langsmith 0.10.7 → 0.10.9
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 +26 -2
- package/dist/_openapi_client/client.d.ts +15 -6
- package/dist/_openapi_client/client.js +27 -3
- package/dist/_openapi_client/internal/detect-platform.cjs +1 -1
- package/dist/_openapi_client/internal/detect-platform.js +1 -1
- package/dist/_openapi_client/resources/annotation-queues/items.cjs +13 -6
- package/dist/_openapi_client/resources/annotation-queues/items.d.ts +33 -8
- package/dist/_openapi_client/resources/annotation-queues/items.js +13 -6
- package/dist/_openapi_client/resources/datasets/datasets.cjs +9 -0
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +4 -0
- package/dist/_openapi_client/resources/datasets/datasets.js +9 -0
- package/dist/_openapi_client/resources/datasets/examples.cjs +26 -0
- package/dist/_openapi_client/resources/datasets/examples.d.ts +23 -0
- package/dist/_openapi_client/resources/datasets/examples.js +22 -0
- package/dist/_openapi_client/resources/fleet/fleet.cjs +54 -0
- package/dist/_openapi_client/resources/fleet/fleet.d.ts +9 -0
- package/dist/_openapi_client/resources/fleet/fleet.js +17 -0
- package/dist/_openapi_client/resources/fleet/threads.cjs +18 -0
- package/dist/_openapi_client/resources/fleet/threads.d.ts +19 -0
- package/dist/_openapi_client/resources/fleet/threads.js +14 -0
- package/dist/_openapi_client/resources/index.cjs +8 -2
- package/dist/_openapi_client/resources/index.d.ts +6 -3
- package/dist/_openapi_client/resources/index.js +5 -2
- package/dist/_openapi_client/resources/info.d.ts +6 -0
- package/dist/_openapi_client/resources/issues.cjs +2 -2
- package/dist/_openapi_client/resources/issues.d.ts +188 -4
- package/dist/_openapi_client/resources/issues.js +2 -2
- package/dist/_openapi_client/resources/online-evaluators.cjs +7 -4
- package/dist/_openapi_client/resources/online-evaluators.d.ts +63 -4
- package/dist/_openapi_client/resources/online-evaluators.js +7 -4
- package/dist/_openapi_client/resources/product-feedback.cjs +33 -0
- package/dist/_openapi_client/resources/product-feedback.d.ts +77 -0
- package/dist/_openapi_client/resources/product-feedback.js +29 -0
- package/dist/_openapi_client/resources/runs/runs.d.ts +26 -16
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +44 -4
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +256 -21
- package/dist/_openapi_client/resources/sandboxes/boxes.js +44 -4
- package/dist/_openapi_client/resources/sandboxes/registries.d.ts +10 -2
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +13 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +169 -14
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +13 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +10 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +37 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +10 -6
- package/dist/_openapi_client/resources/sessions.cjs +23 -0
- package/dist/_openapi_client/resources/sessions.d.ts +732 -0
- package/dist/_openapi_client/resources/sessions.js +19 -0
- package/dist/_openapi_client/resources/threads/index.cjs +9 -0
- package/dist/_openapi_client/resources/threads/index.d.ts +2 -0
- package/dist/_openapi_client/resources/threads/index.js +4 -0
- package/dist/_openapi_client/resources/threads/share.cjs +61 -0
- package/dist/_openapi_client/resources/threads/share.d.ts +71 -0
- package/dist/_openapi_client/resources/threads/share.js +57 -0
- package/dist/_openapi_client/resources/threads/threads.cjs +143 -0
- package/dist/_openapi_client/resources/threads/threads.d.ts +973 -0
- package/dist/_openapi_client/resources/threads/threads.js +106 -0
- package/dist/_openapi_client/resources/threads.cjs +15 -67
- package/dist/_openapi_client/resources/threads.d.ts +1 -709
- package/dist/_openapi_client/resources/threads.js +1 -65
- package/dist/_openapi_client/resources/traces.d.ts +7 -1
- package/dist/_openapi_client/version.cjs +1 -1
- package/dist/_openapi_client/version.js +1 -1
- package/dist/address.cjs +176 -99
- package/dist/address.d.ts +63 -8
- package/dist/address.js +170 -90
- package/dist/anonymizer/index.cjs +1 -1
- package/dist/anonymizer/index.js +1 -1
- package/dist/client.cjs +39 -19
- package/dist/client.d.ts +20 -4
- package/dist/client.js +34 -14
- package/dist/experimental/otel/exporter.cjs +21 -4
- package/dist/experimental/otel/exporter.d.ts +4 -2
- package/dist/experimental/otel/exporter.js +21 -4
- package/dist/index.cjs +5 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/run_trees.cjs +26 -43
- package/dist/run_trees.d.ts +4 -4
- package/dist/run_trees.js +23 -40
- package/dist/sandbox/client.cjs +33 -4
- package/dist/sandbox/client.d.ts +4 -0
- package/dist/sandbox/client.js +34 -5
- package/dist/sandbox/command_handle.cjs +8 -0
- package/dist/sandbox/command_handle.js +8 -0
- package/dist/sandbox/sandbox.cjs +7 -0
- package/dist/sandbox/sandbox.js +7 -0
- package/dist/sandbox/service_url.cjs +9 -1
- package/dist/sandbox/service_url.d.ts +2 -1
- package/dist/sandbox/service_url.js +9 -1
- package/dist/sandbox/tracing.cjs +13 -0
- package/dist/sandbox/tracing.d.ts +1 -0
- package/dist/sandbox/tracing.js +10 -0
- package/dist/schemas.d.ts +3 -3
- package/dist/traceable.cjs +5 -4
- package/dist/traceable.js +4 -3
- package/dist/utils/{agent_addressing.cjs → addressing.cjs} +22 -23
- package/dist/utils/{agent_addressing.d.ts → addressing.d.ts} +5 -8
- package/dist/utils/{agent_addressing.js → addressing.js} +23 -23
- package/dist/utils/env.cjs +6 -4
- package/dist/utils/env.js +6 -4
- package/package.json +1 -1
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { APIResource } from '../../core/resource.js';
|
|
2
2
|
import * as BoxesAPI from './boxes.js';
|
|
3
|
-
import { BoxCreateParams, BoxCreateSnapshotParams, BoxGenerateDownloadURLParams, BoxGenerateServiceURLParams, BoxListParams, BoxUpdateParams, Boxes } from './boxes.js';
|
|
3
|
+
import { BoxCreateParams, BoxCreateSnapshotParams, BoxDeleteServiceURLParams, BoxGenerateDownloadURLParams, BoxGenerateServiceURLParams, BoxListParams, BoxListServiceURLsParams, BoxListServiceURLsResponse, BoxListServiceURLsResponsesItemsCursorGetPagination, BoxUpdateParams, Boxes } from './boxes.js';
|
|
4
4
|
import * as RegistriesAPI from './registries.js';
|
|
5
5
|
import { Registries, RegistryCreateParams, RegistryListParams, RegistryListResponse, RegistryResponse, RegistryUpdateParams } from './registries.js';
|
|
6
6
|
import * as SnapshotsAPI from './snapshots.js';
|
|
7
7
|
import { SnapshotCreateParams, SnapshotListParams, SnapshotRetrieveByNameResponse, Snapshots } from './snapshots.js';
|
|
8
|
-
import { ItemsCursorGetPagination } from '../../core/pagination.js';
|
|
8
|
+
import { ItemsCursorGetPagination, type ItemsCursorGetPaginationParams, PagePromise } from '../../core/pagination.js';
|
|
9
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
9
10
|
export declare class Sandboxes extends APIResource {
|
|
10
11
|
boxes: BoxesAPI.Boxes;
|
|
11
12
|
registries: RegistriesAPI.Registries;
|
|
12
13
|
snapshots: SnapshotsAPI.Snapshots;
|
|
14
|
+
/**
|
|
15
|
+
* Returns priced usage per sandbox or snapshot and UTC hour in the half-open
|
|
16
|
+
* requested interval. LCU uses the recorded compute amount for sandboxes;
|
|
17
|
+
* snapshots have zero LCU. LSU allocates the recorded workspace storage amount
|
|
18
|
+
* proportionally to attributed bytes, including checkpoints on their sandbox and
|
|
19
|
+
* snapshots as separate resources. Resource filters preserve each resource's
|
|
20
|
+
* share. Rate changes do not reprice recorded amounts. An access-filtered page can
|
|
21
|
+
* have no items and a non-null next_cursor; continue until next_cursor is null.
|
|
22
|
+
*/
|
|
23
|
+
listUsageCosts(query: SandboxListUsageCostsParams, options?: RequestOptions): PagePromise<SandboxListUsageCostsResponsesItemsCursorGetPagination, SandboxListUsageCostsResponse>;
|
|
13
24
|
}
|
|
25
|
+
export type SandboxListUsageCostsResponsesItemsCursorGetPagination = ItemsCursorGetPagination<SandboxListUsageCostsResponse>;
|
|
14
26
|
export type SandboxResponsesItemsCursorGetPagination = ItemsCursorGetPagination<SandboxResponse>;
|
|
15
27
|
export type SnapshotResponsesItemsCursorGetPagination = ItemsCursorGetPagination<SnapshotResponse>;
|
|
16
28
|
export interface DownloadURLResponse {
|
|
@@ -43,6 +55,11 @@ export interface SandboxListResponse {
|
|
|
43
55
|
}
|
|
44
56
|
export interface SandboxResponse {
|
|
45
57
|
id?: string;
|
|
58
|
+
/**
|
|
59
|
+
* AccessDelegation is the LangSmith access this sandbox was granted, absent when
|
|
60
|
+
* it has none. It is reported exactly as it was requested at create.
|
|
61
|
+
*/
|
|
62
|
+
access_delegation?: SandboxResponse.AccessDelegation;
|
|
46
63
|
cpu_millicores?: number;
|
|
47
64
|
created_at?: string;
|
|
48
65
|
created_by?: string;
|
|
@@ -58,6 +75,11 @@ export interface SandboxResponse {
|
|
|
58
75
|
name?: string;
|
|
59
76
|
preserve_memory_on_stop?: boolean;
|
|
60
77
|
proxy_config?: SandboxResponse.ProxyConfig;
|
|
78
|
+
/**
|
|
79
|
+
* RunConfig is what the sandbox's commands run with: the user, working directory
|
|
80
|
+
* and base env beneath env_vars.
|
|
81
|
+
*/
|
|
82
|
+
run_config?: SandboxResponse.RunConfig;
|
|
61
83
|
size_class?: string;
|
|
62
84
|
snapshot_id?: string;
|
|
63
85
|
status?: string;
|
|
@@ -68,21 +90,41 @@ export interface SandboxResponse {
|
|
|
68
90
|
vcpus?: number;
|
|
69
91
|
}
|
|
70
92
|
export declare namespace SandboxResponse {
|
|
93
|
+
/**
|
|
94
|
+
* AccessDelegation is the LangSmith access this sandbox was granted, absent when
|
|
95
|
+
* it has none. It is reported exactly as it was requested at create.
|
|
96
|
+
*/
|
|
97
|
+
interface AccessDelegation {
|
|
98
|
+
mode: 'INHERIT' | 'EXPLICIT';
|
|
99
|
+
permissions?: Array<string>;
|
|
100
|
+
}
|
|
71
101
|
interface MountConfig {
|
|
72
102
|
auth?: MountConfig.Auth;
|
|
73
103
|
mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec | MountConfig.SandboxapiContextHubRepoMountSpec>;
|
|
74
104
|
}
|
|
75
105
|
namespace MountConfig {
|
|
76
106
|
interface Auth {
|
|
77
|
-
aws?: Auth.
|
|
107
|
+
aws?: Auth.SandboxesSandboxAwsMountRoleAuthConfig | Auth.SandboxesSandboxAwsMountStaticAuthConfig;
|
|
78
108
|
gcp?: Auth.Gcp;
|
|
79
109
|
}
|
|
80
110
|
namespace Auth {
|
|
81
|
-
interface
|
|
82
|
-
|
|
83
|
-
|
|
111
|
+
interface SandboxesSandboxAwsMountRoleAuthConfig {
|
|
112
|
+
/**
|
|
113
|
+
* IAM role to assume with permissions scoped to the configured S3 mounts. Mutually
|
|
114
|
+
* exclusive with static credentials. Configure only at creation.
|
|
115
|
+
*/
|
|
116
|
+
role_arn: string;
|
|
117
|
+
}
|
|
118
|
+
interface SandboxesSandboxAwsMountStaticAuthConfig {
|
|
119
|
+
access_key_id: SandboxesSandboxAwsMountStaticAuthConfig.AccessKeyID;
|
|
120
|
+
secret_access_key: SandboxesSandboxAwsMountStaticAuthConfig.SecretAccessKey;
|
|
121
|
+
/**
|
|
122
|
+
* IAM role to assume with permissions scoped to the configured S3 mounts. Mutually
|
|
123
|
+
* exclusive with static credentials. Configure only at creation.
|
|
124
|
+
*/
|
|
125
|
+
role_arn?: '';
|
|
84
126
|
}
|
|
85
|
-
namespace
|
|
127
|
+
namespace SandboxesSandboxAwsMountStaticAuthConfig {
|
|
86
128
|
interface AccessKeyID {
|
|
87
129
|
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
88
130
|
is_set?: boolean;
|
|
@@ -317,6 +359,11 @@ export declare namespace SandboxResponse {
|
|
|
317
359
|
interface ProxyConfig {
|
|
318
360
|
access_control?: ProxyConfig.AccessControl;
|
|
319
361
|
callbacks?: Array<ProxyConfig.Callback>;
|
|
362
|
+
/**
|
|
363
|
+
* Description says what this configuration as a whole lets the sandbox reach,
|
|
364
|
+
* complementing the per-rule descriptions. At most 1024 characters.
|
|
365
|
+
*/
|
|
366
|
+
description?: string;
|
|
320
367
|
no_proxy?: Array<string>;
|
|
321
368
|
rules?: Array<ProxyConfig.Rule>;
|
|
322
369
|
}
|
|
@@ -342,7 +389,12 @@ export declare namespace SandboxResponse {
|
|
|
342
389
|
}
|
|
343
390
|
interface Rule {
|
|
344
391
|
name: string;
|
|
345
|
-
aws?: Rule.
|
|
392
|
+
aws?: Rule.SandboxesProxyAwsRoleConfig | Rule.SandboxesProxyAwsStaticConfig;
|
|
393
|
+
/**
|
|
394
|
+
* Description says what this rule lets the sandbox reach, so an agent driving the
|
|
395
|
+
* sandbox can be told its capabilities. At most 1024 characters.
|
|
396
|
+
*/
|
|
397
|
+
description?: string;
|
|
346
398
|
enabled?: boolean;
|
|
347
399
|
/**
|
|
348
400
|
* EnvVars are plaintext env vars set for every command in the sandbox while this
|
|
@@ -357,6 +409,14 @@ export declare namespace SandboxResponse {
|
|
|
357
409
|
};
|
|
358
410
|
gcp?: Rule.Gcp;
|
|
359
411
|
headers?: Array<Rule.Header>;
|
|
412
|
+
/**
|
|
413
|
+
* MatchHeaders restricts a header injection rule to requests carrying every listed
|
|
414
|
+
* header, each written "name: value" with a lowercase name and an exact value.
|
|
415
|
+
* Pair with headers of the same name to swap a placeholder the sandbox sends (e.g.
|
|
416
|
+
* "authorization: Bearer account-b") for a real credential, so one host can serve
|
|
417
|
+
* several accounts. Rules are evaluated in order and the first match wins.
|
|
418
|
+
*/
|
|
419
|
+
match_headers?: Array<string>;
|
|
360
420
|
/**
|
|
361
421
|
* MatchHosts is only accepted for header injection rules. Provider auth rules use
|
|
362
422
|
* built-in host matching.
|
|
@@ -366,11 +426,25 @@ export declare namespace SandboxResponse {
|
|
|
366
426
|
type?: string;
|
|
367
427
|
}
|
|
368
428
|
namespace Rule {
|
|
369
|
-
interface
|
|
370
|
-
|
|
371
|
-
|
|
429
|
+
interface SandboxesProxyAwsRoleConfig {
|
|
430
|
+
/**
|
|
431
|
+
* RoleARN selects automatically renewed IAM-role credentials instead of static
|
|
432
|
+
* keys. Access follows the role's effective AWS permissions, not the sandbox's
|
|
433
|
+
* mount scope. Configure at creation; the role cannot be changed afterward.
|
|
434
|
+
*/
|
|
435
|
+
role_arn: string;
|
|
372
436
|
}
|
|
373
|
-
|
|
437
|
+
interface SandboxesProxyAwsStaticConfig {
|
|
438
|
+
access_key_id: SandboxesProxyAwsStaticConfig.AccessKeyID;
|
|
439
|
+
secret_access_key: SandboxesProxyAwsStaticConfig.SecretAccessKey;
|
|
440
|
+
/**
|
|
441
|
+
* RoleARN selects automatically renewed IAM-role credentials instead of static
|
|
442
|
+
* keys. Access follows the role's effective AWS permissions, not the sandbox's
|
|
443
|
+
* mount scope. Configure at creation; the role cannot be changed afterward.
|
|
444
|
+
*/
|
|
445
|
+
role_arn?: '';
|
|
446
|
+
}
|
|
447
|
+
namespace SandboxesProxyAwsStaticConfig {
|
|
374
448
|
interface AccessKeyID {
|
|
375
449
|
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
376
450
|
is_set?: boolean;
|
|
@@ -401,13 +475,32 @@ export declare namespace SandboxResponse {
|
|
|
401
475
|
}
|
|
402
476
|
}
|
|
403
477
|
}
|
|
478
|
+
/**
|
|
479
|
+
* RunConfig is what the sandbox's commands run with: the user, working directory
|
|
480
|
+
* and base env beneath env_vars.
|
|
481
|
+
*/
|
|
482
|
+
interface RunConfig {
|
|
483
|
+
env_vars?: {
|
|
484
|
+
[key: string]: string;
|
|
485
|
+
};
|
|
486
|
+
user?: string;
|
|
487
|
+
work_dir?: string;
|
|
488
|
+
}
|
|
404
489
|
}
|
|
405
490
|
export interface SandboxStatusResponse {
|
|
406
491
|
status?: string;
|
|
407
492
|
status_message?: string;
|
|
408
493
|
}
|
|
409
494
|
export interface ServiceURLResponse {
|
|
495
|
+
/**
|
|
496
|
+
* Token and ExpiresAt are empty in LangSmith login mode (no token is minted).
|
|
497
|
+
*/
|
|
410
498
|
token?: string;
|
|
499
|
+
/**
|
|
500
|
+
* Access echoes the enabled LangSmith login level ("restricted"/"workspace");
|
|
501
|
+
* omitted in token mode.
|
|
502
|
+
*/
|
|
503
|
+
access?: 'restricted' | 'workspace';
|
|
411
504
|
browser_url?: string;
|
|
412
505
|
expires_at?: string;
|
|
413
506
|
service_url?: string;
|
|
@@ -436,6 +529,11 @@ export interface SnapshotResponse {
|
|
|
436
529
|
id?: string;
|
|
437
530
|
created_at?: string;
|
|
438
531
|
created_by?: string;
|
|
532
|
+
/**
|
|
533
|
+
* Description says what this snapshot's image can do, so a caller can hand it to
|
|
534
|
+
* an agent as a capability summary.
|
|
535
|
+
*/
|
|
536
|
+
description?: string;
|
|
439
537
|
docker_image?: string;
|
|
440
538
|
fs_capacity_bytes?: number;
|
|
441
539
|
fs_used_bytes?: number;
|
|
@@ -451,6 +549,11 @@ export interface SnapshotResponse {
|
|
|
451
549
|
memory_snapshot_size_bytes?: number;
|
|
452
550
|
name?: string;
|
|
453
551
|
registry_id?: string;
|
|
552
|
+
/**
|
|
553
|
+
* RunConfig is what sandboxes from this snapshot boot with. Absent on snapshots
|
|
554
|
+
* built before it was recorded, which run as root with their own env.
|
|
555
|
+
*/
|
|
556
|
+
run_config?: SnapshotResponse.RunConfig;
|
|
454
557
|
source_sandbox_id?: string;
|
|
455
558
|
status?: string;
|
|
456
559
|
status_message?: string;
|
|
@@ -461,9 +564,61 @@ export interface SnapshotResponse {
|
|
|
461
564
|
tags?: Array<string>;
|
|
462
565
|
updated_at?: string;
|
|
463
566
|
}
|
|
567
|
+
export declare namespace SnapshotResponse {
|
|
568
|
+
/**
|
|
569
|
+
* RunConfig is what sandboxes from this snapshot boot with. Absent on snapshots
|
|
570
|
+
* built before it was recorded, which run as root with their own env.
|
|
571
|
+
*/
|
|
572
|
+
interface RunConfig {
|
|
573
|
+
env_vars?: {
|
|
574
|
+
[key: string]: string;
|
|
575
|
+
};
|
|
576
|
+
user?: string;
|
|
577
|
+
work_dir?: string;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
export interface SandboxListUsageCostsResponse {
|
|
581
|
+
/**
|
|
582
|
+
* Recorded compute usage in LangSmith Compute Units (LCU), as a decimal string
|
|
583
|
+
* with up to six fractional digits and trailing zeros omitted. Snapshots return
|
|
584
|
+
* "0".
|
|
585
|
+
*/
|
|
586
|
+
lcu: string;
|
|
587
|
+
/**
|
|
588
|
+
* Allocated storage usage in LangSmith Storage Units (LSU), as a decimal string
|
|
589
|
+
* with up to six fractional digits and trailing zeros omitted.
|
|
590
|
+
*/
|
|
591
|
+
lsu: string;
|
|
592
|
+
period_start: string;
|
|
593
|
+
resource_id: string;
|
|
594
|
+
resource_type: 'SANDBOX' | 'SNAPSHOT';
|
|
595
|
+
}
|
|
596
|
+
export interface SandboxListUsageCostsParams extends ItemsCursorGetPaginationParams {
|
|
597
|
+
/**
|
|
598
|
+
* Exclusive RFC3339 end time; the range must not exceed 31 days
|
|
599
|
+
*/
|
|
600
|
+
end_time: string;
|
|
601
|
+
/**
|
|
602
|
+
* Inclusive RFC3339 start time
|
|
603
|
+
*/
|
|
604
|
+
start_time: string;
|
|
605
|
+
/**
|
|
606
|
+
* HOUR returns hourly buckets. RESOURCE sums each resource over the requested
|
|
607
|
+
* interval and sets period_start to start_time.
|
|
608
|
+
*/
|
|
609
|
+
granularity?: 'HOUR' | 'RESOURCE';
|
|
610
|
+
/**
|
|
611
|
+
* Resource UUID filter; repeat this parameter up to 100 times
|
|
612
|
+
*/
|
|
613
|
+
resource_ids?: Array<string>;
|
|
614
|
+
/**
|
|
615
|
+
* Resource type filter
|
|
616
|
+
*/
|
|
617
|
+
resource_type?: 'SANDBOX' | 'SNAPSHOT';
|
|
618
|
+
}
|
|
464
619
|
export declare namespace Sandboxes {
|
|
465
|
-
export { type DownloadURLResponse as DownloadURLResponse, type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, };
|
|
466
|
-
export { Boxes as Boxes, type BoxCreateParams as BoxCreateParams, type BoxUpdateParams as BoxUpdateParams, type BoxListParams as BoxListParams, type BoxCreateSnapshotParams as BoxCreateSnapshotParams, type BoxGenerateDownloadURLParams as BoxGenerateDownloadURLParams, type BoxGenerateServiceURLParams as BoxGenerateServiceURLParams, };
|
|
620
|
+
export { type DownloadURLResponse as DownloadURLResponse, type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, type SandboxListUsageCostsResponse as SandboxListUsageCostsResponse, type SandboxListUsageCostsResponsesItemsCursorGetPagination as SandboxListUsageCostsResponsesItemsCursorGetPagination, type SandboxListUsageCostsParams as SandboxListUsageCostsParams, };
|
|
621
|
+
export { Boxes as Boxes, type BoxListServiceURLsResponse as BoxListServiceURLsResponse, type BoxListServiceURLsResponsesItemsCursorGetPagination as BoxListServiceURLsResponsesItemsCursorGetPagination, type BoxCreateParams as BoxCreateParams, type BoxUpdateParams as BoxUpdateParams, type BoxListParams as BoxListParams, type BoxCreateSnapshotParams as BoxCreateSnapshotParams, type BoxDeleteServiceURLParams as BoxDeleteServiceURLParams, type BoxGenerateDownloadURLParams as BoxGenerateDownloadURLParams, type BoxGenerateServiceURLParams as BoxGenerateServiceURLParams, type BoxListServiceURLsParams as BoxListServiceURLsParams, };
|
|
467
622
|
export { Registries as Registries, type RegistryListResponse as RegistryListResponse, type RegistryResponse as RegistryResponse, type RegistryCreateParams as RegistryCreateParams, type RegistryUpdateParams as RegistryUpdateParams, type RegistryListParams as RegistryListParams, };
|
|
468
623
|
export { Snapshots as Snapshots, type SnapshotRetrieveByNameResponse as SnapshotRetrieveByNameResponse, type SnapshotCreateParams as SnapshotCreateParams, type SnapshotListParams as SnapshotListParams, };
|
|
469
624
|
}
|
|
@@ -7,6 +7,7 @@ import * as RegistriesAPI from './registries.js';
|
|
|
7
7
|
import { Registries, } from './registries.js';
|
|
8
8
|
import * as SnapshotsAPI from './snapshots.js';
|
|
9
9
|
import { Snapshots, } from './snapshots.js';
|
|
10
|
+
import { ItemsCursorGetPagination, } from '../../core/pagination.js';
|
|
10
11
|
export class Sandboxes extends APIResource {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
@@ -29,6 +30,18 @@ export class Sandboxes extends APIResource {
|
|
|
29
30
|
value: new SnapshotsAPI.Snapshots(this._client)
|
|
30
31
|
});
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns priced usage per sandbox or snapshot and UTC hour in the half-open
|
|
35
|
+
* requested interval. LCU uses the recorded compute amount for sandboxes;
|
|
36
|
+
* snapshots have zero LCU. LSU allocates the recorded workspace storage amount
|
|
37
|
+
* proportionally to attributed bytes, including checkpoints on their sandbox and
|
|
38
|
+
* snapshots as separate resources. Resource filters preserve each resource's
|
|
39
|
+
* share. Rate changes do not reprice recorded amounts. An access-filtered page can
|
|
40
|
+
* have no items and a non-null next_cursor; continue until next_cursor is null.
|
|
41
|
+
*/
|
|
42
|
+
listUsageCosts(query, options) {
|
|
43
|
+
return this._client.getAPIList('/api/v2/sandboxes/usage/costs', (ItemsCursorGetPagination), { query, ...options });
|
|
44
|
+
}
|
|
32
45
|
}
|
|
33
46
|
Sandboxes.Boxes = Boxes;
|
|
34
47
|
Sandboxes.Registries = Registries;
|
|
@@ -9,22 +9,26 @@ const headers_js_1 = require("../../internal/headers.cjs");
|
|
|
9
9
|
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
10
10
|
class Snapshots extends resource_js_1.APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Create a snapshot from a Docker image (async build).
|
|
12
|
+
* Create a snapshot from a Docker image (async build). Names use lowercase
|
|
13
|
+
* registry-style components separated by slashes, up to 255 characters. The
|
|
14
|
+
* system/ namespace is read-only.
|
|
13
15
|
*/
|
|
14
16
|
create(body, options) {
|
|
15
17
|
return this._client.post('/api/v2/sandboxes/snapshots', { body, ...options });
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
|
-
* Get a sandbox snapshot by ID or
|
|
19
|
-
*
|
|
20
|
-
*
|
|
20
|
+
* Get a sandbox snapshot by ID or a registry-style reference, including
|
|
21
|
+
* system/default:latest. URL-encode references containing slashes. A bare name
|
|
22
|
+
* means name:latest, falling back to the newest ready untagged snapshot of that
|
|
23
|
+
* name. To list the tags under a name, use
|
|
24
|
+
* /api/v2/sandboxes/snapshots-by-name/{name}.
|
|
21
25
|
*/
|
|
22
26
|
retrieve(snapshotID, options) {
|
|
23
27
|
return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
|
-
* List
|
|
27
|
-
*
|
|
30
|
+
* List workspace and published system snapshots, with optional filtering, sorting,
|
|
31
|
+
* and pagination. Page with page_size and cursor: replay the response's
|
|
28
32
|
* next_cursor until it comes back null, which is the only signal that no pages
|
|
29
33
|
* remain. Cursors are opaque and only valid on this endpoint; do not parse or
|
|
30
34
|
* construct one.
|
|
@@ -6,18 +6,22 @@ import { type ItemsCursorGetPaginationParams, PagePromise } from '../../core/pag
|
|
|
6
6
|
import { RequestOptions } from '../../internal/request-options.js';
|
|
7
7
|
export declare class Snapshots extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Create a snapshot from a Docker image (async build).
|
|
9
|
+
* Create a snapshot from a Docker image (async build). Names use lowercase
|
|
10
|
+
* registry-style components separated by slashes, up to 255 characters. The
|
|
11
|
+
* system/ namespace is read-only.
|
|
10
12
|
*/
|
|
11
13
|
create(body: SnapshotCreateParams, options?: RequestOptions): APIPromise<SandboxesAPI.SnapshotResponse>;
|
|
12
14
|
/**
|
|
13
|
-
* Get a sandbox snapshot by ID or
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* Get a sandbox snapshot by ID or a registry-style reference, including
|
|
16
|
+
* system/default:latest. URL-encode references containing slashes. A bare name
|
|
17
|
+
* means name:latest, falling back to the newest ready untagged snapshot of that
|
|
18
|
+
* name. To list the tags under a name, use
|
|
19
|
+
* /api/v2/sandboxes/snapshots-by-name/{name}.
|
|
16
20
|
*/
|
|
17
21
|
retrieve(snapshotID: string, options?: RequestOptions): APIPromise<SandboxesAPI.SnapshotResponse>;
|
|
18
22
|
/**
|
|
19
|
-
* List
|
|
20
|
-
*
|
|
23
|
+
* List workspace and published system snapshots, with optional filtering, sorting,
|
|
24
|
+
* and pagination. Page with page_size and cursor: replay the response's
|
|
21
25
|
* next_cursor until it comes back null, which is the only signal that no pages
|
|
22
26
|
* remain. Cursors are opaque and only valid on this endpoint; do not parse or
|
|
23
27
|
* construct one.
|
|
@@ -48,6 +52,11 @@ export interface SnapshotCreateParams {
|
|
|
48
52
|
docker_image: string;
|
|
49
53
|
fs_capacity_bytes: number;
|
|
50
54
|
name: string;
|
|
55
|
+
/**
|
|
56
|
+
* Description says what this snapshot's image can do, so a caller can hand it to
|
|
57
|
+
* an agent as a capability summary. At most 1024 characters.
|
|
58
|
+
*/
|
|
59
|
+
description?: string;
|
|
51
60
|
/**
|
|
52
61
|
* Labels seed the snapshot's labels, overriding any label of the same key derived
|
|
53
62
|
* from the Docker image.
|
|
@@ -56,11 +65,33 @@ export interface SnapshotCreateParams {
|
|
|
56
65
|
[key: string]: string;
|
|
57
66
|
};
|
|
58
67
|
registry_id?: string;
|
|
68
|
+
/**
|
|
69
|
+
* RunConfig overrides the runtime configuration taken from the Docker image. Every
|
|
70
|
+
* sandbox created from the snapshot runs as the image's USER, in its WORKDIR, with
|
|
71
|
+
* its ENV beneath the sandbox's own env_vars; user and work_dir given here replace
|
|
72
|
+
* the image's, and env_vars merge over it.
|
|
73
|
+
*/
|
|
74
|
+
run_config?: SnapshotCreateParams.RunConfig;
|
|
59
75
|
/**
|
|
60
76
|
* mutable Docker-style tag; defaults to "latest"
|
|
61
77
|
*/
|
|
62
78
|
tag?: string;
|
|
63
79
|
}
|
|
80
|
+
export declare namespace SnapshotCreateParams {
|
|
81
|
+
/**
|
|
82
|
+
* RunConfig overrides the runtime configuration taken from the Docker image. Every
|
|
83
|
+
* sandbox created from the snapshot runs as the image's USER, in its WORKDIR, with
|
|
84
|
+
* its ENV beneath the sandbox's own env_vars; user and work_dir given here replace
|
|
85
|
+
* the image's, and env_vars merge over it.
|
|
86
|
+
*/
|
|
87
|
+
interface RunConfig {
|
|
88
|
+
env_vars?: {
|
|
89
|
+
[key: string]: string;
|
|
90
|
+
};
|
|
91
|
+
user?: string;
|
|
92
|
+
work_dir?: string;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
64
95
|
export interface SnapshotListParams extends ItemsCursorGetPaginationParams {
|
|
65
96
|
/**
|
|
66
97
|
* Filter by creator identity. Only 'me' is supported.
|
|
@@ -6,22 +6,26 @@ import { buildHeaders } from '../../internal/headers.js';
|
|
|
6
6
|
import { path } from '../../internal/utils/path.js';
|
|
7
7
|
export class Snapshots extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Create a snapshot from a Docker image (async build).
|
|
9
|
+
* Create a snapshot from a Docker image (async build). Names use lowercase
|
|
10
|
+
* registry-style components separated by slashes, up to 255 characters. The
|
|
11
|
+
* system/ namespace is read-only.
|
|
10
12
|
*/
|
|
11
13
|
create(body, options) {
|
|
12
14
|
return this._client.post('/api/v2/sandboxes/snapshots', { body, ...options });
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
|
-
* Get a sandbox snapshot by ID or
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* Get a sandbox snapshot by ID or a registry-style reference, including
|
|
18
|
+
* system/default:latest. URL-encode references containing slashes. A bare name
|
|
19
|
+
* means name:latest, falling back to the newest ready untagged snapshot of that
|
|
20
|
+
* name. To list the tags under a name, use
|
|
21
|
+
* /api/v2/sandboxes/snapshots-by-name/{name}.
|
|
18
22
|
*/
|
|
19
23
|
retrieve(snapshotID, options) {
|
|
20
24
|
return this._client.get(path `/api/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
|
-
* List
|
|
24
|
-
*
|
|
27
|
+
* List workspace and published system snapshots, with optional filtering, sorting,
|
|
28
|
+
* and pagination. Page with page_size and cursor: replay the response's
|
|
25
29
|
* next_cursor until it comes back null, which is the only signal that no pages
|
|
26
30
|
* remain. Cursors are opaque and only valid on this endpoint; do not parse or
|
|
27
31
|
* construct one.
|
|
@@ -0,0 +1,23 @@
|
|
|
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.Sessions = void 0;
|
|
6
|
+
const resource_js_1 = require("../core/resource.cjs");
|
|
7
|
+
class Sessions extends resource_js_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
10
|
+
* Returns the tracing project (session) an address names. An address is an AGENT
|
|
11
|
+
* (`id` and `environment`), an EXPERIMENT (`id`), or an EVALUATOR (no `id`:
|
|
12
|
+
* evaluator traces share one project per workspace). Send `kind` and `environment`
|
|
13
|
+
* in upper case, as listed; they are matched case-insensitively, while the Agent
|
|
14
|
+
* `id` is case-sensitive. An address that does not exist, or whose project you
|
|
15
|
+
* cannot read, is a 404. Pass the returned `session_id` to any endpoint that takes
|
|
16
|
+
* a project (session) ID. This is not supported on a BYOC data plane yet, and is a
|
|
17
|
+
* 501 there.
|
|
18
|
+
*/
|
|
19
|
+
resolve(query, options) {
|
|
20
|
+
return this._client.get('/api/v1/sessions/resolutions', { query, ...options });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.Sessions = Sessions;
|