import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire'; import { createChannel, Client, Status, ClientMiddleware } from 'nice-grpc'; /** * 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; } /** * gRPC protos for Modal's public API surface. * Warning: direct usage of Modal's gRPC API is discouraged, * and no support or compatibility guarantees are provided. * Message fields or entire RPCs may be changed or removed * without notice. We recommend using official SDKs instead. */ 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$1 { 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 - Now also used by JS and Go SDKs */ APP_STOP_SOURCE_PYTHON_CLIENT = 2, APP_STOP_SOURCE_WEB = 3, UNRECOGNIZED = -1 } /** CPU architecture an image is built for and must run on. */ declare enum Arch { ARCH_UNSPECIFIED = 0, ARCH_X86_64 = 1, ARCH_AARCH64 = 2, 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 DeploymentType { DEPLOYMENT_TYPE_UNSPECIFIED = 0, DEPLOYMENT_TYPE_STANDARD = 1, DEPLOYMENT_TYPE_ROLLBACK = 2, DEPLOYMENT_TYPE_ROLLOVER = 3, DEPLOYMENT_TYPE_PROMOTION = 4, DEPLOYMENT_TYPE_STAGED = 5, UNRECOGNIZED = -1 } declare enum EndpointApiSurface { ENDPOINT_API_SURFACE_UNSPECIFIED = 0, ENDPOINT_API_SURFACE_OPENAI_CHAT_COMPLETIONS = 1, ENDPOINT_API_SURFACE_OPENAI_RESPONSES = 2, ENDPOINT_API_SURFACE_ANTHROPIC_MESSAGES = 3, UNRECOGNIZED = -1 } declare enum EndpointInputModality { ENDPOINT_INPUT_MODALITY_UNSPECIFIED = 0, ENDPOINT_INPUT_MODALITY_TEXT = 1, ENDPOINT_INPUT_MODALITY_IMAGE = 2, ENDPOINT_INPUT_MODALITY_AUDIO = 3, UNRECOGNIZED = -1 } declare enum EndpointLifecycleStatus { ENDPOINT_LIFECYCLE_STATUS_UNSPECIFIED = 0, ENDPOINT_LIFECYCLE_STATUS_ACTIVE = 1, ENDPOINT_LIFECYCLE_STATUS_STOPPED = 2, UNRECOGNIZED = -1 } declare enum EndpointProvisioningStatus { ENDPOINT_PROVISIONING_STATUS_UNSPECIFIED = 0, ENDPOINT_PROVISIONING_STATUS_PENDING = 1, ENDPOINT_PROVISIONING_STATUS_RUNNING = 2, ENDPOINT_PROVISIONING_STATUS_SUCCEEDED = 3, ENDPOINT_PROVISIONING_STATUS_FAILED = 4, ENDPOINT_PROVISIONING_STATUS_CANCELLING = 5, ENDPOINT_PROVISIONING_STATUS_CANCELLED = 6, UNRECOGNIZED = -1 } declare enum EndpointServingMode { ENDPOINT_SERVING_MODE_UNSPECIFIED = 0, ENDPOINT_SERVING_MODE_DEDICATED = 1, ENDPOINT_SERVING_MODE_SHARED = 2, UNRECOGNIZED = -1 } declare enum EndpointStopSource { ENDPOINT_STOP_SOURCE_UNSPECIFIED = 0, ENDPOINT_STOP_SOURCE_CLI = 1, ENDPOINT_STOP_SOURCE_WEB = 2, UNRECOGNIZED = -1 } /** * Partial-update signal for EnvironmentUpdateRequest. Omitted means no-op. * INHERIT clears the environment override so the workspace default applies. */ declare enum EnvironmentBlockUnauthenticatedResources { ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_UNSPECIFIED = 0, ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_INHERIT = 1, ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_BLOCK = 2, ENVIRONMENT_BLOCK_UNAUTHENTICATED_RESOURCES_ALLOW = 3, UNRECOGNIZED = -1 } declare enum EnvironmentRole { ENVIRONMENT_ROLE_UNSPECIFIED = 0, ENVIRONMENT_ROLE_VIEWER = 1, ENVIRONMENT_ROLE_CONTRIBUTOR = 2, ENVIRONMENT_ROLE_NO_ACCESS = 3, ENVIRONMENT_ROLE_MODAL_ADMINISTERED_OBSERVER = 4, /** ENVIRONMENT_ROLE_CUSTOM - Assignment uses a workspace role definition (`rd-`), not a built-in role. */ ENVIRONMENT_ROLE_CUSTOM = 5, UNRECOGNIZED = -1 } /** * Creation-time environment classification. Captures whether an environment * is public or administered by Modal. is_managed and machine_generated may be * folded in as future values. */ declare enum EnvironmentType { ENVIRONMENT_TYPE_UNSPECIFIED = 0, ENVIRONMENT_TYPE_PUBLIC = 1, /** * ENVIRONMENT_TYPE_MODAL_ADMINISTERED - Restricted environment whose roles are administered by Modal admins rather * than the workspace's own managers. */ ENVIRONMENT_TYPE_MODAL_ADMINISTERED = 2, 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 FunctionCallInputStatus { FUNCTION_CALL_INPUT_STATUS_UNSPECIFIED = 0, FUNCTION_CALL_INPUT_STATUS_PENDING = 1, FUNCTION_CALL_INPUT_STATUS_RUNNING = 2, FUNCTION_CALL_INPUT_STATUS_SUCCESS = 3, FUNCTION_CALL_INPUT_STATUS_FAILURE = 4, FUNCTION_CALL_INPUT_STATUS_TIMEOUT = 5, FUNCTION_CALL_INPUT_STATUS_TERMINATED = 6, FUNCTION_CALL_INPUT_STATUS_INIT_FAILURE = 7, FUNCTION_CALL_INPUT_STATUS_INTERNAL_FAILURE = 8, FUNCTION_CALL_INPUT_STATUS_IDLE_TIMEOUT = 9, FUNCTION_CALL_INPUT_STATUS_MEMORY_MANAGER_EVICTION = 10, FUNCTION_CALL_INPUT_STATUS_MEMORY_THRASHING_EVICTION = 11, FUNCTION_CALL_INPUT_STATUS_KERNEL_OOM_KILL = 12, 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 IdentityProviderType { IDENTITY_PROVIDER_TYPE_UNSPECIFIED = 0, IDENTITY_PROVIDER_TYPE_GITHUB = 1, IDENTITY_PROVIDER_TYPE_SAML = 2, IDENTITY_PROVIDER_TYPE_GOOGLE_OAUTH = 3, UNRECOGNIZED = -1 } declare enum LLMEngine { LLM_ENGINE_UNSPECIFIED = 0, LLM_ENGINE_SGLANG = 1, LLM_ENGINE_VLLM = 2, UNRECOGNIZED = -1 } declare enum MemberRole { MEMBER_ROLE_UNSPECIFIED = 0, MEMBER_ROLE_USER = 1, MEMBER_ROLE_MANAGER = 2, MEMBER_ROLE_OWNER = 3, 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 ServerInferenceStatsStatus { SERVER_INFERENCE_STATS_STATUS_UNSPECIFIED = 0, SERVER_INFERENCE_STATS_STATUS_AVAILABLE = 1, SERVER_INFERENCE_STATS_STATUS_NO_DATA = 2, SERVER_INFERENCE_STATS_STATUS_UNAVAILABLE = 3, 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 TaskTerminationReason { /** * TASK_TERMINATION_REASON_UNSPECIFIED - Our internal taxonomy for why a task stopped running. Reported alongside * GenericResult, which stays the coarse outcome. This should not be exposed * directly to clients; instead, public-facing statuses should derive from it. * Values 1-11 match the integers historically stored for V1 tasks (tasks.termination_reason). */ TASK_TERMINATION_REASON_UNSPECIFIED = 0, /** TASK_TERMINATION_REASON_PREEMPTED_BY_SCHEDULER - Control-plane initiated. */ TASK_TERMINATION_REASON_PREEMPTED_BY_SCHEDULER = 1, TASK_TERMINATION_REASON_USER_CANCELLED = 2, TASK_TERMINATION_REASON_WORKER_PREEMPTED = 3, TASK_TERMINATION_REASON_INPUT_CANCELLED = 4, TASK_TERMINATION_REASON_WORKSPACE_FROZEN = 5, TASK_TERMINATION_REASON_BILLING_LIMIT_REACHED = 6, TASK_TERMINATION_REASON_CLUSTER_FAILURE = 7, TASK_TERMINATION_REASON_LOW_PRIORITY_PREEMPTED_FOR_WORKER_SHUTDOWN = 11, TASK_TERMINATION_REASON_APP_STOPPED = 12, TASK_TERMINATION_REASON_APP_DISABLED = 13, TASK_TERMINATION_REASON_APP_NOT_FOUND = 14, TASK_TERMINATION_REASON_NAME_LOST = 15, TASK_TERMINATION_REASON_SECURITY_EVENT = 16, /** TASK_TERMINATION_REASON_WORKER_HEARTBEAT_TIMEOUT - The worker lost contact with the control plane for too long. */ TASK_TERMINATION_REASON_WORKER_HEARTBEAT_TIMEOUT = 17, TASK_TERMINATION_REASON_FUNCTION_NOT_FOUND = 18, /** TASK_TERMINATION_REASON_TIMEOUT - Worker initiated. */ TASK_TERMINATION_REASON_TIMEOUT = 20, TASK_TERMINATION_REASON_IDLE_TIMEOUT = 21, TASK_TERMINATION_REASON_STARTUP_TIMEOUT = 22, TASK_TERMINATION_REASON_MEMORY_MANAGER_EVICTION = 23, TASK_TERMINATION_REASON_MEMORY_THRASHING_EVICTION = 24, TASK_TERMINATION_REASON_KERNEL_OOM_KILL = 25, TASK_TERMINATION_REASON_CONTAINER_HEARTBEAT_TIMEOUT = 26, TASK_TERMINATION_REASON_RUNTIME_ERROR = 27, /** TASK_TERMINATION_REASON_EXITED - Not a termination: the process ended on its own. */ TASK_TERMINATION_REASON_EXITED = 30, TASK_TERMINATION_REASON_PROCESS_FAILED = 31, TASK_TERMINATION_REASON_INIT_FAILURE = 32, 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 BlobUploadResult_Outcome { OUTCOME_UNSPECIFIED = 0, OUTCOME_SUCCESS = 1, OUTCOME_FAILURE = 2, 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 EndpointGetInfoResponse_EndpointStatus { ENDPOINT_STATUS_UNSPECIFIED = 0, ENDPOINT_STATUS_PROVISIONING = 1, ENDPOINT_STATUS_LIVE = 2, ENDPOINT_STATUS_FAILED = 3, ENDPOINT_STATUS_CANCELLING = 4, ENDPOINT_STATUS_CANCELLED = 5, ENDPOINT_STATUS_STOPPED = 6, UNRECOGNIZED = -1 } declare enum EndpointListFilter_Status { /** STATUS_UNSPECIFIED - live or stopped */ STATUS_UNSPECIFIED = 0, /** STATUS_LIVE - not stopped with EndpointStop */ STATUS_LIVE = 1, /** STATUS_STOPPED - stopped with EndpointStop */ STATUS_STOPPED = 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, /** * GENERIC_STATUS_MEMORY_MANAGER_EVICTION - Used when a task was killed because it was evicted by the memory manager when the worker was * under memory pressure. */ GENERIC_STATUS_MEMORY_MANAGER_EVICTION = 8, /** GENERIC_STATUS_MEMORY_THRASHING_EVICTION - Used when a task was killed by the memory manager after thrashing at its own memory limit. */ GENERIC_STATUS_MEMORY_THRASHING_EVICTION = 9, /** GENERIC_STATUS_KERNEL_OOM_KILL - Used when the kernel OOM-killed a process in the task's container after it hit its own memory limit. */ GENERIC_STATUS_KERNEL_OOM_KILL = 10, UNRECOGNIZED = -1 } declare enum MetricsGetInfoRequest_MetricsTargetType { METRICS_TARGET_TYPE_UNSPECIFIED = 0, METRICS_TARGET_TYPE_FUNCTION = 1, METRICS_TARGET_TYPE_SERVER = 2, UNRECOGNIZED = -1 } declare enum NetworkAccess_NetworkAccessType { UNSPECIFIED = 0, OPEN = 1, BLOCKED = 2, ALLOWLIST = 3, UNRECOGNIZED = -1 } declare enum ObjectSuggestRequest_ObjectSuggestKind { OBJECT_SUGGEST_KIND_UNSPECIFIED = 0, OBJECT_SUGGEST_KIND_APP = 1, OBJECT_SUGGEST_KIND_FUNCTION = 2, OBJECT_SUGGEST_KIND_SERVER = 3, UNRECOGNIZED = -1 } declare enum OutboundPolicy_Transport { /** TRANSPORT_UNSPECIFIED - The route type's default, described on each route's transport field. */ TRANSPORT_UNSPECIFIED = 0, TRANSPORT_ANY = 1, TRANSPORT_TCP = 2, TRANSPORT_UDP = 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 SandboxGetExitSnapshotResponse_ErrorCode { ERROR_CODE_UNSPECIFIED = 0, ERROR_CODE_TIMEOUT = 1, ERROR_CODE_INTERNAL = 2, /** * ERROR_CODE_FILESYSTEM_INCONSISTENT - The sandbox exited without leaving a consistent filesystem (e.g. killed * before it could flush) and recovery failed, so no exit snapshot exists. */ ERROR_CODE_FILESYSTEM_INCONSISTENT = 3, 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 AppCallCounts { total: number; succeeded: number; /** All non-success outcomes, including timeouts. */ failed: number; } declare const AppCallCounts: MessageFns$1; interface AppClientDisconnectRequest { appId: string; reason: AppDisconnectReason; exception: string; } declare const AppClientDisconnectRequest: MessageFns$1; interface AppContainerCounts { /** Containers that finished with an error in [since, until). */ containerErrors: number; /** Distinct containers that published heartbeats in [since, until). */ containerActiveCount: number; } declare const AppContainerCounts: 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; /** Restrict logs to this exact Function ID, including when it is the base Function. */ parametrizedFunctionId: string; } 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$1; /** 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; deploymentType: DeploymentType; } declare const AppDeploymentHistory: MessageFns$1; interface AppDeploymentHistoryRequest { appId: string; } declare const AppDeploymentHistoryRequest: MessageFns$1; interface AppDeploymentHistoryResponse { appDeploymentHistories: AppDeploymentHistory[]; productionAppVersion: number; } 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; /** Restrict logs to this exact Function ID, including when it is the base Function. */ parametrizedFunctionId: string; } declare const AppFetchLogsRequest: MessageFns$1; interface AppFetchLogsResponse { batches: TaskLogsBatch[]; } declare const AppFetchLogsResponse: MessageFns$1; interface AppFunctionCounts { calls: AppCallCounts | undefined; containers: AppContainerCounts | undefined; } declare const AppFunctionCounts: MessageFns$1; interface AppFunctionStats { /** Root Function ID */ objectId: string; counts: AppFunctionCounts | undefined; } declare const AppFunctionStats: MessageFns$1; interface AppFunctionStatsGroup { /** Counts summed across current Functions. */ total: AppFunctionCounts | undefined; /** Current Functions keyed by name. */ byName: { [key: string]: AppFunctionStats; }; } declare const AppFunctionStatsGroup: MessageFns$1; interface AppGetByDeploymentNameRequest { name: string; environmentName: string; } declare const AppGetByDeploymentNameRequest: MessageFns$1; interface AppGetByDeploymentNameResponse { /** Null when App with requested name is not deployed */ appId: string; /** Populated if App with requested name was recently stopped */ previousAppId: string; /** Populated because server may resolve default environment */ environmentName: string; /** Lifecycle of current App or recently stopped App */ lifecycle: AppLifecycle$1 | undefined; } declare const AppGetByDeploymentNameResponse: MessageFns$1; interface AppGetInfoRequest { appId: string; } declare const AppGetInfoRequest: MessageFns$1; interface AppGetInfoResponse { info: AppHandleMetadata | undefined; functionInfoSummaries: { [key: string]: AppGetInfoResponse_FunctionInfoSummary; }; } declare const AppGetInfoResponse: MessageFns$1; interface AppGetInfoResponse_FunctionInfoSummary { gpuConfig: GPUConfig[]; schedule: Schedule | undefined; /** True for Web Functions and classes with web methods; false for Servers. */ webFunction: boolean; requiresProxyAuth?: boolean | undefined; /** True for Sessioned Servers. */ isSessioned: boolean; } declare const AppGetInfoResponse_FunctionInfoSummary: 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$1 | 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; handleMetadata: AppHandleMetadata | undefined; } 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 AppGetTimeRangeStatsRequest { appId: string; /** Required, inclusive. */ since: Date | undefined; /** Required, exclusive; at most seven days after since. */ until: Date | undefined; } declare const AppGetTimeRangeStatsRequest: MessageFns$1; interface AppGetTimeRangeStatsResponse { /** Inclusive. */ since: Date | undefined; /** Exclusive. */ until: Date | undefined; functions: AppFunctionStatsGroup | undefined; servers: AppServerStatsGroup | undefined; sandboxes: AppSandboxCounts | undefined; /** Current App metadata at query time. */ lifecycle: AppLifecycle$1 | undefined; /** Live publishes in [since, until); absent for ephemeral and detached run Apps. */ deploymentCount?: number | undefined; } declare const AppGetTimeRangeStatsResponse: MessageFns$1; interface AppHandleMetadata { description: string; appId: string; environmentName: string; lifecycle: AppLifecycle$1 | undefined; /** tag -> function id */ functions: { [key: string]: string; }; /** tag -> function id */ servers: { [key: string]: string; }; } declare const AppHandleMetadata: 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$1 { appState: AppState$1; 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$1: 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$1; createdAt: number; stoppedAt: number; nRunningTasks: number; name: string; metadata: AppHandleMetadata | undefined; } 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 AppPromoteRequest { appId: string; version: number; } declare const AppPromoteRequest: MessageFns$1; interface AppPromoteResponse { url: string; serverWarnings: Warning[]; deployedAt: number; } declare const AppPromoteResponse: 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$1; /** 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; }; /** * If true, create a version pinned deployment but don't update the production deployment * definition on publish */ staged: boolean; deploymentType: DeploymentType; } declare const AppPublishRequest: MessageFns$1; interface AppPublishResponse { url: string; serverWarnings: Warning[]; deployedAt: number; } declare const AppPublishResponse: MessageFns$1; interface AppRequestCounts { total: number; ok: number; /** All non-1xx, non-2xx, and non-3xx responses, including status zero. */ failed: number; } declare const AppRequestCounts: MessageFns$1; interface AppRollbackRequest { appId: string; /** signed as we support negative "roll back n versions" requests */ version: number; } declare const AppRollbackRequest: MessageFns$1; interface AppRollbackResponse { url: string; serverWarnings: Warning[]; deployedAt: number; } declare const AppRollbackResponse: 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 AppSandboxCounts { /** finished + live; not the number created during the window. */ total: number; /** Finished in [since, until), regardless of terminal outcome. */ finished: number; /** Pending, starting, or running at the exclusive until cutoff. */ live: number; } declare const AppSandboxCounts: MessageFns$1; interface AppServerCounts { requests: AppRequestCounts | undefined; containers: AppContainerCounts | undefined; } declare const AppServerCounts: MessageFns$1; interface AppServerStats { objectId: string; counts: AppServerCounts | undefined; } declare const AppServerStats: MessageFns$1; interface AppServerStatsGroup { /** Counts summed across current Servers. */ total: AppServerCounts | undefined; /** Current Servers keyed by name. */ byName: { [key: string]: AppServerStats; }; } declare const AppServerStatsGroup: 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$1; } 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; proxied: boolean; } declare const AttemptStartRequest: MessageFns$1; interface AttemptStartResponse { attemptToken: string; retryPolicy: FunctionRetryPolicy | undefined; } declare const AttemptStartResponse: MessageFns$1; interface AuditLogActor { /** "user", "service_user", "oauth_grant" or "system" */ type: string; id: string; /** Display or service user name; OAuth authorizing user's name. Empty if unresolved. */ name: string; /** User or OAuth authorizing user's email. Empty if unresolved. */ email: string; } declare const AuditLogActor: MessageFns$1; interface AuditLogBucketsRequest { /** Search query in the audit log search syntax */ q: string; /** Oldest time bound in Unix milliseconds, inclusive */ oldestMs: number; /** Newest time bound in Unix milliseconds, exclusive */ newestMs: number; /** Approximate entries per bucket; 0 selects the default */ bucketSize: number; } declare const AuditLogBucketsRequest: MessageFns$1; interface AuditLogContext { workspaceId: string; environmentId: string; /** "sdk", "web" or "unknown" */ source: string; ipAddress: string; isModalAdmin: boolean; /** Empty if unresolved. */ environmentName: string; } declare const AuditLogContext: MessageFns$1; interface AuditLogCountRequest { /** Search query in the audit log search syntax */ q: string; /** Oldest time bound in Unix milliseconds, inclusive */ oldestMs: number; /** Newest time bound in Unix milliseconds, exclusive */ newestMs: number; } declare const AuditLogCountRequest: MessageFns$1; interface AuditLogCountResponse { count: number; } declare const AuditLogCountResponse: MessageFns$1; /** A position in the results. Pass it back unchanged. */ interface AuditLogCursor { eventAtDesc: number; id: string; } declare const AuditLogCursor: MessageFns$1; interface AuditLogEntry { id: string; actor: AuditLogActor | undefined; action: string; targets: AuditLogTarget[]; context: AuditLogContext | undefined; /** ISO 8601 timestamp */ eventAt: string; /** "success" or "error" */ status: string; /** JSON-encoded string */ metadataJson: string; eventAtTimestamp: Date | undefined; } declare const AuditLogEntry: MessageFns$1; /** Entries are read newest to oldest. The newest bound is exclusive and the oldest bound is inclusive, for time and cursors. */ interface AuditLogListRequest { /** Search query in the audit log search syntax */ q: string; /** Oldest time bound in Unix milliseconds, inclusive */ oldestMs: number; /** Newest time bound in Unix milliseconds, exclusive */ newestMs: number; /** Maximum entries to return; 0 selects the default */ limit: number; /** Oldest cursor bound, inclusive; omit to read to oldest_ms */ oldestCursor: AuditLogCursor | undefined; /** Newest cursor bound, exclusive; omit to start at newest_ms */ newestCursor: AuditLogCursor | undefined; } declare const AuditLogListRequest: MessageFns$1; interface AuditLogListResponse { /** Newest first */ items: AuditLogEntry[]; /** Set when more entries may follow */ nextCursor: AuditLogCursor | undefined; } declare const AuditLogListResponse: MessageFns$1; interface AuditLogPlanResponse { /** * Bucket cut points, newest first. Cursor i is the last entry of bucket i, and bucket i+1 starts after it. * Bucket 0 starts at the newest entry, and the last bucket is the remainder. */ cursors: AuditLogCursor[]; } declare const AuditLogPlanResponse: MessageFns$1; interface AuditLogSettingsGetRequest { } declare const AuditLogSettingsGetRequest: MessageFns$1; interface AuditLogSettingsGetResponse { bucketSize: number; pageSize: number; maxConcurrentRequests: number; maxBufferedBuckets: number; requestTimeoutSecs: number; planTimeoutSecs: number; } declare const AuditLogSettingsGetResponse: MessageFns$1; interface AuditLogTarget { /** For example "app", "function" or "secret" */ type: string; id: string; } declare const AuditLogTarget: MessageFns$1; interface AuthTokenGetRequest { } declare const AuthTokenGetRequest: MessageFns$1; interface AuthTokenGetResponse { token: string; } declare const AuthTokenGetResponse: MessageFns$1; /** * Message representing the current (coalesced) state of the autoscaler configuration * As well as the different sources that were used to create it. */ interface AutoscalerConfiguration { /** The settings that are currently in effect. */ settings: AutoscalerSettings | undefined; /** For tracking the source of the overridden value; keys correspond to fields in `settings`. */ overrideEvents: { [key: string]: UserActionInfo; }; /** The default settings that are used when no static settings are provided and no overrides are in effect. */ defaultSettings: AutoscalerSettings | undefined; /** The static settings that were used to initialize the configuration. */ staticSettings: AutoscalerSettings | undefined; /** The merge of all overrides that were used to create the current configuration. */ overrideSettings: AutoscalerSettings | undefined; } declare const AutoscalerConfiguration: 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; /** Stabilization window (in seconds) before scaling up; requires sustained demand over this period */ 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; /** * Integer-valued target concurrent requests per replica for Flash autoscaling. * Superseded by `target_concurrency_float`, which allows non-integer targets. */ targetConcurrency?: number | undefined; /** Maximum number of containers that can be scaled down per minute for Flash autoscaling. */ scaledownRateLimit?: number | undefined; /** Target concurrent requests per replica for Flash autoscaling; may be fractional. */ targetConcurrencyFloat?: 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; functionId: string; } declare const BlobGetRequest: MessageFns$1; interface BlobGetResponse { downloadUrl: string; } declare const BlobGetResponse: MessageFns$1; interface BlobUploadResult { /** The blob id (from BlobCreateResponse) that this upload attempt targeted. */ blobId: string; outcome: BlobUploadResult_Outcome; throughputBytesS: number; } declare const BlobUploadResult: 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; gvisorPlatform?: string | undefined; encrypted: boolean; } 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; appVersion: number; } 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; /** * Suggest guidance for an unknown static CLI command using its syntax and client version. * The client version is supplied in request metadata. */ interface CliCommandSuggestRequest { /** Successfully parsed parent commands, excluding "modal". */ parentPath: string[]; /** The command token that could not be resolved. No arguments or option values. */ unknownCommand: string; } declare const CliCommandSuggestRequest: MessageFns$1; interface CliCommandSuggestResponse { /** Complete guidance text; empty when local CLI suggestions should be used. */ message: string; /** Append the original invocation locally, preserving its arguments and flags. */ appendOriginalCommand: boolean; } declare const CliCommandSuggestResponse: 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 ClusterReservation { /** reservation name, as configured by Modal */ name: string; /** e.g. "B300" */ gpuType: string; region: string; /** workers Modal has committed to keep reserved */ minReservedWorkers: number; /** healthy reserved workers currently present (active + idle) */ reservedWorkers: number; /** reserved workers running this workspace's containers */ activeWorkers: number; /** reserved workers available for new clusters */ idleWorkers: number; /** max(0, min_reserved_workers - reserved_workers) */ unfulfilledWorkers: number; /** containers on reserved workers, ordered by cluster then rank */ tasks: ClusterReservation_Task[]; } declare const ClusterReservation: MessageFns$1; /** A container running on a worker reserved for this reservation. */ interface ClusterReservation_Task { taskId: string; clusterRank: number; appId: string; functionId: string; } declare const ClusterReservation_Task: MessageFns$1; interface ClusterReservationListRequest { } declare const ClusterReservationListRequest: MessageFns$1; interface ClusterReservationListResponse { reservations: ClusterReservation[]; } declare const ClusterReservationListResponse: 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 CommandRouterAccess$1 { jwt: string; url: string; } declare const CommandRouterAccess$1: 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 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; /** * Sent by server containers once lifecycle enter methods have completed. * Only handled on worker by server_io_manager. */ interface ContainerServerLifecycleReadyRequest { } declare const ContainerServerLifecycleReadyRequest: MessageFns$1; interface ContainerStopRequest { taskId: string; /** Let a Function container finish processing any inputs before exiting. */ graceful: boolean; } 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 CurlAuthTokenRequest { url: string; } declare const CurlAuthTokenRequest: MessageFns$1; interface CurlAuthTokenResponse { token: string; } declare const CurlAuthTokenResponse: 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 EndpointComputeRegionSpec { auto?: Empty | undefined; colocated?: Empty | undefined; explicit?: EndpointComputeRegionSpec_ExplicitRegions | undefined; } declare const EndpointComputeRegionSpec: MessageFns$1; interface EndpointComputeRegionSpec_ExplicitRegions { regions: string[]; } declare const EndpointComputeRegionSpec_ExplicitRegions: MessageFns$1; interface EndpointCreateRequest { name: string; description: string; proxyRegions: string[]; computeRegion: EndpointComputeRegionSpec | undefined; model: EndpointModelSource | undefined; apiSurfaces: EndpointApiSurface[]; inputModalities: EndpointInputModality[]; environmentName: string; unauthenticated: boolean; servingMode: EndpointServingMode; sharedEndpointNoticeAcknowledged: boolean; /** Requires Modal admin access. Dedicated endpoints only; must match model. */ recipeId?: string | undefined; /** * Dedicated endpoints only. Fields that are set override the model's default autoscaling * configuration. Target concurrency and scaledown rate limits are not supported. */ autoscalerSettings?: AutoscalerSettings | undefined; } declare const EndpointCreateRequest: MessageFns$1; interface EndpointCreateResponse { endpointId: string; endpointPageUrl: string; name: string; /** Model name to send in requests to the endpoint. */ modelName: string; } declare const EndpointCreateResponse: MessageFns$1; interface EndpointCustomModelSource { baseModelRepoId: string; huggingface?: EndpointHuggingFaceModelSource | undefined; modalVolume?: EndpointModalVolumeModelSource | undefined; } declare const EndpointCustomModelSource: MessageFns$1; interface EndpointGetByNameRequest { name: string; environmentName: string; } declare const EndpointGetByNameRequest: MessageFns$1; interface EndpointGetByNameResponse { endpointId: string; environmentName: string; } declare const EndpointGetByNameResponse: MessageFns$1; interface EndpointGetInfoRequest { endpointId: string; } declare const EndpointGetInfoRequest: MessageFns$1; interface EndpointGetInfoResponse { info: EndpointGetInfoResponse_EndpointInfoSummary | undefined; metadata?: EndpointGetInfoResponse_EndpointHandleMetadata | undefined; } declare const EndpointGetInfoResponse: MessageFns$1; interface EndpointGetInfoResponse_EndpointInfoSummary { name: string; repoId: string; revision: string; serviceUrl: string; requiresProxyAuth: boolean; servingMode: EndpointServingMode; status: EndpointGetInfoResponse_EndpointStatus; lifecycle: EndpointLifecycle | undefined; /** set only when the model is served from a modal volume */ volumeId: string; modelPath: string; /** Model name to send in requests to the endpoint. */ modelName: string; } declare const EndpointGetInfoResponse_EndpointInfoSummary: MessageFns$1; interface EndpointGetInfoResponse_EndpointHandleMetadata { appId: string; serverId: string; environmentName: string; } declare const EndpointGetInfoResponse_EndpointHandleMetadata: MessageFns$1; interface EndpointGetLibraryRequest { } declare const EndpointGetLibraryRequest: MessageFns$1; interface EndpointGetLibraryResponse { models: EndpointModel[]; } declare const EndpointGetLibraryResponse: MessageFns$1; interface EndpointGetLifecycleRequest { endpointId: string; } declare const EndpointGetLifecycleRequest: MessageFns$1; interface EndpointGetLifecycleResponse { lifecycle: EndpointLifecycle | undefined; } declare const EndpointGetLifecycleResponse: MessageFns$1; interface EndpointHuggingFaceModelSource { repoId: string; revision: string; huggingfaceToken: string; } declare const EndpointHuggingFaceModelSource: MessageFns$1; interface EndpointLifecycle { status: EndpointLifecycleStatus; createdAt: number; /** User or service user name */ createdBy: string; /** Unset when Endpoint is active */ stoppedAt: number; /** User or service user name */ stoppedBy: string; environmentName: string; } declare const EndpointLifecycle: MessageFns$1; interface EndpointListFilter { /** Only Endpoints whose name contains this text, ignoring case; empty matches every name. */ nameContains: string; status: EndpointListFilter_Status; } declare const EndpointListFilter: MessageFns$1; interface EndpointListItem { endpointId: string; name: string; description: string; activeDeploymentId: string; updatedAt: number; metadata: EndpointMetadata | undefined; appState: AppState$1; functionId: string; createdByAvatarUrl: string; provisioningStatus: EndpointProvisioningStatus; status: string; servingMode: EndpointServingMode; unauthenticated: boolean; } declare const EndpointListItem: MessageFns$1; interface EndpointListRequest { environmentName: string; pagination: ListPagination | undefined; filter: EndpointListFilter | undefined; } declare const EndpointListRequest: MessageFns$1; interface EndpointListResponse { items: EndpointListItem[]; environmentName: string; } declare const EndpointListResponse: MessageFns$1; interface EndpointMetadata { name: string; creationInfo: CreationInfo | undefined; } declare const EndpointMetadata: MessageFns$1; interface EndpointModalVolumeModelSource { volumeId: string; modelPath: string; } declare const EndpointModalVolumeModelSource: MessageFns$1; interface EndpointModel { /** Canonical model identifier used in Endpoint configuration. */ baseModelRepoId: string; supportedInputModalities: EndpointInputModality[]; availableServingModes: EndpointServingMode[]; } declare const EndpointModel: MessageFns$1; interface EndpointModelSource { baseModelRepoId?: string | undefined; custom?: EndpointCustomModelSource | undefined; } declare const EndpointModelSource: MessageFns$1; interface EndpointStopRequest { endpointId: string; source: EndpointStopSource; } declare const EndpointStopRequest: MessageFns$1; interface EndpointStopResponse { } declare const EndpointStopResponse: MessageFns$1; interface EnvironmentBillingSummaryRequest { /** all query intervals are implicitly one month long (to line up with billing cycles) */ startTimestamp: Date | undefined; environmentId: string; } declare const EnvironmentBillingSummaryRequest: MessageFns$1; interface EnvironmentBillingSummaryResponse { startTimestamp: Date | undefined; endTimestamp: Date | undefined; /** * not showing credits, reservations, etc as those are applied * at the workspace level */ meteredCost: string; /** keyed by app type (deployed, ephemeral, notebook, endpoint, ...), volume, tokens, network egress */ meteredCostBreakdown: { [key: string]: string; }; } declare const EnvironmentBillingSummaryResponse: MessageFns$1; interface EnvironmentCreateRequest { name: string; isManaged: boolean; settings: EnvironmentSettings | undefined; environmentType: EnvironmentType; defaultMemberRole?: EnvironmentRole | undefined; /** String representation; parsed when the enum is unspecified. */ defaultMemberRoleStr: string; } declare const EnvironmentCreateRequest: MessageFns$1; interface EnvironmentDeleteRequest { name: string; } declare const EnvironmentDeleteRequest: MessageFns$1; interface EnvironmentGetBudgetRequest { environmentId: string; } declare const EnvironmentGetBudgetRequest: MessageFns$1; interface EnvironmentGetBudgetResponse { cycleBudgetDollars?: number | undefined; effectiveCycleSpendLimit: number; currentCycleUsage: number; spendLimitReached: boolean; } declare const EnvironmentGetBudgetResponse: MessageFns$1; interface EnvironmentGetManagedRequest { environmentId: string; } declare const EnvironmentGetManagedRequest: MessageFns$1; interface EnvironmentGetManagedResponse { environmentId: string; name: string; createdAt: number; principalRoles: EnvironmentGetManagedResponse_PrincipalEnvRole[]; additionalRoles: EnvironmentGetManagedResponse_PrincipalEnvRole[]; } declare const EnvironmentGetManagedResponse: MessageFns$1; interface EnvironmentGetManagedResponse_PrincipalEnvRole { userId: string; serviceUserId: string; email: string; avatarUrl: string; serviceUserName: string; role: EnvironmentRole; memberRole: MemberRole; userName: string; } declare const EnvironmentGetManagedResponse_PrincipalEnvRole: 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 EnvironmentGetRolesRequest { environmentId: string; } declare const EnvironmentGetRolesRequest: MessageFns$1; interface EnvironmentGetRolesResponse { name: string; createdAt: number; principalRoles: EnvironmentGetRolesResponse_Principal[]; defaultMemberRole?: EnvironmentRole | undefined; } declare const EnvironmentGetRolesResponse: MessageFns$1; interface EnvironmentGetRolesResponse_Principal { userId: string; serviceUserId: string; email: string; avatarUrl: string; userName: string; serviceUserName: string; /** Built-in role token or custom role name. */ roleStr: string; role: EnvironmentRole; roleDefinition: EnvironmentRoleDefinition | undefined; choosableRoles: EnvironmentRole[]; choosableRoleDefinitions: EnvironmentRoleDefinition[]; memberRole: MemberRole; inheritsDefaultMemberRole?: boolean | undefined; hasRoleAssignment?: boolean | undefined; } declare const EnvironmentGetRolesResponse_Principal: 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; /** manager-set */ cycleBudgetDollars?: number | undefined; effectiveCycleSpendLimit: number; currentCycleUsage: number; spendLimitReached: boolean; environmentType: EnvironmentType; defaultMemberRole?: EnvironmentRole | undefined; blockUnauthenticatedResources?: boolean | undefined; effectiveRole?: EnvironmentRole | undefined; imageBuilderVersion?: string | undefined; canManage?: boolean | undefined; createdBy?: string | undefined; createdByAvatarUrl?: string | undefined; } declare const EnvironmentListItem: MessageFns$1; interface EnvironmentListResponse { items: EnvironmentListItem[]; } declare const EnvironmentListResponse: MessageFns$1; interface EnvironmentMetadata { name: string; settings: EnvironmentSettings | undefined; environmentType: EnvironmentType; } declare const EnvironmentMetadata: MessageFns$1; /** Workspace custom role. Built-in Viewer and Contributor are not represented here. */ interface EnvironmentRoleDefinition { environmentRoleDefinitionId: string; name: string; description: string; permissions: string[]; createdAt: number; } declare const EnvironmentRoleDefinition: MessageFns$1; interface EnvironmentRoleSetRequest { environmentId: string; userId: string; serviceUserId: string; role: EnvironmentRole; /** String representation from the CLI; parsed when role is unspecified */ roleStr: string; serviceUserName: string; /** Sent by the client when an environment ID is unavailable */ environmentName: string; /** Custom role (`rd-`). */ environmentRoleDefinitionId: string; } declare const EnvironmentRoleSetRequest: MessageFns$1; interface EnvironmentSetBudgetRequest { environmentId: string; cycleBudgetDollars?: number | undefined; clearBudget: boolean; } declare const EnvironmentSetBudgetRequest: MessageFns$1; interface EnvironmentSetDefaultMemberRoleRequest { environmentId: string; defaultMemberRole: EnvironmentRole; } declare const EnvironmentSetDefaultMemberRoleRequest: MessageFns$1; interface EnvironmentSetManagedRequest { environmentId: string; managed: boolean; defaultMemberRole?: EnvironmentRole | undefined; } declare const EnvironmentSetManagedRequest: 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; maxConcurrentGpus?: number | undefined; maxConcurrentTasks?: number | undefined; /** * When true, new unauthenticated web functions, Servers, tunnels, and * Endpoints in this environment are rejected. Unset inherits the workspace * default. */ blockUnauthenticatedResources?: boolean | undefined; } declare const EnvironmentSettings: MessageFns$1; interface EnvironmentUpdateRequest { currentName: string; name: string | undefined; webSuffix: string | undefined; maxConcurrentTasks?: number | undefined; maxConcurrentGpus?: number | undefined; blockUnauthenticatedResources?: EnvironmentBlockUnauthenticatedResources | undefined; imageBuilderVersion?: string | undefined; } declare const EnvironmentUpdateRequest: MessageFns$1; /** * Experimental policy for outbound traffic from a sandbox: header * replacements. */ interface ExperimentalOutboundPolicy$1 { /** Replace headers in outbound HTTPS requests, potentially with secret values. */ headerReplacements: ExperimentalOutboundPolicy_HeaderReplacement[]; } declare const ExperimentalOutboundPolicy$1: MessageFns$1; interface ExperimentalOutboundPolicy_HeaderReplacement { /** * Domain that the header replacements are scoped to. Supports wildcards in * subdomain positions. */ domain: string; /** * Reference to a secret usable in the header value templates. Can be * empty if no secret value is used. */ secretId: string; /** * Header name -> header value. * * Values support templating with keys in the stanza's secret_id: a * $-prefixed key name in the secret will be replaced with the secret * value. Literal $ characters can be represented by two dollars: `$$`. */ headers: { [key: string]: string; }; } declare const ExperimentalOutboundPolicy_HeaderReplacement: 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 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 ever 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; 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; /** * When set on a "grouped" function, constrains placement across GPU-memory * fabrics: the cluster is placed in co-fabric blocks of this size. */ ExperimentalFabricSize: number; /** If set, the function will be run in an untrusted environment. */ untrusted: boolean; /** To be replaced by autoscaler_settings.buffer_containers */ ExperimentalBufferContainers: number; /** 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; }; /** * Deprecated: still set by client but ignored by server. The scheduler * derives this from the image's builder_version directly. */ 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; /** Where inputs to a function should be routed through. */ routingRegion: string; /** True when the function is a Sessioned Server. Only valid together with is_server. */ isSessioned: boolean; /** Outbound network access of the Function's containers. Takes precedence over block_network. */ networkAccess?: NetworkAccess | undefined; } 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$1 | 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 FunctionCallCountRequest { functionId: string; /** Inclusive, based on input enqueue time. */ since: Date | undefined; /** Exclusive, based on input enqueue time. */ until: Date | undefined; bucketSecs: number; /** Include the root Function and its eligible variants. */ allVariants: boolean; } declare const FunctionCallCountRequest: MessageFns$1; interface FunctionCallCountResponse { /** * Ordered by bucket start time, from oldest to newest. * Counts include only inputs within the requested time range. */ buckets: FunctionCallCountResponse_InputBucket[]; } declare const FunctionCallCountResponse: MessageFns$1; interface FunctionCallCountResponse_InputBucket { bucketStartAt: Date | undefined; /** Number of unique inputs, matching FunctionCallFetch. */ count: number; } declare const FunctionCallCountResponse_InputBucket: MessageFns$1; interface FunctionCallFetchRequest { functionId: string; tail?: FunctionCallFetchRequest_Tail | undefined; range?: FunctionCallFetchRequest_Range | undefined; /** Include the root Function and its eligible variants. */ allVariants: boolean; } declare const FunctionCallFetchRequest: MessageFns$1; interface FunctionCallFetchRequest_Range { /** Inclusive, based on input enqueue time. */ since: Date | undefined; /** Exclusive, based on input enqueue time. */ until: Date | undefined; /** Maximum number of inputs to return. Must be between 1 and 20000. */ limit: number; } declare const FunctionCallFetchRequest_Range: MessageFns$1; interface FunctionCallFetchRequest_Tail { /** Number of most recent inputs to return. Must be between 1 and 1000. */ count: number; } declare const FunctionCallFetchRequest_Tail: MessageFns$1; interface FunctionCallFetchResponse { /** * Tail queries return the most recent inputs from the last seven days, ordered from newest to oldest. * Range queries return inputs ordered from oldest to newest. */ functionCallInputs: FunctionCallInputInfo[]; } declare const FunctionCallFetchResponse: MessageFns$1; interface FunctionCallFromIdRequest { functionCallId: string; } declare const FunctionCallFromIdRequest: MessageFns$1; /** Everything you need to build a FunctionCallHandler. */ interface FunctionCallFromIdResponse { functionCallId: string; numInputs: number; metadata: FunctionCallHandleMetadata | undefined; } declare const FunctionCallFromIdResponse: MessageFns$1; interface FunctionCallGetDataRequest { functionCallId?: string | undefined; attemptToken?: string | undefined; lastIndex: number; } declare const FunctionCallGetDataRequest: MessageFns$1; interface FunctionCallGetInfoRequest { functionId: string; functionCallId: string; } declare const FunctionCallGetInfoRequest: MessageFns$1; interface FunctionCallGetInfoResponse { info: FunctionCallInfo | undefined; } declare const FunctionCallGetInfoResponse: MessageFns$1; interface FunctionCallHandleMetadata { appId: string; functionId: string; } declare const FunctionCallHandleMetadata: 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 FunctionCallInputInfo { enqueuedAt: Date | undefined; startedAt?: Date | undefined; containerId?: string | undefined; startupTimeSeconds?: number | undefined; executionTimeSeconds?: number | undefined; status: FunctionCallInputStatus; functionCallId: string; serviceMethodName?: string | undefined; } declare const FunctionCallInputInfo: 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; /** deprecated soon */ function: FunctionMessage | undefined; handleMetadata: FunctionHandleMetadata | undefined; serverWarnings: Warning[]; functionData: FunctionData | undefined; } 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; ExperimentalFabricSize: 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[]; /** 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; 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; /** Where inputs to a function should be routed through. */ routingRegion: string; /** True when the function is a Sessioned Server. Only valid together with is_server. */ isSessioned: 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 FunctionGetByIdRequest { functionId: string; } declare const FunctionGetByIdRequest: MessageFns$1; interface FunctionGetByIdResponse { function: FunctionData | undefined; handleMetadata: FunctionHandleMetadata | undefined; } declare const FunctionGetByIdResponse: MessageFns$1; interface FunctionGetCallGraphRequest { functionCallId: string; } declare const FunctionGetCallGraphRequest: MessageFns$1; interface FunctionGetCallGraphResponse { inputs: InputCallGraphInfo[]; functionCalls: FunctionCallCallGraphInfo[]; /** Set by the server when the graph has more nodes than it will return, so `inputs` is a prefix of the graph. */ truncated: boolean; } 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 FunctionGetFlashAuthTokenRequest { functionId: string; } declare const FunctionGetFlashAuthTokenRequest: MessageFns$1; interface FunctionGetFlashAuthTokenResponse { token: string; } declare const FunctionGetFlashAuthTokenResponse: 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; fromInputPlane: boolean; } declare const FunctionGetInputsItem: MessageFns$1; interface FunctionGetInputsRequest { functionId: string; /** 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 FunctionGetMetricsRequest { functionId: string; /** Required; rounded down to a UTC bucket boundary. */ since: Date | undefined; /** Required; rounded down; at most 31 days after since. */ until: Date | undefined; /** * If omitted, choose a supported width targeting approximately 100 buckets. * Allowed widths are documented in MetricsGetInfoRequest.bucket_secs. * At most 500 points per series in the rounded interval. */ bucketSecs?: number | undefined; /** * Metric groups: containers, calls. * Empty selects all applicable groups. Each group returns its standard series. */ groups: string[]; /** Restrict the root Function's metrics to one of its parametrized Functions. */ rollup: boolean; } declare const FunctionGetMetricsRequest: MessageFns$1; interface FunctionGetMetricsResponse { /** Inclusive effective bound, rounded down. */ since: Date | undefined; /** Exclusive effective bound, rounded down. */ until: Date | undefined; bucketSecs: number; series: FunctionMetricSeries[]; } declare const FunctionGetMetricsResponse: 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; appVersion: number; } declare const FunctionGetRequest: MessageFns$1; interface FunctionGetResponse { functionId: string; handleMetadata: FunctionHandleMetadata | undefined; serverWarnings: Warning[]; function: FunctionData | undefined; } declare const FunctionGetResponse: MessageFns$1; interface FunctionGetSchedulingParamsRequest { functionId: string; } declare const FunctionGetSchedulingParamsRequest: MessageFns$1; interface FunctionGetSchedulingParamsResponse { autoscalerConfiguration: AutoscalerConfiguration | undefined; } declare const FunctionGetSchedulingParamsResponse: MessageFns$1; interface FunctionGetSerializedRequest { functionId: string; } declare const FunctionGetSerializedRequest: MessageFns$1; interface FunctionGetSerializedResponse { functionSerialized: Uint8Array; classSerialized: Uint8Array; } declare const FunctionGetSerializedResponse: MessageFns$1; interface FunctionGetTimeRangeStatsRequest { functionId: string; /** Inclusive. */ since: Date | undefined; /** Exclusive. */ until: Date | undefined; /** Aggregate the root Function pool and its non-version-pinned variant pools. */ rollup: boolean; /** Filter stats for a specific container */ containerId?: string | undefined; } declare const FunctionGetTimeRangeStatsRequest: MessageFns$1; interface FunctionGetTimeRangeStatsResponse { /** Inclusive. */ since: Date | undefined; /** Exclusive. */ until: Date | undefined; /** Counts of inputs that finish in the requested time range. */ inputSuccessCount: number; inputFailureCount: number; inputTimeoutCount: number; /** Number of inputs assigned but not finished at the exclusive end of the time range. */ inputRunningAtEndCount: number; /** * Metrics include execution_time, end_to_end_latency, subject to change * as requirements evolve */ inputPercentileStats: { [key: string]: StatsPercentileDistribution$1; }; /** * Container lifecycle counts. Started and errored containers are counted when * the corresponding event occurs in the requested time range. Creating containers * were enqueued but had not started or finished at the exclusive end of the range. */ containerStartedCount: number; containerErrorCount: number; containerCreatingAtEndCount: number; /** * Metrics include cpu_usage, memory_usage, gpu_utilization subject to change * as requirements evolve */ containerPercentileStats: { [key: string]: StatsPercentileDistribution$1; }; /** * Number of direct non-version-pinned variants included in the roll-up. * Zero when roll-up is disabled or the base Function has no variants. */ variantCount: number; /** Number of containers that were active (published heartbeats) in the time range. */ containerTotalCount: number; } declare const FunctionGetTimeRangeStatsResponse: 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 */ 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; maxAsyncObjectSizeBytes?: number | undefined; /** (Optional) urls for flash services */ ExperimentalFlashUrls: string[]; supportedInputFormats: DataFormat[]; supportedOutputFormats: DataFormat[]; appId: string; /** The base Function ID for a variant, or the Function's own ID otherwise. */ baseFunctionId: string; } 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 FunctionListVariantsRequest { functionId: string; cursor: FunctionVariantCursor | undefined; limit: number; } declare const FunctionListVariantsRequest: MessageFns$1; interface FunctionListVariantsResponse { infos: FunctionVariantInfo[]; /** Pass back as cursor to fetch the next page. Unset once the listing is complete. */ nextCursor: FunctionVariantCursor | undefined; /** Set by the server when it ordered the variants by how many tasks each is running, busiest first. */ orderedByTaskCount: boolean; } declare const FunctionListVariantsResponse: 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 FunctionMetricPoint { /** UTC-aligned bucket start within the response's effective [since, until). */ timestamp: Date | undefined; value?: number | undefined; } declare const FunctionMetricPoint: MessageFns$1; interface FunctionMetricSeries { /** * Unique within the response; identifies one aggregate series for this metric. * The metric name defines the aggregation semantics. */ name: string; /** Public semantic unit, such as seconds, calls, containers, or requests. */ unit: string; /** Ascending timestamps; absent points are gaps. */ points: FunctionMetricPoint[]; description: string; } declare const FunctionMetricSeries: MessageFns$1; /** todo(ayush): update this to also use `autoscaler_settings` */ interface FunctionOptions$1 { 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[]; pinnedAppVersion?: number | undefined; routingRegion?: string | undefined; } declare const FunctionOptions$1: MessageFns$1; interface FunctionPrecreateRequest { appId: string; functionName: string; existingFunctionId: string; functionType: Function_FunctionType; webhookConfig: WebhookConfig | undefined; /** 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; blobUploadResults: BlobUploadResult[]; } 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; /** injected by the worker */ fromInputPlane: boolean; } 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; inputHeadroom: number; } declare const FunctionStats$1: MessageFns$1; interface FunctionUpdateSchedulingParamsRequest { functionId: string; warmPoolSizeOverride: number; settings: AutoscalerSettings | undefined; } declare const FunctionUpdateSchedulingParamsRequest: MessageFns$1; interface FunctionUpdateSchedulingParamsResponse { currentSettings: AutoscalerSettings | undefined; } declare const FunctionUpdateSchedulingParamsResponse: MessageFns$1; interface FunctionVariantCursor { createdBefore: number; functionId: string; } declare const FunctionVariantCursor: MessageFns$1; interface FunctionVariantInfo { functionId: string; serializedParams: Uint8Array; functionOptions: FunctionOptions$1 | undefined; } declare const FunctionVariantInfo: 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; unauthenticated: boolean; liftAndShiftConfig?: LiftAndShiftConfig | undefined; } 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[]; /** * CPU architecture the image is built for. Images with an unspecified * arch predate this field and are treated as x86_64. */ arch: Arch; } declare const Image$1: MessageFns$1; interface ImageBuildChainGetRequest { imageId: string; } declare const ImageBuildChainGetRequest: MessageFns$1; interface ImageBuildChainGetResponse { buildSteps: ImageBuildStep[]; } declare const ImageBuildChainGetResponse: MessageFns$1; interface ImageBuildStep { imageId: string; startedAt: Date | undefined; finishedAt: Date | undefined; builderAppId: string; builderTaskId: string; } declare const ImageBuildStep: 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 ImageGetByTagRequest { /** * Named image reference: "[[workspace/]environment/]name[:tag]". * The tag suffix defaults to "latest" when omitted. */ tag: string; /** * New clients should send environment name as a /-separated prefix of the `tag` field. * environment_name only accepted when tag has no environment or workspace prefix. */ environmentName: string; } declare const ImageGetByTagRequest: MessageFns$1; interface ImageGetByTagResponse { imageId: string; } declare const ImageGetByTagResponse: 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 ImageListTagsItem { tag: string; imageId: string; revisionId: string; createdAt: number; updatedAt: number; /** Display name of whoever published the image this tag points at. */ lastPublishedBy: string; } declare const ImageListTagsItem: MessageFns$1; interface ImageListTagsRequest { environmentName: string; /** Prefix search over full "name:tag" strings. */ tagPrefix: string; /** Defaults to 100. Values above 100 are rejected by the server. */ maxObjects: number; pageToken: string; /** Returns only the tags that currently point at this image. Optional. */ imageId: string; } declare const ImageListTagsRequest: MessageFns$1; interface ImageListTagsResponse { items: ImageListTagsItem[]; nextPageToken: string; environmentName: string; } declare const ImageListTagsResponse: 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; /** The image's ENTRYPOINT, including one inherited from a base image. Empty if unset. */ entrypoint: string[]; /** * The image's CMD: the default arguments to the entrypoint when a container is * started without any, including a CMD inherited from a base image. Empty if unset. */ cmd: string[]; } declare const ImageMetadata: MessageFns$1; interface ImageNameDeleteRequest { /** Named image reference: "[environment/]name[:tag]". */ tag: string; } declare const ImageNameDeleteRequest: MessageFns$1; interface ImagePublishRequest { imageId: string; /** * Named image reference: "[[workspace/]environment/]name[:tag]". * The tag suffix defaults to "latest" when omitted. */ tag: string; /** * New clients should send environment name as a /-separated prefix of the `tag` field. * environment_name only accepted when tag has no environment or workspace prefix. */ environmentName: string; /** Explicit opt-in required when publishing to a public environment. */ allowPublic: boolean; } declare const ImagePublishRequest: MessageFns$1; interface ImagePublishResponse { imageId: string; revisionId: string; } declare const ImagePublishResponse: MessageFns$1; interface ImageRegistryConfig { registryAuthType: RegistryAuthType; secretId: string; } declare const ImageRegistryConfig: MessageFns$1; interface ImageTagRevisionsItem { imageId: string; revisionId: string; createdAt: number; publishedBy: string; } declare const ImageTagRevisionsItem: MessageFns$1; interface ImageTagRevisionsRequest { /** * Named image reference: "[[workspace/]environment/]name[:tag]". * The tag suffix defaults to "latest" when omitted. */ tag: string; /** * New clients should send environment name as a /-separated prefix of the `tag` field. * environment_name only accepted when tag has no environment or workspace prefix. */ environmentName: string; /** Defaults to 100. Values above 100 are rejected by the server. */ maxObjects: number; pageToken: string; } declare const ImageTagRevisionsRequest: MessageFns$1; interface ImageTagRevisionsResponse { items: ImageTagRevisionsItem[]; nextPageToken: string; tag: string; environmentName: string; } declare const ImageTagRevisionsResponse: 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 LiftAndShiftConfig { } declare const LiftAndShiftConfig: 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[]; proxied: boolean; } 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 MetricDefinition$1 { /** Exact series name returned by the metrics RPC. */ name: string; /** Matches FunctionMetricSeries.unit. */ unit: string; /** Meaning and aggregation semantics of the series. */ description: string; } declare const MetricDefinition$1: MessageFns$1; interface MetricGroupDefinition { /** Group selector, such as "calls". Multiple catalogue rows can share this name. */ name: string; /** Shared description of this catalogue row's series. */ description: string; /** Individual series represented by this row, ordered by name; all have the same unit. */ metrics: MetricDefinition$1[]; /** Display label, such as "execution_time_{p50,p90,p99}". */ displayName: string; } declare const MetricGroupDefinition: MessageFns$1; interface MetricsGetInfoRequest { /** Required; unspecified and unrecognized targets are rejected. */ targetType: MetricsGetInfoRequest_MetricsTargetType; /** Required; rounded down to a UTC bucket boundary. */ since: Date | undefined; /** Required; rounded down; at most 31 days after since. */ until: Date | undefined; /** If omitted, choose a supported width targeting approximately 100 buckets. */ bucketSecs?: number | undefined; groups: string[]; } declare const MetricsGetInfoRequest: MessageFns$1; interface MetricsGetInfoResponse { /** * Catalogue rows for the requested target type, ordered by name then display_name. * Rows sharing a name belong under the same group heading. Each series appears once per group. * Describes the catalog; individual exports may omit unavailable series. */ groups: MetricGroupDefinition[]; /** Resolved bucket width. */ bucketSecs: number; /** Projected buckets per series, not observed sample count. */ bucketCount: number; } declare const MetricsGetInfoResponse: MessageFns$1; interface MountBatchedCheckExistenceRequest { sha256HexHashes: string[]; } declare const MountBatchedCheckExistenceRequest: MessageFns$1; interface MountBatchedCheckExistenceResponse { missingSha256HexHashes: string[]; /** Server time of the check. Clients send the earliest one back as earliest_checked_at on the commit. */ checkedAt: Date | undefined; } declare const MountBatchedCheckExistenceResponse: 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; /** Earliest checked_at the client received from the existence checks for these files. Telemetry only. */ earliestCheckedAt: Date | undefined; } 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; /** Server time of the check. Clients send the earliest one back as earliest_checked_at on the commit. */ checkedAt: Date | undefined; } 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[]; allowedDomains: string[]; } declare const NetworkAccess: 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; /** * Optional name suggestions for CLI error paths. Only objects visible to the * caller in the selected environment are considered; no object is modified. */ interface ObjectSuggestRequest { /** Empty selects the workspace's default environment. */ environmentName: string; /** Required; UNSPECIFIED is invalid. */ kind: ObjectSuggestRequest_ObjectSuggestKind; /** * The reference exactly as typed. For Functions and Servers this may be an * APP_NAME/OBJECT_NAME reference or a reference with an incorrect separator. */ query: string; /** * Maximum number of suggestions. Zero defaults to 3; values above 10 are * capped at 10. */ limit: number; } declare const ObjectSuggestRequest: MessageFns$1; interface ObjectSuggestResponse { /** Distinct suggestions, best match first. Empty if no suitable match exists. */ suggestions: ObjectSuggestion[]; } declare const ObjectSuggestResponse: MessageFns$1; interface ObjectSuggestion { /** Set for Functions and Servers; empty for Apps. */ appName: string; /** * The object's name or tag, including any class method suffix. For Apps, * this is the deployment name. Combine with app_name using '/' when set. */ objectName: string; } declare const ObjectSuggestion: MessageFns$1; /** * Route-based policy for outbound network traffic. A sandbox applies it to * its main container. * * Routes are evaluated in order and the first match decides what happens to * a connection or packet. The last route must be the policy's only * `any` route, which decides what happens to traffic no other route * matches. Traffic a route matches without a redirect goes to its original * destination. */ interface OutboundPolicy { tlsDecryption: OutboundPolicy_TLSDecryption | undefined; routes: OutboundPolicy_Route[]; } declare const OutboundPolicy: MessageFns$1; /** An inclusive range of ports. A single port has start == end. */ interface OutboundPolicy_PortRange { start: number; end: number; } declare const OutboundPolicy_PortRange: MessageFns$1; /** Traffic to these CIDRs. */ interface OutboundPolicy_IPRoute { /** Unspecified means any transport. */ transport: OutboundPolicy_Transport; /** Empty means every port. */ ports: OutboundPolicy_PortRange[]; cidrs: string[]; redirect: OutboundPolicy_Redirect | undefined; } declare const OutboundPolicy_IPRoute: MessageFns$1; /** * Connections that carry TLS from the first byte to these domains. Never * decrypted. */ interface OutboundPolicy_TLSRoute { /** Unspecified means TCP. */ transport: OutboundPolicy_Transport; /** Empty means port 443. */ ports: OutboundPolicy_PortRange[]; /** Supports `*.` wildcard prefixes and a bare `*`. */ domains: string[]; redirect: OutboundPolicy_Redirect | undefined; } declare const OutboundPolicy_TLSRoute: MessageFns$1; /** * HTTPS connections to these domains. Always decrypted, which requires TLS * decryption to be allowed. */ interface OutboundPolicy_HTTPSRoute { /** Unspecified means TCP. */ transport: OutboundPolicy_Transport; /** Empty means port 443. */ ports: OutboundPolicy_PortRange[]; /** Supports `*.` wildcard prefixes and a bare `*`. */ domains: string[]; headerReplacements: OutboundPolicy_HeaderReplacement[]; redirect: OutboundPolicy_Redirect | undefined; } declare const OutboundPolicy_HTTPSRoute: MessageFns$1; /** Everything earlier routes didn't match. */ interface OutboundPolicy_AnyRoute { redirect: OutboundPolicy_Redirect | undefined; } declare const OutboundPolicy_AnyRoute: MessageFns$1; interface OutboundPolicy_HeaderReplacement { /** * Secret whose keys the header value templates may reference. Empty for * static values. */ secretId: string; /** * Header name -> value template. A $-prefixed key name in the secret is * replaced with the secret value; `$$` is a literal `$`. */ headers: { [key: string]: string; }; } declare const OutboundPolicy_HeaderReplacement: MessageFns$1; interface OutboundPolicy_Redirect { block?: OutboundPolicy_Redirect_Block | undefined; viaProxy?: OutboundPolicy_Redirect_ViaProxy | undefined; viaSidecar?: OutboundPolicy_Redirect_ViaSidecar | undefined; } declare const OutboundPolicy_Redirect: MessageFns$1; interface OutboundPolicy_Redirect_Block { } declare const OutboundPolicy_Redirect_Block: MessageFns$1; interface OutboundPolicy_Redirect_ViaProxy { proxyId: string; } declare const OutboundPolicy_Redirect_ViaProxy: MessageFns$1; interface OutboundPolicy_Redirect_ViaSidecar { sidecarName: string; } declare const OutboundPolicy_Redirect_ViaSidecar: MessageFns$1; interface OutboundPolicy_Route { ip?: OutboundPolicy_IPRoute | undefined; tls?: OutboundPolicy_TLSRoute | undefined; https?: OutboundPolicy_HTTPSRoute | undefined; any?: OutboundPolicy_AnyRoute | undefined; } declare const OutboundPolicy_Route: MessageFns$1; interface OutboundPolicy_TLSDecryption { /** * Generate a certificate authority for the sandbox and attempt to make the * sandbox trust it, so that routes that need to can decrypt its TLS traffic. * Decrypts nothing on its own. Required by HTTPS routes. Fixed at creation. */ allowed: boolean; } declare const OutboundPolicy_TLSDecryption: 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 PersistentSandboxCreateRequest { appId: string; definition: Sandbox$1 | undefined; } declare const PersistentSandboxCreateRequest: MessageFns$1; interface PersistentSandboxCreateResponse { persistentSandboxId: string; sandboxId: string; } declare const PersistentSandboxCreateResponse: MessageFns$1; interface PersistentSandboxGetRequest { persistentSandboxId?: string | undefined; name?: PersistentSandboxNameLookup | undefined; } declare const PersistentSandboxGetRequest: MessageFns$1; interface PersistentSandboxGetResponse { persistentSandboxId: string; sandboxId: string; /** Set once the persistent Sandbox is terminated; unset otherwise. */ terminatedAt: Date | undefined; } declare const PersistentSandboxGetResponse: MessageFns$1; interface PersistentSandboxNameLookup { appName: string; environmentName: string; name: string; } declare const PersistentSandboxNameLookup: MessageFns$1; interface PersistentSandboxResumeRequest { persistentSandboxId: string; } declare const PersistentSandboxResumeRequest: MessageFns$1; interface PersistentSandboxResumeResponse { sandboxId: string; } declare const PersistentSandboxResumeResponse: MessageFns$1; interface PersistentSandboxTerminateRequest { persistentSandboxId: string; } declare const PersistentSandboxTerminateRequest: MessageFns$1; interface PersistentSandboxTerminateResponse { } declare const PersistentSandboxTerminateResponse: MessageFns$1; interface PersistentSandboxTunnelsListRequest { persistentSandboxId: string; } declare const PersistentSandboxTunnelsListRequest: MessageFns$1; interface PersistentSandboxTunnelsListResponse { tunnels: TunnelData[]; } declare const PersistentSandboxTunnelsListResponse: 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; /** Leave thread-count env vars (OMP_NUM_THREADS, ...) unset so libraries size themselves from the visible CPUs. Ignored on runc. */ skipNumThreadsEnvVars: 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; /** * Runtime the sandbox runs in: "vm" for a virtual machine, or a container * runtime such as "gvisor". Leave it unset to let Modal pick. */ 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; /** * Deprecated: use experimental_options_v2 instead. * * @deprecated */ experimentalOptions: { [key: string]: boolean; }; /** Experimental options */ experimentalOptionsV2: { [key: string]: string; }; /** 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; /** * Deprecated: direct sandbox commands are always enabled. * * @deprecated */ 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; /** * If set, only connections from these CIDRs will be allowed to connect to the sandbox * (tunnels and auth proxy). */ inboundCidrAllowlist: string[]; environmentVariables: StringMap | undefined; experimentalOutboundPolicy?: ExperimentalOutboundPolicy$1 | undefined; /** * If set, the sandbox's main container is served an X.509-SVID over a * SPIFFE Workload API socket, addressed by SPIFFE_ENDPOINT_SOCKET. The * certificate federates into a cloud account (AWS IAM Roles Anywhere). * Sidecars are not served one. */ includeX509Svid: boolean; /** * Route-based outbound policy. Mutually exclusive with * experimental_outbound_policy (superseded, experimental API) and with any * network_access other than OPEN. */ outboundPolicy?: OutboundPolicy | undefined; } declare const Sandbox$1: MessageFns$1; interface SandboxContainerCreateV2Request { /** Sandbox the container joins; it runs inside that sandbox's task. */ sandboxId: string; /** Logical container name, unique within the sandbox. */ containerName: string; /** * Same definition type as SandboxCreateV2. Fields a container cannot honor * (resources, timeouts, scheduling constraints, ...) are rejected. */ definition: Sandbox$1 | undefined; ephemeralSecrets: StringMap | undefined; cloudBucketMountCredentials: { [key: string]: StringMap; }; /** Applied in order. Cannot be combined with ephemeral_secrets. If definition.secret_ids is set, it must match the secret_id entries here. */ secretSources: SecretSource[]; } declare const SandboxContainerCreateV2Request: MessageFns$1; interface SandboxContainerCreateV2Response { containerId: string; containerName: string; } declare const SandboxContainerCreateV2Response: MessageFns$1; interface SandboxCreateConnectTokenRequest { sandboxId: string; userMetadata: string; /** Uses port 8080 if unspecified. */ port?: number | undefined; } 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; tags: SandboxTag[]; } declare const SandboxCreateRequest: MessageFns$1; interface SandboxCreateResponse { sandboxId: string; metadata: SandboxHandleMetadata | undefined; } declare const SandboxCreateResponse: MessageFns$1; interface SandboxCreateV2Request { appId: string; definition: Sandbox$1 | undefined; ephemeralSecrets: StringMap | undefined; tags: SandboxTag[]; cloudBucketMountCredentials: { [key: string]: StringMap; }; /** Applied in order. Cannot be combined with ephemeral_secrets. If definition.secret_ids is set, it must match the secret_id entries here. */ secretSources: SecretSource[]; } declare const SandboxCreateV2Request: MessageFns$1; interface SandboxCreateV2Response { sandboxId: string; tunnels: TunnelData[]; taskId: string; metadata: SandboxHandleMetadata | undefined; commandRouterAccess: CommandRouterAccess$1 | undefined; /** Signed app and workspace id of the sandbox. Sent as the x-modal-sandbox-token metadata header. */ sandboxToken: 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 | undefined; taskId?: string | undefined; } declare const SandboxGetCommandRouterAccessRequest: MessageFns$1; interface SandboxGetCommandRouterAccessResponse { jwt: string; url: string; /** * Worker's public IPv4 address. When set, clients should connect directly * to this IP while still using the URL's hostname for TLS SNI and the * HTTP/2 :authority header. */ workerIpv4Address: string; } declare const SandboxGetCommandRouterAccessResponse: MessageFns$1; interface SandboxGetExitSnapshotRequest { sandboxId: string; timeout: number; } declare const SandboxGetExitSnapshotRequest: MessageFns$1; interface SandboxGetExitSnapshotResponse { success?: SandboxGetExitSnapshotResponse_Success | undefined; pending?: SandboxGetExitSnapshotResponse_Pending | undefined; error?: SandboxGetExitSnapshotResponse_Error | undefined; } declare const SandboxGetExitSnapshotResponse: MessageFns$1; interface SandboxGetExitSnapshotResponse_Success { imageId: string; } declare const SandboxGetExitSnapshotResponse_Success: MessageFns$1; interface SandboxGetExitSnapshotResponse_Pending { } declare const SandboxGetExitSnapshotResponse_Pending: MessageFns$1; interface SandboxGetExitSnapshotResponse_Error { errorCode: SandboxGetExitSnapshotResponse_ErrorCode; message: string; } declare const SandboxGetExitSnapshotResponse_Error: MessageFns$1; interface SandboxGetFromNameRequest { sandboxName: string; environmentName: string; appName: string; /** * When set, the lookup also considers sandboxes that have already stopped and * returns the most recently created sandbox with the given name. */ includeTerminated: boolean; } declare const SandboxGetFromNameRequest: MessageFns$1; interface SandboxGetFromNameResponse { sandboxId: string; metadata: SandboxHandleMetadata | undefined; } 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 SandboxGetStatsRequest { sandboxId: string; /** * Time range of the samples to include. Unset `since` means the sandbox's * creation and unset `until` means now. */ since: Date | undefined; /** Exclusive. */ until: Date | undefined; } declare const SandboxGetStatsRequest: MessageFns$1; interface SandboxGetStatsResponse { /** * Estimated compute cost in USD at the workspace's current plan rates, without * reservation discounts or network egress. Unset when no usage is available. */ cost?: string | undefined; costByResource: { [key: string]: string; }; numDatapoints: number; /** * Superseded by `percentile_stats`; still populated for clients that read these fields. * * @deprecated */ cpuCores: SandboxGetStatsResponse_ResourceStats | undefined; /** @deprecated */ memoryGib: SandboxGetStatsResponse_ResourceStats | undefined; durationHours: number; /** * Billing-adjusted usage: the greater of measured and reserved resources per * sample, less any resources bundled with a GPU. */ billedCpuCoreSeconds: number; billedMemoryGibSeconds: number; /** * The time range covered, with the request's defaults applied. Every sample * counted lies within it: with `since` unset, it starts before the sandbox's * creation if clock skew stamped a sample earlier. */ since: Date | undefined; until: Date | undefined; /** * Measured usage keyed like FunctionGetTimeRangeStatsResponse.container_percentile_stats: * "CPU Usage (cores)" and "Memory Usage (GiB)". Each has exact, equally weighted sample * percentiles p50, p90, and p99. Empty when no usage is available. */ percentileStats: { [key: string]: StatsPercentileDistribution$1; }; } declare const SandboxGetStatsResponse: MessageFns$1; interface SandboxGetStatsResponse_ResourceStats { /** Exact, equally weighted sample percentiles: p50, p90, p99, and p99.9. */ percentiles: StatsPercentile$1[]; mean: number; max: number; } declare const SandboxGetStatsResponse_ResourceStats: 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 SandboxGetTimeRangeStatsRequest { since: Date | undefined; until: Date | undefined; groupByTags: string[]; tags: { [key: string]: string; }; appId: string; pageToken: string; } declare const SandboxGetTimeRangeStatsRequest: MessageFns$1; interface SandboxGetTimeRangeStatsResponse { groups: SandboxStatsGroup[]; nextPageToken: string; } declare const SandboxGetTimeRangeStatsResponse: 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; appId: string; } 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; readinessProbe?: Probe$1 | undefined; tunnels: TunnelData[]; metadata: SandboxHandleMetadata | 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; /** For internal debugging use only. */ workerId: string; replaceVolumeMounts: boolean; volumeMounts: VolumeMount[]; } declare const SandboxRestoreRequest: MessageFns$1; interface SandboxRestoreResponse { sandboxId: string; } declare const SandboxRestoreResponse: MessageFns$1; interface SandboxRestoreV2Request { snapshotId: string; sandboxNameOverride: string; sandboxNameOverrideType: SandboxRestoreRequest_SandboxNameOverrideType; /** For internal debugging use only. */ workerId: string; } declare const SandboxRestoreV2Request: MessageFns$1; interface SandboxRestoreV2Response { sandboxId: string; tunnels: TunnelData[]; taskId: string; metadata: SandboxHandleMetadata | undefined; commandRouterAccess: CommandRouterAccess$1 | undefined; } declare const SandboxRestoreV2Response: MessageFns$1; interface SandboxSetNameRequest { sandboxId: string; name: string; } declare const SandboxSetNameRequest: MessageFns$1; interface SandboxSetNameResponse { } declare const SandboxSetNameResponse: MessageFns$1; interface SandboxSetOutboundPolicyRequest { sandboxId: string; /** Replaces the Sandbox's route-based outbound policy. */ outboundPolicy: OutboundPolicy | undefined; } declare const SandboxSetOutboundPolicyRequest: MessageFns$1; interface SandboxSetOutboundPolicyResponse { } declare const SandboxSetOutboundPolicyResponse: 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; handleMetadata: SandboxSnapshotHandleMetadata | undefined; } declare const SandboxSnapshotGetResponse: MessageFns$1; interface SandboxSnapshotHandleMetadata { isV2: boolean; } declare const SandboxSnapshotHandleMetadata: 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 SandboxStatsGroup { tags: { [key: string]: SandboxStatsGroup_TagValue; }; /** @deprecated */ cost: number; /** @deprecated */ costByResource: { [key: string]: number; }; /** Supersedes cost */ costStr: string; /** Supersedes cost_by_resource */ costByResourceStr: { [key: string]: string; }; } declare const SandboxStatsGroup: MessageFns$1; interface SandboxStatsGroup_TagValue { value?: string | undefined; } declare const SandboxStatsGroup_TagValue: 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; metadata: SandboxHandleMetadata | 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 SecretGetInfoRequest { secretId: string; } declare const SecretGetInfoRequest: MessageFns$1; interface SecretGetInfoResponse { metadata: SecretMetadata | undefined; } declare const SecretGetInfoResponse: 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; keys: string[]; environmentName: string; lastUsedAt: number; templateType: string; } declare const SecretMetadata: MessageFns$1; /** One source of environment variables for a Sandbox container or exec. */ interface SecretSource { /** Server-side Secret, resolved on the worker. */ secretId?: string | undefined; /** Plaintext values sent directly to the worker. Must not be persisted. */ env?: StringMap | undefined; } declare const SecretSource: 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 ServerCountRequestsRequest { functionId: string; /** Inclusive, based on request timestamp. */ since: Date | undefined; /** Exclusive, based on request timestamp. */ until: Date | undefined; bucketSecs: number; } declare const ServerCountRequestsRequest: MessageFns$1; interface ServerCountRequestsResponse { /** * Ordered by bucket start time, from oldest to newest. * Counts include only requests within the requested time range. */ buckets: ServerCountRequestsResponse_RequestBucket[]; } declare const ServerCountRequestsResponse: MessageFns$1; interface ServerCountRequestsResponse_RequestBucket { bucketStartAt: Date | undefined; /** Number of request records, matching ServerRequestFetch. */ count: number; } declare const ServerCountRequestsResponse_RequestBucket: MessageFns$1; interface ServerGetMetricsRequest { functionId: string; /** Required; rounded down to a UTC bucket boundary. */ since: Date | undefined; /** Required; rounded down; at most 31 days after since. */ until: Date | undefined; /** * If omitted, choose a supported width targeting approximately 100 buckets. * At most 500 points per series in the rounded interval. */ bucketSecs?: number | undefined; /** Metric groups: containers, requests, etc. */ groups: string[]; } declare const ServerGetMetricsRequest: MessageFns$1; interface ServerGetMetricsResponse { /** Inclusive effective bound, rounded down. */ since: Date | undefined; /** Exclusive effective bound, rounded down. */ until: Date | undefined; bucketSecs: number; series: FunctionMetricSeries[]; } declare const ServerGetMetricsResponse: MessageFns$1; interface ServerGetTimeRangeStatsRequest { functionId: string; /** Inclusive. */ since: Date | undefined; /** Exclusive. */ until: Date | undefined; /** Filter stats for a specific container */ containerId?: string | undefined; } declare const ServerGetTimeRangeStatsRequest: MessageFns$1; interface ServerGetTimeRangeStatsResponse { /** Inclusive. */ since: Date | undefined; /** Exclusive. */ until: Date | undefined; requestCount: number; requestCountByStatusCode: ServerGetTimeRangeStatsResponse_ServerStatusCodeCount[]; requestRatePerSecond: number; /** Metrics include request_latency, subject to change as requirements evolve. */ requestPercentileStats: { [key: string]: StatsPercentileDistribution$1; }; /** * Metrics include startup_time, cpu_usage, memory_usage, and * gpu_utilization, subject to change as requirements evolve. */ containerPercentileStats: { [key: string]: StatsPercentileDistribution$1; }; /** Absent when the image does not contain a supported inference engine. */ inference: ServerGetTimeRangeStatsResponse_ServerInferenceStats | undefined; /** * Container lifecycle counts. Started and errored containers are counted when * the corresponding event occurs in the requested time range. Creating containers * were enqueued but had not started or finished at the exclusive end of the range. */ containerStartedCount: number; containerErrorCount: number; containerCreatingAtEndCount: number; /** Number of containers that were active (published heartbeats) in the time range. */ containerTotalCount: number; } declare const ServerGetTimeRangeStatsResponse: MessageFns$1; interface ServerGetTimeRangeStatsResponse_ServerInferenceStats { engine: LLMEngine; status: ServerInferenceStatsStatus; /** * Metrics include time_to_first_token, inter_token_latency, and * end_to_end_latency, subject to change as requirements evolve. */ percentileStats: { [key: string]: StatsPercentileDistribution$1; }; /** * Metrics include input_tokens_per_second, cached_input_tokens_per_second, * and output_tokens_per_second, subject to change as requirements evolve. */ scalarStats: { [key: string]: number; }; } declare const ServerGetTimeRangeStatsResponse_ServerInferenceStats: MessageFns$1; interface ServerGetTimeRangeStatsResponse_ServerStatusCodeCount { statusCode: number; count: number; } declare const ServerGetTimeRangeStatsResponse_ServerStatusCodeCount: MessageFns$1; interface ServerRequestFetchRequest { functionId: string; tail?: ServerRequestFetchRequest_Tail | undefined; range?: ServerRequestFetchRequest_Range | undefined; } declare const ServerRequestFetchRequest: MessageFns$1; interface ServerRequestFetchRequest_Range { /** Inclusive, based on request timestamp. */ since: Date | undefined; /** Exclusive, based on request timestamp. */ until: Date | undefined; /** Maximum number of requests to return. Must be between 1 and 20000. */ limit: number; } declare const ServerRequestFetchRequest_Range: MessageFns$1; interface ServerRequestFetchRequest_Tail { /** Number of most recent requests to return. Must be between 1 and 1000. */ count: number; } declare const ServerRequestFetchRequest_Tail: MessageFns$1; interface ServerRequestFetchResponse { /** * Tail queries return the most recent requests from the last seven days, ordered from newest to oldest. * Range queries return requests ordered from oldest to newest. */ requests: ServerRequestInfo[]; } declare const ServerRequestFetchResponse: MessageFns$1; interface ServerRequestInfo { route: string; timestamp: Date | undefined; containerId: string; durationSeconds: number; status: number; } declare const ServerRequestInfo: MessageFns$1; interface ServiceUser { name: string; tokenId: string; createdBy: string; createdAt: number; lastUsedAt: number; createdByAvatarUrl: string; serviceUserId: string; status: string; scoped: boolean; environmentRoles: ServiceUser_EnvironmentRoleEntry[]; /** This should be a TImestamp type, but keeping as a double for compatibility with public_api.proto */ expiresAt?: number | undefined; } declare const ServiceUser: MessageFns$1; interface ServiceUser_EnvironmentRoleEntry { environmentId: string; role: EnvironmentRole; environmentName: string; /** Built-in token, or the custom definition's name. */ roleStr: string; /** Set on reads when `role` is ENVIRONMENT_ROLE_CUSTOM. */ environmentRoleDefinition: EnvironmentRoleDefinition | undefined; } declare const ServiceUser_EnvironmentRoleEntry: MessageFns$1; interface ServiceUserCreateRequest { name: string; scoped: boolean; expiresInSeconds: number; } declare const ServiceUserCreateRequest: MessageFns$1; interface ServiceUserCreateResponse { tokenId: string; tokenSecret: string; serviceUserId: string; expiresAt: Date | undefined; } declare const ServiceUserCreateResponse: MessageFns$1; interface ServiceUserDeleteRequest { serviceUserId: string; serviceUserName: string; } declare const ServiceUserDeleteRequest: MessageFns$1; interface ServiceUserIdentity { serviceUserId: string; serviceUserName: string; createdBy: UserIdentity | undefined; } declare const ServiceUserIdentity: MessageFns$1; interface ServiceUserInfoRequest { serviceUserName: string; } declare const ServiceUserInfoRequest: MessageFns$1; interface ServiceUserInfoResponse { serviceUser: ServiceUser | undefined; } declare const ServiceUserInfoResponse: MessageFns$1; interface ServiceUserListResponse { serviceUsers: ServiceUser[]; } declare const ServiceUserListResponse: 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 StatsPercentile$1 { /** The percentile expressed in basis points: 5000 is p50 and 9990 is p99.9. */ percentileBasisPoints: number; value: number; } declare const StatsPercentile$1: MessageFns$1; interface StatsPercentileDistribution$1 { /** Unit identifier such as "seconds", "cores", "gibibytes", or "fraction". */ unit: string; percentiles: StatsPercentile$1[]; } declare const StatsPercentileDistribution$1: MessageFns$1; interface StringMap { contents: { [key: string]: string; }; } declare const StringMap: MessageFns$1; interface TaskClusterHelloRequest { taskId: string; containerIp: string; imexHostIp: 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[]; /** * All nvidia-imex IPs in fabric, ordered by cluster rank, * and otherwise absent on non-NVL72 systems */ imexPeerIps: string[]; /** GPU-memory-fabric labels, ordered by cluster rank */ fabricIds: 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; /** For Function containers, this corresponds to the "ready" time, after startup phase */ 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: string; 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; sandboxId: string; } 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; terminationReason: TaskTerminationReason; } 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 TokenCreateResponse { tokenId: string; tokenSecret: string; } declare const TokenCreateResponse: MessageFns$1; interface TokenDeleteRequest { tokenId: string; } declare const TokenDeleteRequest: MessageFns$1; interface TokenDisableRequest { tokenIds: string[]; } declare const TokenDisableRequest: MessageFns$1; interface TokenEnableRequest { tokenIds: string[]; } declare const TokenEnableRequest: MessageFns$1; interface TokenFlowCreateRequest { utmSource: string; localhostPort: number; nextUrl: string; expiresInSeconds: number; } 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 TokensListResponse { tokens: TokensListResponse_Token[]; } declare const TokensListResponse: MessageFns$1; interface TokensListResponse_Token { tokenId: string; createdAt: number; workspaceId: string; userId: string; lastUsedAt: number; memberDisplayname: string; memberId: string; identityProviderType: IdentityProviderType; memberAvatarUrl: string; name: string; expiresAt?: number | undefined; disabled: boolean; } declare const TokensListResponse_Token: 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; /** Used for capturing context about an action performed by a user */ interface UserActionInfo { userId: string; serviceUserId: string; timestamp: number; /** Resolved display name, could be a user or service user. */ requestedBy: string; } declare const UserActionInfo: MessageFns$1; interface UserGroupEnvironmentSetRequest { environmentId: string; userGroupId: string; role: EnvironmentRole; /** Custom role (`rd-`). */ environmentRoleDefinitionId: string; } declare const UserGroupEnvironmentSetRequest: 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; /** * Set by the runtime when committing a volume mounted in a sandbox * sidecar container (used for runtime-driven commit-on-exit). * Unset targets the task's main container. */ containerId?: string | undefined; } 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 VolumeCreateOptions { experimentalOptions: { [key: string]: string; }; } declare const VolumeCreateOptions: 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; /** * The client extends each block body it downloads with zero bytes up to the * block's expected length, so responses may omit trailing zero bytes. */ clientPadsBlocks: boolean; } 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; createOptions?: VolumeCreateOptions | undefined; } 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; subPath?: string | undefined; } 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; /** Earliest checked_at the client received from the existence checks for these files. Telemetry only. */ earliestCheckedAt: Date | undefined; } 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 WebhookToken { tokenId: string; createdAt: number; scoped: boolean; name: string; createdBy: UserIdentity | undefined; } declare const WebhookToken: MessageFns$1; interface WebhookTokenCreateRequest { scoped: boolean; name: string; } declare const WebhookTokenCreateRequest: MessageFns$1; interface WebhookTokenEnvironmentAddRequest { tokenId: string; environmentId: string; } declare const WebhookTokenEnvironmentAddRequest: MessageFns$1; interface WebhookTokenEnvironmentListRequest { tokenId: string; } declare const WebhookTokenEnvironmentListRequest: MessageFns$1; interface WebhookTokenEnvironmentListResponse { environmentIds: string[]; } declare const WebhookTokenEnvironmentListResponse: MessageFns$1; interface WebhookTokenEnvironmentRemoveRequest { tokenId: string; environmentId: string; } declare const WebhookTokenEnvironmentRemoveRequest: MessageFns$1; interface WebhookTokenListForEnvironmentRequest { environmentName: string; } declare const WebhookTokenListForEnvironmentRequest: MessageFns$1; interface WebhookTokenListResponse { tokens: WebhookToken[]; } declare const WebhookTokenListResponse: MessageFns$1; interface WebhookTokenUpdateRequest { tokenId: string; name?: string | undefined; } declare const WebhookTokenUpdateRequest: MessageFns$1; interface WorkspaceBillingRatesRequest { } declare const WorkspaceBillingRatesRequest: MessageFns$1; interface WorkspaceBillingRatesResponse { /** compute rates are per unit per hour, storage rate is per GiB-month */ rates: { [key: string]: string; }; deprecationWarnings: { [key: string]: string; }; deprecationErrors: { [key: string]: string; }; formatted: string; } declare const WorkspaceBillingRatesResponse: MessageFns$1; interface WorkspaceBillingReportItem { objectId: string; description: string; environmentName: string; interval: Date | undefined; cost: string; tags: { [key: string]: string; }; costByResource: { [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[]; environmentIds: string[]; appIds: string[]; } declare const WorkspaceBillingReportRequest: MessageFns$1; interface WorkspaceBillingSummaryRequest { /** all query intervals are implicitly one month long (to line up with billing cycles) */ startTimestamp: Date | undefined; } declare const WorkspaceBillingSummaryRequest: MessageFns$1; interface WorkspaceBillingSummaryResponse { startTimestamp: Date | undefined; endTimestamp: Date | undefined; meteredCost: string; billedCost: string; /** keyed by deployed, ephemeral, volume, notebook, tokens */ meteredCostBreakdown: { [key: string]: string; }; /** keyed by plan, credits, reservations, storage, network egress allowance */ adjustments: { [key: string]: string; }; } declare const WorkspaceBillingSummaryResponse: MessageFns$1; interface WorkspaceDashboardUrlRequest { environmentName: string; } declare const WorkspaceDashboardUrlRequest: MessageFns$1; interface WorkspaceDashboardUrlResponse { url: string; } declare const WorkspaceDashboardUrlResponse: MessageFns$1; interface WorkspaceMembersListItem { memberId: string; memberDisplayname: string; memberRole: MemberRole; joinedAt: number; lastActiveAt: number; deletedAt: number; userId: string; identityProviderType: IdentityProviderType; email: string; avatarUrl: string; idpExternalId: string; } declare const WorkspaceMembersListItem: MessageFns$1; interface WorkspaceMembersListResponse { members: WorkspaceMembersListItem[]; } declare const WorkspaceMembersListResponse: MessageFns$1; interface WorkspaceNameLookupResponse { /** @deprecated */ workspaceName: string; username: string; } declare const WorkspaceNameLookupResponse: MessageFns$1; interface WorkspaceSetDefaultEnvironmentRequest { environmentName: string; } declare const WorkspaceSetDefaultEnvironmentRequest: MessageFns$1; interface WorkspaceSetDefaultEnvironmentSettingsRequest { /** * Omitted = no-op. INHERIT clears the workspace default so environments * with no override have no block. Rejects UNSPECIFIED. */ blockUnauthenticatedResources?: EnvironmentBlockUnauthenticatedResources | undefined; } declare const WorkspaceSetDefaultEnvironmentSettingsRequest: MessageFns$1; interface WorkspaceSetDefaultEnvironmentSettingsResponse { defaultEnvironmentSettings: EnvironmentSettings | undefined; } declare const WorkspaceSetDefaultEnvironmentSettingsResponse: MessageFns$1; interface WorkspaceSetImageBuilderVersionRequest { newImageBuilderVersion: string; } declare const WorkspaceSetImageBuilderVersionRequest: MessageFns$1; interface WorkspaceSetImageBuilderVersionResponse { imageBuilderVersion: string; } declare const WorkspaceSetImageBuilderVersionResponse: MessageFns$1; interface WorkspaceSettingsResponse { defaultEnvironmentName: string; imageBuilderVersion: string; } declare const WorkspaceSettingsResponse: 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 appGetInfo: { readonly name: "AppGetInfo"; 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 appGetTimeRangeStats: { readonly name: "AppGetTimeRangeStats"; 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 appPromote: { readonly name: "AppPromote"; 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$1; 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: {}; }; /** Audit logs */ readonly auditLogCount: { readonly name: "AuditLogCount"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly auditLogList: { readonly name: "AuditLogList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly auditLogPlan: { readonly name: "AuditLogPlan"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly auditLogSettingsGet: { readonly name: "AuditLogSettingsGet"; 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: {}; }; /** CLI guidance */ readonly cliCommandSuggest: { readonly name: "CliCommandSuggest"; 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: {}; }; readonly clusterReservationList: { readonly name: "ClusterReservationList"; 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 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 containerServerLifecycleReady: { readonly name: "ContainerServerLifecycleReady"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; 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: {}; }; /** Curl */ readonly curlGetAuthToken: { readonly name: "CurlGetAuthToken"; 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: {}; }; /** Endpoints */ readonly endpointCreate: { readonly name: "EndpointCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly endpointGetByName: { readonly name: "EndpointGetByName"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly endpointGetInfo: { readonly name: "EndpointGetInfo"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly endpointGetLibrary: { readonly name: "EndpointGetLibrary"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly endpointGetLifecycle: { readonly name: "EndpointGetLifecycle"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly endpointList: { readonly name: "EndpointList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly endpointStop: { readonly name: "EndpointStop"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Environments */ readonly environmentBillingSummary: { readonly name: "EnvironmentBillingSummary"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; 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 environmentGetBudget: { readonly name: "EnvironmentGetBudget"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly environmentGetManaged: { readonly name: "EnvironmentGetManaged"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; 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 environmentGetRoles: { readonly name: "EnvironmentGetRoles"; 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 environmentRoleSet: { readonly name: "EnvironmentRoleSet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly environmentSetBudget: { readonly name: "EnvironmentSetBudget"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly environmentSetDefaultMemberRole: { readonly name: "EnvironmentSetDefaultMemberRole"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly environmentSetManaged: { readonly name: "EnvironmentSetManaged"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; 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 functionBlobGet: { readonly name: "FunctionBlobGet"; 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 functionCallCount: { readonly name: "FunctionCallCount"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionCallFetch: { readonly name: "FunctionCallFetch"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; 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 functionCallGetInfo: { readonly name: "FunctionCallGetInfo"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; 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 functionGetById: { readonly name: "FunctionGetById"; 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: {}; }; readonly functionGetFlashAuthToken: { readonly name: "FunctionGetFlashAuthToken"; 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: {}; }; readonly functionGetMetrics: { readonly name: "FunctionGetMetrics"; 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 functionGetSchedulingParams: { readonly name: "FunctionGetSchedulingParams"; 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 functionGetTimeRangeStats: { readonly name: "FunctionGetTimeRangeStats"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly functionListVariants: { readonly name: "FunctionListVariants"; 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 imageBuildChainGet: { readonly name: "ImageBuildChainGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; 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 imageGetByTag: { readonly name: "ImageGetByTag"; 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: {}; }; readonly imageListTags: { readonly name: "ImageListTags"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly imageNameDelete: { readonly name: "ImageNameDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly imagePublish: { readonly name: "ImagePublish"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly imageTagRevisions: { readonly name: "ImageTagRevisions"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; 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: {}; }; /** Metrics discovery */ readonly metricsGetInfo: { readonly name: "MetricsGetInfo"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Mounts */ readonly mountBatchedCheckExistence: { readonly name: "MountBatchedCheckExistence"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; 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: {}; }; /** Object_ name suggestions */ readonly objectSuggest: { readonly name: "ObjectSuggest"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Persistent sandboxes */ readonly persistentSandboxCreate: { readonly name: "PersistentSandboxCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly persistentSandboxGet: { readonly name: "PersistentSandboxGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly persistentSandboxResume: { readonly name: "PersistentSandboxResume"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly persistentSandboxTerminate: { readonly name: "PersistentSandboxTerminate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly persistentSandboxTunnelsList: { readonly name: "PersistentSandboxTunnelsList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; 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 sandboxContainerCreateV2: { readonly name: "SandboxContainerCreateV2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; 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 sandboxCreateConnectTokenV2: { readonly name: "SandboxCreateConnectTokenV2"; 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 sandboxGetExitSnapshot: { readonly name: "SandboxGetExitSnapshot"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetExitSnapshotV2: { readonly name: "SandboxGetExitSnapshotV2"; 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 sandboxGetFromNameV2: { readonly name: "SandboxGetFromNameV2"; 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: {}; }; /** Statistics over available usage samples; ingestion can lag execution. */ readonly sandboxGetStats: { readonly name: "SandboxGetStats"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxGetStatsV2: { readonly name: "SandboxGetStatsV2"; 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 sandboxGetTimeRangeStats: { readonly name: "SandboxGetTimeRangeStats"; 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 sandboxListV2: { readonly name: "SandboxListV2"; 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 sandboxRestoreV2: { readonly name: "SandboxRestoreV2"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSetName: { readonly name: "SandboxSetName"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSetOutboundPolicy: { readonly name: "SandboxSetOutboundPolicy"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly sandboxSetOutboundPolicyV2: { readonly name: "SandboxSetOutboundPolicyV2"; 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 sandboxTagsGetV2: { readonly name: "SandboxTagsGetV2"; 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 sandboxTagsSetV2: { readonly name: "SandboxTagsSetV2"; 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 secretGetInfo: { readonly name: "SecretGetInfo"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; 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: {}; }; /** Servers */ readonly serverCountRequests: { readonly name: "ServerCountRequests"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly serverGetMetrics: { readonly name: "ServerGetMetrics"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly serverGetTimeRangeStats: { readonly name: "ServerGetTimeRangeStats"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly serverRequestFetch: { readonly name: "ServerRequestFetch"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Service users */ readonly serviceUserCreate: { readonly name: "ServiceUserCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly serviceUserDelete: { readonly name: "ServiceUserDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly serviceUserInfo: { readonly name: "ServiceUserInfo"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly serviceUserList: { readonly name: "ServiceUserList"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$1; 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 tokenDelete: { readonly name: "TokenDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly tokenDisable: { readonly name: "TokenDisable"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly tokenEnable: { readonly name: "TokenEnable"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; 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: {}; }; readonly tokensList: { readonly name: "TokensList"; readonly requestType: MessageFns$2; 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: {}; }; /** User groups */ readonly userGroupEnvironmentSet: { readonly name: "UserGroupEnvironmentSet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; 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: {}; }; /** Webhook tokens (proxy tokens) */ readonly webhookTokenCreate: { readonly name: "WebhookTokenCreate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly webhookTokenDelete: { readonly name: "WebhookTokenDelete"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly webhookTokenEnvironmentAdd: { readonly name: "WebhookTokenEnvironmentAdd"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly webhookTokenEnvironmentList: { readonly name: "WebhookTokenEnvironmentList"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly webhookTokenEnvironmentRemove: { readonly name: "WebhookTokenEnvironmentRemove"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly webhookTokenList: { readonly name: "WebhookTokenList"; readonly requestType: MessageFns$2; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly webhookTokenListForEnvironment: { readonly name: "WebhookTokenListForEnvironment"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly webhookTokenUpdate: { readonly name: "WebhookTokenUpdate"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; /** Workspaces */ readonly workspaceBillingRates: { readonly name: "WorkspaceBillingRates"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly workspaceBillingReport: { readonly name: "WorkspaceBillingReport"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: true; readonly options: {}; }; readonly workspaceBillingSummary: { readonly name: "WorkspaceBillingSummary"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly workspaceDashboardUrlGet: { readonly name: "WorkspaceDashboardUrlGet"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly workspaceMembersList: { readonly name: "WorkspaceMembersList"; readonly requestType: MessageFns$2; 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: {}; }; readonly workspaceSetDefaultEnvironment: { readonly name: "WorkspaceSetDefaultEnvironment"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$2; readonly responseStream: false; readonly options: {}; }; readonly workspaceSetDefaultEnvironmentSettings: { readonly name: "WorkspaceSetDefaultEnvironmentSettings"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly workspaceSetImageBuilderVersion: { readonly name: "WorkspaceSetImageBuilderVersion"; readonly requestType: MessageFns$1; readonly requestStream: false; readonly responseType: MessageFns$1; readonly responseStream: false; readonly options: {}; }; readonly workspaceSettings: { readonly name: "WorkspaceSettings"; 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. * * The returned Secret is lazy: no server-side Secret is created (and * {@link Secret#secretId secretId} stays empty) until it is first used. When * used with {@link Sandbox#exec Sandbox.exec()} or * {@link SandboxService#experimentalCreate client.sandboxes.experimentalCreate()}, * the values are sent directly to the worker as environment variables, * avoiding a `SecretGetOrCreate` round-trip entirely. */ 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; } /** * Resolves a lazy {@link Secret} to a server-side secretId. Each construction * path (fromName, fromObject, ...) supplies its own implementation carrying * whatever inputs that path needs. * * @internal * @hidden */ interface SecretHydrator { hydrate(client: ModalClient): Promise; } /** Secrets provide a dictionary of environment variables for {@link Image}s. */ declare class Secret { #private; readonly name?: string; /** @ignore */ constructor(secretId: string, name?: string, hydrator?: SecretHydrator); /** The ID of the server-side Secret, or an empty string if not yet hydrated. */ get secretId(): string; /** * The hydrator resolving a lazy Secret to a secretId, or `undefined` for * Secrets that already reference a server-side Secret (e.g. from fromName). * * @internal * @hidden */ get _hydrator(): SecretHydrator | undefined; /** * Lazily create the ephemeral server-side Secret backing a fromObject Secret * and populate {@link Secret#secretId secretId}. A no-op once secretId is set * (e.g. for Secrets returned by fromName). * * @internal * @hidden */ _hydrate(client: ModalClient): 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; /** @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; } type LogSource = "system" | "stdout" | "stderr"; interface LogEntry { readonly message: string; readonly source: LogSource; readonly timestamp: Date; readonly objectId: string; readonly contextIds: string[]; } interface FunctionLogFetchParams { /** Start of the UTC time range. */ since: Date; /** End of the UTC time range. Defaults to the current time. */ until?: Date; /** Filter by source: `stdout`, `stderr`, or `system`. */ source?: LogSource; /** Filter by text contained in the log message. */ searchText?: string; } interface FunctionLogTailParams { /** Number of log entries to return. Defaults to 100. */ entries?: number; /** Filter by source: `stdout`, `stderr`, or `system`. */ source?: LogSource; } interface FunctionCallLogTailParams { /** Number of log entries to return. Defaults to 100. */ entries?: number; /** Filter by source: `stdout`, `stderr`, or `system`. */ source?: LogSource; } type LogTailParams = FunctionCallLogTailParams | FunctionLogTailParams; interface FunctionLogStreamParams { /** * Number of milliseconds to wait between log entries before ending the * stream. By default, the stream blocks until it is interrupted. */ timeoutMs?: number; } interface FunctionCallLogStreamParams { /** * Number of milliseconds to wait between log entries before ending the * stream. By default, the stream blocks until it is interrupted. */ timeoutMs?: number; } type LogStreamParams = FunctionCallLogStreamParams | FunctionLogStreamParams; interface FunctionCallLogFetchParams { /** * Start of the UTC time range. Defaults to the start of the FunctionCall. */ since?: Date; /** End of the UTC time range. Defaults to the current time. */ until?: Date; /** Filter by source: `stdout`, `stderr`, or `system`. */ source?: LogSource; /** Filter by text contained in the log message. */ searchText?: string; } type SandboxLogFetchParams = FunctionLogFetchParams; type SandboxLogTailParams = FunctionLogTailParams; interface FunctionLogs { fetch(params: FunctionLogFetchParams): AsyncIterable; tail(params?: FunctionLogTailParams): AsyncIterable; stream(params?: FunctionLogStreamParams): AsyncIterable; } interface FunctionCallLogs extends Omit { fetch(params?: FunctionCallLogFetchParams): AsyncIterable; tail(params?: FunctionCallLogTailParams): AsyncIterable; stream(params?: FunctionCallLogStreamParams): AsyncIterable; } interface SandboxLogs { fetch(params: SandboxLogFetchParams): AsyncIterable; tail(params?: SandboxLogTailParams): AsyncIterable; } interface LogQueryParams { client: ModalClient; objectId: string; appId: string; functionId: string; functionCallId: string; } declare class LogsManager { protected readonly params: LogQueryParams; constructor(params: LogQueryParams); fetch(params: FunctionLogFetchParams): AsyncIterable; tail(params?: LogTailParams): AsyncIterable; stream(params?: LogStreamParams): AsyncIterable; } /** Namespace for Function log APIs. */ declare class FunctionLogsManager extends LogsManager implements FunctionLogs { /** @ignore */ constructor(client: ModalClient, objectId: string, appId: string); /** * Fetch Function logs corresponding to a UTC time range and optional * filters. * * Entries are returned in chronological order. * * @returns An async iterable of {@link LogEntry} objects. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const function_ = await modal.functions.fromName("my-app", "train"); * * for await (const entry of function_.logs.fetch({ * since: new Date(Date.now() - 4 * 60 * 60 * 1_000), * source: "stdout", * })) { * process.stdout.write(entry.message); * } * ``` */ fetch(params: FunctionLogFetchParams): AsyncIterable; /** * Fetch the most recent Function logs. * * Entries are returned in chronological order. * * @returns An async iterable of {@link LogEntry} objects. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const function_ = await modal.functions.fromName("my-app", "train"); * * for await (const entry of function_.logs.tail({ entries: 20 })) { * process.stdout.write(entry.message); * } * ``` */ tail(params?: FunctionLogTailParams): AsyncIterable; /** * Stream new Function logs until the timeout is reached. * * @returns An async iterable of {@link LogEntry} objects as they arrive. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const function_ = await modal.functions.fromName("my-app", "train"); * * for await (const entry of function_.logs.stream({ timeoutMs: 60_000 })) { * process.stdout.write(entry.message); * } * ``` */ stream(params?: FunctionLogStreamParams): AsyncIterable; } /** Namespace for FunctionCall log APIs. */ declare class FunctionCallLogsManager extends LogsManager implements FunctionCallLogs { constructor(client: ModalClient, objectId: string, appId: string, functionId: string); /** * Fetch logs associated with this FunctionCall corresponding to a UTC time * range and optional filters. * * When `since` is omitted, logs are fetched from the start of the * FunctionCall. Entries are returned in chronological order. * * @returns An async iterable of {@link LogEntry} objects. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const function_ = await modal.functions.fromName("my-app", "train"); * const call = await function_.spawn([]); * * for await (const entry of call.logs.fetch()) { * console.log(entry.timestamp, entry.message); * } * ``` */ fetch(params?: FunctionCallLogFetchParams): AsyncIterable; /** * Fetch the most recent FunctionCall logs. * * Entries are returned in chronological order. * * @returns An async iterable of {@link LogEntry} objects. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const function_ = await modal.functions.fromName("my-app", "train"); * const call = await function_.spawn([]); * * for await (const entry of call.logs.tail({ entries: 10 })) { * console.log(entry.timestamp, entry.message); * } * ``` */ tail(params?: FunctionCallLogTailParams): AsyncIterable; /** * Stream new FunctionCall logs until the timeout is reached or the * FunctionCall is observed to have completed. * * The completion check is best-effort. If completion cannot be determined, * the stream continues until the timeout is reached. * * @returns An async iterable of {@link LogEntry} objects as they arrive. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const function_ = await modal.functions.fromName("my-app", "train"); * const call = await function_.spawn([]); * * for await (const entry of call.logs.stream()) { * process.stdout.write(entry.message); * } * ``` */ stream(params?: FunctionCallLogStreamParams): AsyncIterable; } /** Namespace for Sandbox entrypoint log APIs. */ declare class SandboxLogsManager implements SandboxLogs { private readonly client; private readonly sandboxId; private readonly getAppId; private readonly getTaskId; /** @ignore */ constructor(client: ModalClient, sandboxId: string, getAppId: () => Promise, getTaskId: () => Promise); /** * Fetch Sandbox entrypoint logs corresponding to a UTC time range and * optional filters. * * Entries are returned in chronological order. * * @returns An async iterable of {@link LogEntry} objects. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const sandbox = await modal.sandboxes.fromId("sb-..."); * * for await (const entry of sandbox.logs.fetch({ * since: new Date(Date.now() - 60 * 60 * 1_000), * source: "stdout", * })) { * process.stdout.write(entry.message); * } * ``` */ fetch(params: SandboxLogFetchParams): AsyncIterable; /** * Fetch the most recent Sandbox entrypoint logs. * * Entries are returned in chronological order. * * @returns An async iterable of {@link LogEntry} objects. * * @example * ```typescript * import { ModalClient } from "modal"; * * const modal = new ModalClient(); * const sandbox = await modal.sandboxes.fromId("sb-..."); * * for await (const entry of sandbox.logs.tail({ entries: 20 })) { * process.stdout.write(entry.message); * } * ``` */ tail(params?: SandboxLogTailParams): AsyncIterable; } /** * 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, functionCallId: string, appId: string, functionId: string); /** * Get the result of a FunctionCall, optionally waiting with a timeout. * * @throws {@link TimeoutError} if `timeoutMs` elapses before the Function finishes. * @throws {@link FunctionTimeoutError} if the Function exceeds its execution timeout. */ get(params?: FunctionCallGetParams): Promise; /** Cancel a running FunctionCall. */ cancel(params?: FunctionCallCancelParams): Promise; /** * Access logs for this FunctionCall. * * Use {@link FunctionCallLogsManager#fetch fetch()} to read logs from a UTC * time range, {@link FunctionCallLogsManager#tail tail()} to read the most * recent logs, and {@link FunctionCallLogsManager#stream stream()} to follow * new logs as they arrive. * * See also: [`modal app logs`](https://modal.com/docs/cli/latest/app#modal-app-logs) * for CLI access to logs for an App. */ get logs(): FunctionCallLogsManager; } /** An observation at a UTC-aligned bucket start. */ interface TimeSeriesPoint { time: Date; /** Missing observations are null; observed zeroes remain zero. */ value: number | null; } /** An individual metric series with points ordered by time. */ interface MetricSeries { name: string; unit: string; aggregation: string; description: string; points: TimeSeriesPoint[]; } /** The name, unit, and meaning of an exportable series. */ interface MetricDefinition { name: string; unit: string; description: string; } /** A metrics group and its individual series definitions. */ interface MetricsSchema { name: string; definitions: MetricDefinition[]; } /** Exported metrics over the effective, UTC-aligned [since, until) range. */ interface ObjectMetrics { objectId: string; since: Date; until: Date; bucketSizeSecs: number; /** Total points across series, including missing observations. */ pointCount: number; series: Record; } /** Options for discovering metric definitions. */ interface MetricsSchemaParams { /** Omit or pass an empty array to select all groups. */ groups?: string[]; } /** Options for exporting Function metric samples. */ interface FunctionMetricsExportParams extends MetricsSchemaParams { /** Defaults to one hour before until. */ since?: Date; /** Defaults to the current time. */ until?: Date; /** Bucket width in whole seconds. */ bucketSizeSecs?: number; /** Include the root Function and all its variants. Defaults to false. */ allVariants?: boolean; } /** Namespace for Function metric samples and definitions. */ declare class FunctionMetricsManager { #private; /** @hidden */ constructor(client: ModalClient, functionId: string); /** * Fetch metric samples, defaulting to all groups over the last hour. * * The maximum range is 31 days, with at most 500 points per series. Omit * bucketSizeSecs to let Modal select a supported width targeting approximately * 100 buckets. Bounds round down to UTC bucket boundaries: data before since * may be included, and the partial bucket at until is excluded. * Missing observations have value null. Use schema() to discover definitions. * * @example * ```typescript * const metrics = await fn.metrics.export({ * bucketSizeSecs: 5 * 60, * groups: ["calls"], * }); * for (const point of metrics.series["successful_calls_count"].points) { * console.log(point.time, point.value); * } * ``` */ export(params?: FunctionMetricsExportParams): Promise; /** * Return metric definitions keyed by group name, without fetching samples. * Omit groups to return all groups. Each group's definitions include all its * individual series. */ schema(params?: MetricsSchemaParams): Promise>; } 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; /** Experimental VolumeFS version; omit to accept either version. */ version?: 1 | 2; }; /** 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; } /** * Resolved mount configuration stored on a Volume. `subPath: undefined` means "mount the * whole volume" (no sub-path set on the resulting VolumeMount proto). */ type ResolvedMountOptions = { readOnly: boolean; subPath: string | undefined; }; /** Volumes provide persistent storage that can be mounted in Modal {@link Function_ Function}s. */ declare class Volume { #private; readonly volumeId: string; readonly name?: string; /** * @hidden * @internal */ readonly _mountOptions: ResolvedMountOptions; /** @ignore */ constructor(volumeId: string, name?: string, mountOptions?: ResolvedMountOptions, ephemeralHbManager?: EphemeralHeartbeatManager); /** * Configure options used when mounting this Volume. Fields left undefined preserve their value * from any previous withMountOptions call on the same Volume (stacking). */ withMountOptions(params?: VolumeMountOptionsParams): Volume; /** Delete the ephemeral Volume. Only usable with emphemeral Volumes. */ closeEphemeral(): void; } /** Options for mounting a {@link Volume}. */ type VolumeMountOptionsParams = { readOnly?: boolean; subPath?: string; }; /** 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; }); } /** Optional parameters for `client.functions.fromName()`. */ type FunctionFromNameParams = { environment?: string; /** Look up a version-pinned Function deployed at this App version. */ version?: number; }; /** * 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 ID. * * ```typescript * const client = new ModalClient(); * const fn = await client.functions.fromId("fu-***"); * console.log(await fn.getWebUrl()); * ``` */ fromId(functionId: string): Promise; /** * 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 FunctionCurrentStats { backlog: number; numTotalRunners: number; } interface StatsPercentile { percentile: number; value: number; } interface StatsPercentileDistribution { unit: string; percentiles: StatsPercentile[]; } interface FunctionStats { since: Date; until: Date; inputSuccessCount: number; inputFailureCount: number; inputTimeoutCount: number; inputRunningAtEndCount: number; containerStartedCount: number; containerErrorCount: number; containerCreatingAtEndCount: number; variantCount: number; inputPercentileStats: Record; containerPercentileStats: Record; allVariants: boolean; } interface FunctionStatsParams { /** Inclusive start; defaults to one hour before until. */ since?: Date; /** Exclusive end; defaults to the current time. */ until?: Date; /** Restrict statistics to this container ID. */ container?: string; /** Aggregate the base Function and its variants. Defaults to false. */ allVariants?: boolean; } interface FunctionInfoParams { refresh?: boolean; } type FunctionInfo = { cpu?: number | [number, number]; memoryMiB?: number | [number, number]; gpus: { gpuType: string; count: number; }[]; ephemeralDiskMiB?: number; imageId: string; startupTimeoutSecs?: number; timeoutSecs: number; maxRetries?: number; nonpreemptible: boolean; regions?: string[]; routingRegion?: string; cloud?: string; clusterInfo?: { size: number; rdma: boolean; fabricSize?: number; }; batchingInfo?: { maxBatchSize: number; waitMs: number; }; concurrencyInfo?: { maxInputs?: number; targetInputs?: number; }; schedule?: string; restrictModalAccess: boolean; blockNetwork: boolean; singleUseContainers: boolean; volumes: Map; cloudBucketMounts: Map; secretIds: string[]; webInfo?: { webUrl: string; method?: string; unauthenticated: boolean; }; methodNames?: string[]; methodDetails?: Map; }; /** Optional parameters for {@link Function_#updateAutoscaler Function_.updateAutoscaler()}. */ interface FunctionUpdateAutoscalerParams { minContainers?: number; maxContainers?: number; bufferContainers?: number; scaledownWindowMs?: number; } type FunctionAutoscalerSettings = { minContainers?: number; maxContainers?: number; bufferContainers?: number; scaledownWindowMs?: number; }; /** Configuration options for {@link Function_#withOptions Function_.withOptions()}. */ type FunctionWithOptionsParams = { 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; routingRegion?: string; }; /** Configuration options for {@link Function_#withConcurrency Function_.withConcurrency()}. */ type FunctionWithConcurrencyParams = { maxInputs: number; targetInputs?: number; }; /** Configuration options for {@link Function_#withBatching Function_.withBatching()}. */ type FunctionWithBatchingParams = { maxBatchSize: number; waitMs: number; }; /** Internal data structure holding configuration options for {@link Function_ Function}. */ type FunctionOptions = FunctionWithOptionsParams & { maxConcurrentInputs?: number; targetConcurrentInputs?: number; batchMaxSize?: number; batchWaitMs?: 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, options?: FunctionOptions, cachedFunctionData?: FunctionData); /** * Access logs for this Function. * * Use {@link FunctionLogsManager#fetch fetch()} to read logs from a UTC time * range, {@link FunctionLogsManager#tail tail()} to read the most recent * logs, and {@link FunctionLogsManager#stream stream()} to follow new logs as * they arrive. * * See also: [`modal app logs`](https://modal.com/docs/cli/latest/app#modal-app-logs) * for CLI access to logs for an App. */ get logs(): FunctionLogsManager; /** Access metric samples with export() and series definitions with schema(). */ get metrics(): FunctionMetricsManager; /** Override the static Function configuration at runtime. */ withOptions(options: FunctionWithOptionsParams): Function_; /** Override the static Function concurrency configuration at runtime. */ withConcurrency(params: FunctionWithConcurrencyParams): Function_; /** Override the static Function batching configuration at runtime. */ withBatching(params: FunctionWithBatchingParams): Function_; /** Create an instance of the Function with configuration specified by * {@link Function_#withOptions withOptions}, {@link Function_#withConcurrency withConcurrency}, * and/or {@link Function_#withBatching withBatching}. */ instance(): Promise; remote(args?: any[], kwargs?: Record): Promise; spawn(args?: any[], kwargs?: Record): Promise; /** * Return historical statistics. Defaults to the last hour; the maximum range is 7 days. * * @example Read statistics for the last hour. * ```ts * const fn = await modal.functions.fromName("libmodal-test-support", "echo_string"); * const stats = await fn.stats(); * console.log(stats.inputSuccessCount, stats.inputFailureCount); * ``` * * @example Include all variants over the last 24 hours. * ```ts * const until = new Date(); * const since = new Date(until.getTime() - 24 * 60 * 60 * 1000); * const variantStats = await fn.stats({ since, until, allVariants: true }); * for (const [metric, distribution] of Object.entries(variantStats.inputPercentileStats)) { * console.log(metric, distribution.unit, distribution.percentiles); * } * ``` * * Set `container` to a container ID to restrict statistics to that container. */ stats(params?: FunctionStatsParams): Promise; getCurrentStats(): Promise; info(params?: FunctionInfoParams): Promise; updateAutoscaler(params: FunctionUpdateAutoscalerParams): Promise; /** * URL for addressing the Web Function via HTTP. * @returns The web URL, or undefined if this is not a Web Function */ getWebUrl(): Promise; } /** Optional parameters for {@link ClsService#fromName client.cls.fromName()}. */ type ClsFromNameParams = { environment?: string; /** Look up a version-pinned Cls deployed at this App version. */ version?: number; }; /** * 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 = FunctionWithOptionsParams; type ClsWithConcurrencyParams = FunctionWithConcurrencyParams; type ClsWithBatchingParams = FunctionWithBatchingParams; /** Represents a deployed Modal Cls. */ declare class Cls { #private; /** @ignore */ constructor(client: ModalClient, serviceFunctionId: string, serviceFunctionMetadata: FunctionHandleMetadata, options?: FunctionOptions); /** 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_; } /** Optional parameters for {@link ImageService#fromName client.images.fromName()}. */ type ImageFromNameParams = { /** Modal Environment to resolve the named Image in. */ environment?: string; }; /** * A closure that hydrates the registry-auth {@link Secret} (if any) and builds * the {@link ImageRegistryConfig} for the base build layer. It runs at build * time rather than when the Image is constructed, since the Secret may be lazy * (created via {@link SecretService#fromObject}). */ type BuildRegistryConfig = (client: ModalClient) => Promise; /** * 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; /** * Reference a named {@link Image} that was previously published. * * @param name - Name of the published Image, optionally including a tag as `name:tag`. * If no tag is included, `:latest` is used. * @param params - Optional environment. */ fromName(name: string, params?: ImageFromNameParams): 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#publish Image.publish()}. */ type ImagePublishParams = { /** Modal Environment to publish the named Image in. */ environment?: string; }; /** 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, buildRegistryConfig?: BuildRegistryConfig, layers?: Layer[], baseImageId?: string); get imageId(): string; 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; /** * Publish this built Image under a stable name and tag. * * @param name - Name to publish the Image under, optionally including a tag as `name:tag`. * If no tag is included, `:latest` is used. * @param params - Optional environment. */ publish(name: string, params?: ImagePublishParams): 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); } /** 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); /** Delete the ephemeral Queue. Only usable with ephemeral Queues. */ closeEphemeral(): void; /** * 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 } interface SandboxStdinWriteV2Response { } declare const SandboxStdinWriteV2Response: MessageFns; interface SandboxStdioReadV2Response { data: Uint8Array; startingOffset: number; } declare const SandboxStdioReadV2Response: MessageFns; interface SandboxWaitUntilReadyTcrResponse { readyAt: number; } declare const SandboxWaitUntilReadyTcrResponse: MessageFns; interface TaskContainerCreateRequest { taskId: string; /** Logical container name. */ containerName: string; imageId: string; args: string[]; env: { [key: string]: string; }; workdir: string; /** Secret IDs to inject into the container as environment variables. */ secretIds: string[]; /** Volumes to mount into the container. */ volumeMounts: VolumeMount[]; /** * Outbound network policy for the sidecar, independent of the main * container. When unset, defaults to open network access. BLOCKED is not * accepted: a blocked sidecar has no IP and cannot reach the main container. */ networkAccess?: NetworkAccess | undefined; /** Optional PTY info for sidecar. */ ptyInfo?: PTYInfo | undefined; /** * Memory, in MiB, the sidecar consumes from the sandbox's sidecar memory * reserve (experimental option vm_sidecar_memory_reserve_mib); unset * consumes whatever is left of it. Ignored without a reserve. */ memoryReserveConsumeMib?: number | undefined; /** Applied in order. Cannot be combined with secret_ids or env. */ secretSources: SecretSource[]; } declare const TaskContainerCreateRequest: MessageFns; interface TaskContainerCreateResponse { /** Fully qualified container ID (for example, ctr-). */ containerId: string; /** Logical container name associated with this container. */ containerName: string; } declare const TaskContainerCreateResponse: MessageFns; interface TaskContainerGetRequest { taskId: string; containerName: string; /** Include the latest terminated container if the name is no longer active. */ includeTerminated: boolean; } declare const TaskContainerGetRequest: MessageFns; interface TaskContainerGetResponse { container: TaskContainerInfo | undefined; } declare const TaskContainerGetResponse: MessageFns; interface TaskContainerInfo { containerId: string; containerName: string; status: string; result: GenericResult | undefined; } declare const TaskContainerInfo: MessageFns; interface TaskContainerListRequest { taskId: string; /** Include all tracked terminated containers in addition to active ones. */ includeTerminated: boolean; } declare const TaskContainerListRequest: MessageFns; interface TaskContainerListResponse { containers: TaskContainerInfo[]; } declare const TaskContainerListResponse: MessageFns; interface TaskContainerTerminateRequest { taskId: string; containerId: string; } declare const TaskContainerTerminateRequest: MessageFns; interface TaskContainerWaitRequest { taskId: string; containerId: string; timeout: number; } declare const TaskContainerWaitRequest: MessageFns; interface TaskContainerWaitResponse { result: GenericResult | undefined; } declare const TaskContainerWaitResponse: MessageFns; /** * 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; }; /** Applied in order. Cannot be combined with secret_ids or env. */ secretSources: SecretSource[]; } declare const TaskExecStartRequest: MessageFns; interface TaskExecStartResponse { } declare const TaskExecStartResponse: MessageFns; interface TaskExecStdinStatusResponse { /** * Number of bytes the server has accepted for this exec so far. * A streaming client that lost its connection should resume sending at this * offset. */ numBytesWritten: number; /** True if stdin has already been closed (EOF sent) for this exec. */ closed: boolean; } declare const TaskExecStdinStatusResponse: 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; /** * Customer-supplied encryption key used to decrypt CSEK-encrypted image metadata keys. * This key is not persisted by Modal. */ customerSuppliedEncryptionKey?: Uint8Array | undefined; /** Fully qualified target container ID. Empty targets the main container. */ containerId: string; } declare const TaskMountDirectoryRequest: MessageFns; interface TaskReloadVolumesRequest { taskId: string; /** Fully qualified target container ID. Empty targets the main container. */ containerId: string; } declare const TaskReloadVolumesRequest: MessageFns; interface TaskSetExperimentalOutboundPolicyRequest { taskId: string; /** Replaces the task's experimental outbound policy. */ experimentalOutboundPolicy: ExperimentalOutboundPolicy$1 | undefined; } declare const TaskSetExperimentalOutboundPolicyRequest: MessageFns; interface TaskSetNetworkAccessRequest { taskId: string; /** * Replaces the task's network access policy. Only ALLOWLIST is currently * supported; open access is expressed as an allow-all allowlist. */ networkAccess: NetworkAccess | undefined; } declare const TaskSetNetworkAccessRequest: MessageFns; interface TaskSnapshotDirectoryRequest { taskId: string; path: Uint8Array; /** A unique ID to ensure idempotency of directory snapshot requests. */ snapshotId: string; /** * Lifetime for the resulting image, in seconds. When set, the * image's expires_at is a hard cutoff: it is fixed at creation time * and is not extended on use. * * When unset, the resulting image gets the legacy retention policy: * a 30-day TTL that is bumped forward by 30 days on every use, so * active images effectively never expire. * * Sentinel: -1 means "no expiry" (the image never expires). * 0 and other negative values are invalid and rejected by the * server. */ ttlSeconds?: number | undefined; /** * Customer-supplied encryption key used to encrypt the resulting image's data and tree * metadata keys. This key is not persisted by Modal. */ customerSuppliedEncryptionKey?: Uint8Array | undefined; /** Fully qualified target container ID. Empty targets the main container. */ containerId: string; } declare const TaskSnapshotDirectoryRequest: MessageFns; interface TaskSnapshotDirectoryResponse { imageId: string; } declare const TaskSnapshotDirectoryResponse: MessageFns; interface TaskSnapshotFilesystemRequest { taskId: string; /** A unique ID to ensure idempotency of filesystem snapshot requests. */ snapshotId: string; /** * Lifetime for the resulting image, in seconds. Must be set. When positive, * the image expiry is a hard cutoff: it is fixed at creation time and is * not extended on use. * * Sentinel: -1 means "no expiry" (the image never expires). * 0 and other negative values are invalid and rejected by the * server. */ ttlSeconds?: number | undefined; /** * Customer-supplied encryption key used to encrypt the resulting image's data and tree * metadata keys. This key is not persisted by Modal. */ customerSuppliedEncryptionKey?: Uint8Array | undefined; /** Fully qualified target container ID. Empty targets the main container. */ containerId: string; } declare const TaskSnapshotFilesystemRequest: MessageFns; interface TaskSnapshotFilesystemResponse { imageId: string; } declare const TaskSnapshotFilesystemResponse: MessageFns; interface TaskSnapshotMemoryRequest { taskId: string; idempotencyKey: string; } declare const TaskSnapshotMemoryRequest: MessageFns; interface TaskSnapshotMemoryResponse { snapshotId: string; } declare const TaskSnapshotMemoryResponse: MessageFns; interface TaskUnmountDirectoryRequest { taskId: string; path: Uint8Array; /** Fully qualified target container ID. Empty targets the main container. */ containerId: string; } declare const TaskUnmountDirectoryRequest: 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; oauthRefreshToken?: string; oauthClientId?: string; oauthClientSecret?: string; oauthJwtKey?: string; environment?: string; imageBuilderVersion?: string; logLevel?: string; /** Parsed from MODAL_MAX_THROTTLE_WAIT. null means unlimited. */ maxThrottleWaitSecs?: number; /** * How long a Sandbox connection may sit idle before the client gives it up. * The Sandbox stays usable: the next operation reconnects. Zero keeps * connections open until the client closes. */ sandboxChannelIdleTimeoutMs: number; /** * Set by the MODAL_SANDBOX_V2 environment variable or the sandbox_v2 * profile key in .modal.toml. Defaults to true when neither is set. */ sandboxV2: boolean; } /** * @internal * @hidden */ type CommandRouterAccess = { url: string; jwt: string; }; /** * Seekable byte source for streaming stdin uploads. * * @internal * @hidden */ interface StdinSource { /** * Return a fresh iterable over the source's bytes starting at `offset`, * so an upload can resume mid-stream after a transient failure. */ readFrom(offset: number): AsyncIterable; } /** @ignore */ declare class TaskCommandRouterClientImpl { private stub; /** * The connection, absent while it is released. It is dialled again by the * next operation, so nothing may hold `stub` across one. */ private channel; private dial; private factory; /** * How many operations are using the connection. A count rather than a flag * because operations overlap: only the last one out starts the idle clock. */ private inFlight; private idle; private maxThrottleWaitSecs; /** * Bumped every time a connection is dialled. A stream opened on an earlier * one is stale: the connection under it has since been given up. */ private generation; /** * Streams open right now, tracked so they can be ended on release. * * grpc-js does not cancel a call in flight when its channel is closed, and a * subchannel with a live call on it is never collected - so closing alone * leaves the socket up. Aborting the calls first is what actually frees it. */ private liveStreams; /** * How long the client may go unused before its connection is given up. Zero * keeps it up until the client is closed. Overridable in tests. */ idleTimeoutMs: number; private serverClient; private taskId; private sandboxId; private isV2; private serverUrl; private jwt; private jwtExp; private jwtRefreshLock; private logger; private closed; private draining; /** * `access` is the router access returned by SandboxCreateV2, which lets a * freshly created sandbox connect without a round-trip. Pass undefined to look * it up — a re-attached sandbox, or the server could not mint a token. */ static tryInit(serverClient: ModalGrpcClient, taskId: string, sandboxId: string, isV2: boolean, access: CommandRouterAccess | undefined, logger: Logger, profile: Profile): Promise; /** * Builds a client around an already-resolved connection. Public so a test can * construct one without the control-plane round trip `tryInit` makes; the * class is not exported from the package, so this is not API surface. */ constructor(serverClient: ModalGrpcClient, taskId: string, sandboxId: string, isV2: boolean, serverUrl: string, jwt: string, dial: () => ReturnType, logger: Logger, idleTimeoutMs: number, maxThrottleWaitSecs?: number); /** * Says the client is about to be used: holds off the idle timer, and dials * again if the connection was already given up. Returns the generation being * used; pair every call with endOp. */ private beginOp; /** Says the caller is done. The last one out starts the clock. */ private endOp; /** * Starts the countdown to giving the connection back. Call it with nothing * in flight. */ private armIdleTimer; /** Refuse new operations and release resources after current operations finish. */ closeWhenIdle(): void; close(): void; private callWithRetries; /** Run a unary RPC against the command router with the default retry policy. */ private callUnary; execStart(request: TaskExecStartRequest): Promise; containerCreate(request: TaskContainerCreateRequest): Promise; containerGet(request: TaskContainerGetRequest): Promise; containerList(request: TaskContainerListRequest): Promise; containerTerminate(request: TaskContainerTerminateRequest): Promise; containerWait(request: TaskContainerWaitRequest): Promise; execStdioRead(taskId: string, execId: string, fileDescriptor: FileDescriptor, deadline?: number | null, signal?: AbortSignal): AsyncGenerator; execStdinWrite(taskId: string, execId: string, offset: number, data: Uint8Array, eof: boolean): Promise; /** * Read the current stdin write status for an exec'd command. * * Used by streaming clients to find the resume offset after a stream * failure. Evicts any in-flight stdin stream for the exec. */ execStdinStatus(taskId: string, execId: string): Promise; /** * Stream `source` into the exec's stdin, with bounded resume on transient * failures. * * Streams the full contents of `source` in one client-streaming RPC and * closes stdin (EOF) on success. On a resumable error, queries * `execStdinStatus` for the server's offset and reopens the * stream from that point. Returns the total bytes streamed. */ execStdinWriteStream(taskId: string, execId: string, source: StdinSource, chunkSize?: number, maxResumeAttempts?: number): Promise; execPoll(taskId: string, execId: string, deadline?: number | null): Promise; execWait(taskId: string, execId: string, deadline?: number | null, signal?: AbortSignal): Promise; mountDirectory(request: TaskMountDirectoryRequest): Promise; snapshotDirectory(request: TaskSnapshotDirectoryRequest, options?: TimeoutOptions): Promise; snapshotFilesystem(request: TaskSnapshotFilesystemRequest, options?: TimeoutOptions): Promise; snapshotMemory(request: TaskSnapshotMemoryRequest, options?: TimeoutOptions): Promise; unmountDirectory(request: TaskUnmountDirectoryRequest): Promise; setNetworkAccess(request: TaskSetNetworkAccessRequest): Promise; setOutboundPolicy(request: TaskSetExperimentalOutboundPolicyRequest): Promise; /** * Reload all Volumes mounted in the task to reflect their latest committed state. * * `timeoutMs` is the client-side deadline. If the reload does not complete * within this window, the call is cancelled and a TimeoutError is thrown. */ reloadVolumes(request: TaskReloadVolumesRequest, options?: TimeoutOptions): Promise; sandboxStdioReadV2(taskId: string, fileDescriptor: FileDescriptor, signal?: AbortSignal): AsyncGenerator; sandboxStdinWriteV2(taskId: string, offset: number, data: Uint8Array, eof: boolean): Promise; sandboxWaitUntilReady(taskId: string, timeoutMs: number): Promise; private refreshJwt; /** The caller holds an operation lease across authentication and all retries. */ private callWithAuthRetry; /** * Yields the next chunk of stdio, opening or reopening the stream as it needs * to, and determining whether or not to retry a failed open or read. It waits * out the backoff itself. */ private streamStdioWithRetries; private streamExecStdio; private streamSandboxStdio; } /** * Immutable configuration for replacing headers in outbound HTTPS traffic. */ /** @internal */ type HeaderReplacement = { domain: string; headers: Record; secret?: Secret; }; /** * Immutable configuration for replacing headers in outbound HTTPS requests * from a Sandbox. * * EXPERIMENTAL: the API is subject to change. * * Header values support templating with keys in a replacement's secret: a * `$`-prefixed key name in the secret is replaced with the secret value. * Literal `$` characters are written `$$`. * * Secret values never enter the Sandbox: they are resolved and injected into * matching requests outside the container. * * ```ts * const secret = await modal.secrets.fromName("api-token"); * * const outboundPolicy = new modal.ExperimentalOutboundPolicy() * // Inject a secret-backed Authorization header. * .withHeaderReplacement({ * domain: "example.com", * secret, * headers: { Authorization: "Bearer $API_TOKEN" }, * }) * // Inject a static header into requests to another domain. * .withHeaderReplacement({ * domain: "modal.com", * headers: { "X-Trace-Token": "trace_abcd" }, * }); * * const sb = await modal.sandboxes.create(app, image, { * experimentalOutboundPolicy: outboundPolicy, * }); * ``` */ declare class ExperimentalOutboundPolicy { /** @internal */ readonly _replacements: readonly HeaderReplacement[]; /** @internal */ constructor(_replacements?: readonly HeaderReplacement[]); /** * Return a new {@link ExperimentalOutboundPolicy} with an added header replacement. * * @param params.domain Domain the replacements are scoped to. Supports `*.` wildcard * prefixes (matching the apex domain and subdomains) and a bare `"*"`. * @param params.headers Header name -> header value. Values support `$KEY` templates * referencing keys in the replacement's `secret`. * @param params.secret Named {@link Secret} (e.g. from `client.secrets.fromName`) whose * keys may be referenced in the header value templates. Static replacements pass no secret. */ withHeaderReplacement(params: { domain: string; headers: Record; secret?: Secret; }): ExperimentalOutboundPolicy; /** Check all replacements, throwing `InvalidError` on the first violation found. * @internal */ _validate(): void; /** Deduplicated list of secrets referenced by the policy's replacements. * @internal */ _secrets(): Secret[]; /** Convert to the wire format. Referenced secrets must be hydrated first. * @internal */ _toProto(): ExperimentalOutboundPolicy$1; } /** Type of a filesystem entry. */ type FileType = "file" | "directory" | "symlink"; /** Metadata for a file or directory entry in a Sandbox. */ interface FileInfo { readonly name: string; readonly path: string; readonly type: FileType; readonly size: number; readonly mode: number; readonly permissions: string; readonly owner: string; readonly group: string; /** Unix epoch seconds. */ readonly modifiedTime: number; readonly symlinkTarget: string | null; } /** Type of a filesystem watch event. */ type FileWatchEventType = "Access" | "Create" | "Modify" | "Remove" | "Unknown"; /** A filesystem change event. * * `paths` contains the absolute path(s) affected by the event. For most event * types it holds a single entry. Rename operations are reported as `Modify` * events: when both the source and destination fall within the watched scope, * `paths` holds `[source, destination]`; when only one side of the rename is * visible, `paths` holds that single path. */ interface FileWatchEvent { readonly eventType: FileWatchEventType; readonly paths: string[]; } /** Namespace for Sandbox filesystem APIs. */ declare class SandboxFilesystem { #private; private readonly exec; /** @ignore */ constructor(exec: (command: string[], params?: SandboxExecParams) => Promise); /** * Copy a local file into the Sandbox. * * `remotePath` must be an absolute path to a file in the Sandbox. * Parent directories are created if needed. The remote file is overwritten * if it already exists. * * @throws {SandboxFilesystemNotADirectoryError} a parent component of `remotePath` is not a directory. * @throws {SandboxFilesystemIsADirectoryError} `remotePath` points to a directory. * @throws {SandboxFilesystemPermissionError} write permission is denied in the Sandbox. * @throws {SandboxFilesystemError} the command fails for any other reason. * @throws {Error} `localPath` does not exist, is a directory, or cannot be read (`ENOENT`, `EISDIR`, `EACCES`). */ copyFromLocal(localPath: string, remotePath: string): Promise; /** * Copy a file from the Sandbox to a local path. * * `remotePath` must be an absolute path to a file in the Sandbox. * Parent directories for `localPath` are created if needed. The local file * is overwritten if it already exists. * * @throws {SandboxFilesystemNotFoundError} the remote path does not exist. * @throws {SandboxFilesystemIsADirectoryError} the remote path points to a directory. * @throws {SandboxFilesystemFileTooLargeError} the file exceeds the read size limit. * @throws {SandboxFilesystemPermissionError} read permission is denied in the Sandbox. * @throws {SandboxFilesystemError} the command fails for any other reason. * @throws {Error} `localPath` points to a directory, or writing it is not permitted. */ copyToLocal(remotePath: string, localPath: string): Promise; /** * List files and directories in a Sandbox directory. * * `remotePath` must be an absolute path to a directory in the Sandbox. * Returns an array of {@link FileInfo} objects sorted by name. * * @throws {SandboxFilesystemNotFoundError} the path does not exist. * @throws {SandboxFilesystemNotADirectoryError} the path is not a directory. * @throws {SandboxFilesystemPermissionError} read permission is denied. * @throws {SandboxFilesystemError} the command fails for any other reason. */ listFiles(remotePath: string): Promise; /** * Create a new directory in the Sandbox. * * `remotePath` must be an absolute path in the Sandbox. * * When `createParents` is `true` (the default), any missing parent * directories are created and the call is idempotent (succeeds if the * directory already exists). When `createParents` is `false`, the immediate * parent must already exist and the path must not already exist. * * @throws {SandboxFilesystemNotFoundError} the parent does not exist and `createParents` is `false`. * @throws {SandboxFilesystemPathAlreadyExistsError} the path already exists and `createParents` is `false`. * @throws {SandboxFilesystemNotADirectoryError} a path component is not a directory. * @throws {SandboxFilesystemPermissionError} creation is not permitted. * @throws {InvalidError} the operation is not supported by the mount. * @throws {SandboxFilesystemError} the command fails for any other reason. */ makeDirectory(remotePath: string, options?: { createParents?: boolean; }): Promise; /** * Read a file from the Sandbox and return its contents as bytes. * * `remotePath` must be an absolute path to a file in the Sandbox. * * @throws {SandboxFilesystemNotFoundError} the path does not exist. * @throws {SandboxFilesystemIsADirectoryError} the path points to a directory. * @throws {SandboxFilesystemFileTooLargeError} the file exceeds the read size limit. * @throws {SandboxFilesystemPermissionError} read permission is denied. * @throws {SandboxFilesystemError} the command fails for any other reason. */ readBytes(remotePath: string): Promise; /** * Read a file from the Sandbox and return its contents as a UTF-8 string. * * `remotePath` must be an absolute path to a file in the Sandbox. * * @throws {SandboxFilesystemNotFoundError} the path does not exist. * @throws {SandboxFilesystemIsADirectoryError} the path points to a directory. * @throws {SandboxFilesystemFileTooLargeError} the file exceeds the read size limit. * @throws {SandboxFilesystemPermissionError} read permission is denied. * @throws {SandboxFilesystemError} the command fails for any other reason. */ readText(remotePath: string): Promise; /** * Remove a file or directory in the Sandbox. * * `remotePath` must be an absolute path in the Sandbox. When `remotePath` * is a directory and `recursive` is `false` (the default), it is removed * only if empty. When `recursive` is `true`, the directory and all its * contents are removed. Recursive removal is not supported on all mounts — * `CloudBucketMount` does not support it. * * @throws {SandboxFilesystemNotFoundError} the path does not exist. * @throws {SandboxFilesystemDirectoryNotEmptyError} `recursive` is `false` and the directory is not empty. * @throws {SandboxFilesystemPermissionError} removal is not permitted. * @throws {InvalidError} the operation is not supported by the mount. * @throws {SandboxFilesystemError} the command fails for any other reason. */ remove(remotePath: string, options?: { recursive?: boolean; }): Promise; /** * Return metadata for a single file, directory, or symlink in the Sandbox. * * `remotePath` must be an absolute path in the Sandbox. If `remotePath` is * a symlink, the returned {@link FileInfo} describes the symlink itself, not * the target it points to. * * @throws {SandboxFilesystemNotFoundError} the path does not exist. * @throws {SandboxFilesystemNotADirectoryError} a non-leaf component of the path is not a directory. * @throws {SandboxFilesystemPermissionError} a path component is not searchable. * @throws {SandboxFilesystemError} the command fails for any other reason. */ stat(remotePath: string): Promise; /** * Watch a path in the Sandbox for filesystem changes. * * `remotePath` must be an absolute path in the Sandbox. If it points to a * file, events for that file are reported. If it points to a directory, * events for entries directly inside it are reported. Set `recursive: true` * to also receive events for all nested subdirectories. If `remotePath` is * a symlink, it is followed and events reference paths under the resolved * target. * * Yields {@link FileWatchEvent} objects as changes occur, until either the * timeout elapses, the iterator is closed, or the Sandbox is terminated. * * Optionally restrict the kinds of events emitted to those included in * `filter`. An undefined `filter` permits all types; passing an empty array * suppresses all events. * * `timeoutMs` is truncated to whole seconds. Omit it to watch indefinitely. * When the timeout elapses, the iterator stops without raising an exception. * * @throws {SandboxFilesystemNotFoundError} `remotePath` does not exist. * @throws {SandboxFilesystemPermissionError} watch access is denied. * @throws {InvalidError} the filesystem does not support watching. * @throws {SandboxFilesystemError} the command fails for any other reason. */ watch(remotePath: string, params?: { filter?: FileWatchEventType[]; recursive?: boolean; timeoutMs?: number; }): AsyncIterable; /** * Write binary content to a file in the Sandbox. * * `remotePath` must be an absolute path to a file in the Sandbox. * Parent directories are created if needed. The remote file is overwritten * if it already exists. * * @throws {TypeError} `data` is not a `Uint8Array`, `ArrayBuffer`, or `Buffer`. * @throws {SandboxFilesystemNotADirectoryError} a parent component of `remotePath` is not a directory. * @throws {SandboxFilesystemIsADirectoryError} `remotePath` points to a directory. * @throws {SandboxFilesystemPermissionError} write permission is denied. * @throws {SandboxFilesystemError} the command fails for any other reason. */ writeBytes(data: Uint8Array | ArrayBuffer | Buffer, remotePath: string): Promise; /** * Write UTF-8 text to a file in the Sandbox. * * `remotePath` must be an absolute path to a file in the Sandbox. * Parent directories are created if needed. The remote file is overwritten * if it already exists. * * @throws {TypeError} `data` is not a string. * @throws {SandboxFilesystemNotADirectoryError} a parent component of `remotePath` is not a directory. * @throws {SandboxFilesystemIsADirectoryError} `remotePath` points to a directory. * @throws {SandboxFilesystemPermissionError} write permission is denied. * @throws {SandboxFilesystemError} the command fails for any other reason. */ writeText(data: string, remotePath: string): Promise; } /** * > Sandbox memory snapshots are in **early preview**. * * A `SandboxSnapshot` object lets you interact with a stored Sandbox snapshot that was created by calling * {@link Sandbox#experimentalSnapshot} on a Sandbox instance. This includes both the filesystem and memory state of * the original Sandbox at the time the snapshot was taken. */ declare class SandboxSnapshot { #private; readonly snapshotId: string; /** @ignore */ constructor(client: ModalClient, snapshotId: string, params?: { isV2?: boolean; }); /** * @internal * Whether the snapshot came from a V2 sandbox. `undefined` until hydrated. */ get _isV2(): boolean | undefined; /** @internal */ _hydrate(): Promise; } /** * Service for managing {@link SandboxSnapshot}s. * * Normally only ever accessed via the client as: * ```typescript * const modal = new ModalClient(); * const snapshot = await modal.sandboxSnapshots.fromId(snapshotId); * ``` */ declare class SandboxSnapshotService { #private; constructor(client: ModalClient); /** * Construct a {@link SandboxSnapshot} for an existing snapshot ID. * * @param snapshotId - Snapshot ID returned when the snapshot was created. */ fromId(snapshotId: string): 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; } /** * Sidecar options whose support depends on the Sandbox backend; checked by * {@link SandboxImpl.validateSidecarCreate} before a sidecar is created. * * @internal * @hidden */ type SidecarCreateOptions = { hasCloudBucketMounts: boolean; hasProxy: boolean; includeOidcIdentityToken: boolean; }; /** * Backend-independent description of a sidecar container to create. * * @internal * @hidden */ type SidecarCreateRequest = { containerName: string; imageId: string; command: string[]; workdir?: string; secretIds: string[]; secretSources: SecretSource[]; volumeMounts: VolumeMount[]; cloudBucketMounts: CloudBucketMount$1[]; networkAccess: NetworkAccess; includeOidcIdentityToken: boolean; proxyId?: string; ptyInfo?: PTYInfo; memoryReserveConsumeMiB?: number; }; /** * Result of {@link SandboxImpl.createSidecar}. * * @internal * @hidden */ type SidecarCreateResult = { containerId: string; containerName: string; }; /** * Backend-specific operations behind a {@link Sandbox}. * * A `Sandbox` is a thin facade that owns object identity and attachment state; * everything that talks to a backend goes through one of these. Each backend * (V1, V2) is a separate class, so the facade has no per-backend branching. * * @internal * @hidden */ interface SandboxImpl { readonly client: ModalClient; readonly sandboxId: string; stdin(): ModalWriteStream; outputStream(fileDescriptor: FileDescriptor, ensureAttached: () => void): ModalReadStream; getTags(): Promise>; setTags(tags: Record): Promise; setName(name: string): Promise; createConnectToken(port: number, userMetadata: string | undefined): Promise; terminate(): Promise; /** Stop the current session of a persistent Sandbox, keeping its state. */ pause(): Promise; /** Resume a paused persistent Sandbox from its saved state. */ resume(): Promise; /** Release local resources (e.g. connections); the Sandbox keeps running. */ close(): void; wait(): Promise; poll(): Promise; /** * Blocks until the Sandbox has a task. If the wait fails, the Sandbox is * terminated so a queued one cannot start later with no caller. A timeout * surfaces as a ResourceExhaustedError. */ waitForScheduling(timeoutMs: number): Promise; tunnels(timeoutMs: number): Promise>; getAppId(): Promise; resolveTaskIdForLogs(): Promise; getExitSnapshot(params: SandboxExperimentalGetExitSnapshotParams | undefined): Promise; snapshotMemory(): Promise; getCommandRouter(signal?: AbortSignal): Promise<[string, TaskCommandRouterClientImpl]>; waitUntilReady(timeoutMs: number): Promise; updateNetworkPolicy(params: SandboxUpdateNetworkPolicyParams): Promise; updateOutboundPolicy(outboundPolicy: ExperimentalOutboundPolicy): Promise; snapshotFilesystem(containerId: string, params: SandboxSnapshotFilesystemParams | undefined): Promise; snapshotDirectory(path: string, params: SandboxSnapshotDirectoryParams | undefined): Promise; mountImage(path: string, image: Image | undefined, params: SandboxMountImageParams | undefined): Promise; unmountImage(path: string): Promise; reloadVolumes(containerId: string, params: SandboxReloadVolumesParams | undefined): Promise; exec(command: string[], params: SandboxExecParams | undefined, containerId?: string): Promise; /** Reject sidecar options that `createSidecar` cannot provide on this backend. */ validateSidecarCreate(options: SidecarCreateOptions): void; createSidecar(request: SidecarCreateRequest): Promise; } type SandboxSidecarCommandRouter = Pick; type SandboxSidecarAccess = { client: ModalClient; ensureAttached(): void; validateCreate(options: SidecarCreateOptions): void; create(request: SidecarCreateRequest): Promise; exec(command: string[], params: SandboxExecParams | undefined, containerId: string): Promise; commandRouter(): Promise<[string, SandboxSidecarCommandRouter]>; reloadVolumes(containerId: string, params: SidecarReloadVolumesParams | undefined): Promise; snapshotFilesystem(containerId: string, params: SidecarSnapshotFilesystemParams | undefined): Promise; }; /** Options for {@link SidecarService#create SidecarService.create()}. */ type SidecarCreateParams = { /** Command to run in the sidecar container on startup. */ command?: string[]; /** Environment variables to set in the sidecar container. */ env?: Record; /** {@link Secret}s to inject into the sidecar container as environment variables. */ secrets?: Secret[]; /** Working directory of the sidecar container. */ workdir?: string; /** Mount points for Modal {@link Volume}s. */ volumes?: Record; /** * Mount points for Modal {@link CloudBucketMount}s. Not supported for GPU * Sandboxes. */ cloudBucketMounts?: Record; /** * List of CIDRs the sidecar is allowed to access. Independent of the main * container; if not set, all CIDRs are allowed. An empty list blocks all * external egress while preserving connectivity to the main container. */ outboundCidrAllowlist?: string[]; /** * List of domain names the sidecar is allowed to access. Supports wildcard * prefixes (`*.example.com`). Independent of the main container. */ outboundDomainAllowlist?: string[]; /** * If true, the sidecar receives a MODAL_IDENTITY_TOKEN env var for * OIDC-based auth (e.g. to AWS, GCP). The token identifies the sidecar * container itself, not the main container. Not supported for GPU * Sandboxes. */ includeOidcIdentityToken?: boolean; /** * {@link Proxy} to route the sidecar's outbound traffic through, giving it * a static outbound IP of its own, independent of the main container. Not * supported for GPU Sandboxes. */ proxy?: Proxy; /** Enable a PTY for the sidecar. */ pty?: boolean; /** * Memory, in MiB, the sidecar consumes from the Sandbox's sidecar memory * reserve (the `vm_sidecar_memory_reserve_mib` experimental option); unset * consumes whatever is left of it. Ignored by Sandboxes without a reserve. * Experimental. */ experimentalMemoryReserveConsumeMiB?: number; }; /** Options for {@link SidecarService#get SidecarService.get()}. */ type SidecarGetParams = { /** If true, return the latest container with the name even if it has terminated. */ includeTerminated?: boolean; }; /** Options for {@link SidecarService#list SidecarService.list()}. */ type SidecarListParams = { /** If true, include terminated containers. */ includeTerminated?: boolean; }; /** Options for {@link SidecarContainer#exec SidecarContainer.exec()}. */ type SidecarExecParams = SandboxExecParams; /** Options for {@link SidecarContainer#terminate SidecarContainer.terminate()}. */ type SidecarTerminateParams = { /** If true, wait for the sidecar container to terminate. */ wait?: boolean; }; /** Optional parameters for {@link SidecarContainer#snapshotFilesystem SidecarContainer.snapshotFilesystem()}. */ type SidecarSnapshotFilesystemParams = { /** Overall budget for the snapshot call, in milliseconds. Defaults to 55000. */ timeoutMs?: number; /** Lifetime of the resulting image in milliseconds. Defaults to 30 days. Pass `null` for no expiry. */ ttlMs?: number | null; }; /** Optional parameters for {@link SidecarContainer#reloadVolumes SidecarContainer.reloadVolumes()}. */ type SidecarReloadVolumesParams = { /** Overall budget in milliseconds. Defaults to 55000. */ timeoutMs?: number; }; /** Optional parameters for {@link SidecarContainer#mountImage SidecarContainer.mountImage()}. */ type SidecarMountImageParams = SandboxMountImageParams; /** Optional parameters for {@link SidecarContainer#unmountImage SidecarContainer.unmountImage()}. */ type SidecarUnmountImageParams = Record; /** Optional parameters for {@link SidecarContainer#snapshotDirectory SidecarContainer.snapshotDirectory()}. */ type SidecarSnapshotDirectoryParams = SandboxSnapshotDirectoryParams; /** * Creates and manages sidecar containers inside a Sandbox. * * EXPERIMENTAL: the API is subject to change. */ declare class SidecarService { #private; /** @internal @hidden */ constructor(access: SandboxSidecarAccess); /** * Start a new sidecar container in the Sandbox. The {@link Image} must * already be built by calling {@link Image#build Image.build()} before it is * passed to `create`. */ create(name: string, image: Image, params?: SidecarCreateParams): Promise; /** Return a sidecar container by name. */ get(name: string, params?: SidecarGetParams): Promise; /** Return all sidecar containers (not including the main container). */ list(params?: SidecarListParams): Promise; } /** * A handle to a sidecar container running in a Sandbox. * * EXPERIMENTAL: the API is subject to change. */ declare class SidecarContainer { #private; /** The fully qualified container ID. */ readonly containerId: string; /** The logical name of the container within the Sandbox. */ readonly containerName: string; /** @internal @hidden */ constructor(access: SandboxSidecarAccess, containerId: string, containerName: string, result?: GenericResult); exec(command: string[], params?: SidecarExecParams & { mode?: "text"; }): Promise>; exec(command: string[], params: SidecarExecParams & { mode: "binary"; }): Promise>; /** Namespace for filesystem APIs scoped to this sidecar container. */ get filesystem(): SandboxFilesystem; /** Block until the sidecar container exits, and return its exit code. */ wait(): Promise; /** * Check if the sidecar container has finished running. * * Returns `null` if the container is still running, else the exit code. */ poll(): Promise; terminate(): Promise; terminate(params: { wait: true; }): Promise; /** Snapshot this Sidecar container's filesystem into an Image. */ snapshotFilesystem(params?: SidecarSnapshotFilesystemParams): Promise; /** * Reload all Volumes mounted in this sidecar container. * * Blocks until the reload completes, or throws a `TimeoutError` on timeout * (the reload may still complete in the background). */ reloadVolumes(params?: SidecarReloadVolumesParams): Promise; /** * Mount an {@link Image} at a path in this Sidecar container's filesystem. * * @param path - The path where the directory should be mounted * @param image - Optional {@link Image} to mount. If undefined, mounts an empty directory. * @param params - Optional parameters; see {@link SidecarMountImageParams}. */ mountImage(path: string, image?: Image, params?: SidecarMountImageParams): Promise; /** * Unmounts an {@link Image} previously mounted at a path in this Sidecar container's filesystem. * * @param path - The mount path to unmount */ unmountImage(path: string, _params?: SidecarUnmountImageParams): Promise; /** * Snapshots and creates a new {@link Image} from a directory in the running Sidecar container. * * The resulting Image is retained for `ttlMs` (default: 30 days), * as a hard cutoff measured from creation — usage does not extend * the lifetime. Pass `ttlMs: null` to retain indefinitely. * * The call has an overall `timeoutMs` budget (default: 55000). If it * elapses before a snapshot completes, the call is cancelled and an * error is thrown. * * The Image can be used anywhere an Image is accepted, including as a mount * or as the base filesystem for another container. * * @param path - The path of the directory to snapshot * @param params - Optional parameters; see {@link SidecarSnapshotDirectoryParams}. * @returns Promise that resolves to an {@link Image} */ snapshotDirectory(path: string, params?: SidecarSnapshotDirectoryParams): 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"; /** Runtime a Sandbox runs in: a virtual machine, or gVisor. */ type SandboxRuntime = "gvisor" | "vm"; /** 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. * Modal Sandboxes support bursting above the CPU request, so most users don't * need to specify a request. */ cpu?: number; /** Hard limit of physical CPU cores for the Sandbox, can be fractional. */ cpuLimit?: number; /** * Reservation of memory in MiB. * Modal Sandboxes support bursting above the memory request, so most users don't * need to specify a request. */ memoryMiB?: number; /** Hard limit of memory in MiB. */ memoryLimitMiB?: number; /** Runtime under which the Sandbox executes, or undefined to let Modal pick. */ runtime?: SandboxRuntime; /** 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 not set, all CIDRs are allowed. Cannot be used with blockNetwork. */ outboundCidrAllowlist?: string[]; /** List of domain names the Sandbox is allowed to access. Supports wildcard prefixes (`*.example.com`). Cannot be used with blockNetwork. */ outboundDomainAllowlist?: string[]; /** Configuration for replacing headers in outbound HTTPS requests from the Sandbox. * Secrets referenced by the policy are resolved outside the Sandbox and are never * visible to the workload. See {@link ExperimentalOutboundPolicy}. * EXPERIMENTAL: the API is subject to change. */ experimentalOutboundPolicy?: ExperimentalOutboundPolicy; /** List of CIDRs allowed to connect inbound to the Sandbox (encrypted tunnels and connection tokens). If not set, all IPs are allowed. Cannot be used with blockNetwork. */ inboundCidrAllowlist?: string[]; /** Enable private IPv6 networking (i6pn) so Sandboxes in the same workspace can address each * other directly at their `i6pn.modal.local` address. Pin every Sandbox in the group to the same specific region * (e.g. `regions: ["us-east-1"]`). Cannot be used with blockNetwork. */ i6pn?: boolean; /** 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 is ready. If not configured, the Sandbox is ready when it starts. */ readinessProbe?: Probe; /** Optional name for the Sandbox. Unique within an App. */ name?: string; /** Tags to attach to the Sandbox. Filterable via {@link SandboxService#list client.sandboxes.list}. */ tags?: Record; /** * Optional experimental options. Values must be booleans or strings. */ 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; /** Enable memory snapshots. */ experimentalEnableSnapshot?: boolean; experimentalPersistent?: 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; /** * Create a new {@link Sandbox} using the experimental V2 backend. * * Supported features include exec, encrypted tunnels, wait/poll/terminate, * CPU and memory configuration, region placement, volumes, cloud bucket * mounts (with static credentials via {@link Secret} or `oidcAuthRoleArn`), * OIDC identity tokens, {@link Proxy proxies}, filesystem snapshots, and * custom domains (`customDomain` allows connections to the Sandbox via a * subdomain of that parent domain rather than a default Modal domain; * requires prior setup by Modal). * * Pass `experimentalEnableSnapshot: true` to create a sandbox that can be * snapshotted with {@link Sandbox#experimentalSnapshot}. Features like network * file systems and GPUs are not supported. * * V2 sandboxes created with this method are not currently returned by * {@link SandboxService#list client.sandboxes.list()}. A named Sandbox can be * looked up with * {@link SandboxService#experimentalFromName client.sandboxes.experimentalFromName()}; * otherwise store {@link Sandbox#sandboxId sandbox.sandboxId} and use * {@link SandboxService#fromId client.sandboxes.fromId()} to reattach. */ experimentalCreate(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. * If `includeTerminated` is set to `true` and no Sandbox with the name is currently * running, the most recent terminated Sandbox will be returned instead. * 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; /** * Get a running V2 {@link Sandbox} by name from a deployed {@link App}. * * This looks up V2 Sandboxes, i.e. Sandboxes created via * {@link SandboxService#experimentalCreate client.sandboxes.experimentalCreate()}. * * EXPERIMENTAL: the API is subject to change. * * @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 */ experimentalFromName(appName: string, name: string, params?: SandboxExperimentalFromNameParams): Promise; /** * Restore a {@link Sandbox} from a memory snapshot. * * The restore targets the same backend the snapshot was taken from. A V1 * snapshot restores as a V1 sandbox, a V2 snapshot as a V2 sandbox. * * EXPERIMENTAL: the API is subject to change. */ experimentalFromSnapshot(snapshot: SandboxSnapshot, params?: SandboxExperimentalFromSnapshotParams): 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; /** * List V2 {@link Sandbox}es. * * This lists all Sandboxes (both v1 and v2). * Pass `appId` to scope to an App; omit it to list across the current * environment (deprecated — prefer scoping by `appId`). If tags are specified, * only Sandboxes that have at least those tags are returned. * * Yields {@link Sandbox} objects that are currently running. * * EXPERIMENTAL: the API is subject to change. */ experimentalList(params?: SandboxExperimentalListParams): 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; }; /** Parameters for {@link SandboxService#experimentalList client.sandboxes.experimentalList()}. */ type SandboxExperimentalListParams = { /** The App to list Sandboxes under. Omit to list across the environment (deprecated). */ 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; /** * If `includeTerminated` is set to `true` and no Sandbox with the name is * currently running, the most recent terminated Sandbox will be returned instead. */ includeTerminated?: boolean; }; /** Optional parameters for {@link SandboxService#experimentalFromName client.sandboxes.experimentalFromName()}. */ type SandboxExperimentalFromNameParams = { environment?: string; /** * If `includeTerminated` is set to `true` and no Sandbox with the name is * currently running, the most recent terminated Sandbox will be returned instead. */ includeTerminated?: boolean; }; /** Optional parameters for {@link SandboxService#experimentalFromSnapshot client.sandboxes.experimentalFromSnapshot()}. */ type SandboxExperimentalFromSnapshotParams = { /** * Name for the restored Sandbox. Omit to reuse the original Sandbox's name, * pass `null` to leave it unnamed, or pass a string to override it. */ name?: string | null; }; /** 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#terminate Sandbox.terminate()}. */ type SandboxTerminateParams = { /** If true, wait for the Sandbox to finish and return the exit code. */ wait?: boolean; }; /** Optional parameters for {@link Sandbox#snapshotFilesystem Sandbox.snapshotFilesystem()}. */ type SandboxSnapshotFilesystemParams = { /** * Overall budget for the snapshot call, in milliseconds. Defaults to * 55000. If it elapses before a snapshot completes, the call is cancelled * and an error is thrown. */ timeoutMs?: number; /** * Lifetime of the resulting image in milliseconds, as a hard cutoff * measured from creation. Defaults to 30 days. Pass `null` to retain * the image indefinitely. */ ttlMs?: number | null; }; /** Optional parameters for Sandbox.experimentalGetExitSnapshot(). */ type SandboxExperimentalGetExitSnapshotParams = { /** * Total time to wait in milliseconds, spread across repeated long polls of * at most `EXIT_SNAPSHOT_LONG_POLL_TIMEOUT` seconds each. `undefined` (the * default) waits until the snapshot reaches a terminal state. `0` performs * an immediate check without waiting. */ timeoutMs?: number; }; /** Optional parameters for {@link Sandbox#reloadVolumes Sandbox.reloadVolumes()}. */ type SandboxReloadVolumesParams = { /** Overall budget in milliseconds. Defaults to 55000. */ timeoutMs?: number; }; /** Optional parameters for {@link Sandbox#snapshotDirectory Sandbox.snapshotDirectory()}. */ type SandboxSnapshotDirectoryParams = { /** * Overall budget for the snapshot call, in milliseconds. Defaults to * 55000. If it elapses before a snapshot completes, the call is cancelled * and an error is thrown. */ timeoutMs?: number; /** * Lifetime of the resulting image in milliseconds, as a hard cutoff * measured from creation. Defaults to 30 days. Pass `null` to retain * the image indefinitely. */ ttlMs?: number | null; /** * Experimental customer-supplied encryption key used to encrypt the * resulting snapshot. The same key is required when mounting the image. * Modal does not persist the key. */ experimentalEncryptionKey?: Uint8Array; }; /** Optional parameters for {@link Sandbox#mountImage Sandbox.mountImage()}. */ type SandboxMountImageParams = { /** * Experimental customer-supplied encryption key used to decrypt the image. * Use the same key that encrypted the snapshot. */ experimentalEncryptionKey?: Uint8Array; }; /** Optional parameters for {@link Sandbox#createConnectToken Sandbox.createConnectToken()}. */ 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; /** Container port that requests are routed to when using this token. Defaults to 8080. */ port?: number; }; /** * Parameters for {@link Sandbox#updateNetworkPolicy Sandbox.updateNetworkPolicy()}. * * Each dimension is independent: `undefined` leaves that dimension unchanged, * while a defined value replaces it (an empty array blocks all egress for that * dimension; a wildcard entry such as `"0.0.0.0/0"` or `"*"` allows everything). * * Currently, both dimensions must be provided (the underlying transport does * not yet support partial updates). This requirement will be relaxed in a * future release. */ type SandboxUpdateNetworkPolicyParams = { outboundCidrAllowlist?: string[]; outboundDomainAllowlist?: 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; /** * Wraps a backend implementation; use the {@link SandboxService} factory * methods (`client.sandboxes.create()`, `client.sandboxes.fromId()`, ...) * to obtain Sandboxes. * * @ignore */ constructor(impl: SandboxImpl); get stdin(): ModalWriteStream; get stdout(): ModalReadStream; get stderr(): ModalReadStream; /** * Access persisted entrypoint logs emitted by this Sandbox. * * Use {@link SandboxLogsManager#fetch fetch()} to read logs from a UTC time * range and {@link SandboxLogsManager#tail tail()} to read the most recent * logs. * * This is separate from {@link Sandbox#stdout stdout} and * {@link Sandbox#stderr stderr}, which expose the Sandbox's live output * streams. */ get logs(): SandboxLogsManager; get filesystem(): SandboxFilesystem; /** * Operations for managing sidecar containers that run alongside the * Sandbox's main container. * * EXPERIMENTAL: the API is subject to change. */ get experimentalSidecars(): SidecarService; /** * Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in {@link SandboxService#list client.sandboxes.list}. * * Setting tags replaces the Sandbox's entire tag set; passing an empty object clears all tags. */ setTags(tags: Record): Promise; /** Get tags (key-value pairs) currently attached to this Sandbox from the server. */ getTags(): Promise>; /** * Assign a name to a running V2 {@link Sandbox} that was created without one. * * This is only supported for V2 Sandboxes, i.e. Sandboxes created via * {@link SandboxService#experimentalCreate client.sandboxes.experimentalCreate()}. * A name may only be set once, and only on a Sandbox that has never had one; * afterwards the Sandbox can be looked up with * {@link SandboxService#experimentalFromName client.sandboxes.experimentalFromName()}. * * EXPERIMENTAL: the API is subject to change. * * @param name - Name to assign to the Sandbox. Must be unique within the App. * @throws {AlreadyExistsError} If another running Sandbox in the App already holds the name. * @throws {InvalidError} If the server rejects the name as invalid. * @throws {ConflictError} If the Sandbox already has a name or is no longer running. */ experimentalSetName(name: string): Promise; exec(command: string[], params?: SandboxExecParams & { mode?: "text"; }): Promise>; exec(command: string[], params: SandboxExecParams & { mode: "binary"; }): Promise>; /** * Blocks until the Sandbox has a task. If the wait fails, the Sandbox is * terminated so a queued one cannot start later with no caller. A timeout * surfaces as a ResourceExhaustedError. * * @internal * @hidden */ _waitForScheduling(timeoutMs: number): Promise; /** * Create a token for making HTTP connections to the Sandbox. */ createConnectToken(params?: SandboxCreateConnectTokenParams): Promise; terminate(): Promise; terminate(params: { wait: true; }): Promise; /** * Stop the Sandbox's current container, keeping its state so it can be * resumed. * * Only supported for experimental persistent Sandboxes. * * EXPERIMENTAL: the API is subject to change. */ experimentalPause(): Promise; /** * Resume a paused Sandbox from its saved state. * * Only supported for experimental persistent Sandboxes. * * EXPERIMENTAL: the API is subject to change. */ experimentalResume(): 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. * * This does not block on or interrupt ongoing reads or calls. Connection * resources are closed promptly once those operations finish. */ detach(): void; wait(): Promise; /** * Wait until the Sandbox is ready. * * A Sandbox with a readiness probe is ready once the probe passes; * a Sandbox without one is ready once it starts. * * @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. * * The call has an overall `timeoutMs` budget (default: 55000). If it * elapses before a snapshot completes, the call is cancelled and an * error is thrown. * * @param params - Optional parameters; see {@link SandboxSnapshotFilesystemParams}. * @returns Promise that resolves to an {@link Image} */ snapshotFilesystem(params?: SandboxSnapshotFilesystemParams): Promise; /** * Get the exit filesystem snapshot image. * * An exit snapshot captures the Sandbox filesystem when the Sandbox exits, * whether its entrypoint finishes gracefully, abruptly, or it is stopped with * {@link Sandbox#terminate}. The resulting {@link Image} can be passed to * {@link SandboxService#create client.sandboxes.create()} to start a new * Sandbox from the saved filesystem. * * Exit snapshots are opt-in: the Sandbox must have been created with * `experimentalOptions: { enable_exit_snapshot: true }`. Calling this on a * Sandbox created without that option throws an {@link InvalidError}. * * @example * ```ts * const sb = await modal.sandboxes.create(app, image, { * experimentalOptions: { enable_exit_snapshot: true }, * }); * // ... use the Sandbox ... * await sb.terminate(); * const image = await sb.experimentalGetExitSnapshot(); * const sb2 = await modal.sandboxes.create(app, image); * ``` * * EXPERIMENTAL: the API is subject to change. * * @param params - Optional parameters; see SandboxExperimentalGetExitSnapshotParams. * @returns The exit snapshot Image. * @throws {InvalidError} If `timeoutMs` is negative, or if exit snapshots * were not enabled when the Sandbox was created. * @throws {TimeoutError} If `timeoutMs` elapses before the snapshot * reaches a terminal state. This includes `timeoutMs = 0` when the * snapshot is still pending. * @throws {SnapshotCreationError} Snapshot operation is done and failed. * Polling again will not produce an Image; filesystem state is gone. * @throws {NotFoundError} If the Sandbox does not exist. */ experimentalGetExitSnapshot(params?: SandboxExperimentalGetExitSnapshotParams): Promise; /** * Snapshot the filesystem and memory of the Sandbox. * * Returns a {@link SandboxSnapshot} which can be restored into a new Sandbox * with {@link SandboxService#experimentalFromSnapshot client.sandboxes.experimentalFromSnapshot()}. * * The Sandbox must have been created with `experimentalEnableSnapshot: true`. * * EXPERIMENTAL: the API is subject to change. */ experimentalSnapshot(): 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. * @param params - Optional parameters; see {@link SandboxMountImageParams}. */ mountImage(path: string, image?: Image, params?: SandboxMountImageParams): Promise; /** * Unmounts an {@link Image} previously mounted at a path in the Sandbox filesystem. * * @param path - The mount path to unmount */ unmountImage(path: string): Promise; /** * Updates the outbound network policy of a running Sandbox. * * Established connections that the new policy no longer permits are terminated. * * @param params - Both `outboundCidrAllowlist` and `outboundDomainAllowlist` must be provided. */ updateNetworkPolicy(params: SandboxUpdateNetworkPolicyParams): Promise; /** * Replace the outbound policy of a running Sandbox. * * EXPERIMENTAL: the API is subject to change. * * The new policy replaces all existing policy configuration on the * Sandbox; build a policy including any existing rules you want to keep. * * Only Sandboxes created with an `experimentalOutboundPolicy` can be updated this * way; for Sandboxes created without one this fails, since header * replacement is only set up at creation time. */ experimentalUpdateOutboundPolicy(outboundPolicy: ExperimentalOutboundPolicy): Promise; /** * Reload all Volumes mounted in the Sandbox. * * Blocks until the reload completes, or throws a `TimeoutError` on timeout * (the reload may still complete in the background). * * @param params - Optional parameters; see {@link SandboxReloadVolumesParams}. */ reloadVolumes(params?: SandboxReloadVolumesParams): Promise; /** * Snapshots and creates a new {@link Image} from a directory in the running sandbox. * * The resulting Image is retained for `ttlMs` (default: 30 days), * as a hard cutoff measured from creation — usage does not extend * the lifetime. Pass `ttlMs: null` to retain indefinitely. * * The call has an overall `timeoutMs` budget (default: 55000). If it * elapses before a snapshot completes, the call is cancelled and an * error is thrown. * * @param path - The path of the directory to snapshot * @param params - Optional parameters; see {@link SandboxSnapshotDirectoryParams}. * @returns Promise that resolves to an {@link Image} */ snapshotDirectory(path: string, params?: SandboxSnapshotDirectoryParams): Promise; /** * Check if the Sandbox has finished running. * * Returns `null` if the Sandbox is still running, else returns the exit code. */ poll(): Promise; } declare class ContainerProcess { #private; stdin: ModalWriteStream; stdout: ModalReadStream; stderr: ModalReadStream; /** @ignore */ constructor(taskId: string, execId: string, commandRouterClient: TaskCommandRouterClientImpl, params?: SandboxExecParams, deadline?: number | null); /** * @ignore * Send stdin EOF directly, bypassing the WritableStream state machine. * * Useful for when an stdin write has failed. */ closeStdin(): Promise; /** * @internal * @hidden * Stream `source` into the process's stdin and close it (EOF) on success. * * Returns the total bytes streamed. */ _stdinWriteStream(source: StdinSource): Promise; /** * @internal * @hidden * Check if the container process has finished running. * * Returns `null` if the process is still running, else returns the exit * code. */ _poll(): Promise; /** Wait for process completion and return the exit code. */ wait(): Promise; /** * @internal * @hidden * Like `wait()`, but stops waiting when `signal` is aborted. */ _wait(signal?: AbortSignal): Promise; } /** Service for looking up {@link Environment}s through `client.environments`. */ declare class EnvironmentService { #private; /** Namespace for creating, listing, and deleting Environments. */ readonly objects: EnvironmentObjectsService; /** @ignore */ constructor(client: ModalClient); /** * Look up an Environment by name, optionally creating it if it does not exist. * @throws {InvalidError} The Environment name is invalid. */ fromName(name: string, params?: EnvironmentFromNameParams): Promise; /** * Look up an Environment object using the current context. * * This method returns the Environment that is defined by the local configuration * (i.e., the `environment` passed to the {@link ModalClient}, your active profile, or the * `MODAL_ENVIRONMENT` environment variable), or it fetches the default environment from * the server when not defined locally. If called inside a Modal container, it will return * the Environment that container is associated with. * * ```typescript * const environment = await client.environments.fromContext(); * console.log(environment.environmentId, environment.name); * ``` */ fromContext(): Promise; } /** Optional parameters for {@link EnvironmentService#fromName client.environments.fromName()}. */ type EnvironmentFromNameParams = { createIfMissing?: boolean; }; /** Namespace for creating, listing, and deleting Environments. */ declare class EnvironmentObjectsService { #private; /** @ignore */ constructor(client: ModalClient); /** Create an Environment with the given name. */ create(name: string, params?: EnvironmentCreateParams): Promise; /** * Yield Environment handles without additional lookup requests. * * ```typescript * for await (const environment of client.environments.objects.list()) { * console.log(environment.environmentId, environment.name); * } * ``` */ list(): AsyncGenerator; /** * Delete an Environment by name. * This permanently deletes the Environment and all objects in it. */ delete(name: string): Promise; } /** Optional parameters for {@link EnvironmentObjectsService#create}. */ type EnvironmentCreateParams = { /** Restrict access to users with explicitly assigned Environment roles. */ restricted?: boolean; /** Default Environment role for workspace members. */ defaultRole?: string; }; /** A Modal Environment, with namespaces for accessing its resources. */ declare class Environment { readonly environmentId: string; readonly name: string; readonly apps: EnvironmentAppsService; /** @ignore */ constructor(client: ModalClient, environmentId: string, name: string); } /** Namespace for accessing Apps in an {@link Environment}. */ declare class EnvironmentAppsService { #private; /** @ignore */ constructor(client: ModalClient, environmentName: string); /** * Yield handles for live Apps in this Environment, excluding stopped and disabled Apps. * Listing Apps does not create Apps. * * ```typescript * const environment = await client.environments.fromName("prod"); * for await (const app of environment.apps.list()) { * console.log(app.appId, app.name); * } * ``` */ list(): AsyncGenerator; } interface ModalClientParams { tokenId?: string; tokenSecret?: string; /** OAuth refresh token returned by Modal's token endpoint. */ oauthRefreshToken?: string; /** Modal-issued OAuth client ID, with an `oc-` prefix. */ oauthClientId?: string; /** Modal-issued OAuth client secret, with an `ov-` prefix. */ oauthClientSecret?: string; /** Unencrypted RSA private key encoded as PEM, with literal or escaped newlines. */ oauthJwtKey?: string; environment?: string; endpoint?: string; timeoutMs?: number; maxRetries?: number; maxThrottleWaitSecs?: 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 environments: EnvironmentService; readonly functions: FunctionService; readonly functionCalls: FunctionCallService; readonly images: ImageService; readonly proxies: ProxyService; readonly queues: QueueService; readonly sandboxes: SandboxService; readonly sandboxSnapshots: SandboxSnapshotService; readonly secrets: SecretService; readonly volumes: VolumeService; /** @ignore */ readonly cpClient: ModalGrpcClient; readonly profile: Profile; readonly logger: Logger; private ipClients; private authTokenManager; private customMiddleware; private environmentManager; private oauthJwtKey?; constructor(params?: ModalClientParams); environmentName(environment?: string): string; private validateProfileCredentials; /** * Returns the image builder version by querying the server where the local profile takes * precedence. * * The image builder version is an environment-scoped server setting, so pass the environment * the image will be built in (e.g. an App's environment) to fetch the correct version. When * omitted, the profile's default environment is used. */ getImageBuilderVersion(environmentName?: string): Promise; /** @ignore */ ipClient(serverUrl: string): ModalGrpcClient; close(): void; version(): string; /** * Creates the control plane client. `profile.serverUrl` may be a comma-separated list of URLs: * the first request then races connections to them (see {@link connectFirst}) and every request * goes to the winner. A request's `timeoutMs` and `signal` also bound its wait for the race. A * failed race fails its requests with UNAVAILABLE, as an unreachable server does, and is retried * on the next request. */ private createControlPlaneClient; 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[]; }; /** * 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; }; /** Lifecycle state of a Modal App. */ type AppState = "ephemeral" | "detached" | "deployed" | "stopping" | "stopped" | "initializing" | "disabled" | "unknown"; /** Timestamps and attributions for events in an App's lifecycle. */ interface AppLifecycle { state: AppState; version?: number; createdAt: Date; createdBy: string; deployedAt?: Date; deployedBy?: string; stoppedAt?: Date; stoppedBy?: string; } /** Information about an App, its lifecycle, and its member Functions and Servers. */ interface AppInfo { appId: string; description: string; lifecycle: AppLifecycle; /** Function names mapped to Function IDs. */ functions: Record; /** Server names mapped to Function IDs. */ servers: Record; } /** Parameters for {@link AppSandboxesManager#stats app.sandboxes.stats()}. */ interface SandboxStatsParams { /** The beginning of the time range, inclusive, on a UTC hour boundary. */ since: Date; /** The end of the time range, exclusive, on a UTC hour boundary. If omitted, this defaults to the current time. */ until?: Date; /** * Tag names to group by. Sandboxes with the same values for these names form one group; a name not present on a * Sandbox counts as `null`. If omitted, all matching Sandboxes are returned as a single group with `tags: {}`. */ groupByTags?: string[]; /** Only include Sandboxes that match all of these tag names and values. */ tags?: Record; } /** Statistics for a group of Sandboxes over a time range. */ interface SandboxGroupStats { /** The value of each name in `groupByTags` for the group's Sandboxes, `null` where not present. */ tags: Record; /** Total cost in USD as a decimal string, the sum of `costByResource`. */ cost: string; /** * Cost in USD as decimal strings, by billed resource: `CPU`, `Memory`, and GPU types such as `H100`. * The resource names are subject to change as Modal's billing model evolves. */ costByResource: Record; } /** Optional parameters for {@link App#info}. */ type AppInfoParams = { /** Fetch current information rather than the cached lookup or listing snapshot. */ refresh?: boolean; }; /** Optional parameters for {@link App#stats}. */ interface AppStatsParams { /** The beginning of the time range, inclusive. Defaults to an hour before `until`. */ since?: Date; /** The end of the time range, exclusive. Defaults to the current time. */ until?: Date; } /** Completed Function inputs; each map item counts separately. */ interface AppStatsCallCounts { total: number; succeeded: number; failed: number; } /** Terminal container errors and distinct containers reporting resource activity in the window. */ interface AppStatsContainerCounts { errors: number; total: number; } /** Function call and container counts. */ interface AppStatsFunctionCounts { calls: AppStatsCallCounts; containers: AppStatsContainerCounts; } /** Object ID and counts for a Function. */ interface AppStatsFunctionStats { objectId: string; counts: AppStatsFunctionCounts; } /** Totals across current Functions, with individual Function stats keyed by name. */ interface AppStatsFunctionStatsGroup { total: AppStatsFunctionCounts; byName: Record; } /** Server requests split into HTTP 1xx/2xx/3xx and all other outcomes, including status zero. */ interface AppStatsRequestCounts { total: number; ok: number; failed: number; } /** Server request and container counts. */ interface AppStatsServerCounts { requests: AppStatsRequestCounts; containers: AppStatsContainerCounts; } /** Object ID and counts for a Server. */ interface AppStatsServerStats { objectId: string; counts: AppStatsServerCounts; } /** Totals across current Servers, with individual Server stats keyed by name. */ interface AppStatsServerStatsGroup { total: AppStatsServerCounts; byName: Record; } /** * Sandboxes that finished in the window and those that are live as of the until cutoff. * * Total is finished + live. */ interface AppStatsSandboxCounts { total: number; finished: number; live: number; } /** * App-wide statistics over [since, until), with current Functions and Servers indexed by name. * * Lifecycle metadata describes the App when queried, including for historical windows. */ interface AppStats { since: Date; until: Date; functions: AppStatsFunctionStatsGroup; servers: AppStatsServerStatsGroup; sandboxes: AppStatsSandboxCounts; lifecycle: AppLifecycle; deploymentCount?: number; } /** Optional parameters for {@link App#stop App.stop()}. */ type AppStopParams = Record; /** Represents a Modal App. */ declare class App { #private; readonly appId: string; readonly name?: string; readonly environmentName?: string; /** @ignore */ constructor(appId: string, name?: string, environmentName?: string, client?: ModalClient, metadata?: AppHandleMetadata); /** * Return information about this App, including its lifecycle and member Functions and Servers. * By default, returns the snapshot from the previous lookup, listing, or refresh. */ info(params?: AppInfoParams): Promise; /** * Return aggregate Function, Server, and Sandbox statistics for this App. * * The default window is the most recent hour. Windows can span at most seven days, * with a start in the past 30 days. * * App stats show total call counts, request counts, and the count of active and errored containers in * the time window. The count of sandboxes that finished in the interval as well as the count * that were still running as of the end of the window is also returned. * * The available stats and their definitions are subject to change and are provided * on a best-effort basis. They may be delayed or incomplete. * * @param params - The beginning (inclusive) and end (exclusive) of the time range. * `until` defaults to the current time; `since` defaults to an hour before `until`. * * @example * ```ts * const stats = await app.stats(); * console.log(stats.functions.total.calls.failed); * console.log(stats.functions.byName["embed"].counts.containers.errors); * ``` */ stats(params?: AppStatsParams): Promise; /** * Stop the App. * * Stopping an App terminates all of its running containers and Sandboxes and * prevents new inputs from being processed. */ stop(_?: AppStopParams): Promise; /** Operations on this App's Sandboxes. */ get sandboxes(): AppSandboxesManager; } /** Operations on an {@link App}'s Sandboxes, accessed via `app.sandboxes`. */ declare class AppSandboxesManager { #private; /** @ignore */ constructor(appId: string, client?: ModalClient); /** * Return statistics for this App's Sandboxes over a time range, optionally grouped by tag values. * * The maximum time range is 7 days. * * Yields {@link SandboxGroupStats} objects, one per combination of tag values, with the following fields: * - `tags`: the value of each name in `groupByTags` for the group's Sandboxes, `null` where not present. * - `cost`: total cost in USD as a decimal string, the sum of `costByResource`. * - `costByResource`: cost in USD as decimal strings, by billed resource: `CPU`, `Memory`, and GPU types such as * `H100`. The resource names are subject to change as Modal's billing model evolves. * * @throws {InvalidError} If the time range is invalid or there are more than 10,000 groups. * * @example * ```ts * const since = new Date(Math.floor(Date.now() / 3600_000) * 3600_000 - 24 * 3600_000); * for await (const group of app.sandboxes.stats({ since, groupByTags: ["team"] })) { * console.log(group.tags, group.cost, group.costByResource); * } * ``` */ stats(params: SandboxStatsParams): AsyncGenerator; } /** An operation exceeds the allowed time limit. */ declare class TimeoutError extends Error { constructor(message?: string); } /** * Function execution exceeds the allowed time limit. * * {@link FunctionCall#get FunctionCall.get()} throws {@link TimeoutError} * instead when `timeoutMs` elapses before the Function finishes. Matching that * case with `instanceof FunctionTimeoutError` is deprecated and will stop * working in a future release. */ declare class FunctionTimeoutError extends Error { constructor(message: string); static [Symbol.hasInstance](instance: unknown): boolean; } /** An error on the Modal server, or a Python exception. */ declare class RemoteError extends Error { constructor(message: string); } /** Something unexpected happened during runtime. */ declare class ExecutionError 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); } /** The current state of a resource conflicts with the requested operation. */ declare class ConflictError 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); } /** A server-side resource has been exhausted, such as capacity, a quota, or a rate limit. */ declare class ResourceExhaustedError extends Error { constructor(message: string); } /** Errors from invalid Sandbox FileSystem operations. */ declare class SandboxFilesystemError extends Error { constructor(message: string); } /** A directory was expected to be empty but is not. */ declare class SandboxFilesystemDirectoryNotEmptyError extends SandboxFilesystemError { constructor(message: string); } /** A file exceeds the maximum allowed size for a read operation. */ declare class SandboxFilesystemFileTooLargeError extends SandboxFilesystemError { constructor(message: string); } /** A file operation was attempted on a path that resolves to a directory. */ declare class SandboxFilesystemIsADirectoryError extends SandboxFilesystemError { constructor(message: string); } /** A directory operation encountered a path component that is not a directory. */ declare class SandboxFilesystemNotADirectoryError extends SandboxFilesystemError { constructor(message: string); } /** A file or directory is not found. */ declare class SandboxFilesystemNotFoundError extends SandboxFilesystemError { constructor(message: string); } /** A path already exists and the operation requires it to be absent. */ declare class SandboxFilesystemPathAlreadyExistsError extends SandboxFilesystemError { constructor(message: string); } /** Permission is denied for a file operation. */ declare class SandboxFilesystemPermissionError extends SandboxFilesystemError { constructor(message: string); } /** Sandbox operations that exceed the allowed time limit. */ declare class SandboxTimeoutError extends Error { constructor(message?: string); } /** Snapshot operation is done and failed. Polling again will not produce an Image; filesystem state is gone. */ declare class SnapshotCreationError 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, type AppInfo, type AppInfoParams, type AppLifecycle, AppSandboxesManager, AppService, type AppState, type AppStats, type AppStatsCallCounts, type AppStatsContainerCounts, type AppStatsFunctionCounts, type AppStatsFunctionStats, type AppStatsFunctionStatsGroup, type AppStatsParams, type AppStatsRequestCounts, type AppStatsSandboxCounts, type AppStatsServerCounts, type AppStatsServerStats, type AppStatsServerStatsGroup, type AppStopParams, ClientClosedError, CloudBucketMount, CloudBucketMountService, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ConflictError, ContainerProcess, Environment, EnvironmentAppsService, type EnvironmentCreateParams, type EnvironmentFromNameParams, EnvironmentObjectsService, EnvironmentService, ExecutionError, ExperimentalOutboundPolicy, type FileInfo, type FileType, type FileWatchEvent, type FileWatchEventType, type FunctionAutoscalerSettings, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, type FunctionCallLogFetchParams, type FunctionCallLogStreamParams, type FunctionCallLogTailParams, FunctionCallLogsManager, FunctionCallService, type FunctionCurrentStats, type FunctionFromNameParams, type FunctionInfo, type FunctionLogFetchParams, type FunctionLogStreamParams, type FunctionLogTailParams, FunctionLogsManager, type FunctionMetricsExportParams, FunctionMetricsManager, FunctionService, type FunctionStats, type FunctionStatsParams, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, type FunctionWithBatchingParams, type FunctionWithConcurrencyParams, type FunctionWithOptionsParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, type ImageFromNameParams, type ImagePublishParams, ImageService, InternalFailure, InvalidError, type LogEntry, type FunctionLogFetchParams as LogFetchParams, type LogLevel, type LogSource, type Logger, type MetricDefinition, type MetricSeries, type MetricsSchema, type MetricsSchemaParams, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type ObjectMetrics, 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, ResourceExhaustedError, Retries, Sandbox, type SandboxCreateConnectCredentials, type SandboxCreateConnectTokenParams, type SandboxCreateParams, type SandboxExecParams, type SandboxExperimentalFromNameParams, type SandboxExperimentalFromSnapshotParams, type SandboxExperimentalGetExitSnapshotParams, type SandboxExperimentalListParams, SandboxFilesystem, SandboxFilesystemDirectoryNotEmptyError, SandboxFilesystemError, SandboxFilesystemFileTooLargeError, SandboxFilesystemIsADirectoryError, SandboxFilesystemNotADirectoryError, SandboxFilesystemNotFoundError, SandboxFilesystemPathAlreadyExistsError, SandboxFilesystemPermissionError, type SandboxFromNameParams, type SandboxGroupStats, type SandboxListParams, type SandboxLogFetchParams, type SandboxLogTailParams, SandboxLogsManager, type SandboxMountImageParams, type SandboxReloadVolumesParams, type SandboxRuntime, SandboxService, SandboxSnapshot, type SandboxSnapshotDirectoryParams, type SandboxSnapshotFilesystemParams, SandboxSnapshotService, type SandboxStatsParams, type SandboxTerminateParams, SandboxTimeoutError, type SandboxUpdateNetworkPolicyParams, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, SidecarContainer, type SidecarCreateParams, type SidecarExecParams, type SidecarGetParams, type SidecarListParams, type SidecarMountImageParams, SidecarService, type SidecarSnapshotDirectoryParams, type SidecarSnapshotFilesystemParams, type SidecarTerminateParams, type SidecarUnmountImageParams, SnapshotCreationError, type StatsPercentile, type StatsPercentileDistribution, type StdioBehavior, type StreamMode, type TimeSeriesPoint, TimeoutError, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, type VolumeMountOptionsParams, VolumeService, checkForRenamedParams };