modal 0.9.0 → 0.10.1
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/README.md +12 -2
- package/dist/index.cjs +11307 -3685
- package/dist/index.d.cts +1318 -52
- package/dist/index.d.ts +1318 -52
- package/dist/index.js +11409 -3789
- package/package.json +5 -9
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, Status, ClientMiddleware } from 'nice-grpc';
|
|
1
|
+
import { createChannel, Client, Status, ClientMiddleware } from 'nice-grpc';
|
|
2
2
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -28,6 +28,13 @@ interface MessageFns$2<T> {
|
|
|
28
28
|
fromPartial(object: DeepPartial$2<T>): T;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* gRPC protos for Modal's public API surface.
|
|
33
|
+
* Warning: direct usage of Modal's gRPC API is discouraged,
|
|
34
|
+
* and no support or compatibility guarantees are provided.
|
|
35
|
+
* Message fields or entire RPCs may be changed or removed
|
|
36
|
+
* without notice. We recommend using official SDKs instead.
|
|
37
|
+
*/
|
|
31
38
|
declare enum AppDeployVisibility {
|
|
32
39
|
APP_DEPLOY_VISIBILITY_UNSPECIFIED = 0,
|
|
33
40
|
APP_DEPLOY_VISIBILITY_WORKSPACE = 1,
|
|
@@ -79,6 +86,13 @@ declare enum AppStopSource {
|
|
|
79
86
|
APP_STOP_SOURCE_WEB = 3,
|
|
80
87
|
UNRECOGNIZED = -1
|
|
81
88
|
}
|
|
89
|
+
/** CPU architecture an image is built for and must run on. */
|
|
90
|
+
declare enum Arch {
|
|
91
|
+
ARCH_UNSPECIFIED = 0,
|
|
92
|
+
ARCH_X86_64 = 1,
|
|
93
|
+
ARCH_AARCH64 = 2,
|
|
94
|
+
UNRECOGNIZED = -1
|
|
95
|
+
}
|
|
82
96
|
declare enum CertificateStatus {
|
|
83
97
|
CERTIFICATE_STATUS_PENDING = 0,
|
|
84
98
|
CERTIFICATE_STATUS_ISSUED = 1,
|
|
@@ -126,6 +140,15 @@ declare enum DeploymentNamespace {
|
|
|
126
140
|
DEPLOYMENT_NAMESPACE_GLOBAL = 3,
|
|
127
141
|
UNRECOGNIZED = -1
|
|
128
142
|
}
|
|
143
|
+
declare enum DeploymentType {
|
|
144
|
+
DEPLOYMENT_TYPE_UNSPECIFIED = 0,
|
|
145
|
+
DEPLOYMENT_TYPE_STANDARD = 1,
|
|
146
|
+
DEPLOYMENT_TYPE_ROLLBACK = 2,
|
|
147
|
+
DEPLOYMENT_TYPE_ROLLOVER = 3,
|
|
148
|
+
DEPLOYMENT_TYPE_PROMOTION = 4,
|
|
149
|
+
DEPLOYMENT_TYPE_STAGED = 5,
|
|
150
|
+
UNRECOGNIZED = -1
|
|
151
|
+
}
|
|
129
152
|
declare enum EndpointApiSurface {
|
|
130
153
|
ENDPOINT_API_SURFACE_UNSPECIFIED = 0,
|
|
131
154
|
ENDPOINT_API_SURFACE_OPENAI_CHAT_COMPLETIONS = 1,
|
|
@@ -156,16 +179,34 @@ declare enum EndpointProvisioningStatus {
|
|
|
156
179
|
ENDPOINT_PROVISIONING_STATUS_CANCELLED = 6,
|
|
157
180
|
UNRECOGNIZED = -1
|
|
158
181
|
}
|
|
182
|
+
declare enum EndpointServingMode {
|
|
183
|
+
ENDPOINT_SERVING_MODE_UNSPECIFIED = 0,
|
|
184
|
+
ENDPOINT_SERVING_MODE_DEDICATED = 1,
|
|
185
|
+
ENDPOINT_SERVING_MODE_SHARED = 2,
|
|
186
|
+
UNRECOGNIZED = -1
|
|
187
|
+
}
|
|
159
188
|
declare enum EndpointStopSource {
|
|
160
189
|
ENDPOINT_STOP_SOURCE_UNSPECIFIED = 0,
|
|
161
190
|
ENDPOINT_STOP_SOURCE_CLI = 1,
|
|
162
191
|
ENDPOINT_STOP_SOURCE_WEB = 2,
|
|
163
192
|
UNRECOGNIZED = -1
|
|
164
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Partial-update signal for EnvironmentUpdateRequest. Omitted means no-op.
|
|
196
|
+
* INHERIT clears the environment override so the workspace default applies.
|
|
197
|
+
*/
|
|
198
|
+
declare enum EnvironmentBlockUnauthenticatedResources {
|
|
199
|
+
ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_UNSPECIFIED = 0,
|
|
200
|
+
ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_INHERIT = 1,
|
|
201
|
+
ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_BLOCK = 2,
|
|
202
|
+
ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_ALLOW = 3,
|
|
203
|
+
UNRECOGNIZED = -1
|
|
204
|
+
}
|
|
165
205
|
declare enum EnvironmentRole {
|
|
166
206
|
ENVIRONMENT_ROLE_UNSPECIFIED = 0,
|
|
167
207
|
ENVIRONMENT_ROLE_VIEWER = 1,
|
|
168
208
|
ENVIRONMENT_ROLE_CONTRIBUTOR = 2,
|
|
209
|
+
ENVIRONMENT_ROLE_NO_ACCESS = 3,
|
|
169
210
|
UNRECOGNIZED = -1
|
|
170
211
|
}
|
|
171
212
|
/**
|
|
@@ -443,6 +484,11 @@ declare enum GenericResult_GenericStatus {
|
|
|
443
484
|
GENERIC_STATUS_INTERNAL_FAILURE = 6,
|
|
444
485
|
/** GENERIC_STATUS_IDLE_TIMEOUT - Used when sandboxes are terminated due to idle_timeout */
|
|
445
486
|
GENERIC_STATUS_IDLE_TIMEOUT = 7,
|
|
487
|
+
/**
|
|
488
|
+
* GENERIC_STATUS_MEMORY_MANAGER_EVICTION - Used when a task was killed because it was evicted by the memory manager when the worker was
|
|
489
|
+
* under memory pressure.
|
|
490
|
+
*/
|
|
491
|
+
GENERIC_STATUS_MEMORY_MANAGER_EVICTION = 8,
|
|
446
492
|
UNRECOGNIZED = -1
|
|
447
493
|
}
|
|
448
494
|
declare enum NetworkAccess_NetworkAccessType {
|
|
@@ -461,6 +507,12 @@ declare enum PTYInfo_PTYType {
|
|
|
461
507
|
PTY_TYPE_SHELL = 2,
|
|
462
508
|
UNRECOGNIZED = -1
|
|
463
509
|
}
|
|
510
|
+
declare enum SandboxGetExitSnapshotResponse_ErrorCode {
|
|
511
|
+
ERROR_CODE_UNSPECIFIED = 0,
|
|
512
|
+
ERROR_CODE_TIMEOUT = 1,
|
|
513
|
+
ERROR_CODE_INTERNAL = 2,
|
|
514
|
+
UNRECOGNIZED = -1
|
|
515
|
+
}
|
|
464
516
|
declare enum SandboxRestoreRequest_SandboxNameOverrideType {
|
|
465
517
|
SANDBOX_NAME_OVERRIDE_TYPE_UNSPECIFIED = 0,
|
|
466
518
|
SANDBOX_NAME_OVERRIDE_TYPE_NONE = 1,
|
|
@@ -546,6 +598,7 @@ interface AppDeploymentHistory {
|
|
|
546
598
|
rollbackVersion: number;
|
|
547
599
|
rollbackAllowed: boolean;
|
|
548
600
|
commitInfo?: CommitInfo | undefined;
|
|
601
|
+
deploymentType: DeploymentType;
|
|
549
602
|
}
|
|
550
603
|
declare const AppDeploymentHistory: MessageFns$1<AppDeploymentHistory>;
|
|
551
604
|
interface AppDeploymentHistoryRequest {
|
|
@@ -554,6 +607,7 @@ interface AppDeploymentHistoryRequest {
|
|
|
554
607
|
declare const AppDeploymentHistoryRequest: MessageFns$1<AppDeploymentHistoryRequest>;
|
|
555
608
|
interface AppDeploymentHistoryResponse {
|
|
556
609
|
appDeploymentHistories: AppDeploymentHistory[];
|
|
610
|
+
productionAppVersion: number;
|
|
557
611
|
}
|
|
558
612
|
declare const AppDeploymentHistoryResponse: MessageFns$1<AppDeploymentHistoryResponse>;
|
|
559
613
|
interface AppFetchLogsRequest {
|
|
@@ -589,6 +643,14 @@ interface AppGetByDeploymentNameResponse {
|
|
|
589
643
|
lifecycle: AppLifecycle | undefined;
|
|
590
644
|
}
|
|
591
645
|
declare const AppGetByDeploymentNameResponse: MessageFns$1<AppGetByDeploymentNameResponse>;
|
|
646
|
+
interface AppGetInfoRequest {
|
|
647
|
+
appId: string;
|
|
648
|
+
}
|
|
649
|
+
declare const AppGetInfoRequest: MessageFns$1<AppGetInfoRequest>;
|
|
650
|
+
interface AppGetInfoResponse {
|
|
651
|
+
info: AppHandleMetadata | undefined;
|
|
652
|
+
}
|
|
653
|
+
declare const AppGetInfoResponse: MessageFns$1<AppGetInfoResponse>;
|
|
592
654
|
interface AppGetLayoutRequest {
|
|
593
655
|
appId: string;
|
|
594
656
|
}
|
|
@@ -643,6 +705,7 @@ interface AppGetOrCreateRequest {
|
|
|
643
705
|
declare const AppGetOrCreateRequest: MessageFns$1<AppGetOrCreateRequest>;
|
|
644
706
|
interface AppGetOrCreateResponse {
|
|
645
707
|
appId: string;
|
|
708
|
+
handleMetadata: AppHandleMetadata | undefined;
|
|
646
709
|
}
|
|
647
710
|
declare const AppGetOrCreateResponse: MessageFns$1<AppGetOrCreateResponse>;
|
|
648
711
|
interface AppGetTagsRequest {
|
|
@@ -655,6 +718,21 @@ interface AppGetTagsResponse {
|
|
|
655
718
|
};
|
|
656
719
|
}
|
|
657
720
|
declare const AppGetTagsResponse: MessageFns$1<AppGetTagsResponse>;
|
|
721
|
+
interface AppHandleMetadata {
|
|
722
|
+
description: string;
|
|
723
|
+
appId: string;
|
|
724
|
+
environmentName: string;
|
|
725
|
+
lifecycle: AppLifecycle | undefined;
|
|
726
|
+
/** tag -> function id */
|
|
727
|
+
functions: {
|
|
728
|
+
[key: string]: string;
|
|
729
|
+
};
|
|
730
|
+
/** tag -> function id */
|
|
731
|
+
servers: {
|
|
732
|
+
[key: string]: string;
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
declare const AppHandleMetadata: MessageFns$1<AppHandleMetadata>;
|
|
658
736
|
interface AppHeartbeatRequest {
|
|
659
737
|
appId: string;
|
|
660
738
|
}
|
|
@@ -715,6 +793,17 @@ interface AppLookupResponse {
|
|
|
715
793
|
appId: string;
|
|
716
794
|
}
|
|
717
795
|
declare const AppLookupResponse: MessageFns$1<AppLookupResponse>;
|
|
796
|
+
interface AppPromoteRequest {
|
|
797
|
+
appId: string;
|
|
798
|
+
version: number;
|
|
799
|
+
}
|
|
800
|
+
declare const AppPromoteRequest: MessageFns$1<AppPromoteRequest>;
|
|
801
|
+
interface AppPromoteResponse {
|
|
802
|
+
url: string;
|
|
803
|
+
serverWarnings: Warning[];
|
|
804
|
+
deployedAt: number;
|
|
805
|
+
}
|
|
806
|
+
declare const AppPromoteResponse: MessageFns$1<AppPromoteResponse>;
|
|
718
807
|
interface AppPublishRequest {
|
|
719
808
|
appId: string;
|
|
720
809
|
name: string;
|
|
@@ -744,6 +833,12 @@ interface AppPublishRequest {
|
|
|
744
833
|
tags: {
|
|
745
834
|
[key: string]: string;
|
|
746
835
|
};
|
|
836
|
+
/**
|
|
837
|
+
* If true, create a version pinned deployment but don't update the production deployment
|
|
838
|
+
* definition on publish
|
|
839
|
+
*/
|
|
840
|
+
staged: boolean;
|
|
841
|
+
deploymentType: DeploymentType;
|
|
747
842
|
}
|
|
748
843
|
declare const AppPublishRequest: MessageFns$1<AppPublishRequest>;
|
|
749
844
|
interface AppPublishResponse {
|
|
@@ -823,6 +918,7 @@ interface AttemptStartRequest {
|
|
|
823
918
|
functionId: string;
|
|
824
919
|
parentInputId: string;
|
|
825
920
|
input: FunctionPutInputsItem | undefined;
|
|
921
|
+
proxied: boolean;
|
|
826
922
|
}
|
|
827
923
|
declare const AttemptStartRequest: MessageFns$1<AttemptStartRequest>;
|
|
828
924
|
interface AttemptStartResponse {
|
|
@@ -852,10 +948,15 @@ interface AutoscalerSettings {
|
|
|
852
948
|
scaleupWindow?: number | undefined;
|
|
853
949
|
/** Maximum amount of time a container can be idle before being scaled down, in seconds; pka "container_idle_timeout" */
|
|
854
950
|
scaledownWindow?: number | undefined;
|
|
855
|
-
/**
|
|
951
|
+
/**
|
|
952
|
+
* Integer-valued target concurrent requests per replica for Flash autoscaling.
|
|
953
|
+
* Superseded by `target_concurrency_float`, which allows non-integer targets.
|
|
954
|
+
*/
|
|
856
955
|
targetConcurrency?: number | undefined;
|
|
857
956
|
/** Maximum number of containers that can be scaled down per minute for Flash autoscaling. */
|
|
858
957
|
scaledownRateLimit?: number | undefined;
|
|
958
|
+
/** Target concurrent requests per replica for Flash autoscaling; may be fractional. */
|
|
959
|
+
targetConcurrencyFloat?: number | undefined;
|
|
859
960
|
}
|
|
860
961
|
declare const AutoscalerSettings: MessageFns$1<AutoscalerSettings>;
|
|
861
962
|
interface BaseImage {
|
|
@@ -1022,6 +1123,11 @@ interface ClusterStats {
|
|
|
1022
1123
|
startedAt: number;
|
|
1023
1124
|
}
|
|
1024
1125
|
declare const ClusterStats: MessageFns$1<ClusterStats>;
|
|
1126
|
+
interface CommandRouterAccess$1 {
|
|
1127
|
+
jwt: string;
|
|
1128
|
+
url: string;
|
|
1129
|
+
}
|
|
1130
|
+
declare const CommandRouterAccess$1: MessageFns$1<CommandRouterAccess$1>;
|
|
1025
1131
|
interface CommitInfo {
|
|
1026
1132
|
/** Only git is supported for now */
|
|
1027
1133
|
vcs: string;
|
|
@@ -1432,6 +1538,7 @@ interface EndpointCreateRequest {
|
|
|
1432
1538
|
inputModalities: EndpointInputModality[];
|
|
1433
1539
|
environmentName: string;
|
|
1434
1540
|
unauthenticated: boolean;
|
|
1541
|
+
servingMode: EndpointServingMode;
|
|
1435
1542
|
}
|
|
1436
1543
|
declare const EndpointCreateRequest: MessageFns$1<EndpointCreateRequest>;
|
|
1437
1544
|
interface EndpointCreateResponse {
|
|
@@ -1494,6 +1601,8 @@ interface EndpointListItem {
|
|
|
1494
1601
|
createdByAvatarUrl: string;
|
|
1495
1602
|
provisioningStatus: EndpointProvisioningStatus;
|
|
1496
1603
|
status: string;
|
|
1604
|
+
servingMode: EndpointServingMode;
|
|
1605
|
+
unauthenticated: boolean;
|
|
1497
1606
|
}
|
|
1498
1607
|
declare const EndpointListItem: MessageFns$1<EndpointListItem>;
|
|
1499
1608
|
interface EndpointListRequest {
|
|
@@ -1530,8 +1639,8 @@ interface EndpointStopResponse {
|
|
|
1530
1639
|
}
|
|
1531
1640
|
declare const EndpointStopResponse: MessageFns$1<EndpointStopResponse>;
|
|
1532
1641
|
interface EnvironmentBillingSummaryRequest {
|
|
1642
|
+
/** all query intervals are implicitly one month long (to line up with billing cycles) */
|
|
1533
1643
|
startTimestamp: Date | undefined;
|
|
1534
|
-
endTimestamp: Date | undefined;
|
|
1535
1644
|
environmentId: string;
|
|
1536
1645
|
}
|
|
1537
1646
|
declare const EnvironmentBillingSummaryRequest: MessageFns$1<EnvironmentBillingSummaryRequest>;
|
|
@@ -1554,6 +1663,9 @@ interface EnvironmentCreateRequest {
|
|
|
1554
1663
|
isManaged: boolean;
|
|
1555
1664
|
settings: EnvironmentSettings | undefined;
|
|
1556
1665
|
environmentType: EnvironmentType;
|
|
1666
|
+
defaultMemberRole?: EnvironmentRole | undefined;
|
|
1667
|
+
/** String representation; parsed when the enum is unspecified. */
|
|
1668
|
+
defaultMemberRoleStr: string;
|
|
1557
1669
|
}
|
|
1558
1670
|
declare const EnvironmentCreateRequest: MessageFns$1<EnvironmentCreateRequest>;
|
|
1559
1671
|
interface EnvironmentDeleteRequest {
|
|
@@ -1604,6 +1716,33 @@ interface EnvironmentGetOrCreateResponse {
|
|
|
1604
1716
|
metadata: EnvironmentMetadata | undefined;
|
|
1605
1717
|
}
|
|
1606
1718
|
declare const EnvironmentGetOrCreateResponse: MessageFns$1<EnvironmentGetOrCreateResponse>;
|
|
1719
|
+
interface EnvironmentGetRolesRequest {
|
|
1720
|
+
environmentId: string;
|
|
1721
|
+
}
|
|
1722
|
+
declare const EnvironmentGetRolesRequest: MessageFns$1<EnvironmentGetRolesRequest>;
|
|
1723
|
+
interface EnvironmentGetRolesResponse {
|
|
1724
|
+
name: string;
|
|
1725
|
+
createdAt: number;
|
|
1726
|
+
principalRoles: EnvironmentGetRolesResponse_Principal[];
|
|
1727
|
+
defaultMemberRole?: EnvironmentRole | undefined;
|
|
1728
|
+
}
|
|
1729
|
+
declare const EnvironmentGetRolesResponse: MessageFns$1<EnvironmentGetRolesResponse>;
|
|
1730
|
+
interface EnvironmentGetRolesResponse_Principal {
|
|
1731
|
+
userId: string;
|
|
1732
|
+
serviceUserId: string;
|
|
1733
|
+
email: string;
|
|
1734
|
+
avatarUrl: string;
|
|
1735
|
+
userName: string;
|
|
1736
|
+
serviceUserName: string;
|
|
1737
|
+
role: EnvironmentRole;
|
|
1738
|
+
/** String representation for the CLI */
|
|
1739
|
+
roleStr: string;
|
|
1740
|
+
choosableRoles: EnvironmentRole[];
|
|
1741
|
+
memberRole: MemberRole;
|
|
1742
|
+
inheritsDefaultMemberRole?: boolean | undefined;
|
|
1743
|
+
hasRoleAssignment?: boolean | undefined;
|
|
1744
|
+
}
|
|
1745
|
+
declare const EnvironmentGetRolesResponse_Principal: MessageFns$1<EnvironmentGetRolesResponse_Principal>;
|
|
1607
1746
|
interface EnvironmentListItem {
|
|
1608
1747
|
name: string;
|
|
1609
1748
|
webhookSuffix: string;
|
|
@@ -1621,6 +1760,8 @@ interface EnvironmentListItem {
|
|
|
1621
1760
|
currentCycleUsage: number;
|
|
1622
1761
|
spendLimitReached: boolean;
|
|
1623
1762
|
environmentType: EnvironmentType;
|
|
1763
|
+
defaultMemberRole?: EnvironmentRole | undefined;
|
|
1764
|
+
blockUnauthenticatedResources?: boolean | undefined;
|
|
1624
1765
|
}
|
|
1625
1766
|
declare const EnvironmentListItem: MessageFns$1<EnvironmentListItem>;
|
|
1626
1767
|
interface EnvironmentListResponse {
|
|
@@ -1638,6 +1779,8 @@ interface EnvironmentRoleSetRequest {
|
|
|
1638
1779
|
userId: string;
|
|
1639
1780
|
serviceUserId: string;
|
|
1640
1781
|
role: EnvironmentRole;
|
|
1782
|
+
/** String representation from the CLI; parsed when role is unspecified */
|
|
1783
|
+
roleStr: string;
|
|
1641
1784
|
}
|
|
1642
1785
|
declare const EnvironmentRoleSetRequest: MessageFns$1<EnvironmentRoleSetRequest>;
|
|
1643
1786
|
interface EnvironmentSetBudgetRequest {
|
|
@@ -1646,9 +1789,15 @@ interface EnvironmentSetBudgetRequest {
|
|
|
1646
1789
|
clearBudget: boolean;
|
|
1647
1790
|
}
|
|
1648
1791
|
declare const EnvironmentSetBudgetRequest: MessageFns$1<EnvironmentSetBudgetRequest>;
|
|
1792
|
+
interface EnvironmentSetDefaultMemberRoleRequest {
|
|
1793
|
+
environmentId: string;
|
|
1794
|
+
defaultMemberRole: EnvironmentRole;
|
|
1795
|
+
}
|
|
1796
|
+
declare const EnvironmentSetDefaultMemberRoleRequest: MessageFns$1<EnvironmentSetDefaultMemberRoleRequest>;
|
|
1649
1797
|
interface EnvironmentSetManagedRequest {
|
|
1650
1798
|
environmentId: string;
|
|
1651
1799
|
managed: boolean;
|
|
1800
|
+
defaultMemberRole?: EnvironmentRole | undefined;
|
|
1652
1801
|
}
|
|
1653
1802
|
declare const EnvironmentSetManagedRequest: MessageFns$1<EnvironmentSetManagedRequest>;
|
|
1654
1803
|
/**
|
|
@@ -1661,6 +1810,12 @@ interface EnvironmentSettings {
|
|
|
1661
1810
|
webhookSuffix: string;
|
|
1662
1811
|
maxConcurrentGpus?: number | undefined;
|
|
1663
1812
|
maxConcurrentTasks?: number | undefined;
|
|
1813
|
+
/**
|
|
1814
|
+
* When true, new unauthenticated web functions, Servers, tunnels, and
|
|
1815
|
+
* Endpoints in this environment are rejected. Unset inherits the workspace
|
|
1816
|
+
* default.
|
|
1817
|
+
*/
|
|
1818
|
+
blockUnauthenticatedResources?: boolean | undefined;
|
|
1664
1819
|
}
|
|
1665
1820
|
declare const EnvironmentSettings: MessageFns$1<EnvironmentSettings>;
|
|
1666
1821
|
interface EnvironmentUpdateRequest {
|
|
@@ -1669,6 +1824,7 @@ interface EnvironmentUpdateRequest {
|
|
|
1669
1824
|
webSuffix: string | undefined;
|
|
1670
1825
|
maxConcurrentTasks?: number | undefined;
|
|
1671
1826
|
maxConcurrentGpus?: number | undefined;
|
|
1827
|
+
blockUnauthenticatedResources?: EnvironmentBlockUnauthenticatedResources | undefined;
|
|
1672
1828
|
}
|
|
1673
1829
|
declare const EnvironmentUpdateRequest: MessageFns$1<EnvironmentUpdateRequest>;
|
|
1674
1830
|
/** A file entry when listing files in a volume or network file system. */
|
|
@@ -1805,6 +1961,11 @@ interface FunctionMessage {
|
|
|
1805
1961
|
* to schedule in tandem.
|
|
1806
1962
|
*/
|
|
1807
1963
|
ExperimentalGroupSize: number;
|
|
1964
|
+
/**
|
|
1965
|
+
* When set on a "grouped" function, constrains placement across GPU-memory
|
|
1966
|
+
* fabrics: the cluster is placed in co-fabric blocks of this size.
|
|
1967
|
+
*/
|
|
1968
|
+
ExperimentalFabricSize: number;
|
|
1808
1969
|
/** If set, the function will be run in an untrusted environment. */
|
|
1809
1970
|
untrusted: boolean;
|
|
1810
1971
|
/** To be replaced by autoscaler_settings.buffer_containers */
|
|
@@ -1868,6 +2029,8 @@ interface FunctionMessage {
|
|
|
1868
2029
|
isServer: boolean;
|
|
1869
2030
|
/** Where inputs to a function should be routed through. */
|
|
1870
2031
|
routingRegion: string;
|
|
2032
|
+
/** True when the function is a Sessioned Server. Only valid together with is_server. */
|
|
2033
|
+
isSessioned: boolean;
|
|
1871
2034
|
}
|
|
1872
2035
|
declare const FunctionMessage: MessageFns$1<FunctionMessage>;
|
|
1873
2036
|
interface FunctionAsyncInvokeRequest {
|
|
@@ -1926,6 +2089,15 @@ interface FunctionCallGetDataRequest {
|
|
|
1926
2089
|
lastIndex: number;
|
|
1927
2090
|
}
|
|
1928
2091
|
declare const FunctionCallGetDataRequest: MessageFns$1<FunctionCallGetDataRequest>;
|
|
2092
|
+
interface FunctionCallGetInfoRequest {
|
|
2093
|
+
functionId: string;
|
|
2094
|
+
functionCallId: string;
|
|
2095
|
+
}
|
|
2096
|
+
declare const FunctionCallGetInfoRequest: MessageFns$1<FunctionCallGetInfoRequest>;
|
|
2097
|
+
interface FunctionCallGetInfoResponse {
|
|
2098
|
+
info: FunctionCallInfo | undefined;
|
|
2099
|
+
}
|
|
2100
|
+
declare const FunctionCallGetInfoResponse: MessageFns$1<FunctionCallGetInfoResponse>;
|
|
1929
2101
|
interface FunctionCallHandleMetadata {
|
|
1930
2102
|
appId: string;
|
|
1931
2103
|
functionId: string;
|
|
@@ -1982,9 +2154,11 @@ interface FunctionCreateResponse {
|
|
|
1982
2154
|
* @deprecated
|
|
1983
2155
|
*/
|
|
1984
2156
|
DeprecatedWebUrl: string;
|
|
2157
|
+
/** deprecated soon */
|
|
1985
2158
|
function: FunctionMessage | undefined;
|
|
1986
2159
|
handleMetadata: FunctionHandleMetadata | undefined;
|
|
1987
2160
|
serverWarnings: Warning[];
|
|
2161
|
+
functionData: FunctionData | undefined;
|
|
1988
2162
|
}
|
|
1989
2163
|
declare const FunctionCreateResponse: MessageFns$1<FunctionCreateResponse>;
|
|
1990
2164
|
/**
|
|
@@ -2010,6 +2184,7 @@ interface FunctionData {
|
|
|
2010
2184
|
* to schedule in tandem.
|
|
2011
2185
|
*/
|
|
2012
2186
|
ExperimentalGroupSize: number;
|
|
2187
|
+
ExperimentalFabricSize: number;
|
|
2013
2188
|
ExperimentalBufferContainers: number;
|
|
2014
2189
|
ExperimentalCustomScaling: boolean;
|
|
2015
2190
|
ExperimentalEnableGpuSnapshot: boolean;
|
|
@@ -2069,6 +2244,8 @@ interface FunctionData {
|
|
|
2069
2244
|
isServer: boolean;
|
|
2070
2245
|
/** Where inputs to a function should be routed through. */
|
|
2071
2246
|
routingRegion: string;
|
|
2247
|
+
/** True when the function is a Sessioned Server. Only valid together with is_server. */
|
|
2248
|
+
isSessioned: boolean;
|
|
2072
2249
|
}
|
|
2073
2250
|
declare const FunctionData: MessageFns$1<FunctionData>;
|
|
2074
2251
|
interface FunctionData_RankedFunction {
|
|
@@ -2082,6 +2259,15 @@ interface FunctionFinishInputsRequest {
|
|
|
2082
2259
|
numInputs: number;
|
|
2083
2260
|
}
|
|
2084
2261
|
declare const FunctionFinishInputsRequest: MessageFns$1<FunctionFinishInputsRequest>;
|
|
2262
|
+
interface FunctionGetByIdRequest {
|
|
2263
|
+
functionId: string;
|
|
2264
|
+
}
|
|
2265
|
+
declare const FunctionGetByIdRequest: MessageFns$1<FunctionGetByIdRequest>;
|
|
2266
|
+
interface FunctionGetByIdResponse {
|
|
2267
|
+
function: FunctionData | undefined;
|
|
2268
|
+
handleMetadata: FunctionHandleMetadata | undefined;
|
|
2269
|
+
}
|
|
2270
|
+
declare const FunctionGetByIdResponse: MessageFns$1<FunctionGetByIdResponse>;
|
|
2085
2271
|
interface FunctionGetCallGraphRequest {
|
|
2086
2272
|
functionCallId: string;
|
|
2087
2273
|
}
|
|
@@ -2089,6 +2275,8 @@ declare const FunctionGetCallGraphRequest: MessageFns$1<FunctionGetCallGraphRequ
|
|
|
2089
2275
|
interface FunctionGetCallGraphResponse {
|
|
2090
2276
|
inputs: InputCallGraphInfo[];
|
|
2091
2277
|
functionCalls: FunctionCallCallGraphInfo[];
|
|
2278
|
+
/** Set by the server when the graph has more nodes than it will return, so `inputs` is a prefix of the graph. */
|
|
2279
|
+
truncated: boolean;
|
|
2092
2280
|
}
|
|
2093
2281
|
declare const FunctionGetCallGraphResponse: MessageFns$1<FunctionGetCallGraphResponse>;
|
|
2094
2282
|
interface FunctionGetCurrentStatsRequest {
|
|
@@ -2105,6 +2293,14 @@ interface FunctionGetDynamicConcurrencyResponse {
|
|
|
2105
2293
|
concurrency: number;
|
|
2106
2294
|
}
|
|
2107
2295
|
declare const FunctionGetDynamicConcurrencyResponse: MessageFns$1<FunctionGetDynamicConcurrencyResponse>;
|
|
2296
|
+
interface FunctionGetFlashAuthTokenRequest {
|
|
2297
|
+
functionId: string;
|
|
2298
|
+
}
|
|
2299
|
+
declare const FunctionGetFlashAuthTokenRequest: MessageFns$1<FunctionGetFlashAuthTokenRequest>;
|
|
2300
|
+
interface FunctionGetFlashAuthTokenResponse {
|
|
2301
|
+
token: string;
|
|
2302
|
+
}
|
|
2303
|
+
declare const FunctionGetFlashAuthTokenResponse: MessageFns$1<FunctionGetFlashAuthTokenResponse>;
|
|
2108
2304
|
interface FunctionGetInputsItem {
|
|
2109
2305
|
inputId: string;
|
|
2110
2306
|
input: FunctionInput | undefined;
|
|
@@ -2120,8 +2316,6 @@ interface FunctionGetInputsItem {
|
|
|
2120
2316
|
declare const FunctionGetInputsItem: MessageFns$1<FunctionGetInputsItem>;
|
|
2121
2317
|
interface FunctionGetInputsRequest {
|
|
2122
2318
|
functionId: string;
|
|
2123
|
-
maxValues: number;
|
|
2124
|
-
averageCallTime: number;
|
|
2125
2319
|
/** Container aims to fetch multiple inputs at the same time */
|
|
2126
2320
|
inputConcurrency: number;
|
|
2127
2321
|
/** Maximum number of inputs to fetch at once */
|
|
@@ -2185,6 +2379,7 @@ interface FunctionGetResponse {
|
|
|
2185
2379
|
functionId: string;
|
|
2186
2380
|
handleMetadata: FunctionHandleMetadata | undefined;
|
|
2187
2381
|
serverWarnings: Warning[];
|
|
2382
|
+
function: FunctionData | undefined;
|
|
2188
2383
|
}
|
|
2189
2384
|
declare const FunctionGetResponse: MessageFns$1<FunctionGetResponse>;
|
|
2190
2385
|
interface FunctionGetSerializedRequest {
|
|
@@ -2196,6 +2391,58 @@ interface FunctionGetSerializedResponse {
|
|
|
2196
2391
|
classSerialized: Uint8Array;
|
|
2197
2392
|
}
|
|
2198
2393
|
declare const FunctionGetSerializedResponse: MessageFns$1<FunctionGetSerializedResponse>;
|
|
2394
|
+
interface FunctionGetTimeRangeStatsRequest {
|
|
2395
|
+
functionId: string;
|
|
2396
|
+
/** Inclusive. */
|
|
2397
|
+
since: Date | undefined;
|
|
2398
|
+
/** Exclusive. */
|
|
2399
|
+
until: Date | undefined;
|
|
2400
|
+
/** Aggregate the root Function pool and its non-version-pinned variant pools. */
|
|
2401
|
+
rollup: boolean;
|
|
2402
|
+
/** Filter stats for a specific container */
|
|
2403
|
+
containerId?: string | undefined;
|
|
2404
|
+
}
|
|
2405
|
+
declare const FunctionGetTimeRangeStatsRequest: MessageFns$1<FunctionGetTimeRangeStatsRequest>;
|
|
2406
|
+
interface FunctionGetTimeRangeStatsResponse {
|
|
2407
|
+
/** Inclusive. */
|
|
2408
|
+
since: Date | undefined;
|
|
2409
|
+
/** Exclusive. */
|
|
2410
|
+
until: Date | undefined;
|
|
2411
|
+
/** Counts of inputs that finish in the requested time range. */
|
|
2412
|
+
inputSuccessCount: number;
|
|
2413
|
+
inputFailureCount: number;
|
|
2414
|
+
inputTimeoutCount: number;
|
|
2415
|
+
/** Number of inputs assigned but not finished at the exclusive end of the time range. */
|
|
2416
|
+
inputRunningAtEndCount: number;
|
|
2417
|
+
/**
|
|
2418
|
+
* Metrics include execution_time, end_to_end_latency, subject to change
|
|
2419
|
+
* as requirements evolve
|
|
2420
|
+
*/
|
|
2421
|
+
inputPercentileStats: {
|
|
2422
|
+
[key: string]: StatsPercentileDistribution;
|
|
2423
|
+
};
|
|
2424
|
+
/**
|
|
2425
|
+
* Container lifecycle counts. Started and errored containers are counted when
|
|
2426
|
+
* the corresponding event occurs in the requested time range. Creating containers
|
|
2427
|
+
* were enqueued but had not started or finished at the exclusive end of the range.
|
|
2428
|
+
*/
|
|
2429
|
+
containerStartedCount: number;
|
|
2430
|
+
containerErrorCount: number;
|
|
2431
|
+
containerCreatingAtEndCount: number;
|
|
2432
|
+
/**
|
|
2433
|
+
* Metrics include cpu_usage, memory_usage, gpu_utilization subject to change
|
|
2434
|
+
* as requirements evolve
|
|
2435
|
+
*/
|
|
2436
|
+
containerPercentileStats: {
|
|
2437
|
+
[key: string]: StatsPercentileDistribution;
|
|
2438
|
+
};
|
|
2439
|
+
/**
|
|
2440
|
+
* Number of direct non-version-pinned variants included in the roll-up.
|
|
2441
|
+
* Zero when roll-up is disabled or the base Function has no variants.
|
|
2442
|
+
*/
|
|
2443
|
+
variantCount: number;
|
|
2444
|
+
}
|
|
2445
|
+
declare const FunctionGetTimeRangeStatsResponse: MessageFns$1<FunctionGetTimeRangeStatsResponse>;
|
|
2199
2446
|
/**
|
|
2200
2447
|
* contains all the info about a function that is needed to trigger the right
|
|
2201
2448
|
* behaviour when using a FunctionHandler. Notably excludes things purely
|
|
@@ -2222,6 +2469,7 @@ interface FunctionHandleMetadata {
|
|
|
2222
2469
|
inputPlaneRegion?: string | undefined;
|
|
2223
2470
|
/** Use optional to ensure unset values default to None instead of 0 */
|
|
2224
2471
|
maxObjectSizeBytes?: number | undefined;
|
|
2472
|
+
maxAsyncObjectSizeBytes?: number | undefined;
|
|
2225
2473
|
/** (Optional) urls for flash services */
|
|
2226
2474
|
ExperimentalFlashUrls: string[];
|
|
2227
2475
|
supportedInputFormats: DataFormat[];
|
|
@@ -2398,6 +2646,7 @@ interface FunctionUpdateSchedulingParamsRequest {
|
|
|
2398
2646
|
}
|
|
2399
2647
|
declare const FunctionUpdateSchedulingParamsRequest: MessageFns$1<FunctionUpdateSchedulingParamsRequest>;
|
|
2400
2648
|
interface FunctionUpdateSchedulingParamsResponse {
|
|
2649
|
+
currentSettings: AutoscalerSettings | undefined;
|
|
2401
2650
|
}
|
|
2402
2651
|
declare const FunctionUpdateSchedulingParamsResponse: MessageFns$1<FunctionUpdateSchedulingParamsResponse>;
|
|
2403
2652
|
interface GPUConfig {
|
|
@@ -2473,8 +2722,29 @@ interface Image$1 {
|
|
|
2473
2722
|
};
|
|
2474
2723
|
/** Volume mount for RUN commands */
|
|
2475
2724
|
volumeMounts: VolumeMount[];
|
|
2725
|
+
/**
|
|
2726
|
+
* CPU architecture the image is built for. Images with an unspecified
|
|
2727
|
+
* arch predate this field and are treated as x86_64.
|
|
2728
|
+
*/
|
|
2729
|
+
arch: Arch;
|
|
2476
2730
|
}
|
|
2477
2731
|
declare const Image$1: MessageFns$1<Image$1>;
|
|
2732
|
+
interface ImageBuildChainGetRequest {
|
|
2733
|
+
imageId: string;
|
|
2734
|
+
}
|
|
2735
|
+
declare const ImageBuildChainGetRequest: MessageFns$1<ImageBuildChainGetRequest>;
|
|
2736
|
+
interface ImageBuildChainGetResponse {
|
|
2737
|
+
buildSteps: ImageBuildStep[];
|
|
2738
|
+
}
|
|
2739
|
+
declare const ImageBuildChainGetResponse: MessageFns$1<ImageBuildChainGetResponse>;
|
|
2740
|
+
interface ImageBuildStep {
|
|
2741
|
+
imageId: string;
|
|
2742
|
+
startedAt: Date | undefined;
|
|
2743
|
+
finishedAt: Date | undefined;
|
|
2744
|
+
builderAppId: string;
|
|
2745
|
+
builderTaskId: string;
|
|
2746
|
+
}
|
|
2747
|
+
declare const ImageBuildStep: MessageFns$1<ImageBuildStep>;
|
|
2478
2748
|
interface ImageContextFile {
|
|
2479
2749
|
filename: string;
|
|
2480
2750
|
data: Uint8Array;
|
|
@@ -2494,8 +2764,15 @@ interface ImageFromIdResponse {
|
|
|
2494
2764
|
}
|
|
2495
2765
|
declare const ImageFromIdResponse: MessageFns$1<ImageFromIdResponse>;
|
|
2496
2766
|
interface ImageGetByTagRequest {
|
|
2497
|
-
/**
|
|
2767
|
+
/**
|
|
2768
|
+
* Named image reference: "[[workspace/]environment/]name[:tag]".
|
|
2769
|
+
* The tag suffix defaults to "latest" when omitted.
|
|
2770
|
+
*/
|
|
2498
2771
|
tag: string;
|
|
2772
|
+
/**
|
|
2773
|
+
* New clients should send environment name as a /-separated prefix of the `tag` field.
|
|
2774
|
+
* environment_name only accepted when tag has no environment or workspace prefix.
|
|
2775
|
+
*/
|
|
2499
2776
|
environmentName: string;
|
|
2500
2777
|
}
|
|
2501
2778
|
declare const ImageGetByTagRequest: MessageFns$1<ImageGetByTagRequest>;
|
|
@@ -2592,8 +2869,15 @@ interface ImageMetadata {
|
|
|
2592
2869
|
declare const ImageMetadata: MessageFns$1<ImageMetadata>;
|
|
2593
2870
|
interface ImagePublishRequest {
|
|
2594
2871
|
imageId: string;
|
|
2595
|
-
/**
|
|
2872
|
+
/**
|
|
2873
|
+
* Named image reference: "[[workspace/]environment/]name[:tag]".
|
|
2874
|
+
* The tag suffix defaults to "latest" when omitted.
|
|
2875
|
+
*/
|
|
2596
2876
|
tag: string;
|
|
2877
|
+
/**
|
|
2878
|
+
* New clients should send environment name as a /-separated prefix of the `tag` field.
|
|
2879
|
+
* environment_name only accepted when tag has no environment or workspace prefix.
|
|
2880
|
+
*/
|
|
2597
2881
|
environmentName: string;
|
|
2598
2882
|
/** Explicit opt-in required when publishing to a public environment. */
|
|
2599
2883
|
allowPublic: boolean;
|
|
@@ -2617,8 +2901,15 @@ interface ImageTagRevisionsItem {
|
|
|
2617
2901
|
}
|
|
2618
2902
|
declare const ImageTagRevisionsItem: MessageFns$1<ImageTagRevisionsItem>;
|
|
2619
2903
|
interface ImageTagRevisionsRequest {
|
|
2620
|
-
/**
|
|
2904
|
+
/**
|
|
2905
|
+
* Named image reference: "[[workspace/]environment/]name[:tag]".
|
|
2906
|
+
* The tag suffix defaults to "latest" when omitted.
|
|
2907
|
+
*/
|
|
2621
2908
|
tag: string;
|
|
2909
|
+
/**
|
|
2910
|
+
* New clients should send environment name as a /-separated prefix of the `tag` field.
|
|
2911
|
+
* environment_name only accepted when tag has no environment or workspace prefix.
|
|
2912
|
+
*/
|
|
2622
2913
|
environmentName: string;
|
|
2623
2914
|
/** Defaults to 100. Values above 100 are rejected by the server. */
|
|
2624
2915
|
maxObjects: number;
|
|
@@ -2695,6 +2986,7 @@ interface MapStartOrContinueRequest {
|
|
|
2695
2986
|
functionCallId?: string | undefined;
|
|
2696
2987
|
mapToken?: string | undefined;
|
|
2697
2988
|
items: MapStartOrContinueItem[];
|
|
2989
|
+
proxied: boolean;
|
|
2698
2990
|
}
|
|
2699
2991
|
declare const MapStartOrContinueRequest: MessageFns$1<MapStartOrContinueRequest>;
|
|
2700
2992
|
interface MapStartOrContinueResponse {
|
|
@@ -2878,6 +3170,35 @@ interface ObjectDependency {
|
|
|
2878
3170
|
objectId: string;
|
|
2879
3171
|
}
|
|
2880
3172
|
declare const ObjectDependency: MessageFns$1<ObjectDependency>;
|
|
3173
|
+
/** Policy for outbound traffic from a sandbox. */
|
|
3174
|
+
interface OutboundPolicy {
|
|
3175
|
+
/** Replace headers in outbound HTTPS requests, potentially with secret values. */
|
|
3176
|
+
headerReplacements: OutboundPolicy_HeaderReplacement[];
|
|
3177
|
+
}
|
|
3178
|
+
declare const OutboundPolicy: MessageFns$1<OutboundPolicy>;
|
|
3179
|
+
interface OutboundPolicy_HeaderReplacement {
|
|
3180
|
+
/**
|
|
3181
|
+
* Domain that the header replacement is scoped to. Supports wildcards in
|
|
3182
|
+
* subdomain positions.
|
|
3183
|
+
*/
|
|
3184
|
+
domain: string;
|
|
3185
|
+
/** Header name to replace. */
|
|
3186
|
+
headerName: string;
|
|
3187
|
+
/**
|
|
3188
|
+
* Header value to replace.
|
|
3189
|
+
*
|
|
3190
|
+
* Supports templating with keys in a given secret_id: a $-prefixed key
|
|
3191
|
+
* name in the secret will be replaced with the secret value. Literal $
|
|
3192
|
+
* characters can be represented by two dollars: `$$`.
|
|
3193
|
+
*/
|
|
3194
|
+
headerValue: string;
|
|
3195
|
+
/**
|
|
3196
|
+
* Reference to a secret to use in the header_value template. Can be empty
|
|
3197
|
+
* if no secret value is used in header_value.
|
|
3198
|
+
*/
|
|
3199
|
+
secretId: string;
|
|
3200
|
+
}
|
|
3201
|
+
declare const OutboundPolicy_HeaderReplacement: MessageFns$1<OutboundPolicy_HeaderReplacement>;
|
|
2881
3202
|
interface PTYInfo {
|
|
2882
3203
|
/** Soon deprecated */
|
|
2883
3204
|
enabled: boolean;
|
|
@@ -3249,8 +3570,30 @@ interface Sandbox$1 {
|
|
|
3249
3570
|
*/
|
|
3250
3571
|
inboundCidrAllowlist: string[];
|
|
3251
3572
|
environmentVariables: StringMap | undefined;
|
|
3573
|
+
outboundPolicy?: OutboundPolicy | undefined;
|
|
3252
3574
|
}
|
|
3253
3575
|
declare const Sandbox$1: MessageFns$1<Sandbox$1>;
|
|
3576
|
+
interface SandboxContainerCreateV2Request {
|
|
3577
|
+
/** Sandbox the container joins; it runs inside that sandbox's task. */
|
|
3578
|
+
sandboxId: string;
|
|
3579
|
+
/** Logical container name, unique within the sandbox. */
|
|
3580
|
+
containerName: string;
|
|
3581
|
+
/**
|
|
3582
|
+
* Same definition type as SandboxCreateV2. Fields a container cannot honor
|
|
3583
|
+
* (resources, timeouts, scheduling constraints, ...) are rejected.
|
|
3584
|
+
*/
|
|
3585
|
+
definition: Sandbox$1 | undefined;
|
|
3586
|
+
ephemeralSecrets: StringMap | undefined;
|
|
3587
|
+
cloudBucketMountCredentials: {
|
|
3588
|
+
[key: string]: StringMap;
|
|
3589
|
+
};
|
|
3590
|
+
}
|
|
3591
|
+
declare const SandboxContainerCreateV2Request: MessageFns$1<SandboxContainerCreateV2Request>;
|
|
3592
|
+
interface SandboxContainerCreateV2Response {
|
|
3593
|
+
containerId: string;
|
|
3594
|
+
containerName: string;
|
|
3595
|
+
}
|
|
3596
|
+
declare const SandboxContainerCreateV2Response: MessageFns$1<SandboxContainerCreateV2Response>;
|
|
3254
3597
|
interface SandboxCreateConnectTokenRequest {
|
|
3255
3598
|
sandboxId: string;
|
|
3256
3599
|
userMetadata: string;
|
|
@@ -3273,6 +3616,7 @@ interface SandboxCreateRequest {
|
|
|
3273
3616
|
declare const SandboxCreateRequest: MessageFns$1<SandboxCreateRequest>;
|
|
3274
3617
|
interface SandboxCreateResponse {
|
|
3275
3618
|
sandboxId: string;
|
|
3619
|
+
metadata: SandboxHandleMetadata | undefined;
|
|
3276
3620
|
}
|
|
3277
3621
|
declare const SandboxCreateResponse: MessageFns$1<SandboxCreateResponse>;
|
|
3278
3622
|
interface SandboxCreateV2Request {
|
|
@@ -3280,12 +3624,17 @@ interface SandboxCreateV2Request {
|
|
|
3280
3624
|
definition: Sandbox$1 | undefined;
|
|
3281
3625
|
ephemeralSecrets: StringMap | undefined;
|
|
3282
3626
|
tags: SandboxTag[];
|
|
3627
|
+
cloudBucketMountCredentials: {
|
|
3628
|
+
[key: string]: StringMap;
|
|
3629
|
+
};
|
|
3283
3630
|
}
|
|
3284
3631
|
declare const SandboxCreateV2Request: MessageFns$1<SandboxCreateV2Request>;
|
|
3285
3632
|
interface SandboxCreateV2Response {
|
|
3286
3633
|
sandboxId: string;
|
|
3287
3634
|
tunnels: TunnelData[];
|
|
3288
3635
|
taskId: string;
|
|
3636
|
+
metadata: SandboxHandleMetadata | undefined;
|
|
3637
|
+
commandRouterAccess: CommandRouterAccess$1 | undefined;
|
|
3289
3638
|
}
|
|
3290
3639
|
declare const SandboxCreateV2Response: MessageFns$1<SandboxCreateV2Response>;
|
|
3291
3640
|
/**
|
|
@@ -3308,6 +3657,29 @@ interface SandboxGetCommandRouterAccessResponse {
|
|
|
3308
3657
|
workerIpv4Address: string;
|
|
3309
3658
|
}
|
|
3310
3659
|
declare const SandboxGetCommandRouterAccessResponse: MessageFns$1<SandboxGetCommandRouterAccessResponse>;
|
|
3660
|
+
interface SandboxGetExitSnapshotRequest {
|
|
3661
|
+
sandboxId: string;
|
|
3662
|
+
timeout: number;
|
|
3663
|
+
}
|
|
3664
|
+
declare const SandboxGetExitSnapshotRequest: MessageFns$1<SandboxGetExitSnapshotRequest>;
|
|
3665
|
+
interface SandboxGetExitSnapshotResponse {
|
|
3666
|
+
success?: SandboxGetExitSnapshotResponse_Success | undefined;
|
|
3667
|
+
pending?: SandboxGetExitSnapshotResponse_Pending | undefined;
|
|
3668
|
+
error?: SandboxGetExitSnapshotResponse_Error | undefined;
|
|
3669
|
+
}
|
|
3670
|
+
declare const SandboxGetExitSnapshotResponse: MessageFns$1<SandboxGetExitSnapshotResponse>;
|
|
3671
|
+
interface SandboxGetExitSnapshotResponse_Success {
|
|
3672
|
+
imageId: string;
|
|
3673
|
+
}
|
|
3674
|
+
declare const SandboxGetExitSnapshotResponse_Success: MessageFns$1<SandboxGetExitSnapshotResponse_Success>;
|
|
3675
|
+
interface SandboxGetExitSnapshotResponse_Pending {
|
|
3676
|
+
}
|
|
3677
|
+
declare const SandboxGetExitSnapshotResponse_Pending: MessageFns$1<SandboxGetExitSnapshotResponse_Pending>;
|
|
3678
|
+
interface SandboxGetExitSnapshotResponse_Error {
|
|
3679
|
+
errorCode: SandboxGetExitSnapshotResponse_ErrorCode;
|
|
3680
|
+
message: string;
|
|
3681
|
+
}
|
|
3682
|
+
declare const SandboxGetExitSnapshotResponse_Error: MessageFns$1<SandboxGetExitSnapshotResponse_Error>;
|
|
3311
3683
|
interface SandboxGetFromNameRequest {
|
|
3312
3684
|
sandboxName: string;
|
|
3313
3685
|
environmentName: string;
|
|
@@ -3316,6 +3688,7 @@ interface SandboxGetFromNameRequest {
|
|
|
3316
3688
|
declare const SandboxGetFromNameRequest: MessageFns$1<SandboxGetFromNameRequest>;
|
|
3317
3689
|
interface SandboxGetFromNameResponse {
|
|
3318
3690
|
sandboxId: string;
|
|
3691
|
+
metadata: SandboxHandleMetadata | undefined;
|
|
3319
3692
|
}
|
|
3320
3693
|
declare const SandboxGetFromNameResponse: MessageFns$1<SandboxGetFromNameResponse>;
|
|
3321
3694
|
interface SandboxGetLogsRequest {
|
|
@@ -3363,6 +3736,7 @@ interface SandboxGetTunnelsResponse {
|
|
|
3363
3736
|
declare const SandboxGetTunnelsResponse: MessageFns$1<SandboxGetTunnelsResponse>;
|
|
3364
3737
|
interface SandboxHandleMetadata {
|
|
3365
3738
|
result: GenericResult | undefined;
|
|
3739
|
+
appId: string;
|
|
3366
3740
|
}
|
|
3367
3741
|
declare const SandboxHandleMetadata: MessageFns$1<SandboxHandleMetadata>;
|
|
3368
3742
|
interface SandboxInfo {
|
|
@@ -3381,6 +3755,7 @@ interface SandboxInfo {
|
|
|
3381
3755
|
readyAt?: number | undefined;
|
|
3382
3756
|
readinessProbe?: Probe$1 | undefined;
|
|
3383
3757
|
tunnels: TunnelData[];
|
|
3758
|
+
metadata: SandboxHandleMetadata | undefined;
|
|
3384
3759
|
}
|
|
3385
3760
|
declare const SandboxInfo: MessageFns$1<SandboxInfo>;
|
|
3386
3761
|
interface SandboxListRequest {
|
|
@@ -3409,6 +3784,30 @@ interface SandboxRestoreResponse {
|
|
|
3409
3784
|
sandboxId: string;
|
|
3410
3785
|
}
|
|
3411
3786
|
declare const SandboxRestoreResponse: MessageFns$1<SandboxRestoreResponse>;
|
|
3787
|
+
interface SandboxRestoreV2Request {
|
|
3788
|
+
snapshotId: string;
|
|
3789
|
+
sandboxNameOverride: string;
|
|
3790
|
+
sandboxNameOverrideType: SandboxRestoreRequest_SandboxNameOverrideType;
|
|
3791
|
+
/** For internal debugging use only. */
|
|
3792
|
+
workerId: string;
|
|
3793
|
+
}
|
|
3794
|
+
declare const SandboxRestoreV2Request: MessageFns$1<SandboxRestoreV2Request>;
|
|
3795
|
+
interface SandboxRestoreV2Response {
|
|
3796
|
+
sandboxId: string;
|
|
3797
|
+
tunnels: TunnelData[];
|
|
3798
|
+
taskId: string;
|
|
3799
|
+
metadata: SandboxHandleMetadata | undefined;
|
|
3800
|
+
commandRouterAccess: CommandRouterAccess$1 | undefined;
|
|
3801
|
+
}
|
|
3802
|
+
declare const SandboxRestoreV2Response: MessageFns$1<SandboxRestoreV2Response>;
|
|
3803
|
+
interface SandboxSetNameRequest {
|
|
3804
|
+
sandboxId: string;
|
|
3805
|
+
name: string;
|
|
3806
|
+
}
|
|
3807
|
+
declare const SandboxSetNameRequest: MessageFns$1<SandboxSetNameRequest>;
|
|
3808
|
+
interface SandboxSetNameResponse {
|
|
3809
|
+
}
|
|
3810
|
+
declare const SandboxSetNameResponse: MessageFns$1<SandboxSetNameResponse>;
|
|
3412
3811
|
interface SandboxSnapshotFsAsyncGetRequest {
|
|
3413
3812
|
imageId: string;
|
|
3414
3813
|
timeout: number;
|
|
@@ -3440,8 +3839,13 @@ interface SandboxSnapshotGetRequest {
|
|
|
3440
3839
|
declare const SandboxSnapshotGetRequest: MessageFns$1<SandboxSnapshotGetRequest>;
|
|
3441
3840
|
interface SandboxSnapshotGetResponse {
|
|
3442
3841
|
snapshotId: string;
|
|
3842
|
+
handleMetadata: SandboxSnapshotHandleMetadata | undefined;
|
|
3443
3843
|
}
|
|
3444
3844
|
declare const SandboxSnapshotGetResponse: MessageFns$1<SandboxSnapshotGetResponse>;
|
|
3845
|
+
interface SandboxSnapshotHandleMetadata {
|
|
3846
|
+
isV2: boolean;
|
|
3847
|
+
}
|
|
3848
|
+
declare const SandboxSnapshotHandleMetadata: MessageFns$1<SandboxSnapshotHandleMetadata>;
|
|
3445
3849
|
interface SandboxSnapshotRequest {
|
|
3446
3850
|
sandboxId: string;
|
|
3447
3851
|
}
|
|
@@ -3503,6 +3907,7 @@ interface SandboxWaitRequest {
|
|
|
3503
3907
|
declare const SandboxWaitRequest: MessageFns$1<SandboxWaitRequest>;
|
|
3504
3908
|
interface SandboxWaitResponse {
|
|
3505
3909
|
result: GenericResult | undefined;
|
|
3910
|
+
metadata: SandboxHandleMetadata | undefined;
|
|
3506
3911
|
}
|
|
3507
3912
|
declare const SandboxWaitResponse: MessageFns$1<SandboxWaitResponse>;
|
|
3508
3913
|
interface SandboxWaitUntilReadyRequest {
|
|
@@ -3708,6 +4113,18 @@ interface SharedVolumeRemoveFileRequest {
|
|
|
3708
4113
|
recursive: boolean;
|
|
3709
4114
|
}
|
|
3710
4115
|
declare const SharedVolumeRemoveFileRequest: MessageFns$1<SharedVolumeRemoveFileRequest>;
|
|
4116
|
+
interface StatsPercentile {
|
|
4117
|
+
/** The percentile expressed in basis points: 5000 is p50 and 9990 is p99.9. */
|
|
4118
|
+
percentileBasisPoints: number;
|
|
4119
|
+
value: number;
|
|
4120
|
+
}
|
|
4121
|
+
declare const StatsPercentile: MessageFns$1<StatsPercentile>;
|
|
4122
|
+
interface StatsPercentileDistribution {
|
|
4123
|
+
/** Unit identifier such as "seconds", "cores", "gibibytes", or "fraction". */
|
|
4124
|
+
unit: string;
|
|
4125
|
+
percentiles: StatsPercentile[];
|
|
4126
|
+
}
|
|
4127
|
+
declare const StatsPercentileDistribution: MessageFns$1<StatsPercentileDistribution>;
|
|
3711
4128
|
interface StringMap {
|
|
3712
4129
|
contents: {
|
|
3713
4130
|
[key: string]: string;
|
|
@@ -3723,7 +4140,6 @@ interface TaskClusterHelloRequest {
|
|
|
3723
4140
|
taskId: string;
|
|
3724
4141
|
containerIp: string;
|
|
3725
4142
|
imexHostIp: string;
|
|
3726
|
-
imexFabricId: string;
|
|
3727
4143
|
}
|
|
3728
4144
|
declare const TaskClusterHelloRequest: MessageFns$1<TaskClusterHelloRequest>;
|
|
3729
4145
|
interface TaskClusterHelloResponse {
|
|
@@ -3737,6 +4153,8 @@ interface TaskClusterHelloResponse {
|
|
|
3737
4153
|
* and otherwise absent on non-NVL72 systems
|
|
3738
4154
|
*/
|
|
3739
4155
|
imexPeerIps: string[];
|
|
4156
|
+
/** GPU-memory-fabric labels, ordered by cluster rank */
|
|
4157
|
+
fabricIds: string[];
|
|
3740
4158
|
}
|
|
3741
4159
|
declare const TaskClusterHelloResponse: MessageFns$1<TaskClusterHelloResponse>;
|
|
3742
4160
|
interface TaskCurrentInputsResponse {
|
|
@@ -3796,7 +4214,7 @@ interface TaskLogs {
|
|
|
3796
4214
|
taskProgress: TaskProgress | undefined;
|
|
3797
4215
|
functionCallId: string;
|
|
3798
4216
|
inputId: string;
|
|
3799
|
-
timestampNs:
|
|
4217
|
+
timestampNs: string;
|
|
3800
4218
|
containerId: string;
|
|
3801
4219
|
containerName: string;
|
|
3802
4220
|
}
|
|
@@ -3944,6 +4362,12 @@ interface UploadUrlList {
|
|
|
3944
4362
|
items: string[];
|
|
3945
4363
|
}
|
|
3946
4364
|
declare const UploadUrlList: MessageFns$1<UploadUrlList>;
|
|
4365
|
+
interface UserGroupEnvironmentSetRequest {
|
|
4366
|
+
environmentId: string;
|
|
4367
|
+
userGroupId: string;
|
|
4368
|
+
role: EnvironmentRole;
|
|
4369
|
+
}
|
|
4370
|
+
declare const UserGroupEnvironmentSetRequest: MessageFns$1<UserGroupEnvironmentSetRequest>;
|
|
3947
4371
|
interface UserIdentity {
|
|
3948
4372
|
userId: string;
|
|
3949
4373
|
username: string;
|
|
@@ -4008,6 +4432,11 @@ interface VolumeGetFile2Request {
|
|
|
4008
4432
|
start: number;
|
|
4009
4433
|
/** 0 is interpreted as 'read to end' */
|
|
4010
4434
|
len: number;
|
|
4435
|
+
/**
|
|
4436
|
+
* The client extends each block body it downloads with zero bytes up to the
|
|
4437
|
+
* block's expected length, so responses may omit trailing zero bytes.
|
|
4438
|
+
*/
|
|
4439
|
+
clientPadsBlocks: boolean;
|
|
4011
4440
|
}
|
|
4012
4441
|
declare const VolumeGetFile2Request: MessageFns$1<VolumeGetFile2Request>;
|
|
4013
4442
|
interface VolumeGetFile2Response {
|
|
@@ -4286,6 +4715,23 @@ interface WebhookTokenListResponse {
|
|
|
4286
4715
|
tokens: WebhookToken[];
|
|
4287
4716
|
}
|
|
4288
4717
|
declare const WebhookTokenListResponse: MessageFns$1<WebhookTokenListResponse>;
|
|
4718
|
+
interface WorkspaceBillingRatesRequest {
|
|
4719
|
+
}
|
|
4720
|
+
declare const WorkspaceBillingRatesRequest: MessageFns$1<WorkspaceBillingRatesRequest>;
|
|
4721
|
+
interface WorkspaceBillingRatesResponse {
|
|
4722
|
+
/** compute rates are per unit per hour, storage rate is per GiB-month */
|
|
4723
|
+
rates: {
|
|
4724
|
+
[key: string]: string;
|
|
4725
|
+
};
|
|
4726
|
+
deprecationWarnings: {
|
|
4727
|
+
[key: string]: string;
|
|
4728
|
+
};
|
|
4729
|
+
deprecationErrors: {
|
|
4730
|
+
[key: string]: string;
|
|
4731
|
+
};
|
|
4732
|
+
formatted: string;
|
|
4733
|
+
}
|
|
4734
|
+
declare const WorkspaceBillingRatesResponse: MessageFns$1<WorkspaceBillingRatesResponse>;
|
|
4289
4735
|
interface WorkspaceBillingReportItem {
|
|
4290
4736
|
objectId: string;
|
|
4291
4737
|
description: string;
|
|
@@ -4312,23 +4758,23 @@ interface WorkspaceBillingReportRequest {
|
|
|
4312
4758
|
}
|
|
4313
4759
|
declare const WorkspaceBillingReportRequest: MessageFns$1<WorkspaceBillingReportRequest>;
|
|
4314
4760
|
interface WorkspaceBillingSummaryRequest {
|
|
4761
|
+
/** all query intervals are implicitly one month long (to line up with billing cycles) */
|
|
4315
4762
|
startTimestamp: Date | undefined;
|
|
4316
|
-
endTimestamp: Date | undefined;
|
|
4317
4763
|
}
|
|
4318
4764
|
declare const WorkspaceBillingSummaryRequest: MessageFns$1<WorkspaceBillingSummaryRequest>;
|
|
4319
4765
|
interface WorkspaceBillingSummaryResponse {
|
|
4320
4766
|
startTimestamp: Date | undefined;
|
|
4321
4767
|
endTimestamp: Date | undefined;
|
|
4322
4768
|
meteredCost: string;
|
|
4323
|
-
planCost: string;
|
|
4324
|
-
creditsApplied: string;
|
|
4325
|
-
reservationsDiscount: string;
|
|
4326
|
-
volumesDiscount: string;
|
|
4327
4769
|
billedCost: string;
|
|
4328
|
-
/** keyed by deployed, ephemeral, volume, notebook */
|
|
4770
|
+
/** keyed by deployed, ephemeral, volume, notebook, tokens */
|
|
4329
4771
|
meteredCostBreakdown: {
|
|
4330
4772
|
[key: string]: string;
|
|
4331
4773
|
};
|
|
4774
|
+
/** keyed by plan, credits, reservations, storage */
|
|
4775
|
+
adjustments: {
|
|
4776
|
+
[key: string]: string;
|
|
4777
|
+
};
|
|
4332
4778
|
}
|
|
4333
4779
|
declare const WorkspaceBillingSummaryResponse: MessageFns$1<WorkspaceBillingSummaryResponse>;
|
|
4334
4780
|
interface WorkspaceDashboardUrlRequest {
|
|
@@ -4442,6 +4888,14 @@ declare const ModalClientDefinition: {
|
|
|
4442
4888
|
readonly responseStream: false;
|
|
4443
4889
|
readonly options: {};
|
|
4444
4890
|
};
|
|
4891
|
+
readonly appGetInfo: {
|
|
4892
|
+
readonly name: "AppGetInfo";
|
|
4893
|
+
readonly requestType: MessageFns$1<AppGetInfoRequest>;
|
|
4894
|
+
readonly requestStream: false;
|
|
4895
|
+
readonly responseType: MessageFns$1<AppGetInfoResponse>;
|
|
4896
|
+
readonly responseStream: false;
|
|
4897
|
+
readonly options: {};
|
|
4898
|
+
};
|
|
4445
4899
|
readonly appGetLayout: {
|
|
4446
4900
|
readonly name: "AppGetLayout";
|
|
4447
4901
|
readonly requestType: MessageFns$1<AppGetLayoutRequest>;
|
|
@@ -4514,6 +4968,14 @@ declare const ModalClientDefinition: {
|
|
|
4514
4968
|
readonly responseStream: false;
|
|
4515
4969
|
readonly options: {};
|
|
4516
4970
|
};
|
|
4971
|
+
readonly appPromote: {
|
|
4972
|
+
readonly name: "AppPromote";
|
|
4973
|
+
readonly requestType: MessageFns$1<AppPromoteRequest>;
|
|
4974
|
+
readonly requestStream: false;
|
|
4975
|
+
readonly responseType: MessageFns$1<AppPromoteResponse>;
|
|
4976
|
+
readonly responseStream: false;
|
|
4977
|
+
readonly options: {};
|
|
4978
|
+
};
|
|
4517
4979
|
readonly appPublish: {
|
|
4518
4980
|
readonly name: "AppPublish";
|
|
4519
4981
|
readonly requestType: MessageFns$1<AppPublishRequest>;
|
|
@@ -4982,6 +5444,14 @@ declare const ModalClientDefinition: {
|
|
|
4982
5444
|
readonly responseStream: false;
|
|
4983
5445
|
readonly options: {};
|
|
4984
5446
|
};
|
|
5447
|
+
readonly environmentGetRoles: {
|
|
5448
|
+
readonly name: "EnvironmentGetRoles";
|
|
5449
|
+
readonly requestType: MessageFns$1<EnvironmentGetRolesRequest>;
|
|
5450
|
+
readonly requestStream: false;
|
|
5451
|
+
readonly responseType: MessageFns$1<EnvironmentGetRolesResponse>;
|
|
5452
|
+
readonly responseStream: false;
|
|
5453
|
+
readonly options: {};
|
|
5454
|
+
};
|
|
4985
5455
|
readonly environmentList: {
|
|
4986
5456
|
readonly name: "EnvironmentList";
|
|
4987
5457
|
readonly requestType: MessageFns$2<Empty>;
|
|
@@ -5006,6 +5476,14 @@ declare const ModalClientDefinition: {
|
|
|
5006
5476
|
readonly responseStream: false;
|
|
5007
5477
|
readonly options: {};
|
|
5008
5478
|
};
|
|
5479
|
+
readonly environmentSetDefaultMemberRole: {
|
|
5480
|
+
readonly name: "EnvironmentSetDefaultMemberRole";
|
|
5481
|
+
readonly requestType: MessageFns$1<EnvironmentSetDefaultMemberRoleRequest>;
|
|
5482
|
+
readonly requestStream: false;
|
|
5483
|
+
readonly responseType: MessageFns$2<Empty>;
|
|
5484
|
+
readonly responseStream: false;
|
|
5485
|
+
readonly options: {};
|
|
5486
|
+
};
|
|
5009
5487
|
readonly environmentSetManaged: {
|
|
5010
5488
|
readonly name: "EnvironmentSetManaged";
|
|
5011
5489
|
readonly requestType: MessageFns$1<EnvironmentSetManagedRequest>;
|
|
@@ -5104,6 +5582,14 @@ declare const ModalClientDefinition: {
|
|
|
5104
5582
|
readonly responseStream: true;
|
|
5105
5583
|
readonly options: {};
|
|
5106
5584
|
};
|
|
5585
|
+
readonly functionCallGetInfo: {
|
|
5586
|
+
readonly name: "FunctionCallGetInfo";
|
|
5587
|
+
readonly requestType: MessageFns$1<FunctionCallGetInfoRequest>;
|
|
5588
|
+
readonly requestStream: false;
|
|
5589
|
+
readonly responseType: MessageFns$1<FunctionCallGetInfoResponse>;
|
|
5590
|
+
readonly responseStream: false;
|
|
5591
|
+
readonly options: {};
|
|
5592
|
+
};
|
|
5107
5593
|
readonly functionCallList: {
|
|
5108
5594
|
readonly name: "FunctionCallList";
|
|
5109
5595
|
readonly requestType: MessageFns$1<FunctionCallListRequest>;
|
|
@@ -5145,6 +5631,14 @@ declare const ModalClientDefinition: {
|
|
|
5145
5631
|
readonly responseStream: false;
|
|
5146
5632
|
readonly options: {};
|
|
5147
5633
|
};
|
|
5634
|
+
readonly functionGetById: {
|
|
5635
|
+
readonly name: "FunctionGetById";
|
|
5636
|
+
readonly requestType: MessageFns$1<FunctionGetByIdRequest>;
|
|
5637
|
+
readonly requestStream: false;
|
|
5638
|
+
readonly responseType: MessageFns$1<FunctionGetByIdResponse>;
|
|
5639
|
+
readonly responseStream: false;
|
|
5640
|
+
readonly options: {};
|
|
5641
|
+
};
|
|
5148
5642
|
readonly functionGetCallGraph: {
|
|
5149
5643
|
readonly name: "FunctionGetCallGraph";
|
|
5150
5644
|
readonly requestType: MessageFns$1<FunctionGetCallGraphRequest>;
|
|
@@ -5169,6 +5663,14 @@ declare const ModalClientDefinition: {
|
|
|
5169
5663
|
readonly responseStream: false;
|
|
5170
5664
|
readonly options: {};
|
|
5171
5665
|
};
|
|
5666
|
+
readonly functionGetFlashAuthToken: {
|
|
5667
|
+
readonly name: "FunctionGetFlashAuthToken";
|
|
5668
|
+
readonly requestType: MessageFns$1<FunctionGetFlashAuthTokenRequest>;
|
|
5669
|
+
readonly requestStream: false;
|
|
5670
|
+
readonly responseType: MessageFns$1<FunctionGetFlashAuthTokenResponse>;
|
|
5671
|
+
readonly responseStream: false;
|
|
5672
|
+
readonly options: {};
|
|
5673
|
+
};
|
|
5172
5674
|
/** For containers to request next call */
|
|
5173
5675
|
readonly functionGetInputs: {
|
|
5174
5676
|
readonly name: "FunctionGetInputs";
|
|
@@ -5195,6 +5697,14 @@ declare const ModalClientDefinition: {
|
|
|
5195
5697
|
readonly responseStream: false;
|
|
5196
5698
|
readonly options: {};
|
|
5197
5699
|
};
|
|
5700
|
+
readonly functionGetTimeRangeStats: {
|
|
5701
|
+
readonly name: "FunctionGetTimeRangeStats";
|
|
5702
|
+
readonly requestType: MessageFns$1<FunctionGetTimeRangeStatsRequest>;
|
|
5703
|
+
readonly requestStream: false;
|
|
5704
|
+
readonly responseType: MessageFns$1<FunctionGetTimeRangeStatsResponse>;
|
|
5705
|
+
readonly responseStream: false;
|
|
5706
|
+
readonly options: {};
|
|
5707
|
+
};
|
|
5198
5708
|
readonly functionMap: {
|
|
5199
5709
|
readonly name: "FunctionMap";
|
|
5200
5710
|
readonly requestType: MessageFns$1<FunctionMapRequest>;
|
|
@@ -5253,6 +5763,14 @@ declare const ModalClientDefinition: {
|
|
|
5253
5763
|
readonly options: {};
|
|
5254
5764
|
};
|
|
5255
5765
|
/** Images */
|
|
5766
|
+
readonly imageBuildChainGet: {
|
|
5767
|
+
readonly name: "ImageBuildChainGet";
|
|
5768
|
+
readonly requestType: MessageFns$1<ImageBuildChainGetRequest>;
|
|
5769
|
+
readonly requestStream: false;
|
|
5770
|
+
readonly responseType: MessageFns$1<ImageBuildChainGetResponse>;
|
|
5771
|
+
readonly responseStream: false;
|
|
5772
|
+
readonly options: {};
|
|
5773
|
+
};
|
|
5256
5774
|
readonly imageDelete: {
|
|
5257
5775
|
readonly name: "ImageDelete";
|
|
5258
5776
|
readonly requestType: MessageFns$1<ImageDeleteRequest>;
|
|
@@ -5515,6 +6033,14 @@ declare const ModalClientDefinition: {
|
|
|
5515
6033
|
readonly options: {};
|
|
5516
6034
|
};
|
|
5517
6035
|
/** Sandboxes */
|
|
6036
|
+
readonly sandboxContainerCreateV2: {
|
|
6037
|
+
readonly name: "SandboxContainerCreateV2";
|
|
6038
|
+
readonly requestType: MessageFns$1<SandboxContainerCreateV2Request>;
|
|
6039
|
+
readonly requestStream: false;
|
|
6040
|
+
readonly responseType: MessageFns$1<SandboxContainerCreateV2Response>;
|
|
6041
|
+
readonly responseStream: false;
|
|
6042
|
+
readonly options: {};
|
|
6043
|
+
};
|
|
5518
6044
|
readonly sandboxCreate: {
|
|
5519
6045
|
readonly name: "SandboxCreate";
|
|
5520
6046
|
readonly requestType: MessageFns$1<SandboxCreateRequest>;
|
|
@@ -5531,6 +6057,14 @@ declare const ModalClientDefinition: {
|
|
|
5531
6057
|
readonly responseStream: false;
|
|
5532
6058
|
readonly options: {};
|
|
5533
6059
|
};
|
|
6060
|
+
readonly sandboxCreateConnectTokenV2: {
|
|
6061
|
+
readonly name: "SandboxCreateConnectTokenV2";
|
|
6062
|
+
readonly requestType: MessageFns$1<SandboxCreateConnectTokenRequest>;
|
|
6063
|
+
readonly requestStream: false;
|
|
6064
|
+
readonly responseType: MessageFns$1<SandboxCreateConnectTokenResponse>;
|
|
6065
|
+
readonly responseStream: false;
|
|
6066
|
+
readonly options: {};
|
|
6067
|
+
};
|
|
5534
6068
|
readonly sandboxCreateV2: {
|
|
5535
6069
|
readonly name: "SandboxCreateV2";
|
|
5536
6070
|
readonly requestType: MessageFns$1<SandboxCreateV2Request>;
|
|
@@ -5547,6 +6081,22 @@ declare const ModalClientDefinition: {
|
|
|
5547
6081
|
readonly responseStream: false;
|
|
5548
6082
|
readonly options: {};
|
|
5549
6083
|
};
|
|
6084
|
+
readonly sandboxGetExitSnapshot: {
|
|
6085
|
+
readonly name: "SandboxGetExitSnapshot";
|
|
6086
|
+
readonly requestType: MessageFns$1<SandboxGetExitSnapshotRequest>;
|
|
6087
|
+
readonly requestStream: false;
|
|
6088
|
+
readonly responseType: MessageFns$1<SandboxGetExitSnapshotResponse>;
|
|
6089
|
+
readonly responseStream: false;
|
|
6090
|
+
readonly options: {};
|
|
6091
|
+
};
|
|
6092
|
+
readonly sandboxGetExitSnapshotV2: {
|
|
6093
|
+
readonly name: "SandboxGetExitSnapshotV2";
|
|
6094
|
+
readonly requestType: MessageFns$1<SandboxGetExitSnapshotRequest>;
|
|
6095
|
+
readonly requestStream: false;
|
|
6096
|
+
readonly responseType: MessageFns$1<SandboxGetExitSnapshotResponse>;
|
|
6097
|
+
readonly responseStream: false;
|
|
6098
|
+
readonly options: {};
|
|
6099
|
+
};
|
|
5550
6100
|
readonly sandboxGetFromName: {
|
|
5551
6101
|
readonly name: "SandboxGetFromName";
|
|
5552
6102
|
readonly requestType: MessageFns$1<SandboxGetFromNameRequest>;
|
|
@@ -5636,6 +6186,22 @@ declare const ModalClientDefinition: {
|
|
|
5636
6186
|
readonly responseStream: false;
|
|
5637
6187
|
readonly options: {};
|
|
5638
6188
|
};
|
|
6189
|
+
readonly sandboxRestoreV2: {
|
|
6190
|
+
readonly name: "SandboxRestoreV2";
|
|
6191
|
+
readonly requestType: MessageFns$1<SandboxRestoreV2Request>;
|
|
6192
|
+
readonly requestStream: false;
|
|
6193
|
+
readonly responseType: MessageFns$1<SandboxRestoreV2Response>;
|
|
6194
|
+
readonly responseStream: false;
|
|
6195
|
+
readonly options: {};
|
|
6196
|
+
};
|
|
6197
|
+
readonly sandboxSetName: {
|
|
6198
|
+
readonly name: "SandboxSetName";
|
|
6199
|
+
readonly requestType: MessageFns$1<SandboxSetNameRequest>;
|
|
6200
|
+
readonly requestStream: false;
|
|
6201
|
+
readonly responseType: MessageFns$1<SandboxSetNameResponse>;
|
|
6202
|
+
readonly responseStream: false;
|
|
6203
|
+
readonly options: {};
|
|
6204
|
+
};
|
|
5639
6205
|
readonly sandboxSnapshot: {
|
|
5640
6206
|
readonly name: "SandboxSnapshot";
|
|
5641
6207
|
readonly requestType: MessageFns$1<SandboxSnapshotRequest>;
|
|
@@ -5979,6 +6545,15 @@ declare const ModalClientDefinition: {
|
|
|
5979
6545
|
readonly responseStream: false;
|
|
5980
6546
|
readonly options: {};
|
|
5981
6547
|
};
|
|
6548
|
+
/** User groups */
|
|
6549
|
+
readonly userGroupEnvironmentSet: {
|
|
6550
|
+
readonly name: "UserGroupEnvironmentSet";
|
|
6551
|
+
readonly requestType: MessageFns$1<UserGroupEnvironmentSetRequest>;
|
|
6552
|
+
readonly requestStream: false;
|
|
6553
|
+
readonly responseType: MessageFns$2<Empty>;
|
|
6554
|
+
readonly responseStream: false;
|
|
6555
|
+
readonly options: {};
|
|
6556
|
+
};
|
|
5982
6557
|
/** Volumes */
|
|
5983
6558
|
readonly volumeCommit: {
|
|
5984
6559
|
readonly name: "VolumeCommit";
|
|
@@ -6182,6 +6757,14 @@ declare const ModalClientDefinition: {
|
|
|
6182
6757
|
readonly options: {};
|
|
6183
6758
|
};
|
|
6184
6759
|
/** Workspaces */
|
|
6760
|
+
readonly workspaceBillingRates: {
|
|
6761
|
+
readonly name: "WorkspaceBillingRates";
|
|
6762
|
+
readonly requestType: MessageFns$1<WorkspaceBillingRatesRequest>;
|
|
6763
|
+
readonly requestStream: false;
|
|
6764
|
+
readonly responseType: MessageFns$1<WorkspaceBillingRatesResponse>;
|
|
6765
|
+
readonly responseStream: false;
|
|
6766
|
+
readonly options: {};
|
|
6767
|
+
};
|
|
6185
6768
|
readonly workspaceBillingReport: {
|
|
6186
6769
|
readonly name: "WorkspaceBillingReport";
|
|
6187
6770
|
readonly requestType: MessageFns$1<WorkspaceBillingReportRequest>;
|
|
@@ -6373,7 +6956,228 @@ declare class CloudBucketMount {
|
|
|
6373
6956
|
toProto(mountPath: string): CloudBucketMount$1;
|
|
6374
6957
|
}
|
|
6375
6958
|
|
|
6376
|
-
|
|
6959
|
+
type LogSource = "system" | "stdout" | "stderr";
|
|
6960
|
+
interface LogEntry {
|
|
6961
|
+
readonly message: string;
|
|
6962
|
+
readonly source: LogSource;
|
|
6963
|
+
readonly timestamp: Date;
|
|
6964
|
+
readonly objectId: string;
|
|
6965
|
+
readonly contextIds: string[];
|
|
6966
|
+
}
|
|
6967
|
+
interface FunctionLogFetchParams {
|
|
6968
|
+
/** Start of the UTC time range. */
|
|
6969
|
+
since: Date;
|
|
6970
|
+
/** End of the UTC time range. Defaults to the current time. */
|
|
6971
|
+
until?: Date;
|
|
6972
|
+
/** Filter by source: `stdout`, `stderr`, or `system`. */
|
|
6973
|
+
source?: LogSource;
|
|
6974
|
+
/** Filter by text contained in the log message. */
|
|
6975
|
+
searchText?: string;
|
|
6976
|
+
}
|
|
6977
|
+
interface FunctionLogTailParams {
|
|
6978
|
+
/** Number of log entries to return. Defaults to 100. */
|
|
6979
|
+
entries?: number;
|
|
6980
|
+
/** Filter by source: `stdout`, `stderr`, or `system`. */
|
|
6981
|
+
source?: LogSource;
|
|
6982
|
+
}
|
|
6983
|
+
interface FunctionCallLogTailParams {
|
|
6984
|
+
/** Number of log entries to return. Defaults to 100. */
|
|
6985
|
+
entries?: number;
|
|
6986
|
+
/** Filter by source: `stdout`, `stderr`, or `system`. */
|
|
6987
|
+
source?: LogSource;
|
|
6988
|
+
}
|
|
6989
|
+
type LogTailParams = FunctionCallLogTailParams | FunctionLogTailParams;
|
|
6990
|
+
interface FunctionLogStreamParams {
|
|
6991
|
+
/**
|
|
6992
|
+
* Number of milliseconds to wait between log entries before ending the
|
|
6993
|
+
* stream. By default, the stream blocks until it is interrupted.
|
|
6994
|
+
*/
|
|
6995
|
+
timeoutMs?: number;
|
|
6996
|
+
}
|
|
6997
|
+
interface FunctionCallLogStreamParams {
|
|
6998
|
+
/**
|
|
6999
|
+
* Number of milliseconds to wait between log entries before ending the
|
|
7000
|
+
* stream. By default, the stream blocks until it is interrupted.
|
|
7001
|
+
*/
|
|
7002
|
+
timeoutMs?: number;
|
|
7003
|
+
}
|
|
7004
|
+
type LogStreamParams = FunctionCallLogStreamParams | FunctionLogStreamParams;
|
|
7005
|
+
interface FunctionCallLogFetchParams {
|
|
7006
|
+
/**
|
|
7007
|
+
* Start of the UTC time range. Defaults to the start of the FunctionCall.
|
|
7008
|
+
*/
|
|
7009
|
+
since?: Date;
|
|
7010
|
+
/** End of the UTC time range. Defaults to the current time. */
|
|
7011
|
+
until?: Date;
|
|
7012
|
+
/** Filter by source: `stdout`, `stderr`, or `system`. */
|
|
7013
|
+
source?: LogSource;
|
|
7014
|
+
/** Filter by text contained in the log message. */
|
|
7015
|
+
searchText?: string;
|
|
7016
|
+
}
|
|
7017
|
+
interface FunctionLogs {
|
|
7018
|
+
fetch(params: FunctionLogFetchParams): AsyncIterable<LogEntry>;
|
|
7019
|
+
tail(params?: FunctionLogTailParams): AsyncIterable<LogEntry>;
|
|
7020
|
+
stream(params?: FunctionLogStreamParams): AsyncIterable<LogEntry>;
|
|
7021
|
+
}
|
|
7022
|
+
interface FunctionCallLogs extends Omit<FunctionLogs, "fetch"> {
|
|
7023
|
+
fetch(params?: FunctionCallLogFetchParams): AsyncIterable<LogEntry>;
|
|
7024
|
+
tail(params?: FunctionCallLogTailParams): AsyncIterable<LogEntry>;
|
|
7025
|
+
stream(params?: FunctionCallLogStreamParams): AsyncIterable<LogEntry>;
|
|
7026
|
+
}
|
|
7027
|
+
interface LogQueryParams {
|
|
7028
|
+
client: ModalClient;
|
|
7029
|
+
objectId: string;
|
|
7030
|
+
appId: string;
|
|
7031
|
+
functionId: string;
|
|
7032
|
+
functionCallId: string;
|
|
7033
|
+
}
|
|
7034
|
+
declare class LogsManager {
|
|
7035
|
+
protected readonly params: LogQueryParams;
|
|
7036
|
+
constructor(params: LogQueryParams);
|
|
7037
|
+
fetch(params: FunctionLogFetchParams): AsyncIterable<LogEntry>;
|
|
7038
|
+
tail(params?: LogTailParams): AsyncIterable<LogEntry>;
|
|
7039
|
+
stream(params?: LogStreamParams): AsyncIterable<LogEntry>;
|
|
7040
|
+
}
|
|
7041
|
+
/** Namespace for Function log APIs. */
|
|
7042
|
+
declare class FunctionLogsManager extends LogsManager implements FunctionLogs {
|
|
7043
|
+
/** @ignore */
|
|
7044
|
+
constructor(client: ModalClient, objectId: string, appId: string);
|
|
7045
|
+
/**
|
|
7046
|
+
* Fetch Function logs corresponding to a UTC time range and optional
|
|
7047
|
+
* filters.
|
|
7048
|
+
*
|
|
7049
|
+
* Entries are returned in chronological order.
|
|
7050
|
+
*
|
|
7051
|
+
* @returns An async iterable of {@link LogEntry} objects.
|
|
7052
|
+
*
|
|
7053
|
+
* @example
|
|
7054
|
+
* ```typescript
|
|
7055
|
+
* import { ModalClient } from "modal";
|
|
7056
|
+
*
|
|
7057
|
+
* const modal = new ModalClient();
|
|
7058
|
+
* const function_ = await modal.functions.fromName("my-app", "train");
|
|
7059
|
+
*
|
|
7060
|
+
* for await (const entry of function_.logs.fetch({
|
|
7061
|
+
* since: new Date(Date.now() - 4 * 60 * 60 * 1_000),
|
|
7062
|
+
* source: "stdout",
|
|
7063
|
+
* })) {
|
|
7064
|
+
* process.stdout.write(entry.message);
|
|
7065
|
+
* }
|
|
7066
|
+
* ```
|
|
7067
|
+
*/
|
|
7068
|
+
fetch(params: FunctionLogFetchParams): AsyncIterable<LogEntry>;
|
|
7069
|
+
/**
|
|
7070
|
+
* Fetch the most recent Function logs.
|
|
7071
|
+
*
|
|
7072
|
+
* Entries are returned in chronological order.
|
|
7073
|
+
*
|
|
7074
|
+
* @returns An async iterable of {@link LogEntry} objects.
|
|
7075
|
+
*
|
|
7076
|
+
* @example
|
|
7077
|
+
* ```typescript
|
|
7078
|
+
* import { ModalClient } from "modal";
|
|
7079
|
+
*
|
|
7080
|
+
* const modal = new ModalClient();
|
|
7081
|
+
* const function_ = await modal.functions.fromName("my-app", "train");
|
|
7082
|
+
*
|
|
7083
|
+
* for await (const entry of function_.logs.tail({ entries: 20 })) {
|
|
7084
|
+
* process.stdout.write(entry.message);
|
|
7085
|
+
* }
|
|
7086
|
+
* ```
|
|
7087
|
+
*/
|
|
7088
|
+
tail(params?: FunctionLogTailParams): AsyncIterable<LogEntry>;
|
|
7089
|
+
/**
|
|
7090
|
+
* Stream new Function logs until the timeout is reached.
|
|
7091
|
+
*
|
|
7092
|
+
* @returns An async iterable of {@link LogEntry} objects as they arrive.
|
|
7093
|
+
*
|
|
7094
|
+
* @example
|
|
7095
|
+
* ```typescript
|
|
7096
|
+
* import { ModalClient } from "modal";
|
|
7097
|
+
*
|
|
7098
|
+
* const modal = new ModalClient();
|
|
7099
|
+
* const function_ = await modal.functions.fromName("my-app", "train");
|
|
7100
|
+
*
|
|
7101
|
+
* for await (const entry of function_.logs.stream({ timeoutMs: 60_000 })) {
|
|
7102
|
+
* process.stdout.write(entry.message);
|
|
7103
|
+
* }
|
|
7104
|
+
* ```
|
|
7105
|
+
*/
|
|
7106
|
+
stream(params?: FunctionLogStreamParams): AsyncIterable<LogEntry>;
|
|
7107
|
+
}
|
|
7108
|
+
/** Namespace for FunctionCall log APIs. */
|
|
7109
|
+
declare class FunctionCallLogsManager extends LogsManager implements FunctionCallLogs {
|
|
7110
|
+
constructor(client: ModalClient, objectId: string, appId: string, functionId: string);
|
|
7111
|
+
/**
|
|
7112
|
+
* Fetch logs associated with this FunctionCall corresponding to a UTC time
|
|
7113
|
+
* range and optional filters.
|
|
7114
|
+
*
|
|
7115
|
+
* When `since` is omitted, logs are fetched from the start of the
|
|
7116
|
+
* FunctionCall. Entries are returned in chronological order.
|
|
7117
|
+
*
|
|
7118
|
+
* @returns An async iterable of {@link LogEntry} objects.
|
|
7119
|
+
*
|
|
7120
|
+
* @example
|
|
7121
|
+
* ```typescript
|
|
7122
|
+
* import { ModalClient } from "modal";
|
|
7123
|
+
*
|
|
7124
|
+
* const modal = new ModalClient();
|
|
7125
|
+
* const function_ = await modal.functions.fromName("my-app", "train");
|
|
7126
|
+
* const call = await function_.spawn([]);
|
|
7127
|
+
*
|
|
7128
|
+
* for await (const entry of call.logs.fetch()) {
|
|
7129
|
+
* console.log(entry.timestamp, entry.message);
|
|
7130
|
+
* }
|
|
7131
|
+
* ```
|
|
7132
|
+
*/
|
|
7133
|
+
fetch(params?: FunctionCallLogFetchParams): AsyncIterable<LogEntry>;
|
|
7134
|
+
/**
|
|
7135
|
+
* Fetch the most recent FunctionCall logs.
|
|
7136
|
+
*
|
|
7137
|
+
* Entries are returned in chronological order.
|
|
7138
|
+
*
|
|
7139
|
+
* @returns An async iterable of {@link LogEntry} objects.
|
|
7140
|
+
*
|
|
7141
|
+
* @example
|
|
7142
|
+
* ```typescript
|
|
7143
|
+
* import { ModalClient } from "modal";
|
|
7144
|
+
*
|
|
7145
|
+
* const modal = new ModalClient();
|
|
7146
|
+
* const function_ = await modal.functions.fromName("my-app", "train");
|
|
7147
|
+
* const call = await function_.spawn([]);
|
|
7148
|
+
*
|
|
7149
|
+
* for await (const entry of call.logs.tail({ entries: 10 })) {
|
|
7150
|
+
* console.log(entry.timestamp, entry.message);
|
|
7151
|
+
* }
|
|
7152
|
+
* ```
|
|
7153
|
+
*/
|
|
7154
|
+
tail(params?: FunctionCallLogTailParams): AsyncIterable<LogEntry>;
|
|
7155
|
+
/**
|
|
7156
|
+
* Stream new FunctionCall logs until the timeout is reached or the
|
|
7157
|
+
* FunctionCall is observed to have completed.
|
|
7158
|
+
*
|
|
7159
|
+
* The completion check is best-effort. If completion cannot be determined,
|
|
7160
|
+
* the stream continues until the timeout is reached.
|
|
7161
|
+
*
|
|
7162
|
+
* @returns An async iterable of {@link LogEntry} objects as they arrive.
|
|
7163
|
+
*
|
|
7164
|
+
* @example
|
|
7165
|
+
* ```typescript
|
|
7166
|
+
* import { ModalClient } from "modal";
|
|
7167
|
+
*
|
|
7168
|
+
* const modal = new ModalClient();
|
|
7169
|
+
* const function_ = await modal.functions.fromName("my-app", "train");
|
|
7170
|
+
* const call = await function_.spawn([]);
|
|
7171
|
+
*
|
|
7172
|
+
* for await (const entry of call.logs.stream()) {
|
|
7173
|
+
* process.stdout.write(entry.message);
|
|
7174
|
+
* }
|
|
7175
|
+
* ```
|
|
7176
|
+
*/
|
|
7177
|
+
stream(params?: FunctionCallLogStreamParams): AsyncIterable<LogEntry>;
|
|
7178
|
+
}
|
|
7179
|
+
|
|
7180
|
+
/**
|
|
6377
7181
|
* Service for managing {@link FunctionCall}s.
|
|
6378
7182
|
*
|
|
6379
7183
|
* Normally only ever accessed via the client as:
|
|
@@ -6408,11 +7212,23 @@ declare class FunctionCall {
|
|
|
6408
7212
|
#private;
|
|
6409
7213
|
readonly functionCallId: string;
|
|
6410
7214
|
/** @ignore */
|
|
6411
|
-
constructor(client: ModalClient, functionCallId: string);
|
|
7215
|
+
constructor(client: ModalClient, functionCallId: string, appId: string, functionId: string);
|
|
6412
7216
|
/** Get the result of a FunctionCall, optionally waiting with a timeout. */
|
|
6413
7217
|
get(params?: FunctionCallGetParams): Promise<any>;
|
|
6414
7218
|
/** Cancel a running FunctionCall. */
|
|
6415
7219
|
cancel(params?: FunctionCallCancelParams): Promise<void>;
|
|
7220
|
+
/**
|
|
7221
|
+
* Access logs for this FunctionCall.
|
|
7222
|
+
*
|
|
7223
|
+
* Use {@link FunctionCallLogsManager#fetch fetch()} to read logs from a UTC
|
|
7224
|
+
* time range, {@link FunctionCallLogsManager#tail tail()} to read the most
|
|
7225
|
+
* recent logs, and {@link FunctionCallLogsManager#stream stream()} to follow
|
|
7226
|
+
* new logs as they arrive.
|
|
7227
|
+
*
|
|
7228
|
+
* See also: [`modal app logs`](https://modal.com/docs/cli/latest/app#modal-app-logs)
|
|
7229
|
+
* for CLI access to logs for an App.
|
|
7230
|
+
*/
|
|
7231
|
+
get logs(): FunctionCallLogsManager;
|
|
6416
7232
|
}
|
|
6417
7233
|
|
|
6418
7234
|
type HeartbeatFunction = () => Promise<any>;
|
|
@@ -6549,6 +7365,12 @@ interface FunctionUpdateAutoscalerParams {
|
|
|
6549
7365
|
bufferContainers?: number;
|
|
6550
7366
|
scaledownWindowMs?: number;
|
|
6551
7367
|
}
|
|
7368
|
+
type FunctionAutoscalerSettings = {
|
|
7369
|
+
minContainers?: number;
|
|
7370
|
+
maxContainers?: number;
|
|
7371
|
+
bufferContainers?: number;
|
|
7372
|
+
scaledownWindowMs?: number;
|
|
7373
|
+
};
|
|
6552
7374
|
/** Configuration options for {@link Function_#withOptions Function_.withOptions()}. */
|
|
6553
7375
|
type FunctionWithOptionsParams = {
|
|
6554
7376
|
cpu?: number;
|
|
@@ -6590,6 +7412,18 @@ declare class Function_ {
|
|
|
6590
7412
|
readonly methodName?: string;
|
|
6591
7413
|
/** @ignore */
|
|
6592
7414
|
constructor(client: ModalClient, functionId: string, methodName?: string, functionHandleMetadata?: FunctionHandleMetadata, options?: FunctionOptions);
|
|
7415
|
+
/**
|
|
7416
|
+
* Access logs for this Function.
|
|
7417
|
+
*
|
|
7418
|
+
* Use {@link FunctionLogsManager#fetch fetch()} to read logs from a UTC time
|
|
7419
|
+
* range, {@link FunctionLogsManager#tail tail()} to read the most recent
|
|
7420
|
+
* logs, and {@link FunctionLogsManager#stream stream()} to follow new logs as
|
|
7421
|
+
* they arrive.
|
|
7422
|
+
*
|
|
7423
|
+
* See also: [`modal app logs`](https://modal.com/docs/cli/latest/app#modal-app-logs)
|
|
7424
|
+
* for CLI access to logs for an App.
|
|
7425
|
+
*/
|
|
7426
|
+
get logs(): FunctionLogsManager;
|
|
6593
7427
|
/** Override the static Function configuration at runtime. */
|
|
6594
7428
|
withOptions(options: FunctionWithOptionsParams): Function_;
|
|
6595
7429
|
/** Override the static Function concurrency configuration at runtime. */
|
|
@@ -6603,7 +7437,7 @@ declare class Function_ {
|
|
|
6603
7437
|
remote(args?: any[], kwargs?: Record<string, any>): Promise<any>;
|
|
6604
7438
|
spawn(args?: any[], kwargs?: Record<string, any>): Promise<FunctionCall>;
|
|
6605
7439
|
getCurrentStats(): Promise<FunctionStats>;
|
|
6606
|
-
updateAutoscaler(params: FunctionUpdateAutoscalerParams): Promise<
|
|
7440
|
+
updateAutoscaler(params: FunctionUpdateAutoscalerParams): Promise<FunctionAutoscalerSettings>;
|
|
6607
7441
|
/**
|
|
6608
7442
|
* URL for addressing the Web Function via HTTP.
|
|
6609
7443
|
* @returns The web URL, or undefined if this is not a Web Function
|
|
@@ -6972,6 +7806,14 @@ declare enum TaskExecStdoutConfig {
|
|
|
6972
7806
|
TASK_EXEC_STDOUT_CONFIG_PIPE = 1,
|
|
6973
7807
|
UNRECOGNIZED = -1
|
|
6974
7808
|
}
|
|
7809
|
+
interface SandboxStdinWriteV2Response {
|
|
7810
|
+
}
|
|
7811
|
+
declare const SandboxStdinWriteV2Response: MessageFns<SandboxStdinWriteV2Response>;
|
|
7812
|
+
interface SandboxStdioReadV2Response {
|
|
7813
|
+
data: Uint8Array;
|
|
7814
|
+
startingOffset: number;
|
|
7815
|
+
}
|
|
7816
|
+
declare const SandboxStdioReadV2Response: MessageFns<SandboxStdioReadV2Response>;
|
|
6975
7817
|
interface SandboxWaitUntilReadyTcrResponse {
|
|
6976
7818
|
readyAt: number;
|
|
6977
7819
|
}
|
|
@@ -6990,6 +7832,14 @@ interface TaskContainerCreateRequest {
|
|
|
6990
7832
|
secretIds: string[];
|
|
6991
7833
|
/** Volumes to mount into the container. */
|
|
6992
7834
|
volumeMounts: VolumeMount[];
|
|
7835
|
+
/**
|
|
7836
|
+
* Outbound network policy for the sidecar, independent of the main
|
|
7837
|
+
* container. When unset, defaults to open network access. BLOCKED is not
|
|
7838
|
+
* accepted: a blocked sidecar has no IP and cannot reach the main container.
|
|
7839
|
+
*/
|
|
7840
|
+
networkAccess?: NetworkAccess | undefined;
|
|
7841
|
+
/** Optional PTY info for sidecar. */
|
|
7842
|
+
ptyInfo?: PTYInfo | undefined;
|
|
6993
7843
|
}
|
|
6994
7844
|
declare const TaskContainerCreateRequest: MessageFns<TaskContainerCreateRequest>;
|
|
6995
7845
|
interface TaskContainerCreateResponse {
|
|
@@ -7095,6 +7945,17 @@ declare const TaskExecStartRequest: MessageFns<TaskExecStartRequest>;
|
|
|
7095
7945
|
interface TaskExecStartResponse {
|
|
7096
7946
|
}
|
|
7097
7947
|
declare const TaskExecStartResponse: MessageFns<TaskExecStartResponse>;
|
|
7948
|
+
interface TaskExecStdinStatusResponse {
|
|
7949
|
+
/**
|
|
7950
|
+
* Number of bytes the server has accepted for this exec so far.
|
|
7951
|
+
* A streaming client that lost its connection should resume sending at this
|
|
7952
|
+
* offset.
|
|
7953
|
+
*/
|
|
7954
|
+
numBytesWritten: number;
|
|
7955
|
+
/** True if stdin has already been closed (EOF sent) for this exec. */
|
|
7956
|
+
closed: boolean;
|
|
7957
|
+
}
|
|
7958
|
+
declare const TaskExecStdinStatusResponse: MessageFns<TaskExecStdinStatusResponse>;
|
|
7098
7959
|
interface TaskExecStdinWriteResponse {
|
|
7099
7960
|
}
|
|
7100
7961
|
declare const TaskExecStdinWriteResponse: MessageFns<TaskExecStdinWriteResponse>;
|
|
@@ -7119,10 +7980,14 @@ interface TaskMountDirectoryRequest {
|
|
|
7119
7980
|
* This key is not persisted by Modal.
|
|
7120
7981
|
*/
|
|
7121
7982
|
customerSuppliedEncryptionKey?: Uint8Array | undefined;
|
|
7983
|
+
/** Fully qualified target container ID. Empty targets the main container. */
|
|
7984
|
+
containerId: string;
|
|
7122
7985
|
}
|
|
7123
7986
|
declare const TaskMountDirectoryRequest: MessageFns<TaskMountDirectoryRequest>;
|
|
7124
7987
|
interface TaskReloadVolumesRequest {
|
|
7125
7988
|
taskId: string;
|
|
7989
|
+
/** Fully qualified target container ID. Empty targets the main container. */
|
|
7990
|
+
containerId: string;
|
|
7126
7991
|
}
|
|
7127
7992
|
declare const TaskReloadVolumesRequest: MessageFns<TaskReloadVolumesRequest>;
|
|
7128
7993
|
interface TaskSetNetworkAccessRequest {
|
|
@@ -7158,6 +8023,8 @@ interface TaskSnapshotDirectoryRequest {
|
|
|
7158
8023
|
* metadata keys. This key is not persisted by Modal.
|
|
7159
8024
|
*/
|
|
7160
8025
|
customerSuppliedEncryptionKey?: Uint8Array | undefined;
|
|
8026
|
+
/** Fully qualified target container ID. Empty targets the main container. */
|
|
8027
|
+
containerId: string;
|
|
7161
8028
|
}
|
|
7162
8029
|
declare const TaskSnapshotDirectoryRequest: MessageFns<TaskSnapshotDirectoryRequest>;
|
|
7163
8030
|
interface TaskSnapshotDirectoryResponse {
|
|
@@ -7183,15 +8050,28 @@ interface TaskSnapshotFilesystemRequest {
|
|
|
7183
8050
|
* metadata keys. This key is not persisted by Modal.
|
|
7184
8051
|
*/
|
|
7185
8052
|
customerSuppliedEncryptionKey?: Uint8Array | undefined;
|
|
8053
|
+
/** Fully qualified target container ID. Empty targets the main container. */
|
|
8054
|
+
containerId: string;
|
|
7186
8055
|
}
|
|
7187
8056
|
declare const TaskSnapshotFilesystemRequest: MessageFns<TaskSnapshotFilesystemRequest>;
|
|
7188
8057
|
interface TaskSnapshotFilesystemResponse {
|
|
7189
8058
|
imageId: string;
|
|
7190
8059
|
}
|
|
7191
8060
|
declare const TaskSnapshotFilesystemResponse: MessageFns<TaskSnapshotFilesystemResponse>;
|
|
8061
|
+
interface TaskSnapshotMemoryRequest {
|
|
8062
|
+
taskId: string;
|
|
8063
|
+
idempotencyKey: string;
|
|
8064
|
+
}
|
|
8065
|
+
declare const TaskSnapshotMemoryRequest: MessageFns<TaskSnapshotMemoryRequest>;
|
|
8066
|
+
interface TaskSnapshotMemoryResponse {
|
|
8067
|
+
snapshotId: string;
|
|
8068
|
+
}
|
|
8069
|
+
declare const TaskSnapshotMemoryResponse: MessageFns<TaskSnapshotMemoryResponse>;
|
|
7192
8070
|
interface TaskUnmountDirectoryRequest {
|
|
7193
8071
|
taskId: string;
|
|
7194
8072
|
path: Uint8Array;
|
|
8073
|
+
/** Fully qualified target container ID. Empty targets the main container. */
|
|
8074
|
+
containerId: string;
|
|
7195
8075
|
}
|
|
7196
8076
|
declare const TaskUnmountDirectoryRequest: MessageFns<TaskUnmountDirectoryRequest>;
|
|
7197
8077
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -7220,17 +8100,83 @@ interface Profile {
|
|
|
7220
8100
|
serverUrl: string;
|
|
7221
8101
|
tokenId?: string;
|
|
7222
8102
|
tokenSecret?: string;
|
|
8103
|
+
oauthRefreshToken?: string;
|
|
8104
|
+
oauthClientId?: string;
|
|
8105
|
+
oauthClientSecret?: string;
|
|
8106
|
+
oauthJwtKey?: string;
|
|
7223
8107
|
environment?: string;
|
|
7224
8108
|
imageBuilderVersion?: string;
|
|
7225
8109
|
logLevel?: string;
|
|
7226
8110
|
/** Parsed from MODAL_MAX_THROTTLE_WAIT. null means unlimited. */
|
|
7227
8111
|
maxThrottleWaitSecs?: number;
|
|
8112
|
+
/**
|
|
8113
|
+
* How long a Sandbox connection may sit idle before the client gives it up.
|
|
8114
|
+
* The Sandbox stays usable: the next operation reconnects. Zero keeps
|
|
8115
|
+
* connections open until the client closes.
|
|
8116
|
+
*/
|
|
8117
|
+
sandboxChannelIdleTimeoutMs: number;
|
|
8118
|
+
/**
|
|
8119
|
+
* Set by the MODAL_SANDBOX_V2 environment variable or the sandbox_v2
|
|
8120
|
+
* profile key in .modal.toml.
|
|
8121
|
+
*/
|
|
8122
|
+
sandboxV2: boolean;
|
|
7228
8123
|
}
|
|
7229
8124
|
|
|
8125
|
+
/**
|
|
8126
|
+
* @internal
|
|
8127
|
+
* @hidden
|
|
8128
|
+
*/
|
|
8129
|
+
type CommandRouterAccess = {
|
|
8130
|
+
url: string;
|
|
8131
|
+
jwt: string;
|
|
8132
|
+
};
|
|
8133
|
+
/**
|
|
8134
|
+
* Seekable byte source for streaming stdin uploads.
|
|
8135
|
+
*
|
|
8136
|
+
* @internal
|
|
8137
|
+
* @hidden
|
|
8138
|
+
*/
|
|
8139
|
+
interface StdinSource {
|
|
8140
|
+
/**
|
|
8141
|
+
* Return a fresh iterable over the source's bytes starting at `offset`,
|
|
8142
|
+
* so an upload can resume mid-stream after a transient failure.
|
|
8143
|
+
*/
|
|
8144
|
+
readFrom(offset: number): AsyncIterable<Uint8Array>;
|
|
8145
|
+
}
|
|
7230
8146
|
/** @ignore */
|
|
7231
8147
|
declare class TaskCommandRouterClientImpl {
|
|
7232
8148
|
private stub;
|
|
8149
|
+
/**
|
|
8150
|
+
* The connection, absent while it is released. It is dialled again by the
|
|
8151
|
+
* next operation, so nothing may hold `stub` across one.
|
|
8152
|
+
*/
|
|
7233
8153
|
private channel;
|
|
8154
|
+
private dial;
|
|
8155
|
+
private factory;
|
|
8156
|
+
/**
|
|
8157
|
+
* How many operations are using the connection. A count rather than a flag
|
|
8158
|
+
* because operations overlap: only the last one out starts the idle clock.
|
|
8159
|
+
*/
|
|
8160
|
+
private inFlight;
|
|
8161
|
+
private idle;
|
|
8162
|
+
/**
|
|
8163
|
+
* Bumped every time a connection is dialled. A stream opened on an earlier
|
|
8164
|
+
* one is stale: the connection under it has since been given up.
|
|
8165
|
+
*/
|
|
8166
|
+
private generation;
|
|
8167
|
+
/**
|
|
8168
|
+
* Streams open right now, tracked so they can be ended on release.
|
|
8169
|
+
*
|
|
8170
|
+
* grpc-js does not cancel a call in flight when its channel is closed, and a
|
|
8171
|
+
* subchannel with a live call on it is never collected - so closing alone
|
|
8172
|
+
* leaves the socket up. Aborting the calls first is what actually frees it.
|
|
8173
|
+
*/
|
|
8174
|
+
private liveStreams;
|
|
8175
|
+
/**
|
|
8176
|
+
* How long the client may go unused before its connection is given up. Zero
|
|
8177
|
+
* keeps it up until the client is closed. Overridable in tests.
|
|
8178
|
+
*/
|
|
8179
|
+
idleTimeoutMs: number;
|
|
7234
8180
|
private serverClient;
|
|
7235
8181
|
private taskId;
|
|
7236
8182
|
private sandboxId;
|
|
@@ -7241,9 +8187,36 @@ declare class TaskCommandRouterClientImpl {
|
|
|
7241
8187
|
private jwtRefreshLock;
|
|
7242
8188
|
private logger;
|
|
7243
8189
|
private closed;
|
|
7244
|
-
|
|
7245
|
-
|
|
8190
|
+
private draining;
|
|
8191
|
+
/**
|
|
8192
|
+
* `access` is the router access returned by SandboxCreateV2, which lets a
|
|
8193
|
+
* freshly created sandbox connect without a round-trip. Pass undefined to look
|
|
8194
|
+
* it up — a re-attached sandbox, or the server could not mint a token.
|
|
8195
|
+
*/
|
|
8196
|
+
static tryInit(serverClient: ModalGrpcClient, taskId: string, sandboxId: string, isV2: boolean, access: CommandRouterAccess | undefined, logger: Logger, profile: Profile): Promise<TaskCommandRouterClientImpl | null>;
|
|
8197
|
+
/**
|
|
8198
|
+
* Builds a client around an already-resolved connection. Public so a test can
|
|
8199
|
+
* construct one without the control-plane round trip `tryInit` makes; the
|
|
8200
|
+
* class is not exported from the package, so this is not API surface.
|
|
8201
|
+
*/
|
|
8202
|
+
constructor(serverClient: ModalGrpcClient, taskId: string, sandboxId: string, isV2: boolean, serverUrl: string, jwt: string, dial: () => ReturnType<typeof createChannel>, logger: Logger, idleTimeoutMs: number);
|
|
8203
|
+
/**
|
|
8204
|
+
* Says the client is about to be used: holds off the idle timer, and dials
|
|
8205
|
+
* again if the connection was already given up. Returns the generation being
|
|
8206
|
+
* used; pair every call with endOp.
|
|
8207
|
+
*/
|
|
8208
|
+
private beginOp;
|
|
8209
|
+
/** Says the caller is done. The last one out starts the clock. */
|
|
8210
|
+
private endOp;
|
|
8211
|
+
/**
|
|
8212
|
+
* Starts the countdown to giving the connection back. Call it with nothing
|
|
8213
|
+
* in flight.
|
|
8214
|
+
*/
|
|
8215
|
+
private armIdleTimer;
|
|
8216
|
+
/** Refuse new operations and release resources after current operations finish. */
|
|
8217
|
+
closeWhenIdle(): void;
|
|
7246
8218
|
close(): void;
|
|
8219
|
+
private callWithRetries;
|
|
7247
8220
|
/** Run a unary RPC against the command router with the default retry policy. */
|
|
7248
8221
|
private callUnary;
|
|
7249
8222
|
execStart(request: TaskExecStartRequest): Promise<TaskExecStartResponse>;
|
|
@@ -7252,13 +8225,31 @@ declare class TaskCommandRouterClientImpl {
|
|
|
7252
8225
|
containerList(request: TaskContainerListRequest): Promise<TaskContainerListResponse>;
|
|
7253
8226
|
containerTerminate(request: TaskContainerTerminateRequest): Promise<void>;
|
|
7254
8227
|
containerWait(request: TaskContainerWaitRequest): Promise<TaskContainerWaitResponse>;
|
|
7255
|
-
execStdioRead(taskId: string, execId: string, fileDescriptor: FileDescriptor, deadline?: number | null): AsyncGenerator<TaskExecStdioReadResponse>;
|
|
8228
|
+
execStdioRead(taskId: string, execId: string, fileDescriptor: FileDescriptor, deadline?: number | null, signal?: AbortSignal): AsyncGenerator<TaskExecStdioReadResponse>;
|
|
7256
8229
|
execStdinWrite(taskId: string, execId: string, offset: number, data: Uint8Array, eof: boolean): Promise<TaskExecStdinWriteResponse>;
|
|
8230
|
+
/**
|
|
8231
|
+
* Read the current stdin write status for an exec'd command.
|
|
8232
|
+
*
|
|
8233
|
+
* Used by streaming clients to find the resume offset after a stream
|
|
8234
|
+
* failure. Evicts any in-flight stdin stream for the exec.
|
|
8235
|
+
*/
|
|
8236
|
+
execStdinStatus(taskId: string, execId: string): Promise<TaskExecStdinStatusResponse>;
|
|
8237
|
+
/**
|
|
8238
|
+
* Stream `source` into the exec's stdin, with bounded resume on transient
|
|
8239
|
+
* failures.
|
|
8240
|
+
*
|
|
8241
|
+
* Streams the full contents of `source` in one client-streaming RPC and
|
|
8242
|
+
* closes stdin (EOF) on success. On a resumable error, queries
|
|
8243
|
+
* `execStdinStatus` for the server's offset and reopens the
|
|
8244
|
+
* stream from that point. Returns the total bytes streamed.
|
|
8245
|
+
*/
|
|
8246
|
+
execStdinWriteStream(taskId: string, execId: string, source: StdinSource, chunkSize?: number, maxResumeAttempts?: number): Promise<number>;
|
|
7257
8247
|
execPoll(taskId: string, execId: string, deadline?: number | null): Promise<TaskExecPollResponse>;
|
|
7258
8248
|
execWait(taskId: string, execId: string, deadline?: number | null): Promise<TaskExecWaitResponse>;
|
|
7259
8249
|
mountDirectory(request: TaskMountDirectoryRequest): Promise<void>;
|
|
7260
8250
|
snapshotDirectory(request: TaskSnapshotDirectoryRequest, options?: TimeoutOptions): Promise<TaskSnapshotDirectoryResponse>;
|
|
7261
8251
|
snapshotFilesystem(request: TaskSnapshotFilesystemRequest, options?: TimeoutOptions): Promise<TaskSnapshotFilesystemResponse>;
|
|
8252
|
+
snapshotMemory(request: TaskSnapshotMemoryRequest, options?: TimeoutOptions): Promise<TaskSnapshotMemoryResponse>;
|
|
7262
8253
|
unmountDirectory(request: TaskUnmountDirectoryRequest): Promise<void>;
|
|
7263
8254
|
setNetworkAccess(request: TaskSetNetworkAccessRequest): Promise<void>;
|
|
7264
8255
|
/**
|
|
@@ -7268,10 +8259,20 @@ declare class TaskCommandRouterClientImpl {
|
|
|
7268
8259
|
* within this window, the call is cancelled and a TimeoutError is thrown.
|
|
7269
8260
|
*/
|
|
7270
8261
|
reloadVolumes(request: TaskReloadVolumesRequest, options?: TimeoutOptions): Promise<void>;
|
|
8262
|
+
sandboxStdioReadV2(taskId: string, fileDescriptor: FileDescriptor, signal?: AbortSignal): AsyncGenerator<SandboxStdioReadV2Response>;
|
|
8263
|
+
sandboxStdinWriteV2(taskId: string, offset: number, data: Uint8Array, eof: boolean): Promise<SandboxStdinWriteV2Response>;
|
|
7271
8264
|
sandboxWaitUntilReady(taskId: string, timeoutMs: number): Promise<SandboxWaitUntilReadyTcrResponse>;
|
|
7272
8265
|
private refreshJwt;
|
|
8266
|
+
/** The caller holds an operation lease across authentication and all retries. */
|
|
7273
8267
|
private callWithAuthRetry;
|
|
7274
|
-
|
|
8268
|
+
/**
|
|
8269
|
+
* Yields the next chunk of stdio, opening or reopening the stream as it needs
|
|
8270
|
+
* to, and determining whether or not to retry a failed open or read. It waits
|
|
8271
|
+
* out the backoff itself.
|
|
8272
|
+
*/
|
|
8273
|
+
private streamStdioWithRetries;
|
|
8274
|
+
private streamExecStdio;
|
|
8275
|
+
private streamSandboxStdio;
|
|
7275
8276
|
}
|
|
7276
8277
|
|
|
7277
8278
|
/** Type of a filesystem entry. */
|
|
@@ -7306,6 +8307,7 @@ interface FileWatchEvent {
|
|
|
7306
8307
|
}
|
|
7307
8308
|
/** Namespace for Sandbox filesystem APIs. */
|
|
7308
8309
|
declare class SandboxFilesystem {
|
|
8310
|
+
#private;
|
|
7309
8311
|
private readonly exec;
|
|
7310
8312
|
/** @ignore */
|
|
7311
8313
|
constructor(exec: (command: string[], params?: SandboxExecParams) => Promise<ContainerProcess>);
|
|
@@ -7485,11 +8487,13 @@ declare class SandboxFilesystem {
|
|
|
7485
8487
|
writeText(data: string, remotePath: string): Promise<void>;
|
|
7486
8488
|
}
|
|
7487
8489
|
|
|
7488
|
-
type SandboxSidecarCommandRouter = Pick<TaskCommandRouterClientImpl, "containerCreate" | "containerGet" | "containerList" | "containerTerminate" | "containerWait">;
|
|
8490
|
+
type SandboxSidecarCommandRouter = Pick<TaskCommandRouterClientImpl, "containerCreate" | "containerGet" | "containerList" | "containerTerminate" | "containerWait" | "mountDirectory" | "snapshotDirectory" | "unmountDirectory">;
|
|
7489
8491
|
type SandboxSidecarAccess = {
|
|
7490
8492
|
client: ModalClient;
|
|
7491
8493
|
exec(command: string[], params: SandboxExecParams | undefined, containerId: string): Promise<ContainerProcess>;
|
|
7492
8494
|
commandRouter(): Promise<[string, SandboxSidecarCommandRouter]>;
|
|
8495
|
+
reloadVolumes(containerId: string, params: SidecarReloadVolumesParams | undefined): Promise<void>;
|
|
8496
|
+
snapshotFilesystem(containerId: string, params: SidecarSnapshotFilesystemParams | undefined): Promise<Image>;
|
|
7493
8497
|
};
|
|
7494
8498
|
/** Options for {@link SidecarService#create SidecarService.create()}. */
|
|
7495
8499
|
type SidecarCreateParams = {
|
|
@@ -7501,6 +8505,19 @@ type SidecarCreateParams = {
|
|
|
7501
8505
|
secrets?: Secret[];
|
|
7502
8506
|
/** Working directory of the sidecar container. */
|
|
7503
8507
|
workdir?: string;
|
|
8508
|
+
/**
|
|
8509
|
+
* List of CIDRs the sidecar is allowed to access. Independent of the main
|
|
8510
|
+
* container; if not set, all CIDRs are allowed. An empty list blocks all
|
|
8511
|
+
* external egress while preserving connectivity to the main container.
|
|
8512
|
+
*/
|
|
8513
|
+
outboundCidrAllowlist?: string[];
|
|
8514
|
+
/**
|
|
8515
|
+
* List of domain names the sidecar is allowed to access. Supports wildcard
|
|
8516
|
+
* prefixes (`*.example.com`). Independent of the main container.
|
|
8517
|
+
*/
|
|
8518
|
+
outboundDomainAllowlist?: string[];
|
|
8519
|
+
/** Enable a PTY for the sidecar. */
|
|
8520
|
+
pty?: boolean;
|
|
7504
8521
|
};
|
|
7505
8522
|
/** Options for {@link SidecarService#get SidecarService.get()}. */
|
|
7506
8523
|
type SidecarGetParams = {
|
|
@@ -7519,6 +8536,24 @@ type SidecarTerminateParams = {
|
|
|
7519
8536
|
/** If true, wait for the sidecar container to terminate. */
|
|
7520
8537
|
wait?: boolean;
|
|
7521
8538
|
};
|
|
8539
|
+
/** Optional parameters for {@link SidecarContainer#snapshotFilesystem SidecarContainer.snapshotFilesystem()}. */
|
|
8540
|
+
type SidecarSnapshotFilesystemParams = {
|
|
8541
|
+
/** Overall budget for the snapshot call, in milliseconds. Defaults to 55000. */
|
|
8542
|
+
timeoutMs?: number;
|
|
8543
|
+
/** Lifetime of the resulting image in milliseconds. Defaults to 30 days. Pass `null` for no expiry. */
|
|
8544
|
+
ttlMs?: number | null;
|
|
8545
|
+
};
|
|
8546
|
+
/** Optional parameters for {@link SidecarContainer#reloadVolumes SidecarContainer.reloadVolumes()}. */
|
|
8547
|
+
type SidecarReloadVolumesParams = {
|
|
8548
|
+
/** Overall budget in milliseconds. Defaults to 55000. */
|
|
8549
|
+
timeoutMs?: number;
|
|
8550
|
+
};
|
|
8551
|
+
/** Optional parameters for {@link SidecarContainer#mountImage SidecarContainer.mountImage()}. */
|
|
8552
|
+
type SidecarMountImageParams = SandboxMountImageParams;
|
|
8553
|
+
/** Optional parameters for {@link SidecarContainer#unmountImage SidecarContainer.unmountImage()}. */
|
|
8554
|
+
type SidecarUnmountImageParams = Record<string, never>;
|
|
8555
|
+
/** Optional parameters for {@link SidecarContainer#snapshotDirectory SidecarContainer.snapshotDirectory()}. */
|
|
8556
|
+
type SidecarSnapshotDirectoryParams = SandboxSnapshotDirectoryParams;
|
|
7522
8557
|
/**
|
|
7523
8558
|
* Creates and manages sidecar containers inside a Sandbox.
|
|
7524
8559
|
*
|
|
@@ -7572,6 +8607,48 @@ declare class SidecarContainer {
|
|
|
7572
8607
|
terminate(params: {
|
|
7573
8608
|
wait: true;
|
|
7574
8609
|
}): Promise<number>;
|
|
8610
|
+
/** Snapshot this Sidecar container's filesystem into an Image. */
|
|
8611
|
+
snapshotFilesystem(params?: SidecarSnapshotFilesystemParams): Promise<Image>;
|
|
8612
|
+
/**
|
|
8613
|
+
* Reload all Volumes mounted in this sidecar container.
|
|
8614
|
+
*
|
|
8615
|
+
* Blocks until the reload completes, or throws a `TimeoutError` on timeout
|
|
8616
|
+
* (the reload may still complete in the background).
|
|
8617
|
+
*/
|
|
8618
|
+
reloadVolumes(params?: SidecarReloadVolumesParams): Promise<void>;
|
|
8619
|
+
/**
|
|
8620
|
+
* Mount an {@link Image} at a path in this Sidecar container's filesystem.
|
|
8621
|
+
*
|
|
8622
|
+
* @param path - The path where the directory should be mounted
|
|
8623
|
+
* @param image - Optional {@link Image} to mount. If undefined, mounts an empty directory.
|
|
8624
|
+
* @param params - Optional parameters; see {@link SidecarMountImageParams}.
|
|
8625
|
+
*/
|
|
8626
|
+
mountImage(path: string, image?: Image, params?: SidecarMountImageParams): Promise<void>;
|
|
8627
|
+
/**
|
|
8628
|
+
* Unmounts an {@link Image} previously mounted at a path in this Sidecar container's filesystem.
|
|
8629
|
+
*
|
|
8630
|
+
* @param path - The mount path to unmount
|
|
8631
|
+
*/
|
|
8632
|
+
unmountImage(path: string, _params?: SidecarUnmountImageParams): Promise<void>;
|
|
8633
|
+
/**
|
|
8634
|
+
* Snapshots and creates a new {@link Image} from a directory in the running Sidecar container.
|
|
8635
|
+
*
|
|
8636
|
+
* The resulting Image is retained for `ttlMs` (default: 30 days),
|
|
8637
|
+
* as a hard cutoff measured from creation — usage does not extend
|
|
8638
|
+
* the lifetime. Pass `ttlMs: null` to retain indefinitely.
|
|
8639
|
+
*
|
|
8640
|
+
* The call has an overall `timeoutMs` budget (default: 55000). If it
|
|
8641
|
+
* elapses before a snapshot completes, the call is cancelled and an
|
|
8642
|
+
* error is thrown.
|
|
8643
|
+
*
|
|
8644
|
+
* The Image can be used anywhere an Image is accepted, including as a mount
|
|
8645
|
+
* or as the base filesystem for another container.
|
|
8646
|
+
*
|
|
8647
|
+
* @param path - The path of the directory to snapshot
|
|
8648
|
+
* @param params - Optional parameters; see {@link SidecarSnapshotDirectoryParams}.
|
|
8649
|
+
* @returns Promise that resolves to an {@link Image}
|
|
8650
|
+
*/
|
|
8651
|
+
snapshotDirectory(path: string, params?: SidecarSnapshotDirectoryParams): Promise<Image>;
|
|
7575
8652
|
}
|
|
7576
8653
|
|
|
7577
8654
|
/**
|
|
@@ -7611,6 +8688,48 @@ interface ModalWriteStream<R = any> extends WritableStream<R> {
|
|
|
7611
8688
|
writeBytes(bytes: Uint8Array): Promise<void>;
|
|
7612
8689
|
}
|
|
7613
8690
|
|
|
8691
|
+
/**
|
|
8692
|
+
* > Sandbox memory snapshots are in **early preview**.
|
|
8693
|
+
*
|
|
8694
|
+
* A `SandboxSnapshot` object lets you interact with a stored Sandbox snapshot that was created by calling
|
|
8695
|
+
* {@link Sandbox#experimentalSnapshot} on a Sandbox instance. This includes both the filesystem and memory state of
|
|
8696
|
+
* the original Sandbox at the time the snapshot was taken.
|
|
8697
|
+
*/
|
|
8698
|
+
declare class SandboxSnapshot {
|
|
8699
|
+
#private;
|
|
8700
|
+
readonly snapshotId: string;
|
|
8701
|
+
/** @ignore */
|
|
8702
|
+
constructor(client: ModalClient, snapshotId: string, params?: {
|
|
8703
|
+
isV2?: boolean;
|
|
8704
|
+
});
|
|
8705
|
+
/**
|
|
8706
|
+
* @internal
|
|
8707
|
+
* Whether the snapshot came from a V2 sandbox. `undefined` until hydrated.
|
|
8708
|
+
*/
|
|
8709
|
+
get _isV2(): boolean | undefined;
|
|
8710
|
+
/** @internal */
|
|
8711
|
+
_hydrate(): Promise<void>;
|
|
8712
|
+
}
|
|
8713
|
+
/**
|
|
8714
|
+
* Service for managing {@link SandboxSnapshot}s.
|
|
8715
|
+
*
|
|
8716
|
+
* Normally only ever accessed via the client as:
|
|
8717
|
+
* ```typescript
|
|
8718
|
+
* const modal = new ModalClient();
|
|
8719
|
+
* const snapshot = await modal.sandboxSnapshots.fromId(snapshotId);
|
|
8720
|
+
* ```
|
|
8721
|
+
*/
|
|
8722
|
+
declare class SandboxSnapshotService {
|
|
8723
|
+
#private;
|
|
8724
|
+
constructor(client: ModalClient);
|
|
8725
|
+
/**
|
|
8726
|
+
* Construct a {@link SandboxSnapshot} for an existing snapshot ID.
|
|
8727
|
+
*
|
|
8728
|
+
* @param snapshotId - Snapshot ID returned when the snapshot was created.
|
|
8729
|
+
*/
|
|
8730
|
+
fromId(snapshotId: string): Promise<SandboxSnapshot>;
|
|
8731
|
+
}
|
|
8732
|
+
|
|
7614
8733
|
/**
|
|
7615
8734
|
* Stdin is always present, but this option allow you to drop stdout or stderr
|
|
7616
8735
|
* if you don't need them. The default is "pipe", matching Node.js behavior.
|
|
@@ -7703,7 +8822,9 @@ type SandboxCreateParams = {
|
|
|
7703
8822
|
name?: string;
|
|
7704
8823
|
/** Tags to attach to the Sandbox. Filterable via {@link SandboxService#list client.sandboxes.list}. */
|
|
7705
8824
|
tags?: Record<string, string>;
|
|
7706
|
-
/**
|
|
8825
|
+
/**
|
|
8826
|
+
* Optional experimental options. Values must be booleans or strings.
|
|
8827
|
+
*/
|
|
7707
8828
|
experimentalOptions?: Record<string, any>;
|
|
7708
8829
|
/** If set, connections to this Sandbox will be subdomains of this domain rather than the default.
|
|
7709
8830
|
* This requires prior manual setup by Modal and is only available for Enterprise customers.
|
|
@@ -7711,6 +8832,8 @@ type SandboxCreateParams = {
|
|
|
7711
8832
|
customDomain?: string;
|
|
7712
8833
|
/** If true, the sandbox will receive a MODAL_IDENTITY_TOKEN env var for OIDC-based auth (e.g. to AWS, GCP). */
|
|
7713
8834
|
includeOidcIdentityToken?: boolean;
|
|
8835
|
+
/** Enable memory snapshots. */
|
|
8836
|
+
experimentalEnableSnapshot?: boolean;
|
|
7714
8837
|
};
|
|
7715
8838
|
/**
|
|
7716
8839
|
* Service for managing {@link Sandbox}es.
|
|
@@ -7734,10 +8857,14 @@ declare class SandboxService {
|
|
|
7734
8857
|
* Supported features include exec, encrypted tunnels, wait/poll/terminate,
|
|
7735
8858
|
* CPU and memory configuration, region placement, volumes, cloud bucket
|
|
7736
8859
|
* mounts (with static credentials via {@link Secret} or `oidcAuthRoleArn`),
|
|
7737
|
-
* OIDC identity tokens, {@link Proxy proxies},
|
|
8860
|
+
* OIDC identity tokens, {@link Proxy proxies}, filesystem snapshots, and
|
|
8861
|
+
* custom domains (`customDomain` allows connections to the Sandbox via a
|
|
8862
|
+
* subdomain of that parent domain rather than a default Modal domain;
|
|
8863
|
+
* requires prior setup by Modal).
|
|
7738
8864
|
*
|
|
7739
|
-
*
|
|
7740
|
-
*
|
|
8865
|
+
* Pass `experimentalEnableSnapshot: true` to create a sandbox that can be
|
|
8866
|
+
* snapshotted with {@link Sandbox#experimentalSnapshot}. Features like network
|
|
8867
|
+
* file systems and GPUs are not supported.
|
|
7741
8868
|
*
|
|
7742
8869
|
* V2 sandboxes created with this method are not currently returned by
|
|
7743
8870
|
* {@link SandboxService#list client.sandboxes.list()}. A named Sandbox can be
|
|
@@ -7777,25 +8904,33 @@ declare class SandboxService {
|
|
|
7777
8904
|
* @returns Promise that resolves to a Sandbox
|
|
7778
8905
|
*/
|
|
7779
8906
|
experimentalFromName(appName: string, name: string, params?: SandboxExperimentalFromNameParams): Promise<Sandbox>;
|
|
8907
|
+
/**
|
|
8908
|
+
* Restore a {@link Sandbox} from a memory snapshot.
|
|
8909
|
+
*
|
|
8910
|
+
* The restore targets the same backend the snapshot was taken from. A V1
|
|
8911
|
+
* snapshot restores as a V1 sandbox, a V2 snapshot as a V2 sandbox.
|
|
8912
|
+
*
|
|
8913
|
+
* EXPERIMENTAL: the API is subject to change.
|
|
8914
|
+
*/
|
|
8915
|
+
experimentalFromSnapshot(snapshot: SandboxSnapshot, params?: SandboxExperimentalFromSnapshotParams): Promise<Sandbox>;
|
|
7780
8916
|
/**
|
|
7781
8917
|
* List all {@link Sandbox}es for the current Environment or App ID (if specified).
|
|
7782
8918
|
* If tags are specified, only Sandboxes that have at least those tags are returned.
|
|
7783
8919
|
*/
|
|
7784
8920
|
list(params?: SandboxListParams): AsyncGenerator<Sandbox, void, unknown>;
|
|
7785
8921
|
/**
|
|
7786
|
-
* List
|
|
8922
|
+
* List V2 {@link Sandbox}es.
|
|
7787
8923
|
*
|
|
7788
|
-
* This lists
|
|
7789
|
-
*
|
|
7790
|
-
*
|
|
7791
|
-
* {@link SandboxService#list client.sandboxes.list()}. If tags are specified,
|
|
8924
|
+
* This lists all Sandboxes (both v1 and v2).
|
|
8925
|
+
* Pass `appId` to scope to an App; omit it to list across the current
|
|
8926
|
+
* environment (deprecated — prefer scoping by `appId`). If tags are specified,
|
|
7792
8927
|
* only Sandboxes that have at least those tags are returned.
|
|
7793
8928
|
*
|
|
7794
|
-
* Yields {@link Sandbox} objects that are currently running
|
|
8929
|
+
* Yields {@link Sandbox} objects that are currently running.
|
|
7795
8930
|
*
|
|
7796
8931
|
* EXPERIMENTAL: the API is subject to change.
|
|
7797
8932
|
*/
|
|
7798
|
-
experimentalList(params
|
|
8933
|
+
experimentalList(params?: SandboxExperimentalListParams): AsyncGenerator<Sandbox, void, unknown>;
|
|
7799
8934
|
}
|
|
7800
8935
|
/** Optional parameters for {@link SandboxService#list client.sandboxes.list()}. */
|
|
7801
8936
|
type SandboxListParams = {
|
|
@@ -7808,10 +8943,12 @@ type SandboxListParams = {
|
|
|
7808
8943
|
};
|
|
7809
8944
|
/** Parameters for {@link SandboxService#experimentalList client.sandboxes.experimentalList()}. */
|
|
7810
8945
|
type SandboxExperimentalListParams = {
|
|
7811
|
-
/** The App to list Sandboxes under. */
|
|
7812
|
-
appId
|
|
8946
|
+
/** The App to list Sandboxes under. Omit to list across the environment (deprecated). */
|
|
8947
|
+
appId?: string;
|
|
7813
8948
|
/** Only return Sandboxes that include all specified tags. */
|
|
7814
8949
|
tags?: Record<string, string>;
|
|
8950
|
+
/** Override environment for the request; defaults to current profile. */
|
|
8951
|
+
environment?: string;
|
|
7815
8952
|
};
|
|
7816
8953
|
/** Optional parameters for {@link SandboxService#fromName client.sandboxes.fromName()}. */
|
|
7817
8954
|
type SandboxFromNameParams = {
|
|
@@ -7821,6 +8958,14 @@ type SandboxFromNameParams = {
|
|
|
7821
8958
|
type SandboxExperimentalFromNameParams = {
|
|
7822
8959
|
environment?: string;
|
|
7823
8960
|
};
|
|
8961
|
+
/** Optional parameters for {@link SandboxService#experimentalFromSnapshot client.sandboxes.experimentalFromSnapshot()}. */
|
|
8962
|
+
type SandboxExperimentalFromSnapshotParams = {
|
|
8963
|
+
/**
|
|
8964
|
+
* Name for the restored Sandbox. Omit to reuse the original Sandbox's name,
|
|
8965
|
+
* pass `null` to leave it unnamed, or pass a string to override it.
|
|
8966
|
+
*/
|
|
8967
|
+
name?: string | null;
|
|
8968
|
+
};
|
|
7824
8969
|
/** Optional parameters for {@link Sandbox#exec Sandbox.exec()}. */
|
|
7825
8970
|
type SandboxExecParams = {
|
|
7826
8971
|
/** Specifies text or binary encoding for input and output streams. */
|
|
@@ -7861,16 +9006,21 @@ type SandboxSnapshotFilesystemParams = {
|
|
|
7861
9006
|
*/
|
|
7862
9007
|
ttlMs?: number | null;
|
|
7863
9008
|
};
|
|
7864
|
-
/** Optional parameters for
|
|
7865
|
-
type
|
|
9009
|
+
/** Optional parameters for Sandbox.experimentalGetExitSnapshot(). */
|
|
9010
|
+
type SandboxExperimentalGetExitSnapshotParams = {
|
|
7866
9011
|
/**
|
|
7867
|
-
*
|
|
7868
|
-
*
|
|
7869
|
-
*
|
|
7870
|
-
*
|
|
9012
|
+
* Total time to wait in milliseconds, spread across repeated long polls of
|
|
9013
|
+
* at most `EXIT_SNAPSHOT_LONG_POLL_TIMEOUT` seconds each. `undefined` (the
|
|
9014
|
+
* default) waits until the snapshot reaches a terminal state. `0` performs
|
|
9015
|
+
* an immediate check without waiting.
|
|
7871
9016
|
*/
|
|
7872
9017
|
timeoutMs?: number;
|
|
7873
9018
|
};
|
|
9019
|
+
/** Optional parameters for {@link Sandbox#reloadVolumes Sandbox.reloadVolumes()}. */
|
|
9020
|
+
type SandboxReloadVolumesParams = {
|
|
9021
|
+
/** Overall budget in milliseconds. Defaults to 55000. */
|
|
9022
|
+
timeoutMs?: number;
|
|
9023
|
+
};
|
|
7874
9024
|
/** Optional parameters for {@link Sandbox#snapshotDirectory Sandbox.snapshotDirectory()}. */
|
|
7875
9025
|
type SandboxSnapshotDirectoryParams = {
|
|
7876
9026
|
/**
|
|
@@ -7946,11 +9096,16 @@ declare class Tunnel {
|
|
|
7946
9096
|
declare class Sandbox {
|
|
7947
9097
|
#private;
|
|
7948
9098
|
readonly sandboxId: string;
|
|
7949
|
-
/**
|
|
9099
|
+
/**
|
|
9100
|
+
* Creates a Sandbox handle for a server-returned ID, deducing the backend
|
|
9101
|
+
* version from the ID shape.
|
|
9102
|
+
*
|
|
9103
|
+
* @ignore
|
|
9104
|
+
*/
|
|
7950
9105
|
constructor(client: ModalClient, sandboxId: string, params?: {
|
|
7951
|
-
isV2?: boolean;
|
|
7952
9106
|
taskId?: string;
|
|
7953
9107
|
tunnels?: Record<number, Tunnel>;
|
|
9108
|
+
initCommandRouterAccess?: CommandRouterAccess;
|
|
7954
9109
|
});
|
|
7955
9110
|
get stdin(): ModalWriteStream<string>;
|
|
7956
9111
|
get stdout(): ModalReadStream<string>;
|
|
@@ -7963,10 +9118,31 @@ declare class Sandbox {
|
|
|
7963
9118
|
* EXPERIMENTAL: the API is subject to change.
|
|
7964
9119
|
*/
|
|
7965
9120
|
get experimentalSidecars(): SidecarService;
|
|
7966
|
-
/**
|
|
9121
|
+
/**
|
|
9122
|
+
* Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in {@link SandboxService#list client.sandboxes.list}.
|
|
9123
|
+
*
|
|
9124
|
+
* Setting tags replaces the Sandbox's entire tag set; passing an empty object clears all tags.
|
|
9125
|
+
*/
|
|
7967
9126
|
setTags(tags: Record<string, string>): Promise<void>;
|
|
7968
9127
|
/** Get tags (key-value pairs) currently attached to this Sandbox from the server. */
|
|
7969
9128
|
getTags(): Promise<Record<string, string>>;
|
|
9129
|
+
/**
|
|
9130
|
+
* Assign a name to a running V2 {@link Sandbox} that was created without one.
|
|
9131
|
+
*
|
|
9132
|
+
* This is only supported for V2 Sandboxes, i.e. Sandboxes created via
|
|
9133
|
+
* {@link SandboxService#experimentalCreate client.sandboxes.experimentalCreate()}.
|
|
9134
|
+
* A name may only be set once, and only on a Sandbox that has never had one;
|
|
9135
|
+
* afterwards the Sandbox can be looked up with
|
|
9136
|
+
* {@link SandboxService#experimentalFromName client.sandboxes.experimentalFromName()}.
|
|
9137
|
+
*
|
|
9138
|
+
* EXPERIMENTAL: the API is subject to change.
|
|
9139
|
+
*
|
|
9140
|
+
* @param name - Name to assign to the Sandbox. Must be unique within the App.
|
|
9141
|
+
* @throws {AlreadyExistsError} If another running Sandbox in the App already holds the name.
|
|
9142
|
+
* @throws {InvalidError} If the server rejects the name as invalid.
|
|
9143
|
+
* @throws {ConflictError} If the Sandbox already has a name or is no longer running.
|
|
9144
|
+
*/
|
|
9145
|
+
experimentalSetName(name: string): Promise<void>;
|
|
7970
9146
|
exec(command: string[], params?: SandboxExecParams & {
|
|
7971
9147
|
mode?: "text";
|
|
7972
9148
|
}): Promise<ContainerProcess<string>>;
|
|
@@ -7985,6 +9161,9 @@ declare class Sandbox {
|
|
|
7985
9161
|
* Disconnect from the Sandbox, cleaning up local resources.
|
|
7986
9162
|
* The Sandbox continues running on Modal's infrastructure.
|
|
7987
9163
|
* After calling detach(), most operations on this Sandbox object will throw.
|
|
9164
|
+
*
|
|
9165
|
+
* This does not block on or interrupt ongoing reads or calls. Connection
|
|
9166
|
+
* resources are closed promptly once those operations finish.
|
|
7988
9167
|
*/
|
|
7989
9168
|
detach(): void;
|
|
7990
9169
|
wait(): Promise<number>;
|
|
@@ -8018,6 +9197,55 @@ declare class Sandbox {
|
|
|
8018
9197
|
* @returns Promise that resolves to an {@link Image}
|
|
8019
9198
|
*/
|
|
8020
9199
|
snapshotFilesystem(params?: SandboxSnapshotFilesystemParams): Promise<Image>;
|
|
9200
|
+
/**
|
|
9201
|
+
* Get the exit filesystem snapshot image.
|
|
9202
|
+
*
|
|
9203
|
+
* An exit snapshot captures the Sandbox filesystem when the Sandbox exits,
|
|
9204
|
+
* whether its entrypoint finishes gracefully, abruptly, or it is stopped with
|
|
9205
|
+
* {@link Sandbox#terminate}. The resulting {@link Image} can be passed to
|
|
9206
|
+
* {@link SandboxService#create client.sandboxes.create()} to start a new
|
|
9207
|
+
* Sandbox from the saved filesystem.
|
|
9208
|
+
*
|
|
9209
|
+
* Exit snapshots are opt-in: the Sandbox must have been created with
|
|
9210
|
+
* `experimentalOptions: { enable_exit_snapshot: true }`. Calling this on a
|
|
9211
|
+
* Sandbox created without that option throws an {@link InvalidError}.
|
|
9212
|
+
*
|
|
9213
|
+
* @example
|
|
9214
|
+
* ```ts
|
|
9215
|
+
* const sb = await modal.sandboxes.create(app, image, {
|
|
9216
|
+
* experimentalOptions: { enable_exit_snapshot: true },
|
|
9217
|
+
* });
|
|
9218
|
+
* // ... use the Sandbox ...
|
|
9219
|
+
* await sb.terminate();
|
|
9220
|
+
* const image = await sb.experimentalGetExitSnapshot();
|
|
9221
|
+
* const sb2 = await modal.sandboxes.create(app, image);
|
|
9222
|
+
* ```
|
|
9223
|
+
*
|
|
9224
|
+
* EXPERIMENTAL: the API is subject to change.
|
|
9225
|
+
*
|
|
9226
|
+
* @param params - Optional parameters; see SandboxExperimentalGetExitSnapshotParams.
|
|
9227
|
+
* @returns The exit snapshot Image.
|
|
9228
|
+
* @throws {InvalidError} If `timeoutMs` is negative, or if exit snapshots
|
|
9229
|
+
* were not enabled when the Sandbox was created.
|
|
9230
|
+
* @throws {TimeoutError} If `timeoutMs` elapses before the snapshot
|
|
9231
|
+
* reaches a terminal state. This includes `timeoutMs = 0` when the
|
|
9232
|
+
* snapshot is still pending.
|
|
9233
|
+
* @throws {SnapshotCreationError} Snapshot operation is done and failed.
|
|
9234
|
+
* Polling again will not produce an Image; filesystem state is gone.
|
|
9235
|
+
* @throws {NotFoundError} If the Sandbox does not exist.
|
|
9236
|
+
*/
|
|
9237
|
+
experimentalGetExitSnapshot(params?: SandboxExperimentalGetExitSnapshotParams): Promise<Image>;
|
|
9238
|
+
/**
|
|
9239
|
+
* Snapshot the filesystem and memory of the Sandbox.
|
|
9240
|
+
*
|
|
9241
|
+
* Returns a {@link SandboxSnapshot} which can be restored into a new Sandbox
|
|
9242
|
+
* with {@link SandboxService#experimentalFromSnapshot client.sandboxes.experimentalFromSnapshot()}.
|
|
9243
|
+
*
|
|
9244
|
+
* The Sandbox must have been created with `experimentalEnableSnapshot: true`.
|
|
9245
|
+
*
|
|
9246
|
+
* EXPERIMENTAL: the API is subject to change.
|
|
9247
|
+
*/
|
|
9248
|
+
experimentalSnapshot(): Promise<SandboxSnapshot>;
|
|
8021
9249
|
/**
|
|
8022
9250
|
* Mount an {@link Image} at a path in the Sandbox filesystem.
|
|
8023
9251
|
*
|
|
@@ -8043,10 +9271,8 @@ declare class Sandbox {
|
|
|
8043
9271
|
/**
|
|
8044
9272
|
* Reload all Volumes mounted in the Sandbox.
|
|
8045
9273
|
*
|
|
8046
|
-
* Blocks until the
|
|
8047
|
-
*
|
|
8048
|
-
* `TimeoutError` is thrown; note that the reload may still complete in the
|
|
8049
|
-
* background.
|
|
9274
|
+
* Blocks until the reload completes, or throws a `TimeoutError` on timeout
|
|
9275
|
+
* (the reload may still complete in the background).
|
|
8050
9276
|
*
|
|
8051
9277
|
* @param params - Optional parameters; see {@link SandboxReloadVolumesParams}.
|
|
8052
9278
|
*/
|
|
@@ -8088,6 +9314,23 @@ declare class ContainerProcess<R extends string | Uint8Array = any> {
|
|
|
8088
9314
|
* Useful for when an stdin write has failed.
|
|
8089
9315
|
*/
|
|
8090
9316
|
closeStdin(): Promise<void>;
|
|
9317
|
+
/**
|
|
9318
|
+
* @internal
|
|
9319
|
+
* @hidden
|
|
9320
|
+
* Stream `source` into the process's stdin and close it (EOF) on success.
|
|
9321
|
+
*
|
|
9322
|
+
* Returns the total bytes streamed.
|
|
9323
|
+
*/
|
|
9324
|
+
_stdinWriteStream(source: StdinSource): Promise<number>;
|
|
9325
|
+
/**
|
|
9326
|
+
* @internal
|
|
9327
|
+
* @hidden
|
|
9328
|
+
* Check if the container process has finished running.
|
|
9329
|
+
*
|
|
9330
|
+
* Returns `null` if the process is still running, else returns the exit
|
|
9331
|
+
* code.
|
|
9332
|
+
*/
|
|
9333
|
+
_poll(): Promise<number | null>;
|
|
8091
9334
|
/** Wait for process completion and return the exit code. */
|
|
8092
9335
|
wait(): Promise<number>;
|
|
8093
9336
|
}
|
|
@@ -8095,6 +9338,14 @@ declare class ContainerProcess<R extends string | Uint8Array = any> {
|
|
|
8095
9338
|
interface ModalClientParams {
|
|
8096
9339
|
tokenId?: string;
|
|
8097
9340
|
tokenSecret?: string;
|
|
9341
|
+
/** OAuth refresh token returned by Modal's token endpoint. */
|
|
9342
|
+
oauthRefreshToken?: string;
|
|
9343
|
+
/** Modal-issued OAuth client ID, with an `oc-` prefix. */
|
|
9344
|
+
oauthClientId?: string;
|
|
9345
|
+
/** Modal-issued OAuth client secret, with an `ov-` prefix. */
|
|
9346
|
+
oauthClientSecret?: string;
|
|
9347
|
+
/** Unencrypted RSA private key encoded as PEM, with literal or escaped newlines. */
|
|
9348
|
+
oauthJwtKey?: string;
|
|
8098
9349
|
environment?: string;
|
|
8099
9350
|
endpoint?: string;
|
|
8100
9351
|
timeoutMs?: number;
|
|
@@ -8121,7 +9372,7 @@ type ModalGrpcClient = Client<typeof ModalClientDefinition, TimeoutOptions & Ret
|
|
|
8121
9372
|
*
|
|
8122
9373
|
* ModalClient provides access to all Modal services through service properties.
|
|
8123
9374
|
* Create a client instance and use its service properties to manage {@link App}s,
|
|
8124
|
-
* {@link Function_ Function}s,
|
|
9375
|
+
* {@link Function_ Function}s, {@link Sandbox}es, and other Modal resources.
|
|
8125
9376
|
*
|
|
8126
9377
|
* @example
|
|
8127
9378
|
* ```typescript
|
|
@@ -8144,6 +9395,7 @@ declare class ModalClient {
|
|
|
8144
9395
|
readonly proxies: ProxyService;
|
|
8145
9396
|
readonly queues: QueueService;
|
|
8146
9397
|
readonly sandboxes: SandboxService;
|
|
9398
|
+
readonly sandboxSnapshots: SandboxSnapshotService;
|
|
8147
9399
|
readonly secrets: SecretService;
|
|
8148
9400
|
readonly volumes: VolumeService;
|
|
8149
9401
|
/** @ignore */
|
|
@@ -8154,8 +9406,10 @@ declare class ModalClient {
|
|
|
8154
9406
|
private authTokenManager;
|
|
8155
9407
|
private customMiddleware;
|
|
8156
9408
|
private environmentManager;
|
|
9409
|
+
private oauthJwtKey?;
|
|
8157
9410
|
constructor(params?: ModalClientParams);
|
|
8158
9411
|
environmentName(environment?: string): string;
|
|
9412
|
+
private validateProfileCredentials;
|
|
8159
9413
|
/**
|
|
8160
9414
|
* Returns the image builder version by querying the server where the local profile takes
|
|
8161
9415
|
* precedence.
|
|
@@ -8234,6 +9488,10 @@ declare class FunctionTimeoutError extends Error {
|
|
|
8234
9488
|
declare class RemoteError extends Error {
|
|
8235
9489
|
constructor(message: string);
|
|
8236
9490
|
}
|
|
9491
|
+
/** Something unexpected happened during runtime. */
|
|
9492
|
+
declare class ExecutionError extends Error {
|
|
9493
|
+
constructor(message: string);
|
|
9494
|
+
}
|
|
8237
9495
|
/** A retryable internal error from Modal. */
|
|
8238
9496
|
declare class InternalFailure extends Error {
|
|
8239
9497
|
constructor(message: string);
|
|
@@ -8246,6 +9504,10 @@ declare class NotFoundError extends Error {
|
|
|
8246
9504
|
declare class AlreadyExistsError extends Error {
|
|
8247
9505
|
constructor(message: string);
|
|
8248
9506
|
}
|
|
9507
|
+
/** The current state of a resource conflicts with the requested operation. */
|
|
9508
|
+
declare class ConflictError extends Error {
|
|
9509
|
+
constructor(message: string);
|
|
9510
|
+
}
|
|
8249
9511
|
/** A request or other operation was invalid. */
|
|
8250
9512
|
declare class InvalidError extends Error {
|
|
8251
9513
|
constructor(message: string);
|
|
@@ -8294,6 +9556,10 @@ declare class SandboxFilesystemPermissionError extends SandboxFilesystemError {
|
|
|
8294
9556
|
declare class SandboxTimeoutError extends Error {
|
|
8295
9557
|
constructor(message?: string);
|
|
8296
9558
|
}
|
|
9559
|
+
/** Snapshot operation is done and failed. Polling again will not produce an Image; filesystem state is gone. */
|
|
9560
|
+
declare class SnapshotCreationError extends Error {
|
|
9561
|
+
constructor(message: string);
|
|
9562
|
+
}
|
|
8297
9563
|
/** Thrown when attempting operations on a detached Sandbox. */
|
|
8298
9564
|
declare class ClientClosedError extends Error {
|
|
8299
9565
|
constructor(message?: string);
|
|
@@ -8301,4 +9567,4 @@ declare class ClientClosedError extends Error {
|
|
|
8301
9567
|
|
|
8302
9568
|
declare function checkForRenamedParams(params: any, renames: Record<string, string>): void;
|
|
8303
9569
|
|
|
8304
|
-
export { AlreadyExistsError, App, type AppFromNameParams, AppService, ClientClosedError, CloudBucketMount, CloudBucketMountService, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type FileInfo, type FileType, type FileWatchEvent, type FileWatchEventType, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, type FunctionWithBatchingParams, type FunctionWithConcurrencyParams, type FunctionWithOptionsParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, type ImageFromNameParams, type ImagePublishParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, Probe, type ProbeParams, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateConnectCredentials, type SandboxCreateConnectTokenParams, type SandboxCreateParams, type SandboxExecParams, type SandboxExperimentalFromNameParams, type SandboxExperimentalListParams, SandboxFilesystem, SandboxFilesystemDirectoryNotEmptyError, SandboxFilesystemError, SandboxFilesystemFileTooLargeError, SandboxFilesystemIsADirectoryError, SandboxFilesystemNotADirectoryError, SandboxFilesystemNotFoundError, SandboxFilesystemPathAlreadyExistsError, SandboxFilesystemPermissionError, type SandboxFromNameParams, type SandboxListParams, type SandboxMountImageParams, type SandboxReloadVolumesParams, SandboxService, type SandboxSnapshotDirectoryParams, type SandboxSnapshotFilesystemParams, type SandboxTerminateParams, SandboxTimeoutError, type SandboxUpdateNetworkPolicyParams, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, SidecarContainer, type SidecarCreateParams, type SidecarExecParams, type SidecarGetParams, type SidecarListParams, SidecarService, type SidecarTerminateParams, type StdioBehavior, type StreamMode, TimeoutError, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, type VolumeMountOptionsParams, VolumeService, checkForRenamedParams };
|
|
9570
|
+
export { AlreadyExistsError, App, type AppFromNameParams, AppService, ClientClosedError, CloudBucketMount, CloudBucketMountService, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ConflictError, ContainerProcess, ExecutionError, type FileInfo, type FileType, type FileWatchEvent, type FileWatchEventType, type FunctionAutoscalerSettings, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, type FunctionCallLogFetchParams, type FunctionCallLogStreamParams, type FunctionCallLogTailParams, FunctionCallLogsManager, FunctionCallService, type FunctionFromNameParams, type FunctionLogFetchParams, type FunctionLogStreamParams, type FunctionLogTailParams, FunctionLogsManager, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, type FunctionWithBatchingParams, type FunctionWithConcurrencyParams, type FunctionWithOptionsParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, type ImageFromNameParams, type ImagePublishParams, ImageService, InternalFailure, InvalidError, type LogEntry, type FunctionLogFetchParams as LogFetchParams, type LogLevel, type LogSource, type Logger, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, Probe, type ProbeParams, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateConnectCredentials, type SandboxCreateConnectTokenParams, type SandboxCreateParams, type SandboxExecParams, type SandboxExperimentalFromNameParams, type SandboxExperimentalFromSnapshotParams, type SandboxExperimentalGetExitSnapshotParams, type SandboxExperimentalListParams, SandboxFilesystem, SandboxFilesystemDirectoryNotEmptyError, SandboxFilesystemError, SandboxFilesystemFileTooLargeError, SandboxFilesystemIsADirectoryError, SandboxFilesystemNotADirectoryError, SandboxFilesystemNotFoundError, SandboxFilesystemPathAlreadyExistsError, SandboxFilesystemPermissionError, type SandboxFromNameParams, type SandboxListParams, type SandboxMountImageParams, type SandboxReloadVolumesParams, SandboxService, SandboxSnapshot, type SandboxSnapshotDirectoryParams, type SandboxSnapshotFilesystemParams, SandboxSnapshotService, type SandboxTerminateParams, SandboxTimeoutError, type SandboxUpdateNetworkPolicyParams, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, SidecarContainer, type SidecarCreateParams, type SidecarExecParams, type SidecarGetParams, type SidecarListParams, type SidecarMountImageParams, SidecarService, type SidecarSnapshotDirectoryParams, type SidecarSnapshotFilesystemParams, type SidecarTerminateParams, type SidecarUnmountImageParams, SnapshotCreationError, type StdioBehavior, type StreamMode, TimeoutError, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, type VolumeMountOptionsParams, VolumeService, checkForRenamedParams };
|