import { Client, Status, ClientMiddleware } from 'nice-grpc'; import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire'; /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request * or the response type of an API method. For instance: * * service Foo { * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); * } * * The JSON representation for `Empty` is empty JSON object `{}`. */ interface Empty { } declare const Empty: MessageFns$2; type Builtin$2 = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial$2 = T extends Builtin$2 ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial$2; } : Partial; interface MessageFns$2 { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial$2): T; fromPartial(object: DeepPartial$2): T; } declare enum AppDeployVisibility { APP_DEPLOY_VISIBILITY_UNSPECIFIED = 0, APP_DEPLOY_VISIBILITY_WORKSPACE = 1, APP_DEPLOY_VISIBILITY_PUBLIC = 2, UNRECOGNIZED = -1 } declare enum AppDisconnectReason { APP_DISCONNECT_REASON_UNSPECIFIED = 0, APP_DISCONNECT_REASON_LOCAL_EXCEPTION = 1, APP_DISCONNECT_REASON_KEYBOARD_INTERRUPT = 2, APP_DISCONNECT_REASON_ENTRYPOINT_COMPLETED = 3, APP_DISCONNECT_REASON_DEPLOYMENT_EXCEPTION = 4, APP_DISCONNECT_REASON_REMOTE_EXCEPTION = 5, UNRECOGNIZED = -1 } /** * NOTE: make sure to update the frontend if we add a new state here * https://github.com/modal-labs/modal/blob/main/frontend/src/routes/(dashboard)/%5B%5Bworkspace%5D%5D/apps/+page.svelte#L95 */ declare enum AppState { APP_STATE_UNSPECIFIED = 0, /** APP_STATE_EPHEMERAL - Will be discharged when the client disconnects */ APP_STATE_EPHEMERAL = 1, APP_STATE_DETACHED = 2, /** APP_STATE_DEPLOYED - Will be discharged when overwritten */ APP_STATE_DEPLOYED = 3, /** APP_STATE_STOPPING - Winding down app due to user termination. */ APP_STATE_STOPPING = 4, /** APP_STATE_STOPPED - Stopped */ APP_STATE_STOPPED = 5, /** APP_STATE_INITIALIZING - App is created and in process of deployment. */ APP_STATE_INITIALIZING = 6, /** APP_STATE_DISABLED - Same as stopped but prevented from being garbage collected */ APP_STATE_DISABLED = 7, /** APP_STATE_DETACHED_DISCONNECTED - App is detached and local client has disconnected. */ APP_STATE_DETACHED_DISCONNECTED = 8, /** * APP_STATE_DERIVED - App is derived from another workspace. Acts as a static, immutable group of functions. * * @deprecated */ APP_STATE_DERIVED = 9, UNRECOGNIZED = -1 } declare enum AppStopSource { APP_STOP_SOURCE_UNSPECIFIED = 0, APP_STOP_SOURCE_CLI = 1, APP_STOP_SOURCE_PYTHON_CLIENT = 2, APP_STOP_SOURCE_WEB = 3, UNRECOGNIZED = -1 } declare enum CertificateStatus { CERTIFICATE_STATUS_PENDING = 0, CERTIFICATE_STATUS_ISSUED = 1, CERTIFICATE_STATUS_FAILED = 2, CERTIFICATE_STATUS_REVOKED = 3, UNRECOGNIZED = -1 } declare enum CheckpointStatus { CHECKPOINT_STATUS_UNSPECIFIED = 0, CHECKPOINT_STATUS_PENDING = 1, CHECKPOINT_STATUS_PROCESSING = 2, CHECKPOINT_STATUS_READY = 3, CHECKPOINT_STATUS_FAILED = 4, UNRECOGNIZED = -1 } declare enum CloudProvider { CLOUD_PROVIDER_UNSPECIFIED = 0, CLOUD_PROVIDER_AWS = 1, CLOUD_PROVIDER_GCP = 2, CLOUD_PROVIDER_AUTO = 3, CLOUD_PROVIDER_OCI = 4, UNRECOGNIZED = -1 } declare enum DNSRecordType { DNS_RECORD_TYPE_A = 0, DNS_RECORD_TYPE_TXT = 1, DNS_RECORD_TYPE_CNAME = 2, UNRECOGNIZED = -1 } /** Which data format a binary message is encoded with. */ declare enum DataFormat { DATA_FORMAT_UNSPECIFIED = 0, /** DATA_FORMAT_PICKLE - Cloudpickle */ DATA_FORMAT_PICKLE = 1, /** DATA_FORMAT_ASGI - "Asgi" protobuf message */ DATA_FORMAT_ASGI = 2, /** DATA_FORMAT_GENERATOR_DONE - "GeneratorDone" protobuf message */ DATA_FORMAT_GENERATOR_DONE = 3, DATA_FORMAT_CBOR = 4, UNRECOGNIZED = -1 } declare enum DeploymentNamespace { DEPLOYMENT_NAMESPACE_UNSPECIFIED = 0, DEPLOYMENT_NAMESPACE_WORKSPACE = 1, DEPLOYMENT_NAMESPACE_GLOBAL = 3, UNRECOGNIZED = -1 } declare enum ExecOutputOption { EXEC_OUTPUT_OPTION_UNSPECIFIED = 0, EXEC_OUTPUT_OPTION_DEVNULL = 1, EXEC_OUTPUT_OPTION_PIPE = 2, EXEC_OUTPUT_OPTION_STDOUT = 3, UNRECOGNIZED = -1 } declare enum FileDescriptor { FILE_DESCRIPTOR_UNSPECIFIED = 0, FILE_DESCRIPTOR_STDOUT = 1, FILE_DESCRIPTOR_STDERR = 2, FILE_DESCRIPTOR_INFO = 3, UNRECOGNIZED = -1 } declare enum FunctionCallInvocationType { FUNCTION_CALL_INVOCATION_TYPE_UNSPECIFIED = 0, FUNCTION_CALL_INVOCATION_TYPE_SYNC_LEGACY = 1, FUNCTION_CALL_INVOCATION_TYPE_ASYNC_LEGACY = 2, FUNCTION_CALL_INVOCATION_TYPE_ASYNC = 3, FUNCTION_CALL_INVOCATION_TYPE_SYNC = 4, UNRECOGNIZED = -1 } declare enum FunctionCallType { FUNCTION_CALL_TYPE_UNSPECIFIED = 0, FUNCTION_CALL_TYPE_UNARY = 1, FUNCTION_CALL_TYPE_MAP = 2, UNRECOGNIZED = -1 } declare enum GPUType { /** * GPU_TYPE_UNSPECIFIED - Note: this enum is no longer used by current clients - don't add new types * Old clients still send it, so we use it server-side for compatibility */ GPU_TYPE_UNSPECIFIED = 0, GPU_TYPE_T4 = 1, GPU_TYPE_A100 = 2, GPU_TYPE_A10G = 3, GPU_TYPE_ANY = 4, GPU_TYPE_A100_80GB = 8, GPU_TYPE_L4 = 9, GPU_TYPE_H100 = 10, GPU_TYPE_L40S = 11, GPU_TYPE_H200 = 12, UNRECOGNIZED = -1 } declare enum ObjectCreationType { /** OBJECT_CREATION_TYPE_UNSPECIFIED - just lookup */ OBJECT_CREATION_TYPE_UNSPECIFIED = 0, OBJECT_CREATION_TYPE_CREATE_IF_MISSING = 1, OBJECT_CREATION_TYPE_CREATE_FAIL_IF_EXISTS = 2, OBJECT_CREATION_TYPE_CREATE_OVERWRITE_IF_EXISTS = 3, /** OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP - deprecate at some point */ OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP = 4, OBJECT_CREATION_TYPE_EPHEMERAL = 5, UNRECOGNIZED = -1 } declare enum ParameterType { PARAM_TYPE_UNSPECIFIED = 0, PARAM_TYPE_STRING = 1, PARAM_TYPE_INT = 2, /** PARAM_TYPE_PICKLE - currently unused */ PARAM_TYPE_PICKLE = 3, PARAM_TYPE_BYTES = 4, /** PARAM_TYPE_UNKNOWN - used in schemas to signify unrecognized or un-annotated types */ PARAM_TYPE_UNKNOWN = 5, PARAM_TYPE_LIST = 6, PARAM_TYPE_DICT = 7, PARAM_TYPE_NONE = 8, PARAM_TYPE_BOOL = 9, UNRECOGNIZED = -1 } declare enum ProgressType { /** IMAGE_SNAPSHOT_UPLOAD - TODO(erikbern): shouldn't be zero, and needs prefix */ IMAGE_SNAPSHOT_UPLOAD = 0, /** FUNCTION_QUEUED - TODO(erikbern): needs_prefix */ FUNCTION_QUEUED = 1, UNRECOGNIZED = -1 } declare enum ProxyIpStatus { PROXY_IP_STATUS_UNSPECIFIED = 0, PROXY_IP_STATUS_CREATING = 1, PROXY_IP_STATUS_ONLINE = 2, PROXY_IP_STATUS_TERMINATED = 3, PROXY_IP_STATUS_UNHEALTHY = 4, UNRECOGNIZED = -1 } declare enum RateLimitInterval { RATE_LIMIT_INTERVAL_UNSPECIFIED = 0, RATE_LIMIT_INTERVAL_SECOND = 1, RATE_LIMIT_INTERVAL_MINUTE = 2, UNRECOGNIZED = -1 } declare enum RegistryAuthType { /** REGISTRY_AUTH_TYPE_UNSPECIFIED - Older clients send this instead of "public". */ REGISTRY_AUTH_TYPE_UNSPECIFIED = 0, REGISTRY_AUTH_TYPE_AWS = 1, REGISTRY_AUTH_TYPE_GCP = 2, REGISTRY_AUTH_TYPE_PUBLIC = 3, REGISTRY_AUTH_TYPE_STATIC_CREDS = 4, UNRECOGNIZED = -1 } declare enum SeekWhence { SEEK_SET = 0, SEEK_CUR = 1, SEEK_END = 2, UNRECOGNIZED = -1 } declare enum SystemErrorCode { SYSTEM_ERROR_CODE_UNSPECIFIED = 0, /** SYSTEM_ERROR_CODE_PERM - EPERM: Operation not permitted */ SYSTEM_ERROR_CODE_PERM = 1, /** SYSTEM_ERROR_CODE_NOENT - ENOENT: No such file or directory */ SYSTEM_ERROR_CODE_NOENT = 2, /** SYSTEM_ERROR_CODE_IO - EIO: Input/output error */ SYSTEM_ERROR_CODE_IO = 5, /** SYSTEM_ERROR_CODE_NXIO - ENXIO: No such device or address */ SYSTEM_ERROR_CODE_NXIO = 6, /** SYSTEM_ERROR_CODE_NOMEM - ENOMEM: Out of memory */ SYSTEM_ERROR_CODE_NOMEM = 12, /** SYSTEM_ERROR_CODE_ACCES - EACCES: Permission denied */ SYSTEM_ERROR_CODE_ACCES = 13, /** SYSTEM_ERROR_CODE_EXIST - EEXIST: File exists */ SYSTEM_ERROR_CODE_EXIST = 17, /** SYSTEM_ERROR_CODE_NOTDIR - ENOTDIR: Not a directory */ SYSTEM_ERROR_CODE_NOTDIR = 20, /** SYSTEM_ERROR_CODE_ISDIR - EISDIR: Is a directory */ SYSTEM_ERROR_CODE_ISDIR = 21, /** SYSTEM_ERROR_CODE_INVAL - EINVAL: Invalid argument */ SYSTEM_ERROR_CODE_INVAL = 22, /** SYSTEM_ERROR_CODE_MFILE - EMFILE: Too many open files */ SYSTEM_ERROR_CODE_MFILE = 24, /** SYSTEM_ERROR_CODE_FBIG - EFBIG: File too large */ SYSTEM_ERROR_CODE_FBIG = 27, /** SYSTEM_ERROR_CODE_NOSPC - ENOSPC: No space left on device */ SYSTEM_ERROR_CODE_NOSPC = 28, UNRECOGNIZED = -1 } declare enum TaskSnapshotBehavior { TASK_SNAPSHOT_BEHAVIOR_UNSPECIFIED = 0, TASK_SNAPSHOT_BEHAVIOR_SNAPSHOT = 1, TASK_SNAPSHOT_BEHAVIOR_RESTORE = 2, TASK_SNAPSHOT_BEHAVIOR_NONE = 3, UNRECOGNIZED = -1 } declare enum TaskState { TASK_STATE_UNSPECIFIED = 0, TASK_STATE_CREATED = 6, TASK_STATE_QUEUED = 1, TASK_STATE_WORKER_ASSIGNED = 2, TASK_STATE_LOADING_IMAGE = 3, TASK_STATE_ACTIVE = 4, TASK_STATE_COMPLETED = 5, TASK_STATE_CREATING_CONTAINER = 7, TASK_STATE_IDLE = 8, TASK_STATE_PREEMPTIBLE = 9, TASK_STATE_PREEMPTED = 10, TASK_STATE_LOADING_CHECKPOINT_IMAGE = 11, UNRECOGNIZED = -1 } declare enum TunnelType { TUNNEL_TYPE_UNSPECIFIED = 0, /** TUNNEL_TYPE_H2 - HTTP/2 tunnel */ TUNNEL_TYPE_H2 = 1, UNRECOGNIZED = -1 } declare enum VolumeFsVersion { VOLUME_FS_VERSION_UNSPECIFIED = 0, VOLUME_FS_VERSION_V1 = 1, VOLUME_FS_VERSION_V2 = 2, UNRECOGNIZED = -1 } declare enum WebhookAsyncMode { WEBHOOK_ASYNC_MODE_UNSPECIFIED = 0, /** WEBHOOK_ASYNC_MODE_DISABLED - No longer used by client */ WEBHOOK_ASYNC_MODE_DISABLED = 2, /** WEBHOOK_ASYNC_MODE_TRIGGER - No longer used by client (previously used when wait_for_response=False) */ WEBHOOK_ASYNC_MODE_TRIGGER = 3, /** WEBHOOK_ASYNC_MODE_AUTO - The default */ WEBHOOK_ASYNC_MODE_AUTO = 4, UNRECOGNIZED = -1 } declare enum WebhookType { WEBHOOK_TYPE_UNSPECIFIED = 0, WEBHOOK_TYPE_ASGI_APP = 1, WEBHOOK_TYPE_FUNCTION = 2, WEBHOOK_TYPE_WSGI_APP = 3, WEBHOOK_TYPE_WEB_SERVER = 4, UNRECOGNIZED = -1 } declare enum ClassParameterInfo_ParameterSerializationFormat { PARAM_SERIALIZATION_FORMAT_UNSPECIFIED = 0, /** PARAM_SERIALIZATION_FORMAT_PICKLE - legacy format - pickle of (args, kwargs) tuple */ PARAM_SERIALIZATION_FORMAT_PICKLE = 1, /** PARAM_SERIALIZATION_FORMAT_PROTO - new format using api.FunctionParameterSet */ PARAM_SERIALIZATION_FORMAT_PROTO = 2, UNRECOGNIZED = -1 } declare enum CloudBucketMount_BucketType { UNSPECIFIED = 0, S3 = 1, R2 = 2, GCP = 3, UNRECOGNIZED = -1 } declare enum CloudBucketMount_MetadataTTLType { METADATA_TTL_TYPE_UNSPECIFIED = 0, METADATA_TTL_TYPE_MINIMAL = 1, METADATA_TTL_TYPE_INDEFINITE = 2, UNRECOGNIZED = -1 } declare enum FileEntry_FileType { UNSPECIFIED = 0, FILE = 1, DIRECTORY = 2, SYMLINK = 3, FIFO = 4, SOCKET = 5, UNRECOGNIZED = -1 } declare enum Function_DefinitionType { DEFINITION_TYPE_UNSPECIFIED = 0, DEFINITION_TYPE_SERIALIZED = 1, DEFINITION_TYPE_FILE = 2, UNRECOGNIZED = -1 } declare enum Function_FunctionType { FUNCTION_TYPE_UNSPECIFIED = 0, FUNCTION_TYPE_GENERATOR = 1, FUNCTION_TYPE_FUNCTION = 2, UNRECOGNIZED = -1 } declare enum FunctionSchema_FunctionSchemaType { FUNCTION_SCHEMA_UNSPECIFIED = 0, FUNCTION_SCHEMA_V1 = 1, UNRECOGNIZED = -1 } declare enum GenericResult_GenericStatus { GENERIC_STATUS_UNSPECIFIED = 0, GENERIC_STATUS_SUCCESS = 1, GENERIC_STATUS_FAILURE = 2, /** GENERIC_STATUS_TERMINATED - Used when a task was killed using an external signal. */ GENERIC_STATUS_TERMINATED = 3, GENERIC_STATUS_TIMEOUT = 4, /** * GENERIC_STATUS_INIT_FAILURE - Used when the user's function fails to initialize (ex. S3 mount failed due to invalid credentials). * Terminates the function and all remaining inputs. */ GENERIC_STATUS_INIT_FAILURE = 5, GENERIC_STATUS_INTERNAL_FAILURE = 6, /** GENERIC_STATUS_IDLE_TIMEOUT - Used when sandboxes are terminated due to idle_timeout */ GENERIC_STATUS_IDLE_TIMEOUT = 7, UNRECOGNIZED = -1 } declare enum NetworkAccess_NetworkAccessType { UNSPECIFIED = 0, OPEN = 1, BLOCKED = 2, ALLOWLIST = 3, UNRECOGNIZED = -1 } declare enum PTYInfo_PTYType { /** PTY_TYPE_UNSPECIFIED - Nothing */ PTY_TYPE_UNSPECIFIED = 0, /** PTY_TYPE_FUNCTION - Run function in PTY */ PTY_TYPE_FUNCTION = 1, /** PTY_TYPE_SHELL - Replace function with shell */ PTY_TYPE_SHELL = 2, UNRECOGNIZED = -1 } declare enum SandboxRestoreRequest_SandboxNameOverrideType { SANDBOX_NAME_OVERRIDE_TYPE_UNSPECIFIED = 0, SANDBOX_NAME_OVERRIDE_TYPE_NONE = 1, SANDBOX_NAME_OVERRIDE_TYPE_STRING = 2, UNRECOGNIZED = -1 } declare enum Warning_WarningType { WARNING_TYPE_UNSPECIFIED = 0, WARNING_TYPE_CLIENT_DEPRECATION = 1, WARNING_TYPE_RESOURCE_LIMIT = 2, WARNING_TYPE_FUNCTION_CONFIGURATION = 3, UNRECOGNIZED = -1 } interface AppClientDisconnectRequest { appId: string; reason: AppDisconnectReason; exception: string; } declare const AppClientDisconnectRequest: MessageFns$1; interface AppCountLogsRequest { appId: string; taskId: string; functionId: string; functionCallId: string; sandboxId: string; searchText: string; since: Date | undefined; until: Date | undefined; bucketSecs: number; source: FileDescriptor; } declare const AppCountLogsRequest: MessageFns$1; interface AppCountLogsResponse { appId: string; buckets: AppCountLogsResponse_LogBucket[]; } declare const AppCountLogsResponse: MessageFns$1; interface AppCountLogsResponse_LogBucket { bucketStartAt: Date | undefined; stdoutLogs: number; stderrLogs: number; systemLogs: number; } declare const AppCountLogsResponse_LogBucket: MessageFns$1; interface AppCreateRequest { clientId: string; /** Human readable label for the app */ description: string; environmentName: string; appState: AppState; /** Additional metadata to attach to the App */ tags: { [key: string]: string; }; } declare const AppCreateRequest: MessageFns$1; interface AppCreateResponse { appId: string; appPageUrl: string; appLogsUrl: string; } declare const AppCreateResponse: MessageFns$1; interface AppDeployRequest { appId: string; name: string; objectEntity: string; visibility: AppDeployVisibility; tag: string; } declare const AppDeployRequest: MessageFns$1; interface AppDeployResponse { url: string; } declare const AppDeployResponse: MessageFns$1; interface AppDeploymentHistory { appId: string; version: number; clientVersion: string; deployedAt: number; deployedBy: string; deployedByAvatarUrl: string; tag: string; rollbackVersion: number; rollbackAllowed: boolean; commitInfo?: CommitInfo | undefined; } declare const AppDeploymentHistory: MessageFns$1; interface AppDeploymentHistoryRequest { appId: string; } declare const AppDeploymentHistoryRequest: MessageFns$1; interface AppDeploymentHistoryResponse { appDeploymentHistories: AppDeploymentHistory[]; } declare const AppDeploymentHistoryResponse: MessageFns$1; interface AppFetchLogsRequest { appId: string; since: Date | undefined; until: Date | undefined; limit: number; source: FileDescriptor; functionId: string; functionCallId: string; taskId: string; sandboxId: string; searchText: string; } declare const AppFetchLogsRequest: MessageFns$1; interface AppFetchLogsResponse { batches: TaskLogsBatch[]; } declare const AppFetchLogsResponse: MessageFns$1; interface AppGetByDeploymentNameRequest { name: string; environmentName: string; } declare const AppGetByDeploymentNameRequest: MessageFns$1; interface AppGetByDeploymentNameResponse { appId: string; } declare const AppGetByDeploymentNameResponse: MessageFns$1; interface AppGetLayoutRequest { appId: string; } declare const AppGetLayoutRequest: MessageFns$1; interface AppGetLayoutResponse { appLayout: AppLayout | undefined; } declare const AppGetLayoutResponse: MessageFns$1; interface AppGetLifecycleRequest { appId: string; } declare const AppGetLifecycleRequest: MessageFns$1; interface AppGetLifecycleResponse { lifecycle: AppLifecycle | undefined; } declare const AppGetLifecycleResponse: MessageFns$1; interface AppGetLogsRequest { appId: string; timeout: number; lastEntryId: string; functionId: string; parametrizedFunctionId: string; inputId: string; taskId: string; functionCallId: string; fileDescriptor: FileDescriptor; sandboxId: string; searchText: string; } declare const AppGetLogsRequest: MessageFns$1; interface AppGetObjectsItem { tag: string; object: Object_ | undefined; } declare const AppGetObjectsItem: MessageFns$1; interface AppGetObjectsRequest { appId: string; includeUnindexed: boolean; /** True starting with 0.67.x clients, which don't create method placeholder functions */ onlyClassFunction: boolean; } declare const AppGetObjectsRequest: MessageFns$1; interface AppGetObjectsResponse { items: AppGetObjectsItem[]; } declare const AppGetObjectsResponse: MessageFns$1; interface AppGetOrCreateRequest { appName: string; environmentName: string; objectCreationType: ObjectCreationType; } declare const AppGetOrCreateRequest: MessageFns$1; interface AppGetOrCreateResponse { appId: string; } declare const AppGetOrCreateResponse: MessageFns$1; interface AppGetTagsRequest { appId: string; } declare const AppGetTagsRequest: MessageFns$1; interface AppGetTagsResponse { tags: { [key: string]: string; }; } declare const AppGetTagsResponse: MessageFns$1; interface AppHeartbeatRequest { appId: string; } declare const AppHeartbeatRequest: MessageFns$1; interface AppLayout { objects: Object_[]; /** tag -> function id */ functionIds: { [key: string]: string; }; /** tag -> class id */ classIds: { [key: string]: string; }; } declare const AppLayout: MessageFns$1; interface AppLifecycle { appState: AppState; createdAt: number; /** User or service user name */ createdBy: string; /** Most recent deployment event */ deployedAt: number; /** User or service user name */ deployedBy: string; /** Only meaningful when App is deployed */ version: number; /** Unset when App is still running */ stoppedAt: number; /** User or service user name, null if running or ephemeral App that finished normally */ stoppedBy: string; } declare const AppLifecycle: MessageFns$1; interface AppListRequest { environmentName: string; } declare const AppListRequest: MessageFns$1; interface AppListResponse { apps: AppListResponse_AppListItem[]; } declare const AppListResponse: MessageFns$1; interface AppListResponse_AppListItem { appId: string; description: string; state: AppState; createdAt: number; stoppedAt: number; nRunningTasks: number; name: string; } declare const AppListResponse_AppListItem: MessageFns$1; interface AppLookupRequest { appName: string; environmentName: string; } declare const AppLookupRequest: MessageFns$1; interface AppLookupResponse { appId: string; } declare const AppLookupResponse: MessageFns$1; interface AppPublishRequest { appId: string; name: string; /** Additional metadata to identify a deployment */ deploymentTag: string; /** Published app will be in this state */ appState: AppState; /** function_name -> function_id */ functionIds: { [key: string]: string; }; /** class_name -> class_id */ classIds: { [key: string]: string; }; /** function_id -> definition_id */ definitionIds: { [key: string]: string; }; /** Unused by client, but used internally */ rollbackVersion: number; /** Unused by client, but used internally */ clientVersion: string; /** Git information for deployment tracking */ commitInfo: CommitInfo | undefined; /** Additional metadata to attach to the App */ tags: { [key: string]: string; }; } declare const AppPublishRequest: MessageFns$1; interface AppPublishResponse { url: string; serverWarnings: Warning[]; deployedAt: number; } declare const AppPublishResponse: MessageFns$1; interface AppRollbackRequest { appId: string; /** signed as we support negative "roll back n versions" requests */ version: number; } declare const AppRollbackRequest: MessageFns$1; interface AppRolloverRequest { appId: string; } declare const AppRolloverRequest: MessageFns$1; interface AppRolloverResponse { url: string; serverWarnings: Warning[]; deployedAt: number; } declare const AppRolloverResponse: MessageFns$1; interface AppSetObjectsRequest { appId: string; indexedObjectIds: { [key: string]: string; }; clientId: string; unindexedObjectIds: string[]; /** promotes an app from initializing to this new state */ newAppState: AppState; } declare const AppSetObjectsRequest: MessageFns$1; interface AppSetTagsRequest { appId: string; tags: { [key: string]: string; }; } declare const AppSetTagsRequest: MessageFns$1; interface AppStopRequest { appId: string; source: AppStopSource; } declare const AppStopRequest: MessageFns$1; interface AttemptAwaitRequest { attemptToken: string; /** Used for waypoints. */ requestedAt: number; timeoutSecs: number; } declare const AttemptAwaitRequest: MessageFns$1; interface AttemptAwaitResponse { output?: FunctionGetOutputsItem | undefined; } declare const AttemptAwaitResponse: MessageFns$1; interface AttemptRetryRequest { functionId: string; parentInputId: string; input: FunctionPutInputsItem | undefined; attemptToken: string; } declare const AttemptRetryRequest: MessageFns$1; interface AttemptRetryResponse { attemptToken: string; } declare const AttemptRetryResponse: MessageFns$1; interface AttemptStartRequest { functionId: string; parentInputId: string; input: FunctionPutInputsItem | undefined; } declare const AttemptStartRequest: MessageFns$1; interface AttemptStartResponse { attemptToken: string; retryPolicy: FunctionRetryPolicy | undefined; } declare const AttemptStartResponse: MessageFns$1; interface AuthTokenGetRequest { } declare const AuthTokenGetRequest: MessageFns$1; interface AuthTokenGetResponse { token: string; } declare const AuthTokenGetResponse: MessageFns$1; /** * A collection of user-configurable settings for Function autoscaling * These are used for static configuration and for dynamic autoscaler updates */ interface AutoscalerSettings { /** Minimum containers when scale-to-zero is not desired; pka "keep_warm" or "warm_pool_size" */ minContainers?: number | undefined; /** Limit on the number of containers that can be running for each Function; pka "concurrency_limit" */ maxContainers?: number | undefined; /** Additional container to spin up when Function is active */ bufferContainers?: number | undefined; /** Currently unused; a placeholder in case we decide to expose scaleup control to users */ scaleupWindow?: number | undefined; /** Maximum amount of time a container can be idle before being scaled down, in seconds; pka "container_idle_timeout" */ scaledownWindow?: number | undefined; } declare const AutoscalerSettings: MessageFns$1; interface BaseImage { imageId: string; dockerTag: string; } declare const BaseImage: MessageFns$1; interface BlobCreateRequest { /** * TODO(erikbern): how are these garbage collected? * Shouldn't they belong to an app? */ contentMd5: string; contentSha256Base64: string; contentLength: number; } declare const BlobCreateRequest: MessageFns$1; interface BlobCreateResponse { blobId: string; uploadUrl?: string | undefined; multipart?: MultiPartUpload | undefined; blobIds: string[]; uploadUrls?: UploadUrlList | undefined; multiparts?: MultiPartUploadList | undefined; } declare const BlobCreateResponse: MessageFns$1; interface BlobGetRequest { blobId: string; } declare const BlobGetRequest: MessageFns$1; interface BlobGetResponse { downloadUrl: string; } declare const BlobGetResponse: MessageFns$1; interface BuildFunction { definition: string; globals: Uint8Array; input: FunctionInput | undefined; } declare const BuildFunction: MessageFns$1; interface CancelInputEvent { inputIds: string[]; terminateContainers: boolean; cancellationReason: string; } declare const CancelInputEvent: MessageFns$1; interface CheckpointInfo { checksum: string; status: CheckpointStatus; checkpointId: string; runtimeFingerprint: string; size: number; checksumIsFileIndex: boolean; originalTaskId: string; runscRuntimeVersion: string; } declare const CheckpointInfo: MessageFns$1; interface ClassCreateRequest { appId: string; existingClassId: string; methods: ClassMethod[]; /** True starting with 0.67.x clients, which don't create method placeholder functions */ onlyClassFunction: boolean; } declare const ClassCreateRequest: MessageFns$1; interface ClassCreateResponse { classId: string; handleMetadata: ClassHandleMetadata | undefined; } declare const ClassCreateResponse: MessageFns$1; interface ClassGetRequest { appName: string; objectTag: string; environmentName: string; /** True starting with 0.67.x clients, which don't create method placeholder functions */ onlyClassFunction: boolean; } declare const ClassGetRequest: MessageFns$1; interface ClassGetResponse { classId: string; handleMetadata: ClassHandleMetadata | undefined; serverWarnings: Warning[]; } declare const ClassGetResponse: MessageFns$1; interface ClassHandleMetadata { methods: ClassMethod[]; classFunctionId: string; classFunctionMetadata: FunctionHandleMetadata | undefined; } declare const ClassHandleMetadata: MessageFns$1; interface ClassMethod { functionName: string; functionId: string; /** Class methods need to hydrate all functions on the class */ functionHandleMetadata: FunctionHandleMetadata | undefined; } declare const ClassMethod: MessageFns$1; interface ClassParameterInfo { format: ClassParameterInfo_ParameterSerializationFormat; /** only set for PARAM_SERIALIZATION_FORMAT_PROTO */ schema: ClassParameterSpec[]; } declare const ClassParameterInfo: MessageFns$1; /** TODO: rename into NamedPayloadType or similar */ interface ClassParameterSpec { name: string; /** TODO: deprecate - use full_type instead */ type: ParameterType; hasDefault: boolean; /** Default *values* are only registered for class parameters */ stringDefault?: string | undefined; intDefault?: number | undefined; pickleDefault?: Uint8Array | undefined; bytesDefault?: Uint8Array | undefined; boolDefault?: boolean | undefined; /** supersedes `type` */ fullType: GenericPayloadType | undefined; } declare const ClassParameterSpec: MessageFns$1; interface ClientHelloResponse { warning: string; /** Deprecated, no longer used in client */ imageBuilderVersion: string; serverWarnings: Warning[]; } declare const ClientHelloResponse: MessageFns$1; interface CloudBucketMount$1 { bucketName: string; mountPath: string; credentialsSecretId: string; readOnly: boolean; bucketType: CloudBucketMount_BucketType; requesterPays: boolean; bucketEndpointUrl?: string | undefined; keyPrefix?: string | undefined; oidcAuthRoleArn?: string | undefined; forcePathStyle: boolean; metadataTtlType?: CloudBucketMount_MetadataTTLType | undefined; metadataTtlSeconds?: number | undefined; } declare const CloudBucketMount$1: MessageFns$1; interface ClusterGetRequest { clusterId: string; } declare const ClusterGetRequest: MessageFns$1; interface ClusterGetResponse { cluster: ClusterStats | undefined; } declare const ClusterGetResponse: MessageFns$1; interface ClusterListRequest { environmentName: string; } declare const ClusterListRequest: MessageFns$1; interface ClusterListResponse { clusters: ClusterStats[]; } declare const ClusterListResponse: MessageFns$1; interface ClusterStats { appId: string; taskIds: string[]; clusterId: string; /** Defined as start time of the first task in the cluster */ startedAt: number; } declare const ClusterStats: MessageFns$1; interface CommitInfo { /** Only git is supported for now */ vcs: string; branch: string; commitHash: string; commitTimestamp: number; dirty: boolean; authorName: string; authorEmail: string; repoUrl: string; } declare const CommitInfo: MessageFns$1; interface ContainerCheckpointRequest { checkpointId: string; } declare const ContainerCheckpointRequest: MessageFns$1; interface ContainerExecGetOutputRequest { execId: string; timeout: number; lastBatchIndex: number; fileDescriptor: FileDescriptor; /** Old clients (up to 0.65.39) expect string output. Newer clients stream raw bytes */ getRawBytes: boolean; } declare const ContainerExecGetOutputRequest: MessageFns$1; interface ContainerExecPutInputRequest { execId: string; input: RuntimeInputMessage | undefined; } declare const ContainerExecPutInputRequest: MessageFns$1; interface ContainerExecRequest { taskId: string; command: string[]; /** * If pty_info is provided, open a PTY, but also this container exec is treated an * "interactive shell" request, and it will be terminated if messages are not periodically * sent on the stdin stream on some interval (currently 40 seconds). */ ptyInfo?: PTYInfo | undefined; /** * Send SIGTERM to running container on exit of exec command. * * @deprecated */ terminateContainerOnExit: boolean; /** For internal debugging use only. */ runtimeDebug: boolean; stdoutOutput: ExecOutputOption; stderrOutput: ExecOutputOption; timeoutSecs: number; workdir?: string | undefined; secretIds: string[]; } declare const ContainerExecRequest: MessageFns$1; interface ContainerExecResponse { execId: string; } declare const ContainerExecResponse: MessageFns$1; interface ContainerExecWaitRequest { execId: string; timeout: number; } declare const ContainerExecWaitRequest: MessageFns$1; interface ContainerExecWaitResponse { exitCode?: number | undefined; completed: boolean; } declare const ContainerExecWaitResponse: MessageFns$1; interface ContainerFileCloseRequest { fileDescriptor: string; } declare const ContainerFileCloseRequest: MessageFns$1; interface ContainerFileDeleteBytesRequest { fileDescriptor: string; startInclusive?: number | undefined; endExclusive?: number | undefined; } declare const ContainerFileDeleteBytesRequest: MessageFns$1; interface ContainerFileFlushRequest { fileDescriptor: string; } declare const ContainerFileFlushRequest: MessageFns$1; interface ContainerFileLsRequest { path: string; } declare const ContainerFileLsRequest: MessageFns$1; interface ContainerFileMkdirRequest { path: string; makeParents: boolean; } declare const ContainerFileMkdirRequest: MessageFns$1; interface ContainerFileOpenRequest { /** file descriptor is hydrated when sent from server -> worker */ fileDescriptor?: string | undefined; path: string; mode: string; } declare const ContainerFileOpenRequest: MessageFns$1; interface ContainerFileReadLineRequest { fileDescriptor: string; } declare const ContainerFileReadLineRequest: MessageFns$1; interface ContainerFileReadRequest { fileDescriptor: string; n?: number | undefined; } declare const ContainerFileReadRequest: MessageFns$1; interface ContainerFileRmRequest { path: string; recursive: boolean; } declare const ContainerFileRmRequest: MessageFns$1; interface ContainerFileSeekRequest { fileDescriptor: string; offset: number; whence: SeekWhence; } declare const ContainerFileSeekRequest: MessageFns$1; interface ContainerFileWatchRequest { path: string; recursive: boolean; timeoutSecs?: number | undefined; } declare const ContainerFileWatchRequest: MessageFns$1; interface ContainerFileWriteReplaceBytesRequest { fileDescriptor: string; data: Uint8Array; startInclusive?: number | undefined; endExclusive?: number | undefined; } declare const ContainerFileWriteReplaceBytesRequest: MessageFns$1; interface ContainerFileWriteRequest { fileDescriptor: string; data: Uint8Array; } declare const ContainerFileWriteRequest: MessageFns$1; interface ContainerFilesystemExecGetOutputRequest { execId: string; timeout: number; } declare const ContainerFilesystemExecGetOutputRequest: MessageFns$1; interface ContainerFilesystemExecRequest { fileOpenRequest?: ContainerFileOpenRequest | undefined; fileWriteRequest?: ContainerFileWriteRequest | undefined; fileReadRequest?: ContainerFileReadRequest | undefined; fileFlushRequest?: ContainerFileFlushRequest | undefined; fileReadLineRequest?: ContainerFileReadLineRequest | undefined; fileSeekRequest?: ContainerFileSeekRequest | undefined; fileDeleteBytesRequest?: ContainerFileDeleteBytesRequest | undefined; fileWriteReplaceBytesRequest?: ContainerFileWriteReplaceBytesRequest | undefined; fileCloseRequest?: ContainerFileCloseRequest | undefined; fileLsRequest?: ContainerFileLsRequest | undefined; fileMkdirRequest?: ContainerFileMkdirRequest | undefined; fileRmRequest?: ContainerFileRmRequest | undefined; fileWatchRequest?: ContainerFileWatchRequest | undefined; taskId: string; } declare const ContainerFilesystemExecRequest: MessageFns$1; interface ContainerFilesystemExecResponse { execId: string; /** only set when the request opens a new file, i.e., ContainerFileOpenRequest */ fileDescriptor?: string | undefined; } declare const ContainerFilesystemExecResponse: MessageFns$1; interface ContainerHeartbeatRequest { /** Bad client version. */ canceledInputsReturnOutputs: boolean; canceledInputsReturnOutputsV2: boolean; } declare const ContainerHeartbeatRequest: MessageFns$1; interface ContainerHeartbeatResponse { cancelInputEvent?: CancelInputEvent | undefined; } declare const ContainerHeartbeatResponse: MessageFns$1; interface ContainerLogRequest { logs: TaskLogs[]; } declare const ContainerLogRequest: MessageFns$1; interface ContainerReloadVolumesRequest { taskId: string; } declare const ContainerReloadVolumesRequest: MessageFns$1; interface ContainerReloadVolumesResponse { } declare const ContainerReloadVolumesResponse: MessageFns$1; interface ContainerStopRequest { taskId: string; } declare const ContainerStopRequest: MessageFns$1; interface ContainerStopResponse { } declare const ContainerStopResponse: MessageFns$1; interface CreationInfo { /** This message is used in metadata for resource objects like Dict, Queue, Volume, etc. */ createdAt: number; /** User name or service name */ createdBy: string; } declare const CreationInfo: MessageFns$1; interface CustomDomainConfig { name: string; } declare const CustomDomainConfig: MessageFns$1; interface CustomDomainInfo { url: string; } declare const CustomDomainInfo: MessageFns$1; interface DNSRecord { type: DNSRecordType; name: string; value: string; } declare const DNSRecord: MessageFns$1; /** Chunks of data that can be streamed in and out of tasks. */ interface DataChunk { dataFormat: DataFormat; data?: Uint8Array | undefined; dataBlobId?: string | undefined; /** Index of this data chunk in the stream. */ index: number; } declare const DataChunk: MessageFns$1; interface DictClearRequest { dictId: string; } declare const DictClearRequest: MessageFns$1; interface DictContainsRequest { dictId: string; key: Uint8Array; } declare const DictContainsRequest: MessageFns$1; interface DictContainsResponse { found: boolean; } declare const DictContainsResponse: MessageFns$1; interface DictContentsRequest { dictId: string; /** * Setting these to True will populate the corresponding field in the response, otherwise it will be null * This lets us support the keys/values/items SDK API through one RPC without unnecessary data transfer */ keys: boolean; values: boolean; } declare const DictContentsRequest: MessageFns$1; interface DictDeleteRequest { dictId: string; } declare const DictDeleteRequest: MessageFns$1; interface DictEntry { key: Uint8Array; value: Uint8Array; } declare const DictEntry: MessageFns$1; interface DictGetByIdRequest { dictId: string; } declare const DictGetByIdRequest: MessageFns$1; interface DictGetByIdResponse { dictId: string; metadata: DictMetadata | undefined; } declare const DictGetByIdResponse: MessageFns$1; interface DictGetOrCreateRequest { deploymentName: string; environmentName: string; objectCreationType: ObjectCreationType; /** Unused after 1.4.0 */ data: DictEntry[]; } declare const DictGetOrCreateRequest: MessageFns$1; interface DictGetOrCreateResponse { dictId: string; metadata: DictMetadata | undefined; } declare const DictGetOrCreateResponse: MessageFns$1; interface DictGetRequest { dictId: string; key: Uint8Array; } declare const DictGetRequest: MessageFns$1; interface DictGetResponse { found: boolean; value?: Uint8Array | undefined; } declare const DictGetResponse: MessageFns$1; interface DictHeartbeatRequest { dictId: string; } declare const DictHeartbeatRequest: MessageFns$1; interface DictLenRequest { dictId: string; } declare const DictLenRequest: MessageFns$1; interface DictLenResponse { len: number; } declare const DictLenResponse: MessageFns$1; interface DictListRequest { environmentName: string; pagination: ListPagination | undefined; } declare const DictListRequest: MessageFns$1; interface DictListResponse { dicts: DictListResponse_DictInfo[]; environmentName: string; } declare const DictListResponse: MessageFns$1; interface DictListResponse_DictInfo { name: string; /** Superseded by metadata, used by clients up to 1.1.2 */ createdAt: number; dictId: string; metadata: DictMetadata | undefined; } declare const DictListResponse_DictInfo: MessageFns$1; interface DictMetadata { name: string; creationInfo: CreationInfo | undefined; } declare const DictMetadata: MessageFns$1; interface DictPopRequest { dictId: string; key: Uint8Array; } declare const DictPopRequest: MessageFns$1; interface DictPopResponse { found: boolean; value?: Uint8Array | undefined; } declare const DictPopResponse: MessageFns$1; interface DictUpdateRequest { dictId: string; updates: DictEntry[]; ifNotExists: boolean; } declare const DictUpdateRequest: MessageFns$1; interface DictUpdateResponse { created: boolean; } declare const DictUpdateResponse: MessageFns$1; interface Domain { domainId: string; domainName: string; createdAt: number; certificateStatus: CertificateStatus; dnsRecords: DNSRecord[]; } declare const Domain: MessageFns$1; interface DomainCertificateVerifyRequest { domainId: string; } declare const DomainCertificateVerifyRequest: MessageFns$1; interface DomainCertificateVerifyResponse { domain: Domain | undefined; } declare const DomainCertificateVerifyResponse: MessageFns$1; interface DomainCreateRequest { domainName: string; } declare const DomainCreateRequest: MessageFns$1; interface DomainCreateResponse { domainId: string; dnsRecords: DNSRecord[]; } declare const DomainCreateResponse: MessageFns$1; interface DomainListRequest { } declare const DomainListRequest: MessageFns$1; interface DomainListResponse { domains: Domain[]; } declare const DomainListResponse: MessageFns$1; interface EnvironmentCreateRequest { name: string; } declare const EnvironmentCreateRequest: MessageFns$1; interface EnvironmentDeleteRequest { name: string; } declare const EnvironmentDeleteRequest: MessageFns$1; interface EnvironmentGetOrCreateRequest { deploymentName: string; objectCreationType: ObjectCreationType; } declare const EnvironmentGetOrCreateRequest: MessageFns$1; interface EnvironmentGetOrCreateResponse { environmentId: string; metadata: EnvironmentMetadata | undefined; } declare const EnvironmentGetOrCreateResponse: MessageFns$1; interface EnvironmentListItem { name: string; webhookSuffix: string; createdAt: number; default: boolean; isManaged: boolean; environmentId: string; maxConcurrentTasks?: number | undefined; maxConcurrentGpus?: number | undefined; currentConcurrentTasks: number; currentConcurrentGpus: number; } declare const EnvironmentListItem: MessageFns$1; interface EnvironmentListResponse { items: EnvironmentListItem[]; } declare const EnvironmentListResponse: MessageFns$1; interface EnvironmentMetadata { name: string; settings: EnvironmentSettings | undefined; } declare const EnvironmentMetadata: MessageFns$1; /** * Environment-scoped settings, with workspace-level defaults. * Note that we use MergeFrom to combine workspace / environment settings, * which will *append* any `repeated` fields! */ interface EnvironmentSettings { imageBuilderVersion: string; webhookSuffix: string; } declare const EnvironmentSettings: MessageFns$1; interface EnvironmentUpdateRequest { currentName: string; name: string | undefined; webSuffix: string | undefined; maxConcurrentTasks?: number | undefined; maxConcurrentGpus?: number | undefined; } declare const EnvironmentUpdateRequest: MessageFns$1; /** A file entry when listing files in a volume or network file system. */ interface FileEntry { path: string; type: FileEntry_FileType; mtime: number; size: number; } declare const FileEntry: MessageFns$1; interface FilesystemRuntimeOutputBatch { output: Uint8Array[]; error?: SystemErrorMessage | undefined; batchIndex: number; eof: boolean; } declare const FilesystemRuntimeOutputBatch: MessageFns$1; interface FlashContainerDeregisterRequest { serviceName: string; } declare const FlashContainerDeregisterRequest: MessageFns$1; interface FlashContainerListRequest { functionId: string; } declare const FlashContainerListRequest: MessageFns$1; interface FlashContainerListResponse { containers: FlashContainerListResponse_Container[]; } declare const FlashContainerListResponse: MessageFns$1; interface FlashContainerListResponse_Container { taskId: string; host: string; port: number; } declare const FlashContainerListResponse_Container: MessageFns$1; interface FlashContainerRegisterRequest { /** not used? */ serviceName: string; priority: number; weight: number; host: string; port: number; } declare const FlashContainerRegisterRequest: MessageFns$1; interface FlashContainerRegisterResponse { url: string; } declare const FlashContainerRegisterResponse: MessageFns$1; interface FlashSetTargetSlotsMetricsRequest { /** TODO(claudia): add other metrics to use in autoscaling decisions */ functionId: string; targetSlots: number; } declare const FlashSetTargetSlotsMetricsRequest: MessageFns$1; interface FlashSetTargetSlotsMetricsResponse { } declare const FlashSetTargetSlotsMetricsResponse: MessageFns$1; interface FunctionMessage { moduleName: string; functionName: string; mountIds: string[]; imageId: string; functionSerialized: Uint8Array; definitionType: Function_DefinitionType; functionType: Function_FunctionType; resources: Resources | undefined; secretIds: string[]; rateLimit: RateLimit | undefined; webhookConfig: WebhookConfig | undefined; sharedVolumeMounts: SharedVolumeMount[]; proxyId?: string | undefined; retryPolicy: FunctionRetryPolicy | undefined; /** To be replaced by autoscaler_settings.max_containers */ concurrencyLimit: number; timeoutSecs: number; ptyInfo: PTYInfo | undefined; classSerialized: Uint8Array; /** To be replaced by autoscaler_settings.scaledown_period */ taskIdleTimeoutSecs: number; /** Deprecated at some point */ cloudProvider?: CloudProvider | undefined; /** To be replaced by autoscaler_settings.min_containers */ warmPoolSize: number; webUrl: string; webUrlInfo: WebUrlInfo | undefined; /** If set, overrides the runtime used by the function, either "runc" or "gvisor". */ runtime: string; /** Formerly stub_name */ appName: string; volumeMounts: VolumeMount[]; maxConcurrentInputs: number; customDomainInfo: CustomDomainInfo[]; /** For internal debugging use only. */ workerId: string; /** For internal debugging use only. */ runtimeDebug: boolean; /** TODO: combine into enum? */ isBuilderFunction: boolean; isAutoSnapshot: boolean; isMethod: boolean; isCheckpointingFunction: boolean; checkpointingEnabled: boolean; checkpoint: CheckpointInfo | undefined; objectDependencies: ObjectDependency[]; blockNetwork: boolean; /** * In the SDK, we've deprecated `max_inputs` (which only every implemented `max_inputs=1`) * in favor of a boolean `single_use_containers` parameter. */ maxInputs: number; s3Mounts: S3Mount[]; cloudBucketMounts: CloudBucketMount$1[]; schedulerPlacement?: SchedulerPlacement | undefined; /** if "Function" is actually a class grouping multiple methods */ isClass: boolean; /** for class methods use this function id instead for invocations - the *referenced* function should have is_class=True */ useFunctionId: string; /** for class methods - this method name needs to be included in the FunctionInput */ useMethodName: string; classParameterInfo: ClassParameterInfo | undefined; /** Maximum number of inputs to fetch at once */ batchMaxSize: number; /** Miliseconds to block before a response is needed */ batchLingerMs: number; i6pnEnabled: boolean; ExperimentalConcurrentCancellations: boolean; targetConcurrentInputs: number; /** TODO(irfansharif): Remove, once https://github.com/modal-labs/modal/pull/15645 lands. */ ExperimentalTaskTemplatesEnabled: boolean; /** for fallback options, where the first/most-preferred "template" is derived from fields above */ ExperimentalTaskTemplates: TaskTemplate[]; /** * When the function is a "grouped" one, this records the # of tasks we want * to schedule in tandem. */ ExperimentalGroupSize: number; /** If set, the function will be run in an untrusted environment. */ untrusted: boolean; /** To be replaced by autoscaler_settings.buffer_containers */ ExperimentalBufferContainers: number; /** * _experimental_proxy_ip -> ProxyInfo * TODO: deprecate. */ ExperimentalProxyIp?: string | undefined; /** For internal debugging use only. */ runtimePerfRecord: boolean; schedule: Schedule | undefined; /** For internal debugging use only. */ snapshotDebug: boolean; /** Mapping of method names to method definitions, only non-empty for class service functions */ methodDefinitions: { [key: string]: MethodDefinition; }; methodDefinitionsSet: boolean; ExperimentalCustomScaling: boolean; /** Supersedes cloud_provider */ cloudProviderStr: string; /** Experimental support for GPU snapshotting */ ExperimentalEnableGpuSnapshot: boolean; /** Bundle of parameters related to autoscaling */ autoscalerSettings: AutoscalerSettings | undefined; /** Function schema, may be missing: client doesn't block deployment if it fails to get it */ functionSchema: FunctionSchema | undefined; /** * For server-side experimental functionality. Prefer using this over individual _experimental_* fields. * Note the value type as string. Internally we'll coerce all values to string with str(). * On the server, it's necessary to convert back to the most natural type (e.g. int) when relevant. */ experimentalOptions: { [key: string]: string; }; /** * If set, client deps will be mounted into the container, and are * no longer expected to exist in the image itself. */ mountClientDependencies: boolean; flashServiceUrls: string[]; flashServiceLabel: string; /** GPU memory snapshotting (alpha) */ enableGpuSnapshot: boolean; startupTimeoutSecs: number; /** can be used as inputs */ supportedInputFormats: DataFormat[]; supportedOutputFormats: DataFormat[]; httpConfig?: HTTPConfig | undefined; /** * Attribute on the module with the implementation, which may differ from function_name * when the user provided a custom name= for the Function inside the Application namespace */ implementationName: string; /** When True, containers will shut down after handling a single input */ singleUseContainers: boolean; /** When True, the function is a server function */ isServer: boolean; } declare const FunctionMessage: MessageFns$1; interface FunctionAsyncInvokeRequest { functionId: string; parentInputId: string; input: FunctionInput | undefined; } declare const FunctionAsyncInvokeRequest: MessageFns$1; interface FunctionAsyncInvokeResponse { retryWithBlobUpload: boolean; functionCallId: string; } declare const FunctionAsyncInvokeResponse: MessageFns$1; interface FunctionBindParamsRequest { functionId: string; serializedParams: Uint8Array; functionOptions: FunctionOptions | undefined; environmentName: string; /** Only used for the input plane. */ authSecret: string; } declare const FunctionBindParamsRequest: MessageFns$1; interface FunctionBindParamsResponse { boundFunctionId: string; handleMetadata: FunctionHandleMetadata | undefined; } declare const FunctionBindParamsResponse: MessageFns$1; interface FunctionCallCallGraphInfo { functionCallId: string; parentInputId: string; functionName: string; moduleName: string; } declare const FunctionCallCallGraphInfo: MessageFns$1; interface FunctionCallCancelRequest { functionCallId: string; terminateContainers: boolean; /** Only provided for sync input cancellation on the input plane. Async input cancellation does not provide this field this. */ functionId?: string | undefined; } declare const FunctionCallCancelRequest: MessageFns$1; interface FunctionCallFromIdRequest { functionCallId: string; } declare const FunctionCallFromIdRequest: MessageFns$1; /** Everything you need to build a FunctionCallHandler. */ interface FunctionCallFromIdResponse { functionCallId: string; numInputs: number; } declare const FunctionCallFromIdResponse: MessageFns$1; interface FunctionCallGetDataRequest { functionCallId?: string | undefined; attemptToken?: string | undefined; lastIndex: number; useGaplessRead: boolean; } declare const FunctionCallGetDataRequest: MessageFns$1; interface FunctionCallInfo { functionCallId: string; idx: number; /** when the call was created */ createdAt: number; /** if cron job, when run was scheduled */ scheduledAt: number; pendingInputs: InputCategoryInfo | undefined; failedInputs: InputCategoryInfo | undefined; succeededInputs: InputCategoryInfo | undefined; timeoutInputs: InputCategoryInfo | undefined; cancelledInputs: InputCategoryInfo | undefined; totalInputs: number; } declare const FunctionCallInfo: MessageFns$1; interface FunctionCallListRequest { functionId: string; } declare const FunctionCallListRequest: MessageFns$1; interface FunctionCallListResponse { functionCalls: FunctionCallInfo[]; } declare const FunctionCallListResponse: MessageFns$1; interface FunctionCallPutDataRequest { functionCallId?: string | undefined; attemptToken?: string | undefined; dataChunks: DataChunk[]; } declare const FunctionCallPutDataRequest: MessageFns$1; interface FunctionCreateRequest { function: FunctionMessage | undefined; appId: string; /** * Deprecated: now passed in the Function definition * * @deprecated */ schedule: Schedule | undefined; existingFunctionId: string; /** supersedes 'function' field above */ functionData: FunctionData | undefined; } declare const FunctionCreateRequest: MessageFns$1; interface FunctionCreateResponse { functionId: string; /** * Used up until 0.62.212 * * @deprecated */ DeprecatedWebUrl: string; function: FunctionMessage | undefined; handleMetadata: FunctionHandleMetadata | undefined; serverWarnings: Warning[]; } declare const FunctionCreateResponse: MessageFns$1; /** * Note: FunctionData pulls "up" a subset of fields from Function message that * will get deprecated there and made authoritative here, at the top-level. * All remaining fields will stay within the Function message itself and a * single FunctionData will contain a list of such (ranked) Functions. The * top-level fields capture data not specific to any particular underlying * task (like warm-pool-size, applicable across all tasks), while fields * specific to the task (like the resource request) will exist at the bottom * level. */ interface FunctionData { moduleName: string; functionName: string; functionType: Function_FunctionType; /** Scheduling related fields. */ warmPoolSize: number; concurrencyLimit: number; taskIdleTimeoutSecs: number; /** * When the function is a "grouped" one, this records the # of tasks we want * to schedule in tandem. */ ExperimentalGroupSize: number; ExperimentalBufferContainers: number; ExperimentalCustomScaling: boolean; ExperimentalEnableGpuSnapshot: boolean; /** for internal debugging use only */ workerId: string; timeoutSecs: number; webUrl: string; webUrlInfo: WebUrlInfo | undefined; webhookConfig: WebhookConfig | undefined; customDomainInfo: CustomDomainInfo[]; /** * _experimental_proxy_ip -> ProxyInfo * TODO: deprecate. */ ExperimentalProxyIp?: string | undefined; /** Mapping of method names to method definitions, only non-empty for class service functions */ methodDefinitions: { [key: string]: MethodDefinition; }; methodDefinitionsSet: boolean; /** if "Function" is actually a class grouping multiple methods - applies across all underlying tasks */ isClass: boolean; classParameterInfo: ClassParameterInfo | undefined; isMethod: boolean; /** used for methods */ useFunctionId: string; /** used for methods */ useMethodName: string; rankedFunctions: FunctionData_RankedFunction[]; schedule: Schedule | undefined; /** If set, the function will be run in an untrusted environment. */ untrusted: boolean; /** For internal debugging use only. */ snapshotDebug: boolean; /** For internal debugging use only. */ runtimePerfRecord: boolean; /** Bundle of parameters related to autoscaling */ autoscalerSettings: AutoscalerSettings | undefined; functionSchema: FunctionSchema | undefined; experimentalOptions: { [key: string]: string; }; flashServiceUrls: string[]; flashServiceLabel: string; startupTimeoutSecs: number; supportedInputFormats: DataFormat[]; supportedOutputFormats: DataFormat[]; httpConfig?: HTTPConfig | undefined; /** * Attribute on the module with the implementation, which may differ from function_name * when the user provided a custom name= for the Function inside the Application namespace */ implementationName: string; /** When True, the function is a server function */ isServer: boolean; } declare const FunctionData: MessageFns$1; interface FunctionData_RankedFunction { rank: number; function: FunctionMessage | undefined; } declare const FunctionData_RankedFunction: MessageFns$1; interface FunctionFinishInputsRequest { functionId: string; functionCallId: string; numInputs: number; } declare const FunctionFinishInputsRequest: MessageFns$1; interface FunctionGetCallGraphRequest { /** TODO: use input_id once we switch client submit API to return those. */ functionCallId: string; } declare const FunctionGetCallGraphRequest: MessageFns$1; interface FunctionGetCallGraphResponse { inputs: InputCallGraphInfo[]; functionCalls: FunctionCallCallGraphInfo[]; } declare const FunctionGetCallGraphResponse: MessageFns$1; interface FunctionGetCurrentStatsRequest { functionId: string; } declare const FunctionGetCurrentStatsRequest: MessageFns$1; interface FunctionGetDynamicConcurrencyRequest { functionId: string; targetConcurrency: number; maxConcurrency: number; } declare const FunctionGetDynamicConcurrencyRequest: MessageFns$1; interface FunctionGetDynamicConcurrencyResponse { concurrency: number; } declare const FunctionGetDynamicConcurrencyResponse: MessageFns$1; interface FunctionGetInputsItem { inputId: string; input: FunctionInput | undefined; killSwitch: boolean; functionCallId: string; functionCallInvocationType: FunctionCallInvocationType; retryCount: number; /** intercepted and only used by the worker. */ functionMapIdx?: number | undefined; attemptToken: string; } declare const FunctionGetInputsItem: MessageFns$1; interface FunctionGetInputsRequest { functionId: string; maxValues: number; averageCallTime: number; /** Container aims to fetch multiple inputs at the same time */ inputConcurrency: number; /** Maximum number of inputs to fetch at once */ batchMaxSize: number; /** Miliseconds to block before a response is needed */ batchLingerMs: number; } declare const FunctionGetInputsRequest: MessageFns$1; interface FunctionGetInputsResponse { inputs: FunctionGetInputsItem[]; /** How long to sleep before requesting another input. */ rateLimitSleepDuration: number; } declare const FunctionGetInputsResponse: MessageFns$1; interface FunctionGetOutputsItem { result: GenericResult | undefined; idx: number; inputId: string; /** for result.data_oneof */ dataFormat: DataFormat; taskId: string; inputStartedAt: number; outputCreatedAt: number; retryCount: number; /** datadog function call trace tag */ fcTraceTag: string; } declare const FunctionGetOutputsItem: MessageFns$1; interface FunctionGetOutputsRequest { functionCallId: string; maxValues: number; timeout: number; lastEntryId: string; /** expires *any* remaining outputs soon after this call, not just the returned ones */ clearOnSuccess: boolean; /** Used for waypoints. */ requestedAt: number; /** The jwts the client expects the server to be processing. This is optional and used for sync inputs only. */ inputJwts: string[]; /** for async batch requests. this indicates which index to start from. */ startIdx?: number | undefined; /** for async batch requests. this indicates which index to end at. */ endIdx?: number | undefined; } declare const FunctionGetOutputsRequest: MessageFns$1; interface FunctionGetOutputsResponse { idxs: number[]; outputs: FunctionGetOutputsItem[]; lastEntryId: string; numUnfinishedInputs: number; } declare const FunctionGetOutputsResponse: MessageFns$1; interface FunctionGetRequest { appName: string; objectTag: string; environmentName: string; } declare const FunctionGetRequest: MessageFns$1; interface FunctionGetResponse { functionId: string; handleMetadata: FunctionHandleMetadata | undefined; serverWarnings: Warning[]; } declare const FunctionGetResponse: MessageFns$1; interface FunctionGetSerializedRequest { functionId: string; } declare const FunctionGetSerializedRequest: MessageFns$1; interface FunctionGetSerializedResponse { functionSerialized: Uint8Array; classSerialized: Uint8Array; } declare const FunctionGetSerializedResponse: MessageFns$1; /** * contains all the info about a function that is needed to trigger the right * behaviour when using a FunctionHandler. Notably excludes things purely * used for *executing* the function in a container entrypoint */ interface FunctionHandleMetadata { /** Should be a subset and use IDs/types from `Function` above */ functionName: string; functionType: Function_FunctionType; webUrl: string; isMethod: boolean; /** used for methods */ useFunctionId: string; /** used for methods */ useMethodName: string; definitionId: string; classParameterInfo: ClassParameterInfo | undefined; /** Mapping of method names to their metadata, only non-empty for class service functions */ methodHandleMetadata: { [key: string]: FunctionHandleMetadata; }; functionSchema: FunctionSchema | undefined; inputPlaneUrl?: string | undefined; inputPlaneRegion?: string | undefined; /** Use optional to ensure unset values default to None instead of 0 */ maxObjectSizeBytes?: number | undefined; /** (Optional) urls for flash services */ ExperimentalFlashUrls: string[]; supportedInputFormats: DataFormat[]; supportedOutputFormats: DataFormat[]; } declare const FunctionHandleMetadata: MessageFns$1; interface FunctionInput { args?: Uint8Array | undefined; argsBlobId?: string | undefined; finalInput: boolean; /** For args_oneof. */ dataFormat: DataFormat; /** specifies which method to call when calling a class/object function */ methodName?: string | undefined; } declare const FunctionInput: MessageFns$1; interface FunctionMapRequest { functionId: string; parentInputId: string; returnExceptions: boolean; functionCallType: FunctionCallType; pipelinedInputs: FunctionPutInputsItem[]; functionCallInvocationType: FunctionCallInvocationType; fromSpawnMap: boolean; } declare const FunctionMapRequest: MessageFns$1; interface FunctionMapResponse { functionCallId: string; pipelinedInputs: FunctionPutInputsResponseItem[]; retryPolicy: FunctionRetryPolicy | undefined; functionCallJwt: string; syncClientRetriesEnabled: boolean; maxInputsOutstanding: number; } declare const FunctionMapResponse: MessageFns$1; interface FunctionOptions { secretIds: string[]; /** Currently not supported */ mountIds: string[]; resources?: Resources | undefined; retryPolicy?: FunctionRetryPolicy | undefined; concurrencyLimit?: number | undefined; timeoutSecs?: number | undefined; taskIdleTimeoutSecs?: number | undefined; warmPoolSize?: number | undefined; volumeMounts: VolumeMount[]; targetConcurrentInputs?: number | undefined; replaceVolumeMounts: boolean; replaceSecretIds: boolean; bufferContainers?: number | undefined; maxConcurrentInputs?: number | undefined; batchMaxSize?: number | undefined; batchLingerMs?: number | undefined; schedulerPlacement?: SchedulerPlacement | undefined; cloudProviderStr?: string | undefined; replaceCloudBucketMounts: boolean; cloudBucketMounts: CloudBucketMount$1[]; } declare const FunctionOptions: MessageFns$1; interface FunctionPrecreateRequest { appId: string; functionName: string; existingFunctionId: string; functionType: Function_FunctionType; webhookConfig: WebhookConfig | undefined; /** for class methods - use this function id instead for invocations - the *referenced* function should have is_class=True */ useFunctionId: string; /** for class methods - this method name needs to be included in the FunctionInput */ useMethodName: string; /** Mapping of method names to method definitions, only non-empty for class service functions */ methodDefinitions: { [key: string]: MethodDefinition; }; functionSchema: FunctionSchema | undefined; supportedInputFormats: DataFormat[]; supportedOutputFormats: DataFormat[]; } declare const FunctionPrecreateRequest: MessageFns$1; interface FunctionPrecreateResponse { functionId: string; handleMetadata: FunctionHandleMetadata | undefined; } declare const FunctionPrecreateResponse: MessageFns$1; interface FunctionPutInputsItem { idx: number; input: FunctionInput | undefined; r2Failed: boolean; r2ThroughputBytesS: number; } declare const FunctionPutInputsItem: MessageFns$1; interface FunctionPutInputsRequest { functionId: string; functionCallId: string; inputs: FunctionPutInputsItem[]; } declare const FunctionPutInputsRequest: MessageFns$1; interface FunctionPutInputsResponse { inputs: FunctionPutInputsResponseItem[]; } declare const FunctionPutInputsResponse: MessageFns$1; interface FunctionPutInputsResponseItem { idx: number; inputId: string; inputJwt: string; } declare const FunctionPutInputsResponseItem: MessageFns$1; interface FunctionPutOutputsItem { inputId: string; result: GenericResult | undefined; inputStartedAt: number; outputCreatedAt: number; /** for result.data_oneof */ dataFormat: DataFormat; retryCount: number; /** injected by the worker */ functionCallId: string; /** injected by the worker */ functionMapIdx?: number | undefined; } declare const FunctionPutOutputsItem: MessageFns$1; interface FunctionPutOutputsRequest { outputs: FunctionPutOutputsItem[]; /** Used for waypoints. */ requestedAt: number; } declare const FunctionPutOutputsRequest: MessageFns$1; interface FunctionRetryInputsItem { inputJwt: string; input: FunctionInput | undefined; retryCount: number; } declare const FunctionRetryInputsItem: MessageFns$1; interface FunctionRetryInputsRequest { functionCallJwt: string; inputs: FunctionRetryInputsItem[]; } declare const FunctionRetryInputsRequest: MessageFns$1; interface FunctionRetryInputsResponse { inputJwts: string[]; } declare const FunctionRetryInputsResponse: MessageFns$1; interface FunctionRetryPolicy { backoffCoefficient: number; initialDelayMs: number; maxDelayMs: number; /** NOTE: two-byte field number not used for special reason. copy-paste error. Ref: PR #2542 */ retries: number; } declare const FunctionRetryPolicy: MessageFns$1; interface FunctionSchema { /** allows easy disambiguation between empty schema and no schema collection etc. */ schemaType: FunctionSchema_FunctionSchemaType; arguments: ClassParameterSpec[]; returnType: GenericPayloadType | undefined; } declare const FunctionSchema: MessageFns$1; interface FunctionStats$1 { backlog: number; numTotalTasks: number; numRunningInputs: number; } declare const FunctionStats$1: MessageFns$1; interface FunctionUpdateSchedulingParamsRequest { functionId: string; warmPoolSizeOverride: number; settings: AutoscalerSettings | undefined; } declare const FunctionUpdateSchedulingParamsRequest: MessageFns$1; interface FunctionUpdateSchedulingParamsResponse { } declare const FunctionUpdateSchedulingParamsResponse: MessageFns$1; interface GPUConfig { /** Deprecated, at some point */ type: GPUType; count: number; gpuType: string; } declare const GPUConfig: MessageFns$1; interface GenericPayloadType { baseType: ParameterType; /** sub-type for generic types like lists */ subTypes: GenericPayloadType[]; } declare const GenericPayloadType: MessageFns$1; /** Used for both tasks and function outputs */ interface GenericResult { /** Status of the task or function output. */ status: GenericResult_GenericStatus; /** Exception message for failures, if available. */ exception: string; /** Status code of the container entrypoint or builder process if it terminates unexpectedly. */ exitcode: number; /** String value of the Python traceback. */ traceback: string; /** Pickled traceback object. */ serializedTb: Uint8Array; /** Pickled line cache for traceback object. */ tbLineCache: Uint8Array; /** Inline data of the result. */ data?: Uint8Array | undefined; /** Blob ID for large data. */ dataBlobId?: string | undefined; /** (?) */ propagationReason: string; } declare const GenericResult: MessageFns$1; interface HTTPConfig { port: number; proxyRegions: string[]; startupTimeout: number; exitGracePeriod: number; h2Enabled: boolean; targetConcurrency: number; } declare const HTTPConfig: MessageFns$1; interface Image$1 { baseImages: BaseImage[]; dockerfileCommands: string[]; contextFiles: ImageContextFile[]; version: string; secretIds: string[]; /** * Part of Image definition, because presence of GPU drivers * affects the image that's built. */ contextMountId: string; gpuConfig: GPUConfig | undefined; imageRegistryConfig: ImageRegistryConfig | undefined; /** deprecated after 0.58.96 */ buildFunctionDef: string; /** deprecated after 0.58.96 */ buildFunctionGlobals: Uint8Array; /** If set, overrides the runtime used by the function. Specify either "runc" or "gvisor". */ runtime: string; /** Not included in image definition checksum as debug features do not affect built image. */ runtimeDebug: boolean; buildFunction: BuildFunction | undefined; /** Build arguments for the image (--build-arg) for ARG substitution in Dockerfile. */ buildArgs: { [key: string]: string; }; /** Volume mount for RUN commands */ volumeMounts: VolumeMount[]; } declare const Image$1: MessageFns$1; interface ImageContextFile { filename: string; data: Uint8Array; } declare const ImageContextFile: MessageFns$1; interface ImageDeleteRequest { imageId: string; } declare const ImageDeleteRequest: MessageFns$1; interface ImageFromIdRequest { imageId: string; } declare const ImageFromIdRequest: MessageFns$1; interface ImageFromIdResponse { imageId: string; metadata: ImageMetadata | undefined; } declare const ImageFromIdResponse: MessageFns$1; interface ImageGetOrCreateRequest { image: Image$1 | undefined; appId: string; /** ignored */ existingImageId: string; buildFunctionId: string; forceBuild: boolean; namespace: DeploymentNamespace; builderVersion: string; /** Only admins can publish global images, but this provides an extra failsafe */ allowGlobalDeployment: boolean; /** Force the Image to build but don't clobber any Images with the same recipe in the cache */ ignoreCache: boolean; } declare const ImageGetOrCreateRequest: MessageFns$1; interface ImageGetOrCreateResponse { /** image_id is set regardless if the image is built (use ImageJoinStreaming to wait for build) */ imageId: string; /** result of build - only set if the image has finished building (regardless if success or not) */ result: GenericResult | undefined; /** image metadata - only set if the image has built successfully */ metadata: ImageMetadata | undefined; } declare const ImageGetOrCreateResponse: MessageFns$1; interface ImageJoinStreamingRequest { imageId: string; timeout: number; lastEntryId: string; includeLogsForFinished: boolean; } declare const ImageJoinStreamingRequest: MessageFns$1; interface ImageJoinStreamingResponse { result: GenericResult | undefined; taskLogs: TaskLogs[]; entryId: string; eof: boolean; /** set on success */ metadata: ImageMetadata | undefined; } declare const ImageJoinStreamingResponse: MessageFns$1; interface ImageMetadata { /** The output of `python -VV. Not set if missing */ pythonVersionInfo?: string | undefined; /** * Installed python packages, as listed by by `pip list`. * package name -> version. Empty if missing */ pythonPackages: { [key: string]: string; }; /** * The working directory of the image, as an absolute file path. * * For most images, this is not set, which means to use the default workdir: * - On function runners, the default is `/root` (home directory). * - For image builds and sandbox environments, it is `/`. */ workdir?: string | undefined; /** The version of glibc in this image, if any. */ libcVersionInfo?: string | undefined; /** The builder version for/with which the image was created. */ imageBuilderVersion?: string | undefined; } declare const ImageMetadata: MessageFns$1; interface ImageRegistryConfig { registryAuthType: RegistryAuthType; secretId: string; } declare const ImageRegistryConfig: MessageFns$1; interface InputCallGraphInfo { inputId: string; status: GenericResult_GenericStatus; functionCallId: string; taskId: string; } declare const InputCallGraphInfo: MessageFns$1; interface InputCategoryInfo { total: number; latest: InputInfo[]; } declare const InputCategoryInfo: MessageFns$1; interface InputInfo { inputId: string; idx: number; taskId: string; startedAt: number; finishedAt: number; taskStartupTime: number; taskFirstInput: boolean; } declare const InputInfo: MessageFns$1; interface ListPagination { maxObjects: number; createdBefore: number; } declare const ListPagination: MessageFns$1; interface MapAwaitRequest { functionCallId?: string | undefined; mapToken?: string | undefined; lastEntryId: string; /** Used for waypoints. */ requestedAt: number; timeout: number; } declare const MapAwaitRequest: MessageFns$1; interface MapAwaitResponse { outputs: FunctionGetOutputsItem[]; lastEntryId: string; } declare const MapAwaitResponse: MessageFns$1; interface MapCheckInputsRequest { lastEntryId: string; timeout: number; attemptTokens: string[]; } declare const MapCheckInputsRequest: MessageFns$1; interface MapCheckInputsResponse { lost: boolean[]; } declare const MapCheckInputsResponse: MessageFns$1; interface MapStartOrContinueItem { input: FunctionPutInputsItem | undefined; /** None if this is a fresh input, otherwise it is the attempt token for a retry. */ attemptToken?: string | undefined; } declare const MapStartOrContinueItem: MessageFns$1; interface MapStartOrContinueRequest { functionId: string; parentInputId: string; functionCallId?: string | undefined; mapToken?: string | undefined; items: MapStartOrContinueItem[]; } declare const MapStartOrContinueRequest: MessageFns$1; interface MapStartOrContinueResponse { /** * function_id and function_call_id are not necessary if map_token is provided. * All 3 will be sent until it is safe to only send map_token. */ mapToken: string; functionId: string; functionCallId: string; maxInputsOutstanding: number; attemptTokens: string[]; retryPolicy: FunctionRetryPolicy | undefined; } declare const MapStartOrContinueResponse: MessageFns$1; interface MethodDefinition { functionName: string; functionType: Function_FunctionType; webhookConfig: WebhookConfig | undefined; webUrl: string; webUrlInfo: WebUrlInfo | undefined; customDomainInfo: CustomDomainInfo[]; functionSchema: FunctionSchema | undefined; supportedInputFormats: DataFormat[]; supportedOutputFormats: DataFormat[]; } declare const MethodDefinition: MessageFns$1; interface MountFile { filename: string; /** SHA-256 checksum of the file. */ sha256Hex: string; /** Size of the file in bytes — ignored in MountBuild(). */ size?: number | undefined; /** Unix file permission bits `st_mode`. */ mode?: number | undefined; } declare const MountFile: MessageFns$1; interface MountGetOrCreateRequest { deploymentName: string; namespace: DeploymentNamespace; environmentName: string; objectCreationType: ObjectCreationType; files: MountFile[]; /** only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP */ appId: string; } declare const MountGetOrCreateRequest: MessageFns$1; interface MountGetOrCreateResponse { mountId: string; handleMetadata: MountHandleMetadata | undefined; } declare const MountGetOrCreateResponse: MessageFns$1; interface MountHandleMetadata { contentChecksumSha256Hex: string; } declare const MountHandleMetadata: MessageFns$1; interface MountPutFileRequest { sha256Hex: string; data?: Uint8Array | undefined; dataBlobId?: string | undefined; } declare const MountPutFileRequest: MessageFns$1; interface MountPutFileResponse { exists: boolean; } declare const MountPutFileResponse: MessageFns$1; interface MultiPartUpload { /** split upload based on this part length - all except the last part must have this length */ partLength: number; uploadUrls: string[]; completionUrl: string; } declare const MultiPartUpload: MessageFns$1; interface MultiPartUploadList { items: MultiPartUpload[]; } declare const MultiPartUploadList: MessageFns$1; interface NetworkAccess { networkAccessType: NetworkAccess_NetworkAccessType; allowedCidrs: string[]; } declare const NetworkAccess: MessageFns$1; interface NotebookKernelPublishResultsRequest { notebookId: string; results: NotebookKernelPublishResultsRequest_CellResult[]; } declare const NotebookKernelPublishResultsRequest: MessageFns$1; /** * See kernelshim.py for the differences between this and `ExecuteResult`. * https://jupyter-client.readthedocs.io/en/stable/messaging.html#execution-results */ interface NotebookKernelPublishResultsRequest_ExecuteReply { status: string; executionCount: number; duration: number; } declare const NotebookKernelPublishResultsRequest_ExecuteReply: MessageFns$1; /** IOPub message or reply received from the kernel for a cell. */ interface NotebookKernelPublishResultsRequest_CellResult { cellId: string; /** Persistent output that is saved in the notebook. */ output?: NotebookOutput | undefined; /** Clear all previous outputs of the cell. */ clearOutput?: boolean | undefined; /** Cell has finished executing, return the kernel's execute_reply. */ executeReply?: NotebookKernelPublishResultsRequest_ExecuteReply | undefined; } declare const NotebookKernelPublishResultsRequest_CellResult: MessageFns$1; /** * A single output from a notebook. When you execute a cell, it produces an * array of these outputs as the code runs. * * https://github.com/jupyter/nbformat/blob/v5.10.4/nbformat/v4/nbformat.v4.schema.json#L301-L309 */ interface NotebookOutput { executeResult?: NotebookOutput_ExecuteResult | undefined; displayData?: NotebookOutput_DisplayData | undefined; stream?: NotebookOutput_Stream | undefined; error?: NotebookOutput_Error | undefined; } declare const NotebookOutput: MessageFns$1; /** Result of executing a code cell. */ interface NotebookOutput_ExecuteResult { executionCount: number; /** mimebundle */ data: { [key: string]: any; } | undefined; metadata: { [key: string]: any; } | undefined; } declare const NotebookOutput_ExecuteResult: MessageFns$1; /** Data displayed as a result of code cell execution. */ interface NotebookOutput_DisplayData { /** mimebundle */ data: { [key: string]: any; } | undefined; metadata: { [key: string]: any; } | undefined; /** This should not be included in saved notebook. */ transientDisplayId?: string | undefined; } declare const NotebookOutput_DisplayData: MessageFns$1; /** Stream output from a code cell (stdout / stderr). */ interface NotebookOutput_Stream { /** stdout | stderr */ name: string; /** multiline_string */ text: string; } declare const NotebookOutput_Stream: MessageFns$1; /** Output of an error that occurred during code cell execution. */ interface NotebookOutput_Error { ename: string; evalue: string; traceback: string[]; } declare const NotebookOutput_Error: MessageFns$1; interface Object_ { objectId: string; functionHandleMetadata?: FunctionHandleMetadata | undefined; mountHandleMetadata?: MountHandleMetadata | undefined; classHandleMetadata?: ClassHandleMetadata | undefined; sandboxHandleMetadata?: SandboxHandleMetadata | undefined; volumeMetadata?: VolumeMetadata | undefined; } declare const Object_: MessageFns$1; interface ObjectDependency { objectId: string; } declare const ObjectDependency: MessageFns$1; interface PTYInfo { /** Soon deprecated */ enabled: boolean; winszRows: number; winszCols: number; envTerm: string; envColorterm: string; envTermProgram: string; ptyType: PTYInfo_PTYType; noTerminateOnIdleStdin: boolean; } declare const PTYInfo: MessageFns$1; interface PortSpec { port: number; unencrypted: boolean; tunnelType?: TunnelType | undefined; } declare const PortSpec: MessageFns$1; interface PortSpecs { ports: PortSpec[]; } declare const PortSpecs: MessageFns$1; interface Probe$1 { tcpPort?: number | undefined; execCommand?: Probe_ExecCommand | undefined; intervalMs?: number | undefined; } declare const Probe$1: MessageFns$1; interface Probe_ExecCommand { /** Command and args to execute directly (argv form, not shell-parsed). */ argv: string[]; } declare const Probe_ExecCommand: MessageFns$1; interface Proxy$1 { name: string; createdAt: number; environmentName: string; proxyIps: ProxyIp[]; proxyId: string; region: string; } declare const Proxy$1: MessageFns$1; interface ProxyAddIpRequest { proxyId: string; } declare const ProxyAddIpRequest: MessageFns$1; interface ProxyAddIpResponse { proxyIp: ProxyIp | undefined; } declare const ProxyAddIpResponse: MessageFns$1; interface ProxyCreateRequest { name: string; environmentName: string; region: string; } declare const ProxyCreateRequest: MessageFns$1; interface ProxyCreateResponse { proxy: Proxy$1 | undefined; } declare const ProxyCreateResponse: MessageFns$1; interface ProxyDeleteRequest { proxyId: string; } declare const ProxyDeleteRequest: MessageFns$1; interface ProxyGetOrCreateRequest { deploymentName: string; environmentName: string; /** must be UNSPECIFIED */ objectCreationType: ObjectCreationType; } declare const ProxyGetOrCreateRequest: MessageFns$1; interface ProxyGetOrCreateResponse { proxyId: string; } declare const ProxyGetOrCreateResponse: MessageFns$1; interface ProxyGetRequest { name: string; environmentName: string; } declare const ProxyGetRequest: MessageFns$1; interface ProxyGetResponse { proxy: Proxy$1 | undefined; } declare const ProxyGetResponse: MessageFns$1; interface ProxyIp { proxyIp: string; status: ProxyIpStatus; createdAt: number; environmentName: string; } declare const ProxyIp: MessageFns$1; interface ProxyListResponse { proxies: Proxy$1[]; } declare const ProxyListResponse: MessageFns$1; interface ProxyRemoveIpRequest { proxyIp: string; } declare const ProxyRemoveIpRequest: MessageFns$1; interface QueueClearRequest { queueId: string; partitionKey: Uint8Array; allPartitions: boolean; } declare const QueueClearRequest: MessageFns$1; interface QueueDeleteRequest { queueId: string; } declare const QueueDeleteRequest: MessageFns$1; interface QueueGetByIdRequest { queueId: string; } declare const QueueGetByIdRequest: MessageFns$1; interface QueueGetByIdResponse { queueId: string; metadata: QueueMetadata | undefined; } declare const QueueGetByIdResponse: MessageFns$1; interface QueueGetOrCreateRequest { deploymentName: string; environmentName: string; objectCreationType: ObjectCreationType; } declare const QueueGetOrCreateRequest: MessageFns$1; interface QueueGetOrCreateResponse { queueId: string; metadata: QueueMetadata | undefined; } declare const QueueGetOrCreateResponse: MessageFns$1; interface QueueGetRequest { queueId: string; timeout: number; nValues: number; partitionKey: Uint8Array; } declare const QueueGetRequest: MessageFns$1; interface QueueGetResponse { values: Uint8Array[]; } declare const QueueGetResponse: MessageFns$1; interface QueueHeartbeatRequest { queueId: string; } declare const QueueHeartbeatRequest: MessageFns$1; interface QueueItem { value: Uint8Array; entryId: string; } declare const QueueItem: MessageFns$1; interface QueueLenRequest { queueId: string; partitionKey: Uint8Array; total: boolean; } declare const QueueLenRequest: MessageFns$1; interface QueueLenResponse { len: number; } declare const QueueLenResponse: MessageFns$1; interface QueueListRequest { environmentName: string; /** Limit on "number of partitions" reported, since checking them is costly */ totalSizeLimit: number; pagination: ListPagination | undefined; } declare const QueueListRequest: MessageFns$1; interface QueueListResponse { queues: QueueListResponse_QueueInfo[]; environmentName: string; } declare const QueueListResponse: MessageFns$1; interface QueueListResponse_QueueInfo { name: string; /** Superseded by metadata, used by clients up to 1.1.2 */ createdAt: number; numPartitions: number; totalSize: number; queueId: string; metadata: QueueMetadata | undefined; } declare const QueueListResponse_QueueInfo: MessageFns$1; interface QueueMetadata { name: string; creationInfo: CreationInfo | undefined; } declare const QueueMetadata: MessageFns$1; interface QueueNextItemsRequest { queueId: string; partitionKey: Uint8Array; lastEntryId: string; /** seconds */ itemPollTimeout: number; } declare const QueueNextItemsRequest: MessageFns$1; interface QueueNextItemsResponse { items: QueueItem[]; } declare const QueueNextItemsResponse: MessageFns$1; interface QueuePutRequest { queueId: string; values: Uint8Array[]; partitionKey: Uint8Array; partitionTtlSeconds: number; } declare const QueuePutRequest: MessageFns$1; interface RateLimit { limit: number; interval: RateLimitInterval; } declare const RateLimit: MessageFns$1; interface ResourceInfo { /** MiB */ memoryMb: ResourceInfo_ResourceValue | undefined; /** milli CPU cores */ milliCpu: ResourceInfo_ResourceValue | undefined; gpuType: string; /** MiB */ memoryMbMax: number; /** MiB */ ephemeralDiskMb: number; /** milli CPU cores */ milliCpuMax: number; } declare const ResourceInfo: MessageFns$1; interface ResourceInfo_ResourceValue { value: number; isDefault: boolean; } declare const ResourceInfo_ResourceValue: MessageFns$1; interface Resources { /** MiB */ memoryMb: number; /** milli CPU cores */ milliCpu: number; gpuConfig: GPUConfig | undefined; /** MiB */ memoryMbMax: number; /** MiB */ ephemeralDiskMb: number; /** milli CPU cores */ milliCpuMax: number; /** Whether to use RDMA interfaces */ rdma: boolean; } declare const Resources: MessageFns$1; interface RuntimeInputMessage { message: Uint8Array; messageIndex: number; eof: boolean; } declare const RuntimeInputMessage: MessageFns$1; interface RuntimeOutputBatch { items: RuntimeOutputMessage[]; batchIndex: number; /** if an exit code is given, this is the final message that will be sent. */ exitCode?: number | undefined; stdout: RuntimeOutputMessage[]; stderr: RuntimeOutputMessage[]; info: RuntimeOutputMessage[]; } declare const RuntimeOutputBatch: MessageFns$1; /** Used for `modal container exec`, `modal shell`, and Sandboxes */ interface RuntimeOutputMessage { /** only stdout / stderr is used */ fileDescriptor: FileDescriptor; message: string; messageBytes: Uint8Array; } declare const RuntimeOutputMessage: MessageFns$1; interface S3Mount { bucketName: string; mountPath: string; credentialsSecretId: string; readOnly: boolean; } declare const S3Mount: MessageFns$1; interface Sandbox$1 { entrypointArgs: string[]; mountIds: string[]; imageId: string; secretIds: string[]; resources: Resources | undefined; /** Deprecated at some point */ cloudProvider: CloudProvider; /** The max lifetime of a sandbox in seconds. */ timeoutSecs: number; workdir?: string | undefined; nfsMounts: SharedVolumeMount[]; /** For internal debugging use only. */ runtimeDebug: boolean; /** deprecated, use network_access instead */ blockNetwork: boolean; s3Mounts: S3Mount[]; cloudBucketMounts: CloudBucketMount$1[]; volumeMounts: VolumeMount[]; ptyInfo: PTYInfo | undefined; schedulerPlacement?: SchedulerPlacement | undefined; /** for internal debugging use only */ workerId: string; openPorts?: PortSpecs | undefined; i6pnEnabled: boolean; /** Network access configuration beyond simple allow/block. */ networkAccess: NetworkAccess | undefined; proxyId?: string | undefined; /** * Enable snapshotting the sandbox (both memory and filesystem). * This doesn't need to be enabled to save the filesystem as an image (i.e. a filesystem-only snapshot). */ enableSnapshot: boolean; /** * Used to pin gVisor version for memory-snapshottable sandboxes. * This field is set by the server, not the client. */ snapshotVersion?: number | undefined; /** Supersedes cloud_provider */ cloudProviderStr: string; /** * Specifies container runtime behavior for sandboxes which are restored from a snapshot. * Set by the backend at snapshot creation time. */ runscRuntimeVersion?: string | undefined; /** If set, overrides the runtime used by the function, either "runc" or "gvisor". */ runtime?: string | undefined; /** If set, the sandbox will be created with verbose logging enabled. */ verbose: boolean; /** If set, the sandbox will be created with a name. */ name?: string | undefined; /** Experimental options */ experimentalOptions: { [key: string]: boolean; }; /** Internal use only. */ preloadPathPrefixes: string[]; /** Optional idle timeout in seconds. If set, the sandbox will be terminated after being idle for this duration. */ idleTimeoutSecs?: number | undefined; /** * If set, the sandbox will be created with direct sandbox commands enabled. * Exec commands for the sandbox will be issued directly to the sandbox * command router running on the Modal worker. */ directSandboxCommandsEnabled: boolean; /** * Internal: restricts sandbox to run on this specific instance type. * Set by server during SandboxRestore to ensure the restored sandbox runs * on the same instance type as the original snapshot. */ RestoreInstanceType: string; /** If set, connections to this sandbox will be subdomains of this domain rather than the default. */ customDomain: string; /** * If set, the sandbox will receive a MODAL_IDENTITY_TOKEN env var, * similar to how modal Function containers do. This can be used * for OIDC-based authentication (e.g. to AWS, GCP). */ includeOidcIdentityToken: boolean; /** Probe used to determine when the sandbox has become ready. */ readinessProbe?: Probe$1 | undefined; } declare const Sandbox$1: MessageFns$1; interface SandboxCreateConnectTokenRequest { sandboxId: string; userMetadata: string; } declare const SandboxCreateConnectTokenRequest: MessageFns$1; interface SandboxCreateConnectTokenResponse { url: string; token: string; } declare const SandboxCreateConnectTokenResponse: MessageFns$1; interface SandboxCreateRequest { appId: string; definition: Sandbox$1 | undefined; /** DEPRECATED* 7/16/2025 */ environmentName: string; } declare const SandboxCreateRequest: MessageFns$1; interface SandboxCreateResponse { sandboxId: string; } declare const SandboxCreateResponse: MessageFns$1; interface SandboxCreateV2Request { appId: string; definition: Sandbox$1 | undefined; } declare const SandboxCreateV2Request: MessageFns$1; interface SandboxCreateV2Response { sandboxId: string; tunnels: TunnelData[]; taskId: string; } declare const SandboxCreateV2Response: MessageFns$1; /** * Used by the sandbox controller to get command router access for V2 sandboxes. * For all other use cases, use TaskGetCommandRouterAccess instead. */ interface SandboxGetCommandRouterAccessRequest { sandboxId: string; } declare const SandboxGetCommandRouterAccessRequest: MessageFns$1; interface SandboxGetCommandRouterAccessResponse { jwt: string; url: string; } declare const SandboxGetCommandRouterAccessResponse: MessageFns$1; interface SandboxGetFromNameRequest { sandboxName: string; environmentName: string; appName: string; } declare const SandboxGetFromNameRequest: MessageFns$1; interface SandboxGetFromNameResponse { sandboxId: string; } declare const SandboxGetFromNameResponse: MessageFns$1; interface SandboxGetLogsRequest { sandboxId: string; fileDescriptor: FileDescriptor; timeout: number; lastEntryId: string; } declare const SandboxGetLogsRequest: MessageFns$1; interface SandboxGetResourceUsageRequest { sandboxId: string; } declare const SandboxGetResourceUsageRequest: MessageFns$1; interface SandboxGetResourceUsageResponse { cpuCoreNanosecs: number; memGibNanosecs: number; gpuNanosecs: number; gpuType?: string | undefined; } declare const SandboxGetResourceUsageResponse: MessageFns$1; interface SandboxGetTaskIdRequest { sandboxId: string; /** Legacy clients do not provide a timeout. New clients must always provide a timeout. */ timeout?: number | undefined; /** If true, waits until the container's postStart hook has been run before returning. Useful for detecting init failures. */ waitUntilReady: boolean; } declare const SandboxGetTaskIdRequest: MessageFns$1; interface SandboxGetTaskIdResponse { /** This is None if the sandbox was terminated before a task could be scheduled. */ taskId?: string | undefined; /** If the task has already exited, this is the result. */ taskResult?: GenericResult | undefined; } declare const SandboxGetTaskIdResponse: MessageFns$1; interface SandboxGetTunnelsRequest { sandboxId: string; timeout: number; } declare const SandboxGetTunnelsRequest: MessageFns$1; interface SandboxGetTunnelsResponse { result: GenericResult | undefined; tunnels: TunnelData[]; } declare const SandboxGetTunnelsResponse: MessageFns$1; interface SandboxHandleMetadata { result: GenericResult | undefined; } declare const SandboxHandleMetadata: MessageFns$1; interface SandboxInfo { id: string; createdAt: number; taskInfo: TaskInfo | undefined; appId: string; /** TODO: Not yet exposed in client library. */ tags: SandboxTag[]; name: string; imageId: string; resourceInfo: ResourceInfo | undefined; regions: string[]; timeoutSecs: number; idleTimeoutSecs?: number | undefined; readyAt?: number | undefined; } declare const SandboxInfo: MessageFns$1; interface SandboxListRequest { appId: string; beforeTimestamp: number; environmentName: string; includeFinished: boolean; tags: SandboxTag[]; } declare const SandboxListRequest: MessageFns$1; interface SandboxListResponse { sandboxes: SandboxInfo[]; } declare const SandboxListResponse: MessageFns$1; interface SandboxRestoreRequest { snapshotId: string; sandboxNameOverride: string; sandboxNameOverrideType: SandboxRestoreRequest_SandboxNameOverrideType; } declare const SandboxRestoreRequest: MessageFns$1; interface SandboxRestoreResponse { sandboxId: string; } declare const SandboxRestoreResponse: MessageFns$1; interface SandboxSnapshotFsAsyncGetRequest { imageId: string; timeout: number; } declare const SandboxSnapshotFsAsyncGetRequest: MessageFns$1; interface SandboxSnapshotFsAsyncRequest { sandboxId: string; } declare const SandboxSnapshotFsAsyncRequest: MessageFns$1; interface SandboxSnapshotFsAsyncResponse { imageId: string; } declare const SandboxSnapshotFsAsyncResponse: MessageFns$1; interface SandboxSnapshotFsRequest { sandboxId: string; timeout: number; } declare const SandboxSnapshotFsRequest: MessageFns$1; interface SandboxSnapshotFsResponse { imageId: string; result: GenericResult | undefined; /** Metadata may be empty since we may skip it for performance reasons. */ imageMetadata: ImageMetadata | undefined; } declare const SandboxSnapshotFsResponse: MessageFns$1; interface SandboxSnapshotGetRequest { snapshotId: string; } declare const SandboxSnapshotGetRequest: MessageFns$1; interface SandboxSnapshotGetResponse { snapshotId: string; } declare const SandboxSnapshotGetResponse: MessageFns$1; interface SandboxSnapshotRequest { sandboxId: string; } declare const SandboxSnapshotRequest: MessageFns$1; interface SandboxSnapshotResponse { snapshotId: string; } declare const SandboxSnapshotResponse: MessageFns$1; interface SandboxSnapshotWaitRequest { snapshotId: string; timeout: number; } declare const SandboxSnapshotWaitRequest: MessageFns$1; interface SandboxSnapshotWaitResponse { result: GenericResult | undefined; } declare const SandboxSnapshotWaitResponse: MessageFns$1; interface SandboxStdinWriteRequest { sandboxId: string; input: Uint8Array; index: number; eof: boolean; } declare const SandboxStdinWriteRequest: MessageFns$1; interface SandboxStdinWriteResponse { } declare const SandboxStdinWriteResponse: MessageFns$1; interface SandboxTag { tagName: string; tagValue: string; } declare const SandboxTag: MessageFns$1; interface SandboxTagsGetRequest { sandboxId: string; } declare const SandboxTagsGetRequest: MessageFns$1; interface SandboxTagsGetResponse { tags: SandboxTag[]; } declare const SandboxTagsGetResponse: MessageFns$1; interface SandboxTagsSetRequest { environmentName: string; sandboxId: string; tags: SandboxTag[]; } declare const SandboxTagsSetRequest: MessageFns$1; interface SandboxTerminateRequest { sandboxId: string; } declare const SandboxTerminateRequest: MessageFns$1; interface SandboxTerminateResponse { existingResult: GenericResult | undefined; } declare const SandboxTerminateResponse: MessageFns$1; interface SandboxWaitRequest { sandboxId: string; timeout: number; } declare const SandboxWaitRequest: MessageFns$1; interface SandboxWaitResponse { result: GenericResult | undefined; } declare const SandboxWaitResponse: MessageFns$1; interface SandboxWaitUntilReadyRequest { sandboxId: string; timeout: number; } declare const SandboxWaitUntilReadyRequest: MessageFns$1; interface SandboxWaitUntilReadyResponse { readyAt: number; } declare const SandboxWaitUntilReadyResponse: MessageFns$1; interface Schedule { cron?: Schedule_Cron | undefined; period?: Schedule_Period | undefined; } declare const Schedule: MessageFns$1; interface Schedule_Cron { cronString: string; timezone: string; } declare const Schedule_Cron: MessageFns$1; interface Schedule_Period { years: number; months: number; weeks: number; days: number; hours: number; minutes: number; seconds: number; } declare const Schedule_Period: MessageFns$1; /** Scheduling constraints for Functions and Sandboxes. */ interface SchedulerPlacement { regions: string[]; /** @deprecated */ Zone?: string | undefined; /** @deprecated */ Lifecycle?: string | undefined; /** @deprecated */ InstanceTypes: string[]; /** Functions only */ nonpreemptible: boolean; } declare const SchedulerPlacement: MessageFns$1; interface SecretDeleteRequest { secretId: string; } declare const SecretDeleteRequest: MessageFns$1; interface SecretGetOrCreateRequest { deploymentName: string; environmentName: string; /** Not used atm */ objectCreationType: ObjectCreationType; envDict: { [key: string]: string; }; /** only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP */ appId: string; requiredKeys: string[]; } declare const SecretGetOrCreateRequest: MessageFns$1; interface SecretGetOrCreateResponse { secretId: string; metadata: SecretMetadata | undefined; } declare const SecretGetOrCreateResponse: MessageFns$1; interface SecretListItem { label: string; /** Superseded by metadata, used by clients up to 1.1.2 */ createdAt: number; lastUsedAt: number; /** Unused by client */ environmentName: string; secretId: string; metadata: SecretMetadata | undefined; } declare const SecretListItem: MessageFns$1; interface SecretListRequest { environmentName: string; pagination: ListPagination | undefined; } declare const SecretListRequest: MessageFns$1; interface SecretListResponse { items: SecretListItem[]; environmentName: string; } declare const SecretListResponse: MessageFns$1; interface SecretMetadata { name: string; creationInfo: CreationInfo | undefined; } declare const SecretMetadata: MessageFns$1; interface SecretUpdateRequest { secretId: string; updates: SecretUpdateRequest_Update[]; } declare const SecretUpdateRequest: MessageFns$1; interface SecretUpdateRequest_Update { key: string; /** If not set, the key is removed. */ value?: string | undefined; } declare const SecretUpdateRequest_Update: MessageFns$1; interface ServiceUserIdentity { serviceUserId: string; serviceUserName: string; createdBy: UserIdentity | undefined; } declare const ServiceUserIdentity: MessageFns$1; interface SharedVolumeDeleteRequest { sharedVolumeId: string; } declare const SharedVolumeDeleteRequest: MessageFns$1; interface SharedVolumeGetFileRequest { sharedVolumeId: string; path: string; } declare const SharedVolumeGetFileRequest: MessageFns$1; interface SharedVolumeGetFileResponse { data?: Uint8Array | undefined; dataBlobId?: string | undefined; } declare const SharedVolumeGetFileResponse: MessageFns$1; interface SharedVolumeGetOrCreateRequest { deploymentName: string; environmentName: string; objectCreationType: ObjectCreationType; /** only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP */ appId: string; } declare const SharedVolumeGetOrCreateRequest: MessageFns$1; interface SharedVolumeGetOrCreateResponse { sharedVolumeId: string; } declare const SharedVolumeGetOrCreateResponse: MessageFns$1; interface SharedVolumeHeartbeatRequest { sharedVolumeId: string; } declare const SharedVolumeHeartbeatRequest: MessageFns$1; interface SharedVolumeListFilesRequest { sharedVolumeId: string; path: string; } declare const SharedVolumeListFilesRequest: MessageFns$1; interface SharedVolumeListFilesResponse { entries: FileEntry[]; } declare const SharedVolumeListFilesResponse: MessageFns$1; interface SharedVolumeListItem { /** app name of object entity app */ label: string; sharedVolumeId: string; createdAt: number; cloudProvider: CloudProvider; } declare const SharedVolumeListItem: MessageFns$1; interface SharedVolumeListRequest { environmentName: string; } declare const SharedVolumeListRequest: MessageFns$1; interface SharedVolumeListResponse { items: SharedVolumeListItem[]; environmentName: string; } declare const SharedVolumeListResponse: MessageFns$1; interface SharedVolumeMount { mountPath: string; sharedVolumeId: string; cloudProvider: CloudProvider; } declare const SharedVolumeMount: MessageFns$1; interface SharedVolumePutFileRequest { sharedVolumeId: string; path: string; sha256Hex: string; data?: Uint8Array | undefined; dataBlobId?: string | undefined; /** remove when required client version >= 47 */ resumable: boolean; } declare const SharedVolumePutFileRequest: MessageFns$1; interface SharedVolumePutFileResponse { exists: boolean; } declare const SharedVolumePutFileResponse: MessageFns$1; interface SharedVolumeRemoveFileRequest { sharedVolumeId: string; path: string; recursive: boolean; } declare const SharedVolumeRemoveFileRequest: MessageFns$1; interface SystemErrorMessage { errorCode: SystemErrorCode; errorMessage: string; } declare const SystemErrorMessage: MessageFns$1; interface TaskClusterHelloRequest { taskId: string; containerIp: string; } declare const TaskClusterHelloRequest: MessageFns$1; interface TaskClusterHelloResponse { clusterId: string; clusterRank: number; /** All IPv6 addresses in cluster, ordered by cluster rank */ containerIps: string[]; containerIpv4Ips: string[]; } declare const TaskClusterHelloResponse: MessageFns$1; interface TaskCurrentInputsResponse { inputIds: string[]; } declare const TaskCurrentInputsResponse: MessageFns$1; /** * Used to get a JWT and URL for direct access to a task command router * running on the modal-worker, so the client can issue exec commands (and other * operations as they become available) directly to the worker. */ interface TaskGetCommandRouterAccessRequest { taskId: string; } declare const TaskGetCommandRouterAccessRequest: MessageFns$1; interface TaskGetCommandRouterAccessResponse { jwt: string; url: string; } declare const TaskGetCommandRouterAccessResponse: MessageFns$1; interface TaskGetInfoRequest { taskId: string; } declare const TaskGetInfoRequest: MessageFns$1; interface TaskGetInfoResponse { appId: string; info: TaskInfo | undefined; } declare const TaskGetInfoResponse: MessageFns$1; interface TaskInfo { id: string; startedAt: number; finishedAt: number; result: GenericResult | undefined; enqueuedAt: number; gpuType: string; sandboxId: string; snapshotBehavior: TaskSnapshotBehavior; gpuConfig: GPUConfig | undefined; } declare const TaskInfo: MessageFns$1; interface TaskListRequest { environmentName: string; appId: string; } declare const TaskListRequest: MessageFns$1; interface TaskListResponse { tasks: TaskStats[]; } declare const TaskListResponse: MessageFns$1; interface TaskLogs { data: string; taskState: TaskState; timestamp: number; fileDescriptor: FileDescriptor; taskProgress: TaskProgress | undefined; functionCallId: string; inputId: string; timestampNs: number; containerId: string; containerName: string; } declare const TaskLogs: MessageFns$1; interface TaskLogsBatch { taskId: string; items: TaskLogs[]; entryId: string; appDone: boolean; functionId: string; inputId: string; /** Used for image logs */ imageId: string; eof: boolean; /** Used for interactive functions */ ptyExecId: string; rootFunctionId: string; ttlDays: number; } declare const TaskLogsBatch: MessageFns$1; interface TaskProgress { len: number; pos: number; progressType: ProgressType; description: string; } declare const TaskProgress: MessageFns$1; interface TaskResultRequest { result: GenericResult | undefined; } declare const TaskResultRequest: MessageFns$1; interface TaskStats { taskId: string; appId: string; appDescription: string; startedAt: number; enqueuedAt: number; } declare const TaskStats: MessageFns$1; interface TaskTemplate { rank: number; resources: Resources | undefined; targetConcurrentInputs: number; maxConcurrentInputs: number; /** * TODO(irfansharif): Just move this into a column in the task table instead? * Deprecate all above fields and get rid of this message altogether */ index: number; } declare const TaskTemplate: MessageFns$1; interface TemplateListRequest { } declare const TemplateListRequest: MessageFns$1; interface TemplateListResponse { items: TemplateListResponse_TemplateListItem[]; } declare const TemplateListResponse: MessageFns$1; interface TemplateListResponse_TemplateListItem { name: string; repo: string; ref: string; } declare const TemplateListResponse_TemplateListItem: MessageFns$1; interface TokenFlowCreateRequest { utmSource: string; localhostPort: number; nextUrl: string; } declare const TokenFlowCreateRequest: MessageFns$1; interface TokenFlowCreateResponse { tokenFlowId: string; webUrl: string; code: string; waitSecret: string; } declare const TokenFlowCreateResponse: MessageFns$1; interface TokenFlowWaitRequest { timeout: number; tokenFlowId: string; waitSecret: string; } declare const TokenFlowWaitRequest: MessageFns$1; interface TokenFlowWaitResponse { tokenId: string; tokenSecret: string; timeout: boolean; workspaceUsername: string; } declare const TokenFlowWaitResponse: MessageFns$1; interface TokenInfoGetRequest { } declare const TokenInfoGetRequest: MessageFns$1; interface TokenInfoGetResponse { tokenId: string; workspaceId: string; workspaceName: string; userIdentity?: UserIdentity | undefined; serviceUserIdentity?: ServiceUserIdentity | undefined; /** Token metadata */ createdAt: Date | undefined; expiresAt: Date | undefined; tokenName: string; } declare const TokenInfoGetResponse: MessageFns$1; interface TunnelData { host: string; port: number; unencryptedHost?: string | undefined; unencryptedPort?: number | undefined; containerPort: number; } declare const TunnelData: MessageFns$1; interface TunnelStartRequest { port: number; unencrypted: boolean; tunnelType?: TunnelType | undefined; } declare const TunnelStartRequest: MessageFns$1; interface TunnelStartResponse { host: string; port: number; unencryptedHost?: string | undefined; unencryptedPort?: number | undefined; } declare const TunnelStartResponse: MessageFns$1; interface TunnelStopRequest { port: number; } declare const TunnelStopRequest: MessageFns$1; interface TunnelStopResponse { exists: boolean; } declare const TunnelStopResponse: MessageFns$1; interface UploadUrlList { items: string[]; } declare const UploadUrlList: MessageFns$1; interface UserIdentity { userId: string; username: string; } declare const UserIdentity: MessageFns$1; interface VolumeCommitRequest { /** * NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies * a volume mount. */ volumeId: string; } declare const VolumeCommitRequest: MessageFns$1; interface VolumeCommitResponse { skipReload: boolean; } declare const VolumeCommitResponse: MessageFns$1; interface VolumeCopyFiles2Request { volumeId: string; srcPaths: string[]; dstPath: string; recursive: boolean; } declare const VolumeCopyFiles2Request: MessageFns$1; interface VolumeCopyFilesRequest { volumeId: string; srcPaths: string[]; dstPath: string; recursive: boolean; } declare const VolumeCopyFilesRequest: MessageFns$1; interface VolumeDeleteRequest { volumeId: string; /** @deprecated */ environmentName: string; } declare const VolumeDeleteRequest: MessageFns$1; interface VolumeGetByIdRequest { volumeId: string; } declare const VolumeGetByIdRequest: MessageFns$1; interface VolumeGetByIdResponse { volumeId: string; metadata: VolumeMetadata | undefined; } declare const VolumeGetByIdResponse: MessageFns$1; interface VolumeGetFile2Request { volumeId: string; path: string; start: number; /** 0 is interpreted as 'read to end' */ len: number; } declare const VolumeGetFile2Request: MessageFns$1; interface VolumeGetFile2Response { getUrls: string[]; /** total file size */ size: number; /** file position of first byte returned */ start: number; /** number of bytes returned */ len: number; } declare const VolumeGetFile2Response: MessageFns$1; interface VolumeGetFileRequest { volumeId: string; path: string; start: number; /** 0 is interpreted as 'read to end' */ len: number; } declare const VolumeGetFileRequest: MessageFns$1; interface VolumeGetFileResponse { data?: Uint8Array | undefined; dataBlobId?: string | undefined; /** total file size */ size: number; /** file position of first byte returned */ start: number; /** number of bytes returned */ len: number; } declare const VolumeGetFileResponse: MessageFns$1; interface VolumeGetOrCreateRequest { deploymentName: string; environmentName: string; objectCreationType: ObjectCreationType; /** only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP */ appId: string; version: VolumeFsVersion; } declare const VolumeGetOrCreateRequest: MessageFns$1; interface VolumeGetOrCreateResponse { volumeId: string; /** Not used directly; version is part of the metadata */ version: VolumeFsVersion; metadata: VolumeMetadata | undefined; } declare const VolumeGetOrCreateResponse: MessageFns$1; interface VolumeHeartbeatRequest { volumeId: string; } declare const VolumeHeartbeatRequest: MessageFns$1; interface VolumeListFiles2Request { volumeId: string; path: string; recursive: boolean; maxEntries?: number | undefined; } declare const VolumeListFiles2Request: MessageFns$1; interface VolumeListFiles2Response { entries: FileEntry[]; } declare const VolumeListFiles2Response: MessageFns$1; interface VolumeListFilesRequest { volumeId: string; path: string; recursive: boolean; maxEntries?: number | undefined; } declare const VolumeListFilesRequest: MessageFns$1; interface VolumeListFilesResponse { entries: FileEntry[]; } declare const VolumeListFilesResponse: MessageFns$1; interface VolumeListItem { /** app name of object entity app */ label: string; volumeId: string; /** Superseded by metadata, used by clients up to 1.1.2 */ createdAt: number; metadata: VolumeMetadata | undefined; } declare const VolumeListItem: MessageFns$1; interface VolumeListRequest { environmentName: string; pagination: ListPagination | undefined; } declare const VolumeListRequest: MessageFns$1; interface VolumeListResponse { items: VolumeListItem[]; environmentName: string; } declare const VolumeListResponse: MessageFns$1; interface VolumeMetadata { version: VolumeFsVersion; name: string; creationInfo: CreationInfo | undefined; } declare const VolumeMetadata: MessageFns$1; interface VolumeMount { volumeId: string; mountPath: string; allowBackgroundCommits: boolean; readOnly: boolean; } declare const VolumeMount: MessageFns$1; interface VolumePutFiles2Request { /** The ID of the volume to put/upload files into. */ volumeId: string; /** List of files to put/upload. */ files: VolumePutFiles2Request_File[]; /** * If set to true, prevent overwriting existing files. (Note that we don't * allow overwriting existing directories with uploaded files regardless.) */ disallowOverwriteExistingFiles: boolean; } declare const VolumePutFiles2Request: MessageFns$1; interface VolumePutFiles2Request_File { /** * Destination path of the file to be uploaded, including any parent dirs * etc.; for example "foo/bar/baz.txt" */ path: string; /** The total size of the file, in bytes. */ size: number; /** The blocks, in units of 8MiB, that this file consists of. */ blocks: VolumePutFiles2Request_Block[]; /** Unix file permission bits `st_mode`. */ mode?: number | undefined; } declare const VolumePutFiles2Request_File: MessageFns$1; interface VolumePutFiles2Request_Block { /** * The SHA256 digest of the contents of this block, in raw (ie. 32 bytes) * form for compactness. */ contentsSha256: Uint8Array; /** * From a previous call to `VolumePutFiles2`, we might have gotten a * response indicating that this block was missing. * * For such a block, this field contains the raw bytes of the body that * was returned from the HTTP PUT request when the client made a request * for the `put_url` returned in the previous `VolumePutFiles2Response`. */ putResponse?: Uint8Array | undefined; } declare const VolumePutFiles2Request_Block: MessageFns$1; interface VolumePutFiles2Response { /** * Blocks that are currently missing in the volume, because the file did not * exist, or because the block checksum from `blocks_sha256` in the request * did not match the current contents of the file. * * Values will be returned sorted by `(file_index, block_index)`. * * If this field is empty, it means that the files were uploaded successfully * and/or that the request was an idempotent no-op. */ missingBlocks: VolumePutFiles2Response_MissingBlock[]; } declare const VolumePutFiles2Response: MessageFns$1; interface VolumePutFiles2Response_MissingBlock { /** Index of the file in the original `files` field of the request. */ fileIndex: number; /** * The index of the block in the original `files[file_index].blocks` of the * request. */ blockIndex: number; /** * Make a HTTP PUT request to this endpoint with the blocks' contents as * the body. */ putUrl: string; } declare const VolumePutFiles2Response_MissingBlock: MessageFns$1; interface VolumePutFilesRequest { volumeId: string; /** TODO(staffan): This is obviously unfortunately named, but provides what we need - consider renaming. */ files: MountFile[]; /** * If set to true, prevent overwriting existing files. (Note that we don't allow overwriting * existing directories with uploaded files regardless.) */ disallowOverwriteExistingFiles: boolean; } declare const VolumePutFilesRequest: MessageFns$1; interface VolumeReloadRequest { /** * NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies * a volume mount. */ volumeId: string; } declare const VolumeReloadRequest: MessageFns$1; interface VolumeRemoveFile2Request { volumeId: string; path: string; recursive: boolean; } declare const VolumeRemoveFile2Request: MessageFns$1; interface VolumeRemoveFileRequest { volumeId: string; path: string; recursive: boolean; } declare const VolumeRemoveFileRequest: MessageFns$1; interface VolumeRenameRequest { volumeId: string; name: string; } declare const VolumeRenameRequest: MessageFns$1; interface Warning { type: Warning_WarningType; message: string; } declare const Warning: MessageFns$1; interface WebUrlInfo { truncated: boolean; /** @deprecated */ hasUniqueHash: boolean; labelStolen: boolean; } declare const WebUrlInfo: MessageFns$1; interface WebhookConfig { type: WebhookType; method: string; /** User-supplied "label" component of URL */ requestedSuffix: string; asyncMode: WebhookAsyncMode; customDomains: CustomDomainConfig[]; webServerPort: number; webServerStartupTimeout: number; webEndpointDocs: boolean; requiresProxyAuth: boolean; /** Additional URL suffix added for ephemeral Apps */ ephemeralSuffix: string; } declare const WebhookConfig: MessageFns$1; interface WorkspaceBillingReportItem { objectId: string; description: string; environmentName: string; interval: Date | undefined; cost: string; tags: { [key: string]: string; }; } declare const WorkspaceBillingReportItem: MessageFns$1; interface WorkspaceBillingReportRequest { /** Workspace ID will be implicit in the request metadata */ startTimestamp: Date | undefined; endTimestamp: Date | undefined; /** e.g. 'd' or 'h'; server defines what we accept */ resolution: string; tagNames: string[]; } declare const WorkspaceBillingReportRequest: MessageFns$1; interface WorkspaceDashboardUrlRequest { environmentName: string; } declare const WorkspaceDashboardUrlRequest: MessageFns$1; interface WorkspaceDashboardUrlResponse { url: string; } declare const WorkspaceDashboardUrlResponse: MessageFns$1; interface WorkspaceNameLookupResponse { /** @deprecated */ workspaceName: string; username: string; } declare const WorkspaceNameLookupResponse: MessageFns$1; type ModalClientDefinition = typeof ModalClientDefinition; declare const ModalClientDefinition: { readonly name: "ModalClient"; readonly fullName: "modal.client.ModalClient"; readonly methods: { /** Apps */ readonly appClientDisconnect: { readonly name: "AppClientDisconnect"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly appCountLogs: { readonly name: "AppCountLogs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appCreate: { readonly name: "AppCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appDeploy: { readonly name: "AppDeploy"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appDeploymentHistory: { readonly name: "AppDeploymentHistory"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appFetchLogs: { readonly name: "AppFetchLogs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appGetByDeploymentName: { readonly name: "AppGetByDeploymentName"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appGetLayout: { readonly name: "AppGetLayout"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appGetLifecycle: { readonly name: "AppGetLifecycle"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appGetLogs: { readonly name: "AppGetLogs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly appGetObjects: { readonly name: "AppGetObjects"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appGetOrCreate: { readonly name: "AppGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appGetTags: { readonly name: "AppGetTags"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appHeartbeat: { readonly name: "AppHeartbeat"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly appList: { readonly name: "AppList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appLookup: { readonly name: "AppLookup"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appPublish: { readonly name: "AppPublish"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appRollback: { readonly name: "AppRollback"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly appRollover: { readonly name: "AppRollover"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly appSetObjects: { readonly name: "AppSetObjects"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly appSetTags: { readonly name: "AppSetTags"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly appStop: { readonly name: "AppStop"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** Input Plane */ readonly attemptAwait: { readonly name: "AttemptAwait"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly attemptRetry: { readonly name: "AttemptRetry"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly attemptStart: { readonly name: "AttemptStart"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Auth Token */ readonly authTokenGet: { readonly name: "AuthTokenGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Blobs */ readonly blobCreate: { readonly name: "BlobCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly blobGet: { readonly name: "BlobGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Classes */ readonly classCreate: { readonly name: "ClassCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly classGet: { readonly name: "ClassGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Clients */ readonly clientHello: { readonly name: "ClientHello"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Clusters */ readonly clusterGet: { readonly name: "ClusterGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly clusterList: { readonly name: "ClusterList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Container */ readonly containerCheckpoint: { readonly name: "ContainerCheckpoint"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly containerExec: { readonly name: "ContainerExec"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly containerExecGetOutput: { readonly name: "ContainerExecGetOutput"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly containerExecPutInput: { readonly name: "ContainerExecPutInput"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly containerExecWait: { readonly name: "ContainerExecWait"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly containerFilesystemExec: { readonly name: "ContainerFilesystemExec"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly containerFilesystemExecGetOutput: { readonly name: "ContainerFilesystemExecGetOutput"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly containerHeartbeat: { readonly name: "ContainerHeartbeat"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly containerHello: { readonly name: "ContainerHello"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly containerLog: { readonly name: "ContainerLog"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly containerReloadVolumes: { readonly name: "ContainerReloadVolumes"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly containerStop: { readonly name: "ContainerStop"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Dicts */ readonly dictClear: { readonly name: "DictClear"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly dictContains: { readonly name: "DictContains"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly dictContents: { readonly name: "DictContents"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly dictDelete: { readonly name: "DictDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly dictGet: { readonly name: "DictGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly dictGetById: { readonly name: "DictGetById"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly dictGetOrCreate: { readonly name: "DictGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly dictHeartbeat: { readonly name: "DictHeartbeat"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly dictLen: { readonly name: "DictLen"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly dictList: { readonly name: "DictList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly dictPop: { readonly name: "DictPop"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly dictUpdate: { readonly name: "DictUpdate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Domains */ readonly domainCertificateVerify: { readonly name: "DomainCertificateVerify"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly domainCreate: { readonly name: "DomainCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly domainList: { readonly name: "DomainList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Environments */ readonly environmentCreate: { readonly name: "EnvironmentCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly environmentDelete: { readonly name: "EnvironmentDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly environmentGetOrCreate: { readonly name: "EnvironmentGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly environmentList: { readonly name: "EnvironmentList"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly environmentUpdate: { readonly name: "EnvironmentUpdate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Modal Flash (experimental) */ readonly flashContainerDeregister: { readonly name: "FlashContainerDeregister"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly flashContainerList: { readonly name: "FlashContainerList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly flashContainerRegister: { readonly name: "FlashContainerRegister"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly flashSetTargetSlotsMetrics: { readonly name: "FlashSetTargetSlotsMetrics"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Functions */ readonly functionAsyncInvoke: { readonly name: "FunctionAsyncInvoke"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionBindParams: { readonly name: "FunctionBindParams"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionCallCancel: { readonly name: "FunctionCallCancel"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly functionCallFromId: { readonly name: "FunctionCallFromId"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionCallGetDataIn: { readonly name: "FunctionCallGetDataIn"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly functionCallGetDataOut: { readonly name: "FunctionCallGetDataOut"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly functionCallList: { readonly name: "FunctionCallList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionCallPutDataOut: { readonly name: "FunctionCallPutDataOut"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly functionCreate: { readonly name: "FunctionCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** For map RPCs, to signal that all inputs have been sent */ readonly functionFinishInputs: { readonly name: "FunctionFinishInputs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly functionGet: { readonly name: "FunctionGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionGetCallGraph: { readonly name: "FunctionGetCallGraph"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionGetCurrentStats: { readonly name: "FunctionGetCurrentStats"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionGetDynamicConcurrency: { readonly name: "FunctionGetDynamicConcurrency"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** For containers to request next call */ readonly functionGetInputs: { readonly name: "FunctionGetInputs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Returns the next result(s) for an entire function call (FunctionMap) */ readonly functionGetOutputs: { readonly name: "FunctionGetOutputs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionGetSerialized: { readonly name: "FunctionGetSerialized"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionMap: { readonly name: "FunctionMap"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionPrecreate: { readonly name: "FunctionPrecreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionPutInputs: { readonly name: "FunctionPutInputs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** For containers to return result */ readonly functionPutOutputs: { readonly name: "FunctionPutOutputs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly functionRetryInputs: { readonly name: "FunctionRetryInputs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionStartPtyShell: { readonly name: "FunctionStartPtyShell"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly functionUpdateSchedulingParams: { readonly name: "FunctionUpdateSchedulingParams"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Images */ readonly imageDelete: { readonly name: "ImageDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly imageFromId: { readonly name: "ImageFromId"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly imageGetOrCreate: { readonly name: "ImageGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly imageJoinStreaming: { readonly name: "ImageJoinStreaming"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; /** Input Plane Map */ readonly mapAwait: { readonly name: "MapAwait"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly mapCheckInputs: { readonly name: "MapCheckInputs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly mapStartOrContinue: { readonly name: "MapStartOrContinue"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Mounts */ readonly mountGetOrCreate: { readonly name: "MountGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly mountPutFile: { readonly name: "MountPutFile"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Notebooks */ readonly notebookKernelPublishResults: { readonly name: "NotebookKernelPublishResults"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** Proxies */ readonly proxyAddIp: { readonly name: "ProxyAddIp"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly proxyCreate: { readonly name: "ProxyCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly proxyDelete: { readonly name: "ProxyDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly proxyGet: { readonly name: "ProxyGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly proxyGetOrCreate: { readonly name: "ProxyGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly proxyList: { readonly name: "ProxyList"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly proxyRemoveIp: { readonly name: "ProxyRemoveIp"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** Queues */ readonly queueClear: { readonly name: "QueueClear"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly queueDelete: { readonly name: "QueueDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly queueGet: { readonly name: "QueueGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly queueGetById: { readonly name: "QueueGetById"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly queueGetOrCreate: { readonly name: "QueueGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly queueHeartbeat: { readonly name: "QueueHeartbeat"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly queueLen: { readonly name: "QueueLen"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly queueList: { readonly name: "QueueList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly queueNextItems: { readonly name: "QueueNextItems"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly queuePut: { readonly name: "QueuePut"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** Sandboxes */ readonly sandboxCreate: { readonly name: "SandboxCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxCreateConnectToken: { readonly name: "SandboxCreateConnectToken"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxCreateV2: { readonly name: "SandboxCreateV2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetCommandRouterAccess: { readonly name: "SandboxGetCommandRouterAccess"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetFromName: { readonly name: "SandboxGetFromName"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetLogs: { readonly name: "SandboxGetLogs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly sandboxGetResourceUsage: { readonly name: "SandboxGetResourceUsage"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** needed for modal container exec */ readonly sandboxGetTaskId: { readonly name: "SandboxGetTaskId"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetTaskIdV2: { readonly name: "SandboxGetTaskIdV2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetTunnels: { readonly name: "SandboxGetTunnels"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetTunnelsV2: { readonly name: "SandboxGetTunnelsV2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxList: { readonly name: "SandboxList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxRestore: { readonly name: "SandboxRestore"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSnapshot: { readonly name: "SandboxSnapshot"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSnapshotFs: { readonly name: "SandboxSnapshotFs"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSnapshotFsAsync: { readonly name: "SandboxSnapshotFsAsync"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSnapshotFsAsyncGet: { readonly name: "SandboxSnapshotFsAsyncGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSnapshotGet: { readonly name: "SandboxSnapshotGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSnapshotWait: { readonly name: "SandboxSnapshotWait"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxStdinWrite: { readonly name: "SandboxStdinWrite"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxTagsGet: { readonly name: "SandboxTagsGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxTagsSet: { readonly name: "SandboxTagsSet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly sandboxTerminate: { readonly name: "SandboxTerminate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxTerminateV2: { readonly name: "SandboxTerminateV2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxWait: { readonly name: "SandboxWait"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxWaitUntilReady: { readonly name: "SandboxWaitUntilReady"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxWaitV2: { readonly name: "SandboxWaitV2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Secrets */ readonly secretDelete: { readonly name: "SecretDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly secretGetOrCreate: { readonly name: "SecretGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly secretList: { readonly name: "SecretList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly secretUpdate: { readonly name: "SecretUpdate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** SharedVolumes */ readonly sharedVolumeDelete: { readonly name: "SharedVolumeDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly sharedVolumeGetFile: { readonly name: "SharedVolumeGetFile"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sharedVolumeGetOrCreate: { readonly name: "SharedVolumeGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sharedVolumeHeartbeat: { readonly name: "SharedVolumeHeartbeat"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly sharedVolumeList: { readonly name: "SharedVolumeList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sharedVolumeListFiles: { readonly name: "SharedVolumeListFiles"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sharedVolumeListFilesStream: { readonly name: "SharedVolumeListFilesStream"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly sharedVolumePutFile: { readonly name: "SharedVolumePutFile"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sharedVolumeRemoveFile: { readonly name: "SharedVolumeRemoveFile"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** Tasks */ readonly taskClusterHello: { readonly name: "TaskClusterHello"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly taskCurrentInputs: { readonly name: "TaskCurrentInputs"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly taskGetCommandRouterAccess: { readonly name: "TaskGetCommandRouterAccess"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly taskGetInfo: { readonly name: "TaskGetInfo"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly taskList: { readonly name: "TaskList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly taskResult: { readonly name: "TaskResult"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** Templates */ readonly templateList: { readonly name: "TemplateList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Tokens (web auth flow) */ readonly tokenFlowCreate: { readonly name: "TokenFlowCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly tokenFlowWait: { readonly name: "TokenFlowWait"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly tokenInfoGet: { readonly name: "TokenInfoGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Tunnels */ readonly tunnelStart: { readonly name: "TunnelStart"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly tunnelStop: { readonly name: "TunnelStop"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Volumes */ readonly volumeCommit: { readonly name: "VolumeCommit"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly volumeCopyFiles: { readonly name: "VolumeCopyFiles"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumeCopyFiles2: { readonly name: "VolumeCopyFiles2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumeDelete: { readonly name: "VolumeDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumeGetById: { readonly name: "VolumeGetById"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly volumeGetFile: { readonly name: "VolumeGetFile"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly volumeGetFile2: { readonly name: "VolumeGetFile2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly volumeGetOrCreate: { readonly name: "VolumeGetOrCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly volumeHeartbeat: { readonly name: "VolumeHeartbeat"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumeList: { readonly name: "VolumeList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly volumeListFiles: { readonly name: "VolumeListFiles"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly volumeListFiles2: { readonly name: "VolumeListFiles2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly volumePutFiles: { readonly name: "VolumePutFiles"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumePutFiles2: { readonly name: "VolumePutFiles2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly volumeReload: { readonly name: "VolumeReload"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumeRemoveFile: { readonly name: "VolumeRemoveFile"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumeRemoveFile2: { readonly name: "VolumeRemoveFile2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly volumeRename: { readonly name: "VolumeRename"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; /** Workspaces */ readonly workspaceBillingReport: { readonly name: "WorkspaceBillingReport"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly workspaceDashboardUrlGet: { readonly name: "WorkspaceDashboardUrlGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly workspaceNameLookup: { readonly name: "WorkspaceNameLookup"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; }; }; type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial$1 = T extends Builtin$1 ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial$1; } : Partial; interface MessageFns$1 { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial$1): T; fromPartial(object: DeepPartial$1): T; } /** Optional parameters for {@link SecretService#fromName client.secrets.fromName()}. */ type SecretFromNameParams = { environment?: string; requiredKeys?: string[]; }; /** Optional parameters for {@link SecretService#fromObject client.secrets.fromObject()}. */ type SecretFromObjectParams = { environment?: string; }; /** Optional parameters for {@link SecretService#delete client.secrets.delete()}. */ type SecretDeleteParams = { environment?: string; allowMissing?: boolean; }; /** * Service for managing {@link Secret Secrets}. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const secret = await modal.secrets.fromName("my-secret"); * ``` */ declare class SecretService { #private; constructor(client: ModalClient); /** Reference a {@link Secret} by its name. */ fromName(name: string, params?: SecretFromNameParams): Promise; /** Create a {@link Secret} from a plain object of key-value pairs. */ fromObject(entries: Record, params?: SecretFromObjectParams): Promise; /** * Delete a named {@link Secret}. * * Warning: Deletion is irreversible and will affect any Apps currently using the Secret. */ delete(name: string, params?: SecretDeleteParams): Promise; } /** Secrets provide a dictionary of environment variables for {@link Image}s. */ declare class Secret { readonly secretId: string; readonly name?: string; /** @ignore */ constructor(secretId: string, name?: string); /** * @deprecated Use {@link SecretService#fromName client.secrets.fromName()} instead. */ static fromName(name: string, params?: SecretFromNameParams): Promise; /** * @deprecated Use {@link SecretService#fromObject client.secrets.fromObject()} instead. */ static fromObject(entries: Record, params?: SecretFromObjectParams): Promise; } declare class CloudBucketMountService { #private; constructor(client: ModalClient); create(bucketName: string, params?: { secret?: Secret; readOnly?: boolean; requesterPays?: boolean; bucketEndpointUrl?: string; keyPrefix?: string; oidcAuthRoleArn?: string; }): CloudBucketMount; } /** Cloud Bucket Mounts provide access to cloud storage buckets within Modal Functions. */ declare class CloudBucketMount { #private; readonly bucketName: string; readonly secret?: Secret; readonly readOnly: boolean; readonly requesterPays: boolean; readonly bucketEndpointUrl?: string; readonly keyPrefix?: string; readonly oidcAuthRoleArn?: string; /** * @deprecated Use {@link CloudBucketMountService#create client.cloudBucketMounts.create()} instead. */ constructor(bucketName: string, params?: { secret?: Secret; readOnly?: boolean; requesterPays?: boolean; bucketEndpointUrl?: string; keyPrefix?: string; oidcAuthRoleArn?: string; }); /** @ignore */ constructor(bucketName: string, secret: Secret | undefined, readOnly: boolean, requesterPays: boolean, bucketEndpointUrl: string | undefined, keyPrefix: string | undefined, oidcAuthRoleArn: string | undefined, bucketType: CloudBucketMount_BucketType); /** @ignore */ toProto(mountPath: string): CloudBucketMount$1; } /** * Service for managing {@link FunctionCall}s. * * Normally only ever accessed via the client as: * * ```typescript * const modal = new ModalClient(); * const functionCall = await modal.functionCalls.fromId("123"); * ``` */ declare class FunctionCallService { #private; constructor(client: ModalClient); /** * Create a new {@link FunctionCall} from ID. */ fromId(functionCallId: string): Promise; } /** Optional parameters for {@link FunctionCall#get FunctionCall.get()}. */ type FunctionCallGetParams = { timeoutMs?: number; }; /** Optional parameters for {@link FunctionCall#cancel FunctionCall.cancel()}. */ type FunctionCallCancelParams = { terminateContainers?: boolean; }; /** * Represents a Modal FunctionCall. FunctionCalls are {@link Function_ Function} invocations with * a given input. They can be consumed asynchronously (see {@link FunctionCall#get FunctionCall.get()}) or cancelled * (see {@link FunctionCall#cancel FunctionCall.cancel()}). */ declare class FunctionCall { #private; readonly functionCallId: string; /** @ignore */ constructor(client: ModalClient | undefined, functionCallId: string); /** * @deprecated Use {@link FunctionCallService#fromId client.functionCalls.fromId()} instead. */ static fromId(functionCallId: string): FunctionCall; /** Get the result of a FunctionCall, optionally waiting with a timeout. */ get(params?: FunctionCallGetParams): Promise; /** Cancel a running FunctionCall. */ cancel(params?: FunctionCallCancelParams): Promise; } /** Optional parameters for `client.functions.fromName()`. */ type FunctionFromNameParams = { environment?: string; createIfMissing?: boolean; }; /** * Service for managing {@link Function_ Function}s. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const function = await modal.functions.fromName("my-app", "my-function"); * ``` */ declare class FunctionService { #private; constructor(client: ModalClient); /** * Reference a {@link Function_ Function} by its name in an App. */ fromName(appName: string, name: string, params?: FunctionFromNameParams): Promise; } /** Simple data structure storing stats for a running {@link Function_ Function}. */ interface FunctionStats { backlog: number; numTotalRunners: number; } /** Optional parameters for {@link Function_#updateAutoscaler Function_.updateAutoscaler()}. */ interface FunctionUpdateAutoscalerParams { minContainers?: number; maxContainers?: number; bufferContainers?: number; scaledownWindowMs?: number; } /** Represents a deployed Modal Function, which can be invoked remotely. */ declare class Function_ { #private; readonly functionId: string; readonly methodName?: string; /** @ignore */ constructor(client: ModalClient, functionId: string, methodName?: string, functionHandleMetadata?: FunctionHandleMetadata); /** * @deprecated Use `client.functions.fromName()` instead. */ static lookup(appName: string, name: string, params?: FunctionFromNameParams): Promise; remote(args?: any[], kwargs?: Record): Promise; spawn(args?: any[], kwargs?: Record): Promise; getCurrentStats(): Promise; updateAutoscaler(params: FunctionUpdateAutoscalerParams): Promise; /** * URL of a Function running as a web endpoint. * @returns The web URL if this Function is a web endpoint, otherwise undefined */ getWebUrl(): Promise; } /** Retry policy configuration for a Modal Function/Cls. */ declare class Retries { readonly maxRetries: number; readonly backoffCoefficient: number; readonly initialDelayMs: number; readonly maxDelayMs: number; constructor(params: { maxRetries: number; backoffCoefficient?: number; initialDelayMs?: number; maxDelayMs?: number; }); } type HeartbeatFunction = () => Promise; declare class EphemeralHeartbeatManager { private readonly heartbeatFn; private readonly abortController; constructor(heartbeatFn: HeartbeatFunction); private start; stop(): void; } /** Optional parameters for {@link VolumeService#fromName client.volumes.fromName()}. */ type VolumeFromNameParams = { environment?: string; createIfMissing?: boolean; }; /** Optional parameters for {@link VolumeService#ephemeral client.volumes.ephemeral()}. */ type VolumeEphemeralParams = { environment?: string; }; /** Optional parameters for {@link VolumeService#delete client.volumes.delete()}. */ type VolumeDeleteParams = { environment?: string; allowMissing?: boolean; }; /** * Service for managing {@link Volume}s. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const volume = await modal.volumes.fromName("my-volume"); * ``` */ declare class VolumeService { #private; constructor(client: ModalClient); /** * Reference a {@link Volume} by its name. */ fromName(name: string, params?: VolumeFromNameParams): Promise; /** * Create a nameless, temporary {@link Volume}. * It persists until closeEphemeral() is called, or the process exits. */ ephemeral(params?: VolumeEphemeralParams): Promise; /** * Delete a named {@link Volume}. * * Warning: Deletion is irreversible and will affect any Apps currently using the Volume. */ delete(name: string, params?: VolumeDeleteParams): Promise; } /** Volumes provide persistent storage that can be mounted in Modal {@link Function_ Function}s. */ declare class Volume { #private; readonly volumeId: string; readonly name?: string; private _readOnly; /** @ignore */ constructor(volumeId: string, name?: string, readOnly?: boolean, ephemeralHbManager?: EphemeralHeartbeatManager); /** * @deprecated Use {@link VolumeService#fromName client.volumes.fromName()} instead. */ static fromName(name: string, options?: VolumeFromNameParams): Promise; /** Configure Volume to mount as read-only. */ readOnly(): Volume; get isReadOnly(): boolean; /** * @deprecated Use {@link VolumeService#ephemeral client.volumes.ephemeral()} instead. */ static ephemeral(options?: VolumeEphemeralParams): Promise; /** Delete the ephemeral Volume. Only usable with emphemeral Volumes. */ closeEphemeral(): void; } /** Optional parameters for {@link ClsService#fromName client.cls.fromName()}. */ type ClsFromNameParams = { environment?: string; createIfMissing?: boolean; }; /** * Service for managing {@link Cls}. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const cls = await modal.cls.fromName("my-app", "MyCls"); * ``` */ declare class ClsService { #private; constructor(client: ModalClient); /** * Reference a {@link Cls} from a deployed {@link App} by its name. */ fromName(appName: string, name: string, params?: ClsFromNameParams): Promise; } type ClsWithOptionsParams = { cpu?: number; cpuLimit?: number; memoryMiB?: number; memoryLimitMiB?: number; gpu?: string; env?: Record; secrets?: Secret[]; volumes?: Record; retries?: number | Retries; maxContainers?: number; bufferContainers?: number; scaledownWindowMs?: number; timeoutMs?: number; }; type ClsWithConcurrencyParams = { maxInputs: number; targetInputs?: number; }; type ClsWithBatchingParams = { maxBatchSize: number; waitMs: number; }; type ServiceOptions = ClsWithOptionsParams & { maxConcurrentInputs?: number; targetConcurrentInputs?: number; batchMaxSize?: number; batchWaitMs?: number; }; /** Represents a deployed Modal Cls. */ declare class Cls { #private; /** @ignore */ constructor(client: ModalClient, serviceFunctionId: string, serviceFunctionMetadata: FunctionHandleMetadata, options?: ServiceOptions); /** * @deprecated Use {@link ClsService#fromName client.cls.fromName()} instead. */ static lookup(appName: string, name: string, params?: ClsFromNameParams): Promise; /** Create a new instance of the Cls with parameters and/or runtime options. */ instance(parameters?: Record): Promise; /** Override the static Function configuration at runtime. */ withOptions(options: ClsWithOptionsParams): Cls; /** Create an instance of the Cls with input concurrency enabled or overridden with new values. */ withConcurrency(params: ClsWithConcurrencyParams): Cls; /** Create an instance of the Cls with dynamic batching enabled or overridden with new values. */ withBatching(params: ClsWithBatchingParams): Cls; } /** Represents an instance of a deployed Modal {@link Cls}, optionally with parameters. */ declare class ClsInstance { #private; constructor(methods: Map); method(name: string): Function_; } /** * Service for managing {@link Image}s. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const image = await modal.images.fromRegistry("alpine"); * ``` */ declare class ImageService { #private; constructor(client: ModalClient); /** * Creates an {@link Image} from an Image ID * * @param imageId - Image ID. */ fromId(imageId: string): Promise; /** * Creates an {@link Image} from a raw registry tag, optionally using a {@link Secret} for authentication. * * @param tag - The registry tag for the Image. * @param secret - Optional. A Secret containing credentials for registry authentication. */ fromRegistry(tag: string, secret?: Secret): Image; /** * Creates an {@link Image} from a raw registry tag, optionally using a {@link Secret} for authentication. * * @param tag - The registry tag for the Image. * @param secret - A Secret containing credentials for registry authentication. */ fromAwsEcr(tag: string, secret: Secret): Image; /** * Creates an {@link Image} from a raw registry tag, optionally using a {@link Secret} for authentication. * * @param tag - The registry tag for the Image. * @param secret - A Secret containing credentials for registry authentication. */ fromGcpArtifactRegistry(tag: string, secret: Secret): Image; /** * Delete an {@link Image} by ID. * * Deletion is irreversible and will prevent Functions/Sandboxes from using the Image. * * Note: When building an Image, each chained method call will create an * intermediate Image layer, each with its own ID. Deleting an Image will not * delete any of its intermediate layers, only the image identified by the * provided ID. */ delete(imageId: string, _?: ImageDeleteParams): Promise; } /** Optional parameters for {@link ImageService#delete client.images.delete()}. */ type ImageDeleteParams = Record; /** Optional parameters for {@link Image#dockerfileCommands Image.dockerfileCommands()}. */ type ImageDockerfileCommandsParams = { /** Environment variables to set in the build environment. */ env?: Record; /** {@link Secret}s that will be made available as environment variables to this layer's build environment. */ secrets?: Secret[]; /** GPU reservation for this layer's build environment (e.g. "A100", "T4:2", "A100-80GB:4"). */ gpu?: string; /** Ignore cached builds for this layer, similar to 'docker build --no-cache'. */ forceBuild?: boolean; }; /** Represents a single image layer with its build configuration. */ type Layer = { commands: string[]; env?: Record; secrets?: Secret[]; gpuConfig?: GPUConfig; forceBuild?: boolean; }; /** A container image, used for starting {@link Sandbox}es. */ declare class Image { #private; /** @ignore */ constructor(client: ModalClient, imageId: string, tag: string, imageRegistryConfig?: ImageRegistryConfig, layers?: Layer[]); get imageId(): string; /** * @deprecated Use {@link ImageService#fromId client.images.fromId()} instead. */ static fromId(imageId: string): Promise; /** * @deprecated Use {@link ImageService#fromRegistry client.images.fromRegistry()} instead. */ static fromRegistry(tag: string, secret?: Secret): Image; /** * @deprecated Use {@link ImageService#fromAwsEcr client.images.fromAwsEcr()} instead. */ static fromAwsEcr(tag: string, secret: Secret): Image; /** * @deprecated Use {@link ImageService#fromGcpArtifactRegistry client.images.fromGcpArtifactRegistry()} instead. */ static fromGcpArtifactRegistry(tag: string, secret: Secret): Image; private static validateDockerfileCommands; /** * Extend an image with arbitrary Dockerfile-like commands. * * Each call creates a new Image layer that will be built sequentially. * The provided options apply only to this layer. * * @param commands - Array of Dockerfile commands as strings * @param params - Optional configuration for this layer's build * @returns A new Image instance */ dockerfileCommands(commands: string[], params?: ImageDockerfileCommandsParams): Image; /** * Eagerly builds an Image on Modal. * * @param app - App to use to build the Image. */ build(app: App): Promise; /** * @deprecated Use {@link ImageService#delete client.images.delete()} instead. */ static delete(imageId: string, _?: ImageDeleteParams): Promise; } /** * Service for managing {@link Proxy Proxies}. */ declare class ProxyService { #private; constructor(client: ModalClient); /** * Reference a {@link Proxy} by its name. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const proxy = await modal.proxies.fromName("my-proxy"); * ``` */ fromName(name: string, params?: ProxyFromNameParams): Promise; } /** Optional parameters for {@link ProxyService#fromName client.proxies.fromName()}. */ type ProxyFromNameParams = { environment?: string; }; /** Proxy objects give your Modal containers a static outbound IP address. */ declare class Proxy { readonly proxyId: string; /** @ignore */ constructor(proxyId: string); /** * @deprecated Use {@link ProxyService#fromName client.proxies.fromName()} instead. */ static fromName(name: string, params?: ProxyFromNameParams): Promise; } /** Optional parameters for {@link QueueService#fromName client.queues.fromName()}. */ type QueueFromNameParams = { environment?: string; createIfMissing?: boolean; }; /** Optional parameters for {@link QueueService#delete client.queues.delete()}. */ type QueueDeleteParams = { environment?: string; allowMissing?: boolean; }; /** Optional parameters for {@link QueueService#ephemeral client.queues.ephemeral()}. */ type QueueEphemeralParams = { environment?: string; }; /** * Service for managing {@link Queue}s. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const queue = await modal.queues.fromName("my-queue"); * ``` */ declare class QueueService { #private; constructor(client: ModalClient); /** * Create a nameless, temporary {@link Queue}. * You will need to call {@link Queue#closeEphemeral Queue.closeEphemeral()} to delete the Queue. */ ephemeral(params?: QueueEphemeralParams): Promise; /** * Reference a {@link Queue} by name. */ fromName(name: string, params?: QueueFromNameParams): Promise; /** * Delete a {@link Queue} by name. * * Warning: Deletion is irreversible and will affect any Apps currently using the Queue. */ delete(name: string, params?: QueueDeleteParams): Promise; } /** Optional parameters for {@link Queue#clear Queue.clear()}. */ type QueueClearParams = { /** Partition to clear, uses default partition if not set. */ partition?: string; /** Set to clear all Queue partitions. */ all?: boolean; }; /** Optional parameters for {@link Queue#get Queue.get()}. */ type QueueGetParams = { /** How long to wait if the Queue is empty in milliseconds (default: indefinite). */ timeoutMs?: number; /** Partition to fetch values from, uses default partition if not set. */ partition?: string; }; /** Optional parameters for {@link Queue#getMany Queue.getMany()}. */ type QueueGetManyParams = QueueGetParams; /** Optional parameters for {@link Queue#put Queue.put()}. */ type QueuePutParams = { /** How long to wait if the Queue is full in milliseconds (default: indefinite). */ timeoutMs?: number; /** Partition to add items to, uses default partition if not set. */ partition?: string; /** TTL for the partition in milliseconds (default: 1 day). */ partitionTtlMs?: number; }; /** Optional parameters for {@link Queue#putMany Queue.putMany()}. */ type QueuePutManyParams = QueuePutParams; /** Optional parameters for {@link Queue#len Queue.len()}. */ type QueueLenParams = { /** Partition to compute length, uses default partition if not set. */ partition?: string; /** Return the total length across all partitions. */ total?: boolean; }; /** Optional parameters for {@link Queue#iterate Queue.iterate()}. */ type QueueIterateParams = { /** How long to wait between successive items before exiting iteration in milliseconds (default: 0). */ itemPollTimeoutMs?: number; /** Partition to iterate, uses default partition if not set. */ partition?: string; }; /** * Distributed, FIFO queue for data flow in Modal {@link App Apps}. */ declare class Queue { #private; readonly queueId: string; readonly name?: string; /** @ignore */ constructor(client: ModalClient, queueId: string, name?: string, ephemeralHbManager?: EphemeralHeartbeatManager); /** * @deprecated Use {@link QueueService#ephemeral client.queues.ephemeral()} instead. */ static ephemeral(params?: QueueEphemeralParams): Promise; /** Delete the ephemeral Queue. Only usable with ephemeral Queues. */ closeEphemeral(): void; /** * @deprecated Use {@link QueueService#fromName client.queues.fromName()} instead. */ static lookup(name: string, options?: QueueFromNameParams): Promise; /** * @deprecated Use {@link QueueService#delete client.queues.delete()} instead. */ static delete(name: string, options?: QueueDeleteParams): Promise; /** * Remove all objects from a Queue partition. */ clear(params?: QueueClearParams): Promise; /** * Remove and return the next object from the Queue. * * By default, this will wait until at least one item is present in the Queue. * If `timeoutMs` is set, raises `QueueEmptyError` if no items are available * within that timeout in milliseconds. */ get(params?: QueueGetParams): Promise; /** * Remove and return up to `n` objects from the Queue. * * By default, this will wait until at least one item is present in the Queue. * If `timeoutMs` is set, raises `QueueEmptyError` if no items are available * within that timeout in milliseconds. */ getMany(n: number, params?: QueueGetManyParams): Promise; /** * Add an item to the end of the Queue. * * If the Queue is full, this will retry with exponential backoff until the * provided `timeoutMs` is reached, or indefinitely if `timeoutMs` is not set. * Raises {@link QueueFullError} if the Queue is still full after the timeout. */ put(v: any, params?: QueuePutParams): Promise; /** * Add several items to the end of the Queue. * * If the Queue is full, this will retry with exponential backoff until the * provided `timeoutMs` is reached, or indefinitely if `timeoutMs` is not set. * Raises {@link QueueFullError} if the Queue is still full after the timeout. */ putMany(values: any[], params?: QueuePutManyParams): Promise; /** Return the number of objects in the Queue. */ len(params?: QueueLenParams): Promise; /** Iterate through items in a Queue without mutation. */ iterate(params?: QueueIterateParams): AsyncGenerator; } declare enum TaskExecStderrConfig { /** TASK_EXEC_STDERR_CONFIG_DEVNULL - The output will be discarded. */ TASK_EXEC_STDERR_CONFIG_DEVNULL = 0, /** TASK_EXEC_STDERR_CONFIG_PIPE - The output will be streamed to the client. */ TASK_EXEC_STDERR_CONFIG_PIPE = 1, /** * TASK_EXEC_STDERR_CONFIG_STDOUT - A special value that can be used to indicate that the stderr stream should * be merged with the stdout stream. */ TASK_EXEC_STDERR_CONFIG_STDOUT = 2, UNRECOGNIZED = -1 } declare enum TaskExecStdoutConfig { /** TASK_EXEC_STDOUT_CONFIG_DEVNULL - The output will be discarded. */ TASK_EXEC_STDOUT_CONFIG_DEVNULL = 0, /** TASK_EXEC_STDOUT_CONFIG_PIPE - The output will be streamed to the client. */ TASK_EXEC_STDOUT_CONFIG_PIPE = 1, UNRECOGNIZED = -1 } /** * The response to a TaskExecPollRequest. If the exec'd command has not * completed, exit_status will be unset. */ interface TaskExecPollResponse { /** The exit code of the command. */ code?: number | undefined; /** The signal that terminated the command. */ signal?: number | undefined; } declare const TaskExecPollResponse: MessageFns; interface TaskExecStartRequest { /** The ID of the task to execute the command in. */ taskId: string; /** * Execution ID. This ID will be used to identify the execution for other * requests and ensure exec commands are idempotent. */ execId: string; /** Command arguments to execute. */ commandArgs: string[]; /** Configures how the stdout of the command will be handled. */ stdoutConfig: TaskExecStdoutConfig; /** Configures how the stderr of the command will be handled. */ stderrConfig: TaskExecStderrConfig; /** * Timeout in seconds for the exec'd command to exit. If the command does not * exit within this duration, the command will be killed. This is NOT the * timeout for the ExecStartRequest RPC to complete. */ timeoutSecs?: number | undefined; /** Working directory for the command. */ workdir?: string | undefined; /** Secret IDs to mount into the task. */ secretIds: string[]; /** PTY info for the command. */ ptyInfo?: PTYInfo | undefined; /** * Enable debugging capabilities on the container runtime. Used only for * internal debugging. */ runtimeDebug: boolean; /** Fully qualified target container ID. Empty targets the main container. */ containerId: string; /** Environment variables to set directly for the exec'd command. */ env: { [key: string]: string; }; } declare const TaskExecStartRequest: MessageFns; interface TaskExecStartResponse { } declare const TaskExecStartResponse: MessageFns; interface TaskExecStdinWriteResponse { } declare const TaskExecStdinWriteResponse: MessageFns; interface TaskExecStdioReadResponse { /** The data read from the file descriptor. */ data: Uint8Array; } declare const TaskExecStdioReadResponse: MessageFns; interface TaskExecWaitResponse { /** The exit code of the command. */ code?: number | undefined; /** The signal that terminated the command. */ signal?: number | undefined; } declare const TaskExecWaitResponse: MessageFns; interface TaskMountDirectoryRequest { taskId: string; path: Uint8Array; imageId: string; } declare const TaskMountDirectoryRequest: MessageFns; interface TaskSnapshotDirectoryRequest { taskId: string; path: Uint8Array; } declare const TaskSnapshotDirectoryRequest: MessageFns; interface TaskSnapshotDirectoryResponse { imageId: string; } declare const TaskSnapshotDirectoryResponse: MessageFns; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial): T; fromPartial(object: DeepPartial): T; } type LogLevel = "debug" | "info" | "warn" | "error"; interface Logger { debug(message: string, ...args: any[]): void; info(message: string, ...args: any[]): void; warn(message: string, ...args: any[]): void; error(message: string, ...args: any[]): void; } /** Resolved configuration object from `Config` and environment variables. */ interface Profile { serverUrl: string; tokenId?: string; tokenSecret?: string; environment?: string; imageBuilderVersion?: string; logLevel?: string; } /** @ignore */ declare class TaskCommandRouterClientImpl { private stub; private channel; private serverClient; private taskId; private serverUrl; private jwt; private jwtExp; private jwtRefreshLock; private logger; private closed; static tryInit(serverClient: ModalGrpcClient, taskId: string, logger: Logger, profile: Profile): Promise; private constructor(); close(): void; execStart(request: TaskExecStartRequest): Promise; execStdioRead(taskId: string, execId: string, fileDescriptor: FileDescriptor, deadline?: number | null): AsyncGenerator; execStdinWrite(taskId: string, execId: string, offset: number, data: Uint8Array, eof: boolean): Promise; execPoll(taskId: string, execId: string, deadline?: number | null): Promise; execWait(taskId: string, execId: string, deadline?: number | null): Promise; mountDirectory(request: TaskMountDirectoryRequest): Promise; snapshotDirectory(request: TaskSnapshotDirectoryRequest): Promise; private refreshJwt; private callWithAuthRetry; private streamStdio; } /** File open modes supported by the filesystem API. */ type SandboxFileMode = "r" | "w" | "a" | "r+" | "w+" | "a+"; /** * SandboxFile represents an open file in the {@link Sandbox} filesystem. * Provides read/write operations similar to Node.js `fsPromises.FileHandle`. */ declare class SandboxFile { #private; /** @ignore */ constructor(client: ModalClient, fileDescriptor: string, taskId: string); /** * Read data from the file. * @returns Promise that resolves to the read data as Uint8Array */ read(): Promise; /** * Write data to the file. * @param data - Data to write (string or Uint8Array) */ write(data: Uint8Array): Promise; /** * Flush any buffered data to the file. */ flush(): Promise; /** * Close the file handle. */ close(): Promise; } /** * Wrapper around `ReadableStream` with convenience functions. * * The Stream API is a modern standard for asynchronous data streams across * network and process boundaries. It allows you to read data in chunks, pipe * and transform it, and handle backpressure. * * This wrapper adds some extra functions like `.readText()` to read the entire * stream as a string, or `readBytes()` to read binary data. * * Background: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API */ interface ModalReadStream extends ReadableStream { /** Read the entire stream as a string. */ readText(): Promise; /** Read the entire stream as a byte array. */ readBytes(): Promise; } /** * Wrapper around `WritableStream` with convenience functions. * * The Stream API is a modern standard for asynchronous data streams across * network and process boundaries. It allows you to read data in chunks, pipe * and transform it, and handle backpressure. * * This wrapper adds some extra functions like `.writeText()` to write a string * to the stream, or `writeBytes()` to write binary data. * * Background: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API */ interface ModalWriteStream extends WritableStream { /** Write a string to the stream. Only if this is a text stream. */ writeText(text: string): Promise; /** Write a byte array to the stream. Only if this is a byte stream. */ writeBytes(bytes: Uint8Array): Promise; } /** * Stdin is always present, but this option allow you to drop stdout or stderr * if you don't need them. The default is "pipe", matching Node.js behavior. * * If behavior is set to "ignore", the output streams will be empty. */ type StdioBehavior = "pipe" | "ignore"; /** * Specifies the type of data that will be read from the Sandbox or container * process. "text" means the data will be read as UTF-8 text, while "binary" * means the data will be read as raw bytes (Uint8Array). */ type StreamMode = "text" | "binary"; /** Optional parameters for {@link Probe.withTcp} and {@link Probe.withExec}. */ type ProbeParams = { intervalMs: number; }; /** Probe configuration for sandbox readiness checks. */ declare class Probe { #private; private constructor(); static withTcp(port: number, params?: ProbeParams): Probe; static withExec(argv: string[], params?: ProbeParams): Probe; /** @ignore */ toProto(): Probe$1; } /** Optional parameters for {@link SandboxService#create client.sandboxes.create()}. */ type SandboxCreateParams = { /** Reservation of physical CPU cores for the Sandbox, can be fractional. */ cpu?: number; /** Hard limit of physical CPU cores for the Sandbox, can be fractional. */ cpuLimit?: number; /** Reservation of memory in MiB. */ memoryMiB?: number; /** Hard limit of memory in MiB. */ memoryLimitMiB?: number; /** GPU reservation for the Sandbox (e.g. "A100", "T4:2", "A100-80GB:4"). */ gpu?: string; /** Maximum lifetime of the Sandbox in milliseconds. Defaults to 5 minutes. */ timeoutMs?: number; /** The amount of time in milliseconds that a Sandbox can be idle before being terminated. */ idleTimeoutMs?: number; /** Working directory of the Sandbox. */ workdir?: string; /** * Sequence of program arguments for the main process. * Default behavior is to sleep indefinitely until timeout or termination. */ command?: string[]; /** Environment variables to set in the Sandbox. */ env?: Record; /** {@link Secret}s to inject into the Sandbox as environment variables. */ secrets?: Secret[]; /** Mount points for Modal {@link Volume}s. */ volumes?: Record; /** Mount points for {@link CloudBucketMount}s. */ cloudBucketMounts?: Record; /** Enable a PTY for the Sandbox entrypoint command. When enabled, all output (stdout and * stderr from the process) is multiplexed into stdout, and the stderr stream is effectively empty. */ pty?: boolean; /** List of ports to tunnel into the Sandbox. Encrypted ports are tunneled with TLS. */ encryptedPorts?: number[]; /** List of encrypted ports to tunnel into the Sandbox, using HTTP/2. */ h2Ports?: number[]; /** List of ports to tunnel into the Sandbox without encryption. */ unencryptedPorts?: number[]; /** Whether to block all network access from the Sandbox. */ blockNetwork?: boolean; /** List of CIDRs the Sandbox is allowed to access. If None, all CIDRs are allowed. Cannot be used with blockNetwork. */ cidrAllowlist?: string[]; /** Cloud provider to run the Sandbox on. */ cloud?: string; /** Region(s) to run the Sandbox on. */ regions?: string[]; /** Enable verbose logging. */ verbose?: boolean; /** Reference to a Modal {@link Proxy} to use in front of this Sandbox. */ proxy?: Proxy; /** Probe used to determine when the Sandbox has become ready. */ readinessProbe?: Probe; /** Optional name for the Sandbox. Unique within an App. */ name?: string; /** Optional experimental options. */ experimentalOptions?: Record; /** If set, connections to this Sandbox will be subdomains of this domain rather than the default. * This requires prior manual setup by Modal and is only available for Enterprise customers. */ customDomain?: string; /** If true, the sandbox will receive a MODAL_IDENTITY_TOKEN env var for OIDC-based auth (e.g. to AWS, GCP). */ includeOidcIdentityToken?: boolean; }; /** * Service for managing {@link Sandbox}es. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const sb = await modal.sandboxes.create(app, image); * ``` */ declare class SandboxService { #private; constructor(client: ModalClient); /** * Create a new {@link Sandbox} in the {@link App} with the specified {@link Image} and options. */ create(app: App, image: Image, params?: SandboxCreateParams): Promise; /** Returns a running {@link Sandbox} object from an ID. * * @returns Sandbox with ID */ fromId(sandboxId: string): Promise; /** Get a running {@link Sandbox} by name from a deployed {@link App}. * * Raises a {@link NotFoundError} if no running Sandbox is found with the given name. * A Sandbox's name is the `name` argument passed to {@link SandboxService#create sandboxes.create()}. * * @param appName - Name of the deployed App * @param name - Name of the Sandbox * @param params - Optional parameters for getting the Sandbox * @returns Promise that resolves to a Sandbox */ fromName(appName: string, name: string, params?: SandboxFromNameParams): Promise; /** * List all {@link Sandbox}es for the current Environment or App ID (if specified). * If tags are specified, only Sandboxes that have at least those tags are returned. */ list(params?: SandboxListParams): AsyncGenerator; } /** Optional parameters for {@link SandboxService#list client.sandboxes.list()}. */ type SandboxListParams = { /** Filter Sandboxes for a specific {@link App}. */ appId?: string; /** Only return Sandboxes that include all specified tags. */ tags?: Record; /** Override environment for the request; defaults to current profile. */ environment?: string; }; /** Optional parameters for {@link SandboxService#fromName client.sandboxes.fromName()}. */ type SandboxFromNameParams = { environment?: string; }; /** Optional parameters for {@link Sandbox#exec Sandbox.exec()}. */ type SandboxExecParams = { /** Specifies text or binary encoding for input and output streams. */ mode?: StreamMode; /** Whether to pipe or ignore standard output. */ stdout?: StdioBehavior; /** Whether to pipe or ignore standard error. */ stderr?: StdioBehavior; /** Working directory to run the command in. */ workdir?: string; /** Timeout for the process in milliseconds. Defaults to 0 (no timeout). */ timeoutMs?: number; /** Environment variables to set for the command. */ env?: Record; /** {@link Secret}s to inject as environment variables for the commmand.*/ secrets?: Secret[]; /** Enable a PTY for the command. When enabled, all output (stdout and stderr from the * process) is multiplexed into stdout, and the stderr stream is effectively empty. */ pty?: boolean; }; /** Optional parameters for {@link Sandbox#createConnectToken Sandbox.createConnectToken()}. */ type SandboxTerminateParams = { /** If true, wait for the Sandbox to finish and return the exit code. */ wait?: boolean; }; type SandboxCreateConnectTokenParams = { /** Optional user-provided metadata string that will be added to the headers by the proxy when forwarding requests to the Sandbox. */ userMetadata?: string; }; /** Credentials returned by {@link Sandbox#createConnectToken Sandbox.createConnectToken()}. */ type SandboxCreateConnectCredentials = { url: string; token: string; }; /** A port forwarded from within a running Modal {@link Sandbox}. */ declare class Tunnel { host: string; port: number; unencryptedHost?: string | undefined; unencryptedPort?: number | undefined; /** @ignore */ constructor(host: string, port: number, unencryptedHost?: string | undefined, unencryptedPort?: number | undefined); /** Get the public HTTPS URL of the forwarded port. */ get url(): string; /** Get the public TLS socket as a [host, port] tuple. */ get tlsSocket(): [string, number]; /** Get the public TCP socket as a [host, port] tuple. */ get tcpSocket(): [string, number]; } /** Sandboxes are secure, isolated containers in Modal that boot in seconds. */ declare class Sandbox { #private; readonly sandboxId: string; /** @ignore */ constructor(client: ModalClient, sandboxId: string); get stdin(): ModalWriteStream; get stdout(): ModalReadStream; get stderr(): ModalReadStream; /** Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in {@link SandboxService#list Sandbox.list}. */ setTags(tags: Record): Promise; /** Get tags (key-value pairs) currently attached to this Sandbox from the server. */ getTags(): Promise>; /** * @deprecated Use {@link SandboxService#fromId client.sandboxes.fromId()} instead. */ static fromId(sandboxId: string): Promise; /** * @deprecated Use {@link SandboxService#fromName client.sandboxes.fromName()} instead. */ static fromName(appName: string, name: string, environment?: string): Promise; /** * Open a file in the Sandbox filesystem. * @param path - Path to the file to open * @param mode - File open mode (r, w, a, r+, w+, a+) * @returns Promise that resolves to a {@link SandboxFile} */ open(path: string, mode?: SandboxFileMode): Promise; exec(command: string[], params?: SandboxExecParams & { mode?: "text"; }): Promise>; exec(command: string[], params: SandboxExecParams & { mode: "binary"; }): Promise>; /** * Create a token for making HTTP connections to the Sandbox. */ createConnectToken(params?: SandboxCreateConnectTokenParams): Promise; terminate(): Promise; terminate(params: { wait: true; }): Promise; /** * Disconnect from the Sandbox, cleaning up local resources. * The Sandbox continues running on Modal's infrastructure. * After calling detach(), most operations on this Sandbox object will throw. */ detach(): void; wait(): Promise; /** * Wait until the Sandbox readiness probe reports the Sandbox is ready. * * This method only works for Sandboxes configured with a readiness probe. * * @param timeoutMs - Maximum total time to wait, in milliseconds. * @returns A promise that resolves once the Sandbox is ready. * @throws {@link TimeoutError} If readiness is not reported before `timeoutMs`. */ waitUntilReady(timeoutMs?: number): Promise; /** Get {@link Tunnel} metadata for the Sandbox. * * Raises {@link SandboxTimeoutError} if the tunnels are not available after the timeout. * * @returns A dictionary of {@link Tunnel} objects which are keyed by the container port. */ tunnels(timeoutMs?: number): Promise>; /** * Snapshot the filesystem of the Sandbox. * * Returns an {@link Image} object which can be used to spawn a new Sandbox with the same filesystem. * * @param timeoutMs - Timeout for the snapshot operation in milliseconds * @returns Promise that resolves to an {@link Image} */ snapshotFilesystem(timeoutMs?: number): Promise; /** * Mount an {@link Image} at a path in the Sandbox filesystem. * * @param path - The path where the directory should be mounted * @param image - Optional {@link Image} to mount. If undefined, mounts an empty directory. */ mountImage(path: string, image?: Image): Promise; /** * Snapshots and creates a new {@link Image} from a directory in the running sandbox. * * @param path - The path of the directory to snapshot * @returns Promise that resolves to an {@link Image} */ snapshotDirectory(path: string): Promise; /** * Check if the Sandbox has finished running. * * Returns `null` if the Sandbox is still running, else returns the exit code. */ poll(): Promise; /** * @deprecated Use {@link SandboxService#list client.sandboxes.list()} instead. */ static list(params?: SandboxListParams): AsyncGenerator; } declare class ContainerProcess { #private; stdin: ModalWriteStream; stdout: ModalReadStream; stderr: ModalReadStream; /** @ignore */ constructor(taskId: string, execId: string, commandRouterClient: TaskCommandRouterClientImpl, params?: SandboxExecParams, deadline?: number | null); /** Wait for process completion and return the exit code. */ wait(): Promise; } interface ModalClientParams { tokenId?: string; tokenSecret?: string; environment?: string; endpoint?: string; timeoutMs?: number; maxRetries?: number; logger?: Logger; logLevel?: LogLevel; /** * Custom gRPC middleware to be applied to all API calls. * These middleware are appended after Modal's built-in middleware * (authentication, retry logic, and timeouts), allowing you to add * telemetry, tracing, or other observability features. * * Note that the Modal gRPC API is not considered a public API, and * can change without warning. */ grpcMiddleware?: ClientMiddleware[]; /** @ignore */ cpClient?: ModalGrpcClient; } type ModalGrpcClient = Client; /** * The main client for interacting with Modal's cloud infrastructure. * * ModalClient provides access to all Modal services through service properties. * Create a client instance and use its service properties to manage {@link App}s, * {@link Function_ Function}s, * {@link Sandbox}es, and other Modal resources. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * * const app = await modal.apps.fromName("my-app"); * const image = modal.images.fromRegistry("python:3.13"); * const sb = await modal.sandboxes.create(app, image); * ``` */ declare class ModalClient { readonly apps: AppService; readonly cloudBucketMounts: CloudBucketMountService; readonly cls: ClsService; readonly functions: FunctionService; readonly functionCalls: FunctionCallService; readonly images: ImageService; readonly proxies: ProxyService; readonly queues: QueueService; readonly sandboxes: SandboxService; readonly secrets: SecretService; readonly volumes: VolumeService; /** @ignore */ readonly cpClient: ModalGrpcClient; readonly profile: Profile; readonly logger: Logger; private ipClients; private authTokenManager; private customMiddleware; constructor(params?: ModalClientParams); environmentName(environment?: string): string; imageBuilderVersion(version?: string): string; /** @ignore */ ipClient(serverUrl: string): ModalGrpcClient; close(): void; version(): string; private createClient; /** Middleware to retry transient errors and timeouts for unary requests. */ private retryMiddleware; private authMiddleware; } type TimeoutOptions = { /** Timeout for this call, interpreted as a duration in milliseconds */ timeoutMs?: number; }; type RetryOptions = { /** Number of retries to take. */ retries?: number; /** Base delay in milliseconds. */ baseDelay?: number; /** Maximum delay in milliseconds. */ maxDelay?: number; /** Exponential factor to multiply successive delays. */ delayFactor?: number; /** Additional status codes to retry. */ additionalStatusCodes?: Status[]; }; /** * @deprecated Use {@link ModalClient `new ModalClient()`} instead. */ type ClientOptions = { tokenId: string; tokenSecret: string; environment?: string; }; /** * @deprecated Use {@link ModalClient `new ModalClient()`} instead. */ declare function initializeClient(options: ClientOptions): void; /** * Stops the auth token refresh. * @deprecated Use {@link ModalClient#close modalClient.close()} instead. */ declare function close(): void; /** * Service for managing {@link App}s. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const app = await modal.apps.fromName("my-app"); * ``` */ declare class AppService { #private; constructor(client: ModalClient); /** * Reference a deployed {@link App} by name, or create if it does not exist. */ fromName(name: string, params?: AppFromNameParams): Promise; } /** Optional parameters for {@link AppService#fromName client.apps.fromName()}. */ type AppFromNameParams = { environment?: string; createIfMissing?: boolean; }; /** @deprecated Use specific Params types instead. */ type LookupOptions = { environment?: string; createIfMissing?: boolean; }; /** @deprecated Use specific Params types instead. */ type DeleteOptions = { environment?: string; }; /** @deprecated Use specific Params types instead. */ type EphemeralOptions = { environment?: string; }; /** Represents a deployed Modal App. */ declare class App { readonly appId: string; readonly name?: string; /** @ignore */ constructor(appId: string, name?: string); /** * @deprecated Use {@link AppService#fromName client.apps.fromName()} instead. */ static lookup(name: string, options?: LookupOptions): Promise; /** * @deprecated Use {@link SandboxService#create client.sandboxes.create()} instead. */ createSandbox(image: Image, options?: SandboxCreateParams): Promise; /** * @deprecated Use {@link ImageService#fromRegistry client.images.fromRegistry()} instead. */ imageFromRegistry(tag: string, secret?: Secret): Promise; /** * @deprecated Use {@link ImageService#fromAwsEcr client.images.fromAwsEcr()} instead. */ imageFromAwsEcr(tag: string, secret: Secret): Promise; /** * @deprecated Use {@link ImageService#fromGcpArtifactRegistry client.images.fromGcpArtifactRegistry()} instead. */ imageFromGcpArtifactRegistry(tag: string, secret: Secret): Promise; } /** An operation exceeds the allowed time limit. */ declare class TimeoutError extends Error { constructor(message?: string); } /** Function execution exceeds the allowed time limit. */ declare class FunctionTimeoutError extends Error { constructor(message: string); } /** An error on the Modal server, or a Python exception. */ declare class RemoteError extends Error { constructor(message: string); } /** A retryable internal error from Modal. */ declare class InternalFailure extends Error { constructor(message: string); } /** Some resource was not found. */ declare class NotFoundError extends Error { constructor(message: string); } /** A resource already exists. */ declare class AlreadyExistsError extends Error { constructor(message: string); } /** A request or other operation was invalid. */ declare class InvalidError extends Error { constructor(message: string); } /** The Queue is empty. */ declare class QueueEmptyError extends Error { constructor(message: string); } /** The Queue is full. */ declare class QueueFullError extends Error { constructor(message: string); } /** Sandbox operations that exceed the allowed time limit. */ declare class SandboxTimeoutError extends Error { constructor(message?: string); } /** Thrown when attempting operations on a detached Sandbox. */ declare class ClientClosedError extends Error { constructor(message?: string); } declare function checkForRenamedParams(params: any, renames: Record): void; export { AlreadyExistsError, App, type AppFromNameParams, AppService, ClientClosedError, type ClientOptions, CloudBucketMount, CloudBucketMountService, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, 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, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, type SandboxTerminateParams, SandboxTimeoutError, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, TimeoutError, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };