// 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. syntax = "proto3"; option go_package = "github.com/modal-labs/modal/go/proto"; package modal.client; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; enum AppDeployVisibility { APP_DEPLOY_VISIBILITY_UNSPECIFIED = 0; APP_DEPLOY_VISIBILITY_WORKSPACE = 1; APP_DEPLOY_VISIBILITY_PUBLIC = 2; } 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; } // 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 enum AppState { APP_STATE_UNSPECIFIED = 0; // Will be discharged when the client disconnects APP_STATE_EPHEMERAL = 1; APP_STATE_DETACHED = 2; // Will be discharged when overwritten APP_STATE_DEPLOYED = 3; // Winding down app due to user termination. APP_STATE_STOPPING = 4; // Stopped APP_STATE_STOPPED = 5; // App is created and in process of deployment. APP_STATE_INITIALIZING = 6; // Same as stopped but prevented from being garbage collected APP_STATE_DISABLED = 7; // App is detached and local client has disconnected. APP_STATE_DETACHED_DISCONNECTED = 8; // App is derived from another workspace. Acts as a static, immutable group of functions. APP_STATE_DERIVED = 9 [deprecated=true]; } enum AppStopSource { APP_STOP_SOURCE_UNSPECIFIED = 0; APP_STOP_SOURCE_CLI = 1; APP_STOP_SOURCE_PYTHON_CLIENT = 2; APP_STOP_SOURCE_WEB = 3; } // CPU architecture an image is built for and must run on. enum Arch { ARCH_UNSPECIFIED = 0; ARCH_X86_64 = 1; ARCH_AARCH64 = 2; } enum CertificateStatus { CERTIFICATE_STATUS_PENDING = 0; CERTIFICATE_STATUS_ISSUED = 1; CERTIFICATE_STATUS_FAILED = 2; CERTIFICATE_STATUS_REVOKED = 3; } enum CheckpointStatus { CHECKPOINT_STATUS_UNSPECIFIED = 0; CHECKPOINT_STATUS_PENDING = 1; CHECKPOINT_STATUS_PROCESSING = 2; CHECKPOINT_STATUS_READY = 3; CHECKPOINT_STATUS_FAILED = 4; } enum ClientType { CLIENT_TYPE_UNSPECIFIED = 0; CLIENT_TYPE_CLIENT = 1; // modal-client: Modal Python SDK CLIENT_TYPE_WORKER = 2; // modal-worker CLIENT_TYPE_CONTAINER = 3; // modal-client from inside containers CLIENT_TYPE_WEB_SERVER = 5; // modal-web CLIENT_TYPE_NOTEBOOK_KERNEL = 6; // kernelshim.py from notebooks CLIENT_TYPE_LIBMODAL = 7; // libmodal: experimental JS&Go SDK, before version modal-js/v0.3.15, modal-go/v0.0.15 CLIENT_TYPE_LIBMODAL_JS = 8; // libmodal/modal-js: JavaScript SDK, since version modal-js/v0.3.15 CLIENT_TYPE_LIBMODAL_GO = 9; // libmodal/modal-go: Go SDK, since version modal-go/v0.0.15 } enum CloudProvider { CLOUD_PROVIDER_UNSPECIFIED = 0; CLOUD_PROVIDER_AWS = 1; CLOUD_PROVIDER_GCP = 2; CLOUD_PROVIDER_AUTO = 3; CLOUD_PROVIDER_OCI = 4; reserved 5, 6, 7, 8; // now unused internal experimental values } enum DNSRecordType { DNS_RECORD_TYPE_A = 0; DNS_RECORD_TYPE_TXT = 1; DNS_RECORD_TYPE_CNAME = 2; } // Which data format a binary message is encoded with. enum DataFormat { DATA_FORMAT_UNSPECIFIED = 0; DATA_FORMAT_PICKLE = 1; // Cloudpickle DATA_FORMAT_ASGI = 2; // "Asgi" protobuf message DATA_FORMAT_GENERATOR_DONE = 3; // "GeneratorDone" protobuf message DATA_FORMAT_CBOR = 4; } enum DeploymentNamespace { DEPLOYMENT_NAMESPACE_UNSPECIFIED = 0; DEPLOYMENT_NAMESPACE_WORKSPACE = 1; DEPLOYMENT_NAMESPACE_GLOBAL = 3; } 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; } 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; } enum EndpointInputModality { ENDPOINT_INPUT_MODALITY_UNSPECIFIED = 0; ENDPOINT_INPUT_MODALITY_TEXT = 1; ENDPOINT_INPUT_MODALITY_IMAGE = 2; ENDPOINT_INPUT_MODALITY_AUDIO = 3; } enum EndpointLifecycleStatus { ENDPOINT_LIFECYCLE_STATUS_UNSPECIFIED = 0; ENDPOINT_LIFECYCLE_STATUS_ACTIVE = 1; ENDPOINT_LIFECYCLE_STATUS_STOPPED = 2; } 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; } enum EndpointServingMode { ENDPOINT_SERVING_MODE_UNSPECIFIED = 0; ENDPOINT_SERVING_MODE_DEDICATED = 1; ENDPOINT_SERVING_MODE_SHARED = 2; } enum EndpointStopSource { ENDPOINT_STOP_SOURCE_UNSPECIFIED = 0; ENDPOINT_STOP_SOURCE_CLI = 1; ENDPOINT_STOP_SOURCE_WEB = 2; } enum EndpointTaskType { ENDPOINT_TASK_TYPE_UNSPECIFIED = 0; ENDPOINT_TASK_TYPE_GENERATION = 1; ENDPOINT_TASK_TYPE_EMBEDDING = 2; } // Partial-update signal for EnvironmentUpdateRequest. Omitted means no-op. // INHERIT clears the environment override so the workspace default applies. 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; } enum EnvironmentRole { ENVIRONMENT_ROLE_UNSPECIFIED = 0; ENVIRONMENT_ROLE_VIEWER = 1; ENVIRONMENT_ROLE_CONTRIBUTOR = 2; ENVIRONMENT_ROLE_NO_ACCESS = 3; } // Creation-time environment classification. Captures whether an environment // is public. is_managed and machine_generated may be folded in as future // values. enum EnvironmentType { ENVIRONMENT_TYPE_UNSPECIFIED = 0; ENVIRONMENT_TYPE_PUBLIC = 1; } enum ExecOutputOption { EXEC_OUTPUT_OPTION_UNSPECIFIED = 0; EXEC_OUTPUT_OPTION_DEVNULL = 1; EXEC_OUTPUT_OPTION_PIPE = 2; EXEC_OUTPUT_OPTION_STDOUT = 3; } enum FileDescriptor { FILE_DESCRIPTOR_UNSPECIFIED = 0; FILE_DESCRIPTOR_STDOUT = 1; FILE_DESCRIPTOR_STDERR = 2; FILE_DESCRIPTOR_INFO = 3; } 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; } 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; } enum FunctionCallType { FUNCTION_CALL_TYPE_UNSPECIFIED = 0; FUNCTION_CALL_TYPE_UNARY = 1; FUNCTION_CALL_TYPE_MAP = 2; } enum GPUType { // 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; } enum IdentityProviderType { IDENTITY_PROVIDER_TYPE_UNSPECIFIED = 0; IDENTITY_PROVIDER_TYPE_GITHUB = 1; IDENTITY_PROVIDER_TYPE_SAML = 2; IDENTITY_PROVIDER_TYPE_GOOGLE_OAUTH = 3; } enum LLMEngine { LLM_ENGINE_UNSPECIFIED = 0; LLM_ENGINE_SGLANG = 1; LLM_ENGINE_VLLM = 2; } enum MemberRole { MEMBER_ROLE_UNSPECIFIED = 0; MEMBER_ROLE_USER = 1; MEMBER_ROLE_MANAGER = 2; MEMBER_ROLE_OWNER = 3; } enum ObjectCreationType { OBJECT_CREATION_TYPE_UNSPECIFIED = 0; // just lookup 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 = 4; // deprecate at some point OBJECT_CREATION_TYPE_EPHEMERAL = 5; } enum ParameterType { PARAM_TYPE_UNSPECIFIED = 0; PARAM_TYPE_STRING = 1; PARAM_TYPE_INT = 2; PARAM_TYPE_PICKLE = 3; // currently unused PARAM_TYPE_BYTES = 4; PARAM_TYPE_UNKNOWN = 5; // used in schemas to signify unrecognized or un-annotated types PARAM_TYPE_LIST = 6; PARAM_TYPE_DICT = 7; PARAM_TYPE_NONE = 8; PARAM_TYPE_BOOL = 9; } enum ProgressType { IMAGE_SNAPSHOT_UPLOAD = 0; // TODO(erikbern): shouldn't be zero, and needs prefix FUNCTION_QUEUED = 1; // TODO(erikbern): needs_prefix } 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; } enum ProxyType { PROXY_TYPE_UNSPECIFIED = 0; PROXY_TYPE_LEGACY = 1; PROXY_TYPE_VPROX = 2; } enum RateLimitInterval { RATE_LIMIT_INTERVAL_UNSPECIFIED = 0; RATE_LIMIT_INTERVAL_SECOND = 1; RATE_LIMIT_INTERVAL_MINUTE = 2; } enum RegistryAuthType { REGISTRY_AUTH_TYPE_UNSPECIFIED = 0; // Older clients send this instead of "public". REGISTRY_AUTH_TYPE_AWS = 1; REGISTRY_AUTH_TYPE_GCP = 2; REGISTRY_AUTH_TYPE_PUBLIC = 3; REGISTRY_AUTH_TYPE_STATIC_CREDS = 4; } enum SeekWhence { SEEK_SET = 0; SEEK_CUR = 1; SEEK_END = 2; } 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; } enum SystemErrorCode { SYSTEM_ERROR_CODE_UNSPECIFIED = 0; SYSTEM_ERROR_CODE_PERM = 1; // EPERM: Operation not permitted SYSTEM_ERROR_CODE_NOENT = 2; // ENOENT: No such file or directory SYSTEM_ERROR_CODE_IO = 5; // EIO: Input/output error SYSTEM_ERROR_CODE_NXIO = 6; // ENXIO: No such device or address SYSTEM_ERROR_CODE_NOMEM = 12; // ENOMEM: Out of memory SYSTEM_ERROR_CODE_ACCES = 13; // EACCES: Permission denied SYSTEM_ERROR_CODE_EXIST = 17; // EEXIST: File exists SYSTEM_ERROR_CODE_NOTDIR = 20; // ENOTDIR: Not a directory SYSTEM_ERROR_CODE_ISDIR = 21; // EISDIR: Is a directory SYSTEM_ERROR_CODE_INVAL = 22; // EINVAL: Invalid argument SYSTEM_ERROR_CODE_MFILE = 24; // EMFILE: Too many open files SYSTEM_ERROR_CODE_FBIG = 27; // EFBIG: File too large SYSTEM_ERROR_CODE_NOSPC = 28; // ENOSPC: No space left on device } enum TaskSnapshotBehavior { TASK_SNAPSHOT_BEHAVIOR_UNSPECIFIED = 0; TASK_SNAPSHOT_BEHAVIOR_SNAPSHOT = 1; TASK_SNAPSHOT_BEHAVIOR_RESTORE = 2; TASK_SNAPSHOT_BEHAVIOR_NONE = 3; } 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; } enum TunnelType { TUNNEL_TYPE_UNSPECIFIED = 0; TUNNEL_TYPE_H2 = 1; // HTTP/2 tunnel } enum VolumeFsVersion { VOLUME_FS_VERSION_UNSPECIFIED = 0; VOLUME_FS_VERSION_V1 = 1; VOLUME_FS_VERSION_V2 = 2; } enum WebhookAsyncMode { WEBHOOK_ASYNC_MODE_UNSPECIFIED = 0; reserved 1; // unused REDIRECT mode WEBHOOK_ASYNC_MODE_DISABLED = 2; // No longer used by client WEBHOOK_ASYNC_MODE_TRIGGER = 3; // No longer used by client (previously used when wait_for_response=False) WEBHOOK_ASYNC_MODE_AUTO = 4; // The default } 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; } message AppClientDisconnectRequest { string app_id = 1; AppDisconnectReason reason = 2; string exception = 3; } message AppCountLogsRequest { string app_id = 1; string task_id = 2; string function_id = 3; string function_call_id = 4; string sandbox_id = 5; string search_text = 6; google.protobuf.Timestamp since = 7; google.protobuf.Timestamp until = 8; uint32 bucket_secs = 9; FileDescriptor source = 10; // Restrict logs to this exact Function ID, including when it is the base Function. string parametrized_function_id = 11; } message AppCountLogsResponse { message LogBucket { google.protobuf.Timestamp bucket_start_at = 1; uint64 stdout_logs = 2; uint64 stderr_logs = 3; uint64 system_logs = 4; } string app_id = 1; repeated LogBucket buckets = 2; } message AppCreateRequest { string client_id = 1; string description = 2; // Human readable label for the app string environment_name = 5; AppState app_state = 6; map tags = 7; // Additional metadata to attach to the App } message AppCreateResponse { string app_id = 1; string app_page_url = 2; string app_logs_url = 3; } message AppDeployRequest { string app_id = 1; reserved 2; // namespace string name = 3; string object_entity = 4; AppDeployVisibility visibility = 5; string tag = 6; } message AppDeployResponse { string url = 1; } message AppDeploymentHistory { string app_id = 1; uint32 version = 2; string client_version = 3; double deployed_at = 4; string deployed_by = 5; string deployed_by_avatar_url = 9; string tag = 6; uint32 rollback_version = 7; bool rollback_allowed = 8; optional CommitInfo commit_info = 10; DeploymentType deployment_type = 11; } message AppDeploymentHistoryRequest { string app_id = 1; } message AppDeploymentHistoryResponse { repeated AppDeploymentHistory app_deployment_histories = 1; uint32 production_app_version = 2; } message AppFetchLogsRequest { string app_id = 1; google.protobuf.Timestamp since = 2; google.protobuf.Timestamp until = 3; uint32 limit = 4; FileDescriptor source = 5; string function_id = 6; string function_call_id = 7; string task_id = 8; string sandbox_id = 9; string search_text = 10; // Restrict logs to this exact Function ID, including when it is the base Function. string parametrized_function_id = 11; } message AppFetchLogsResponse { repeated TaskLogsBatch batches = 1; } message AppGetByDeploymentNameRequest { reserved 1; // removed namespace string name = 2; string environment_name = 4; } message AppGetByDeploymentNameResponse { string app_id = 1; // Null when App with requested name is not deployed string previous_app_id = 2; // Populated if App with requested name was recently stopped string environment_name = 3; // Populated because server may resolve default environment AppLifecycle lifecycle = 4; // Lifecycle of current App or recently stopped App } message AppGetInfoRequest { string app_id = 1; } message AppGetInfoResponse { message FunctionInfoSummary { repeated GPUConfig gpu_config = 1; Schedule schedule = 2; // True for Web Functions and classes with web methods; false for Servers. bool web_function = 3; optional bool requires_proxy_auth = 4; } AppHandleMetadata info = 1; map function_info_summaries = 2; } message AppGetLayoutRequest { string app_id = 1; } message AppGetLayoutResponse { AppLayout app_layout = 1; } message AppGetLifecycleRequest { string app_id = 1; } message AppGetLifecycleResponse { AppLifecycle lifecycle = 1; } message AppGetLogsRequest { string app_id = 1; float timeout = 2; string last_entry_id = 4; string function_id = 5; string parametrized_function_id = 11; string input_id = 6; string task_id = 7; string function_call_id = 9; FileDescriptor file_descriptor = 8; string sandbox_id = 10; string search_text = 12; } message AppGetObjectsItem { string tag = 1; Object object = 6; } message AppGetObjectsRequest { string app_id = 1; bool include_unindexed = 2; bool only_class_function = 3; // True starting with 0.67.x clients, which don't create method placeholder functions } message AppGetObjectsResponse { repeated AppGetObjectsItem items = 2; } message AppGetOrCreateRequest { string app_name = 1; string environment_name = 2; ObjectCreationType object_creation_type = 3; } message AppGetOrCreateResponse { string app_id = 1; AppHandleMetadata handle_metadata = 2; } message AppGetTagsRequest { string app_id = 1; } message AppGetTagsResponse { map tags = 1; } message AppHandleMetadata { string description = 1; string app_id = 2; string environment_name = 3; AppLifecycle lifecycle = 4; map functions = 5; // tag -> function id map servers = 6; // tag -> function id } message AppHeartbeatRequest { string app_id = 1; } message AppLayout { repeated Object objects = 1; map function_ids = 2; // tag -> function id map class_ids = 3; // tag -> class id } message AppLifecycle { AppState app_state = 1; double created_at = 2; string created_by = 3; // User or service user name double deployed_at = 4; // Most recent deployment event string deployed_by = 5; // User or service user name int32 version = 6; // Only meaningful when App is deployed double stopped_at = 7; // Unset when App is still running string stopped_by = 8; // User or service user name, null if running or ephemeral App that finished normally } message AppListRequest { string environment_name = 1; } message AppListResponse { message AppListItem { string app_id = 1; string description = 3; AppState state = 4; double created_at = 5; double stopped_at = 6; int32 n_running_tasks = 8; string name = 10; } repeated AppListItem apps = 1; } message AppLookupRequest { string app_name = 2; string environment_name = 3; } message AppLookupResponse { string app_id = 1; } message AppPromoteRequest { string app_id = 1; int32 version = 2; } message AppPromoteResponse { string url = 1; repeated Warning server_warnings = 2; double deployed_at = 3; } message AppPublishRequest { string app_id = 1; string name = 2; string deployment_tag = 3; // Additional metadata to identify a deployment AppState app_state = 4; // Published app will be in this state map function_ids = 5; // function_name -> function_id map class_ids = 6; // class_name -> class_id map definition_ids = 7; // function_id -> definition_id uint32 rollback_version = 8; // Unused by client, but used internally string client_version = 9; // Unused by client, but used internally CommitInfo commit_info = 10; // Git information for deployment tracking map tags = 11; // Additional metadata to attach to the App // If true, create a version pinned deployment but don't update the production deployment // definition on publish bool staged = 12; DeploymentType deployment_type = 13; } message AppPublishResponse { string url = 1; repeated Warning server_warnings = 3; double deployed_at = 4; } message AppRollbackRequest { string app_id = 1; int32 version = 2; // signed as we support negative "roll back n versions" requests } message AppRollbackResponse { string url = 1; repeated Warning server_warnings = 3; double deployed_at = 4; } message AppRolloverRequest { string app_id = 1; } message AppRolloverResponse { string url = 1; repeated Warning server_warnings = 3; double deployed_at = 4; } message AppSetObjectsRequest { string app_id = 1; map indexed_object_ids = 2; string client_id = 3; repeated string unindexed_object_ids = 4; AppState new_app_state = 5; // promotes an app from initializing to this new state reserved 6; } message AppSetTagsRequest { string app_id = 1; map tags = 2; } message AppStopRequest { string app_id = 1; AppStopSource source = 2; } // A Web Function connection-related message. // // Modal's internal Web Function runtime effectively acts as a global web server // that schedules requests to tasks that are spawned on-demand, so we need an // internal protocol to model HTTP requests. This is that protocol. // // We base this protocol on Python's ASGI specification, which is a popular // interface between applications and web servers. // // ASGI Spec: https://asgi.readthedocs.io/en/latest/specs/www.html message Asgi { // Message of type "http" (connection scope) message Http { string http_version = 1; string method = 2; string scheme = 3; string path = 4; bytes query_string = 5; repeated bytes headers = 6; // Flat list of alternating header names and values optional string client_host = 7; optional uint32 client_port = 8; } // Message of type "http.request" message HttpRequest { bytes body = 1; bool more_body = 2; } // Message of type "http.response.start" message HttpResponseStart { uint32 status = 1; repeated bytes headers = 2; // Flat list of alternating header names and values bool trailers = 3; } // Message of type "http.response.body" message HttpResponseBody { bytes body = 1; bool more_body = 2; } // Message of type "http.response.trailers" message HttpResponseTrailers { repeated bytes headers = 1; // Flat list of alternating header names and values bool more_trailers = 2; } // Message of type "http.disconnect" message HttpDisconnect { } // Message of type "websocket" (connection scope) message Websocket { string http_version = 1; // We don't support RFC 8441 yet, so this will always be "1.1" string scheme = 2; string path = 3; bytes query_string = 4; repeated bytes headers = 5; // Flat list of alternating header names and values optional string client_host = 6; optional uint32 client_port = 7; repeated string subprotocols = 8; } // Message of type "websocket.connect" message WebsocketConnect { } // Message of type "websocket.accept" message WebsocketAccept { optional string subprotocol = 1; repeated bytes headers = 2; // Flat list of alternating header names and values } // Message of type "websocket.receive" message WebsocketReceive { oneof content { bytes bytes = 1; string text = 2; } } // Message of type "websocket.send" message WebsocketSend { oneof content { bytes bytes = 1; string text = 2; } } // Message of type "websocket.disconnect" message WebsocketDisconnect { optional uint32 code = 1; } // Message of type "websocket.close" message WebsocketClose { optional uint32 code = 1; string reason = 2; } oneof type { Http http = 1; HttpRequest http_request = 2; HttpResponseStart http_response_start = 3; HttpResponseBody http_response_body = 4; HttpResponseTrailers http_response_trailers = 5; HttpDisconnect http_disconnect = 6; Websocket websocket = 7; WebsocketConnect websocket_connect = 8; WebsocketAccept websocket_accept = 9; WebsocketReceive websocket_receive = 10; WebsocketSend websocket_send = 11; WebsocketDisconnect websocket_disconnect = 12; WebsocketClose websocket_close = 13; } } message AttemptAwaitRequest { string attempt_token = 1; double requested_at = 2; // Used for waypoints. float timeout_secs = 3; } message AttemptAwaitResponse { optional FunctionGetOutputsItem output = 1; } message AttemptRetryRequest { string function_id = 1; string parent_input_id = 2; FunctionPutInputsItem input = 3; string attempt_token = 4; } message AttemptRetryResponse { string attempt_token = 1; } message AttemptStartRequest { string function_id = 1; string parent_input_id = 2; FunctionPutInputsItem input = 3; bool proxied = 4; } message AttemptStartResponse { string attempt_token = 1; FunctionRetryPolicy retry_policy = 2; } message AuthTokenGetRequest { } message AuthTokenGetResponse { string token = 1; } // Message representing the current (coalesced) state of the autoscaler configuration // As well as the different sources that were used to create it. message AutoscalerConfiguration { // The settings that are currently in effect. AutoscalerSettings settings = 1; // For tracking the source of the overridden value; keys correspond to fields in `settings`. map override_events = 2; // The default settings that are used when no static settings are provided and no overrides are in effect. AutoscalerSettings default_settings = 3; // The static settings that were used to initialize the configuration. AutoscalerSettings static_settings = 4; // The merge of all overrides that were used to create the current configuration. AutoscalerSettings override_settings = 5; } message AutoscalerSettings { // A collection of user-configurable settings for Function autoscaling // These are used for static configuration and for dynamic autoscaler updates // Minimum containers when scale-to-zero is not desired; pka "keep_warm" or "warm_pool_size" optional uint32 min_containers = 1; // Limit on the number of containers that can be running for each Function; pka "concurrency_limit" optional uint32 max_containers = 2; // Additional container to spin up when Function is active optional uint32 buffer_containers = 3; // Stabilization window (in seconds) before scaling up; requires sustained demand over this period optional uint32 scaleup_window = 4; // Maximum amount of time a container can be idle before being scaled down, in seconds; pka "container_idle_timeout" optional uint32 scaledown_window = 5; reserved 6; // Integer-valued target concurrent requests per replica for Flash autoscaling. // Superseded by `target_concurrency_float`, which allows non-integer targets. optional uint32 target_concurrency = 7; // Deprecated // Maximum number of containers that can be scaled down per minute for Flash autoscaling. optional uint32 scaledown_rate_limit = 8; // Target concurrent requests per replica for Flash autoscaling; may be fractional. optional double target_concurrency_float = 9; } // Used for flash autoscaling message AutoscalingMetrics { double cpu_usage_percent = 1; double memory_usage_percent = 2; uint32 concurrent_requests = 3; double timestamp = 4; } message BaseImage { string image_id = 1; string docker_tag = 2; reserved 4; } message BlobCreateRequest { // TODO(erikbern): how are these garbage collected? // Shouldn't they belong to an app? string content_md5 = 1; string content_sha256_base64 = 2; int64 content_length = 3; } message BlobCreateResponse { string blob_id = 2; oneof upload_type_oneof { string upload_url = 1; MultiPartUpload multipart = 3; } repeated string blob_ids = 4; oneof upload_types_oneof { UploadUrlList upload_urls = 5; MultiPartUploadList multiparts = 6; } } message BlobGetRequest { string blob_id = 1; } message BlobGetResponse { string download_url = 1; } message BlobUploadResult { enum Outcome { OUTCOME_UNSPECIFIED = 0; OUTCOME_SUCCESS = 1; OUTCOME_FAILURE = 2; } string blob_id = 1; // The blob id (from BlobCreateResponse) that this upload attempt targeted. Outcome outcome = 2; uint64 throughput_bytes_s = 3; } message BuildFunction { string definition = 1; bytes globals = 2; FunctionInput input = 3; } message CancelInputEvent { repeated string input_ids = 1; bool terminate_containers = 2; string cancellation_reason = 3; } message CheckpointInfo { string checksum = 1; CheckpointStatus status = 2; string checkpoint_id = 3; string runtime_fingerprint = 4; int64 size = 5; bool checksum_is_file_index = 6; string original_task_id = 7; reserved 8; string runsc_runtime_version = 9; } message ClassCreateRequest { string app_id = 1 ; string existing_class_id = 2; repeated ClassMethod methods = 3; reserved 4; // removed class_function_id bool only_class_function = 5; // True starting with 0.67.x clients, which don't create method placeholder functions } message ClassCreateResponse { string class_id = 1; ClassHandleMetadata handle_metadata = 2; } message ClassGetRequest { string app_name = 1; string object_tag = 2; reserved 3; // removed namespace string environment_name = 4; reserved 8; // lookup_published reserved 9; // workspace_name bool only_class_function = 10; // True starting with 0.67.x clients, which don't create method placeholder functions int32 app_version = 11; } message ClassGetResponse { string class_id = 1; ClassHandleMetadata handle_metadata = 2; repeated Warning server_warnings = 3; } message ClassHandleMetadata { repeated ClassMethod methods = 1; string class_function_id = 2; FunctionHandleMetadata class_function_metadata = 3; } message ClassMethod { string function_name = 1; string function_id = 2; // Class methods need to hydrate all functions on the class FunctionHandleMetadata function_handle_metadata = 3; } message ClassParameterInfo { enum ParameterSerializationFormat { PARAM_SERIALIZATION_FORMAT_UNSPECIFIED = 0; PARAM_SERIALIZATION_FORMAT_PICKLE = 1; // legacy format - pickle of (args, kwargs) tuple PARAM_SERIALIZATION_FORMAT_PROTO = 2; // new format using api.FunctionParameterSet } ParameterSerializationFormat format = 1; repeated ClassParameterSpec schema = 2; // only set for PARAM_SERIALIZATION_FORMAT_PROTO } message ClassParameterSet { // NOTE: adding additional *fields* here can invalidate function lookups // since we use the serialized message as the bound function identifier // for parameter-bound classes. Modify with *caution* repeated ClassParameterValue parameters = 1; } message ClassParameterSpec { // TODO: rename into NamedPayloadType or similar string name = 1; ParameterType type = 2; // TODO: deprecate - use full_type instead bool has_default = 3; oneof default_oneof { // Default *values* are only registered for class parameters string string_default = 4; int64 int_default = 5; bytes pickle_default = 6; bytes bytes_default = 7; bool bool_default = 9; } GenericPayloadType full_type = 8; // supersedes `type` } message ClassParameterValue { // TODO: rename into NamedPayloadValue // NOTE: adding additional *fields* here can invalidate function lookups // since we use the serialized message as the bound function identifier // for parameter-bound classes. Modify with *caution* string name = 1; ParameterType type = 2; oneof value_oneof { string string_value = 3; int64 int_value = 4; bytes pickle_value = 5; bytes bytes_value = 6; bool bool_value = 7; } } message ClientHelloResponse { string warning = 1; string image_builder_version = 2; // Deprecated, no longer used in client repeated Warning server_warnings = 4; } message CloudBucketMount { enum BucketType { UNSPECIFIED = 0; S3 = 1; R2 = 2; GCP = 3; } enum MetadataTTLType { METADATA_TTL_TYPE_UNSPECIFIED = 0; METADATA_TTL_TYPE_MINIMAL = 1; METADATA_TTL_TYPE_INDEFINITE = 2; } string bucket_name = 1; string mount_path = 2; string credentials_secret_id = 3; bool read_only = 4; BucketType bucket_type = 5; bool requester_pays = 6; optional string bucket_endpoint_url = 7; optional string key_prefix = 8; optional string oidc_auth_role_arn = 9; bool force_path_style = 10; oneof metadata_ttl_oneof { MetadataTTLType metadata_ttl_type = 11; uint64 metadata_ttl_seconds = 12; } } message ClusterGetRequest { string cluster_id = 1; } message ClusterGetResponse { ClusterStats cluster = 1; } message ClusterListRequest { string environment_name = 1; } message ClusterListResponse { repeated ClusterStats clusters = 1; } message ClusterStats { string app_id = 1; repeated string task_ids = 2; string cluster_id = 3; double started_at = 4; // Defined as start time of the first task in the cluster } message CommandRouterAccess { string jwt = 1; string url = 2; } message CommitInfo { string vcs = 1; // Only git is supported for now string branch = 2; string commit_hash = 3; int64 commit_timestamp = 4; bool dirty = 5; string author_name = 6; string author_email = 7; string repo_url = 8; } message ContainerArguments { // This is used to pass data from the worker to the container string task_id = 1; string function_id = 2; string app_id = 4; Function function_def = 7; ProxyInfo proxy_info = 8; map tracing_context = 9; bytes serialized_params = 10; string runtime = 11; string environment_name = 13; optional string checkpoint_id = 14; AppLayout app_layout = 15; string input_plane_server_url = 16; } message ContainerCheckpointRequest { string checkpoint_id = 1; } message ContainerExecGetOutputRequest { string exec_id = 1; float timeout = 2; uint64 last_batch_index = 3; FileDescriptor file_descriptor = 4; // Old clients (up to 0.65.39) expect string output. Newer clients stream raw bytes bool get_raw_bytes = 5; } message ContainerExecPutInputRequest { string exec_id = 1; RuntimeInputMessage input = 2; } message ContainerExecRequest { string task_id = 1; repeated string command = 2; // 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). optional PTYInfo pty_info = 3; // Send SIGTERM to running container on exit of exec command. bool terminate_container_on_exit = 4 [deprecated=true]; bool runtime_debug = 5; // For internal debugging use only. ExecOutputOption stdout_output = 6; ExecOutputOption stderr_output = 7; uint32 timeout_secs = 8; optional string workdir = 9; repeated string secret_ids = 10; } message ContainerExecResponse { string exec_id = 1; } message ContainerExecWaitRequest { string exec_id = 1; float timeout = 2; } message ContainerExecWaitResponse { optional int32 exit_code = 1; bool completed = 2; } message ContainerFileCloseRequest { string file_descriptor = 1; } message ContainerFileDeleteBytesRequest { string file_descriptor = 1; optional uint32 start_inclusive = 2; optional uint32 end_exclusive = 3; } message ContainerFileFlushRequest { string file_descriptor = 1; } message ContainerFileLsRequest { string path = 1; } message ContainerFileMkdirRequest { string path = 1; bool make_parents = 2; } message ContainerFileOpenRequest { // file descriptor is hydrated when sent from server -> worker optional string file_descriptor = 1; string path = 2; string mode = 3; } message ContainerFileReadLineRequest { string file_descriptor = 1; } message ContainerFileReadRequest { string file_descriptor = 1; optional uint32 n = 2; } message ContainerFileRmRequest { string path = 1; bool recursive = 2; } message ContainerFileSeekRequest { string file_descriptor = 1; int32 offset = 2; SeekWhence whence = 3; } message ContainerFileWatchRequest { string path = 1; bool recursive = 2; optional uint64 timeout_secs = 3; } message ContainerFileWriteReplaceBytesRequest { string file_descriptor = 1; bytes data = 2; optional uint32 start_inclusive = 3; optional uint32 end_exclusive = 4; } message ContainerFileWriteRequest { string file_descriptor = 1; bytes data = 2; } message ContainerFilesystemExecGetOutputRequest { string exec_id = 1; float timeout = 2; } message ContainerFilesystemExecRequest { oneof file_exec_request_oneof { ContainerFileOpenRequest file_open_request = 1; ContainerFileWriteRequest file_write_request = 2; ContainerFileReadRequest file_read_request = 3; ContainerFileFlushRequest file_flush_request = 4; ContainerFileReadLineRequest file_read_line_request = 5; ContainerFileSeekRequest file_seek_request = 6; ContainerFileDeleteBytesRequest file_delete_bytes_request = 7; ContainerFileWriteReplaceBytesRequest file_write_replace_bytes_request = 8; ContainerFileCloseRequest file_close_request = 9; ContainerFileLsRequest file_ls_request = 11; ContainerFileMkdirRequest file_mkdir_request = 12; ContainerFileRmRequest file_rm_request = 13; ContainerFileWatchRequest file_watch_request = 14; } string task_id = 10; } message ContainerFilesystemExecResponse { string exec_id = 1; // only set when the request opens a new file, i.e., ContainerFileOpenRequest optional string file_descriptor = 2; } message ContainerHeartbeatRequest { bool canceled_inputs_return_outputs = 4; // Bad client version. bool canceled_inputs_return_outputs_v2 = 5; reserved 1, 2, 3; } message ContainerHeartbeatResponse { optional CancelInputEvent cancel_input_event = 1; } message ContainerLogRequest { repeated TaskLogs logs = 3; } message ContainerReloadVolumesRequest { string task_id = 1; } message ContainerReloadVolumesResponse { } // Sent by server containers once lifecycle enter methods have completed. // Only handled on worker by server_io_manager. message ContainerServerLifecycleReadyRequest { } message ContainerStopRequest { string task_id = 1; bool graceful = 2; // Let a Function container finish processing any inputs before exiting. } message ContainerStopResponse { } message CreationInfo { // This message is used in metadata for resource objects like Dict, Queue, Volume, etc. double created_at = 1; // Timestamp of resource creation string created_by = 2; // User name or service name } message CurlAuthTokenRequest { string url = 1; } message CurlAuthTokenResponse { string token = 1; } message CustomDomainConfig { string name = 1; } message CustomDomainInfo { string url = 1; } message DNSRecord { DNSRecordType type = 1; string name = 2; string value = 3; } // Chunks of data that can be streamed in and out of tasks. message DataChunk { DataFormat data_format = 1; oneof data_oneof { bytes data = 2; string data_blob_id = 3; } uint64 index = 4; // Index of this data chunk in the stream. } message DictClearRequest { string dict_id = 1; } message DictContainsRequest { string dict_id = 1; bytes key = 2; } message DictContainsResponse { bool found = 1; } message DictContentsRequest { string dict_id = 1; // 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 bool keys = 2; bool values = 3; } message DictDeleteRequest { string dict_id = 1; } message DictEntry { bytes key = 1; bytes value = 2; } message DictGetByIdRequest { string dict_id = 1; } message DictGetByIdResponse { string dict_id = 1; DictMetadata metadata = 2; } message DictGetOrCreateRequest { string deployment_name = 1; reserved 2; // removed namespace string environment_name = 3; ObjectCreationType object_creation_type = 4; repeated DictEntry data = 5; // Unused after 1.4.0 } message DictGetOrCreateResponse { string dict_id = 1; DictMetadata metadata = 2; } message DictGetRequest { string dict_id = 1; bytes key = 2; } message DictGetResponse { bool found = 1; optional bytes value = 2; } message DictHeartbeatRequest { string dict_id = 1; } message DictLenRequest { string dict_id = 1; } message DictLenResponse { int32 len = 1; } message DictListRequest { string environment_name = 1; ListPagination pagination = 2; } message DictListResponse { message DictInfo { string name = 1; double created_at = 2; // Superseded by metadata, used by clients up to 1.1.2 string dict_id = 3; DictMetadata metadata = 4; } repeated DictInfo dicts = 1; string environment_name = 2; } message DictMetadata { string name = 1; CreationInfo creation_info = 2; } message DictPopRequest { string dict_id = 1; bytes key = 2; } message DictPopResponse { bool found = 1; optional bytes value = 2; } message DictUpdateRequest { string dict_id = 1; repeated DictEntry updates = 2; bool if_not_exists = 3; } message DictUpdateResponse { bool created = 1; } message Domain { string domain_id = 1; string domain_name = 2; double created_at = 3; CertificateStatus certificate_status = 4; repeated DNSRecord dns_records = 5; }; message DomainCertificateVerifyRequest { string domain_id = 1; } message DomainCertificateVerifyResponse { Domain domain = 1; } message DomainCreateRequest { string domain_name = 1 ; } message DomainCreateResponse { string domain_id = 1; repeated DNSRecord dns_records = 2; } message DomainListRequest { } message DomainListResponse { repeated Domain domains = 1; } message EndpointComputeRegionSpec { message ExplicitRegions { repeated string regions = 1; } oneof placement { google.protobuf.Empty auto = 1; google.protobuf.Empty colocated = 2; ExplicitRegions explicit = 3; } } message EndpointCreateRequest { string name = 1; string description = 2; repeated string proxy_regions = 3; EndpointComputeRegionSpec compute_region = 4; EndpointModelSource model = 5; repeated EndpointApiSurface api_surfaces = 6; repeated EndpointInputModality input_modalities = 7; string environment_name = 8; bool unauthenticated = 9; EndpointServingMode serving_mode = 10; bool shared_endpoint_notice_acknowledged = 11; } message EndpointCreateResponse { string endpoint_id = 1; string endpoint_page_url = 2; string name = 3; } message EndpointCustomModelSource { string base_model_repo_id = 1; oneof location { EndpointHuggingFaceModelSource huggingface = 2; EndpointModalVolumeModelSource modal_volume = 3; } } message EndpointGetByNameRequest { string name = 1; string environment_name = 2; } message EndpointGetByNameResponse { string endpoint_id = 1; string environment_name = 2; } message EndpointGetLifecycleRequest { string endpoint_id = 1; } message EndpointGetLifecycleResponse { EndpointLifecycle lifecycle = 1; } message EndpointHuggingFaceModelSource { string repo_id = 1; string revision = 2; string huggingface_token = 3; } message EndpointLifecycle { EndpointLifecycleStatus status = 1; double created_at = 2; string created_by = 3; // User or service user name double stopped_at = 4; // Unset when Endpoint is active string stopped_by = 5; // User or service user name string environment_name = 6; } message EndpointListItem { string endpoint_id = 1; string name = 2; string description = 3; string active_deployment_id = 4; double updated_at = 5; EndpointMetadata metadata = 6; AppState app_state = 7; string function_id = 8; string created_by_avatar_url = 9; EndpointProvisioningStatus provisioning_status = 10; string status = 11; EndpointServingMode serving_mode = 12; bool unauthenticated = 13; } message EndpointListRequest { string environment_name = 1; ListPagination pagination = 2; } message EndpointListResponse { repeated EndpointListItem items = 1; string environment_name = 2; } message EndpointMetadata { string name = 1; CreationInfo creation_info = 2; } message EndpointModalVolumeModelSource { string volume_id = 1; string model_path = 2; } message EndpointModelSource { oneof source { string base_model_repo_id = 1; EndpointCustomModelSource custom = 2; } } message EndpointStopRequest { string endpoint_id = 1; EndpointStopSource source = 2; } message EndpointStopResponse {} message EnvironmentBillingSummaryRequest { // all query intervals are implicitly one month long (to line up with billing cycles) google.protobuf.Timestamp start_timestamp = 1; string environment_id = 3; } message EnvironmentBillingSummaryResponse { google.protobuf.Timestamp start_timestamp = 1; google.protobuf.Timestamp end_timestamp = 2; // not showing credits, reservations, etc as those are applied // at the workspace level string metered_cost = 3; // keyed by deployed, ephemeral, volume, notebook map metered_cost_breakdown = 4; } message EnvironmentCreateRequest { string name = 1; bool is_managed = 2; EnvironmentSettings settings = 3; EnvironmentType environment_type = 4; optional EnvironmentRole default_member_role = 5; string default_member_role_str = 6; // String representation; parsed when the enum is unspecified. } message EnvironmentDeleteRequest { string name = 1; } message EnvironmentGetBudgetRequest { string environment_id = 1; } message EnvironmentGetBudgetResponse { optional double cycle_budget_dollars = 1; double effective_cycle_spend_limit = 2; double current_cycle_usage = 3; bool spend_limit_reached = 4; } message EnvironmentGetManagedRequest { string environment_id = 1; } message EnvironmentGetManagedResponse { message PrincipalEnvRole { string user_id = 1; string service_user_id = 2; string email = 3; string avatar_url = 4; string service_user_name = 5; EnvironmentRole role = 6; MemberRole member_role = 7; string user_name = 8; } string environment_id = 1; string name = 2; double created_at = 3; repeated PrincipalEnvRole principal_roles = 4; repeated PrincipalEnvRole additional_roles = 5; } message EnvironmentGetOrCreateRequest { string deployment_name = 1; ObjectCreationType object_creation_type = 2; } message EnvironmentGetOrCreateResponse { string environment_id = 1; EnvironmentMetadata metadata = 2; } message EnvironmentGetRolesRequest { string environment_id = 1; } message EnvironmentGetRolesResponse { message Principal { string user_id = 1; string service_user_id = 2; string email = 3; string avatar_url = 4; string user_name = 5; string service_user_name = 6; EnvironmentRole role = 7; string role_str = 8; // String representation for the CLI repeated EnvironmentRole choosable_roles = 9; MemberRole member_role = 10; optional bool inherits_default_member_role = 11; optional bool has_role_assignment = 12; } string name = 1; double created_at = 2; repeated Principal principal_roles = 3; optional EnvironmentRole default_member_role = 4; } message EnvironmentListItem { string name = 1; string webhook_suffix = 2; double created_at = 3; bool default = 4; bool is_managed = 5; string environment_id = 6; optional int32 max_concurrent_tasks = 7; optional int32 max_concurrent_gpus = 8; int32 current_concurrent_tasks = 9; int32 current_concurrent_gpus = 10; optional double cycle_budget_dollars = 11; // manager-set double effective_cycle_spend_limit = 12; double current_cycle_usage = 13; bool spend_limit_reached = 14; EnvironmentType environment_type = 15; optional EnvironmentRole default_member_role = 16; optional bool block_unauthenticated_resources = 17; } message EnvironmentListResponse { repeated EnvironmentListItem items = 2; } message EnvironmentMetadata{ string name = 1; EnvironmentSettings settings = 2; EnvironmentType environment_type = 3; } message EnvironmentRoleSetRequest { string environment_id = 1; string user_id = 2; string service_user_id = 3; EnvironmentRole role = 4; string role_str = 5; // String representation from the CLI; parsed when role is unspecified } message EnvironmentSetBudgetRequest { string environment_id = 1; optional double cycle_budget_dollars = 2; bool clear_budget = 3; } message EnvironmentSetDefaultMemberRoleRequest { string environment_id = 1; EnvironmentRole default_member_role = 2; } message EnvironmentSetManagedRequest { string environment_id = 1; bool managed = 2; optional EnvironmentRole default_member_role = 3; } // Environment-scoped settings, with workspace-level defaults. // Note that we use MergeFrom to combine workspace / environment settings, // which will *append* any `repeated` fields! message EnvironmentSettings { string image_builder_version = 1; string webhook_suffix = 2; optional int32 max_concurrent_gpus = 3; optional int32 max_concurrent_tasks = 4; // When true, new unauthenticated web functions, Servers, tunnels, and // Endpoints in this environment are rejected. Unset inherits the workspace // default. optional bool block_unauthenticated_resources = 5; } message EnvironmentUpdateRequest { string current_name = 1; google.protobuf.StringValue name = 2; google.protobuf.StringValue web_suffix = 3; optional int32 max_concurrent_tasks = 4; optional int32 max_concurrent_gpus = 5; optional EnvironmentBlockUnauthenticatedResources block_unauthenticated_resources = 6; } // A file entry when listing files in a volume or network file system. message FileEntry { enum FileType { UNSPECIFIED = 0; FILE = 1; DIRECTORY = 2; SYMLINK = 3; FIFO = 4; SOCKET = 5; } string path = 1; FileType type = 2; uint64 mtime = 3; uint64 size = 4; } message FilesystemRuntimeOutputBatch { repeated bytes output = 1; optional SystemErrorMessage error = 2; uint64 batch_index = 3; bool eof = 4; } message FlashContainerDeregisterRequest { string service_name = 1; } message FlashContainerListRequest { string function_id = 1; } message FlashContainerListResponse { message Container { string task_id = 1; string host = 2; uint32 port = 3; } repeated Container containers = 1; } message FlashContainerRegisterRequest { string service_name = 1; // not used? uint32 priority = 2; uint32 weight = 3; string host = 4; uint32 port = 5; } message FlashContainerRegisterResponse { string url = 1; } message FlashProxyUpstreamRequest { uint32 upstream_requests = 1; double timestamp = 2; } message FlashSetTargetSlotsMetricsRequest { // TODO(claudia): add other metrics to use in autoscaling decisions string function_id = 1; uint32 target_slots = 2; } message FlashSetTargetSlotsMetricsResponse {} message Function { string module_name = 1; string function_name = 2; repeated string mount_ids = 3; string image_id = 4; bytes function_serialized = 6; enum DefinitionType { DEFINITION_TYPE_UNSPECIFIED = 0; DEFINITION_TYPE_SERIALIZED = 1; DEFINITION_TYPE_FILE = 2; } DefinitionType definition_type = 7; enum FunctionType { FUNCTION_TYPE_UNSPECIFIED = 0; FUNCTION_TYPE_GENERATOR = 1; FUNCTION_TYPE_FUNCTION = 2; } FunctionType function_type = 8; Resources resources = 9; repeated string secret_ids = 10; RateLimit rate_limit = 11; WebhookConfig webhook_config = 15; repeated SharedVolumeMount shared_volume_mounts = 16; optional string proxy_id = 17; FunctionRetryPolicy retry_policy = 18; uint32 concurrency_limit = 19; // To be replaced by autoscaler_settings.max_containers reserved 20; // old fields uint32 timeout_secs = 21; PTYInfo pty_info = 22; bytes class_serialized = 23; uint32 task_idle_timeout_secs = 25; // To be replaced by autoscaler_settings.scaledown_period optional CloudProvider cloud_provider = 26; // Deprecated at some point uint32 warm_pool_size = 27; // To be replaced by autoscaler_settings.min_containers string web_url = 28; WebUrlInfo web_url_info = 29; // If set, overrides the runtime used by the function, either "runc" or "gvisor". string runtime = 30; string app_name = 31; // Formerly stub_name repeated VolumeMount volume_mounts = 33; uint32 max_concurrent_inputs = 34; repeated CustomDomainInfo custom_domain_info = 35; string worker_id = 36; // For internal debugging use only. bool runtime_debug = 37; // For internal debugging use only. // TODO: combine into enum? bool is_builder_function = 32; bool is_auto_snapshot = 38; bool is_method = 39; bool is_checkpointing_function = 40; // Checkpoint and restore bool checkpointing_enabled = 41; CheckpointInfo checkpoint = 42; repeated ObjectDependency object_dependencies = 43; bool block_network = 44; // In the SDK, we've deprecated `max_inputs` (which only ever implemented `max_inputs=1`) // in favor of a boolean `single_use_containers` parameter. uint32 max_inputs = 46; repeated S3Mount s3_mounts = 47; repeated CloudBucketMount cloud_bucket_mounts = 51; reserved 48; // _experimental_boost // If set, tasks will be scheduled using the new scheduler, which also knows // to look at fine-grained placement constraints. reserved 49; // _experimental_scheduler optional SchedulerPlacement scheduler_placement = 50; reserved 52; // _experimental_scheduler_placement bool is_class = 53; // if "Function" is actually a class grouping multiple methods reserved 54; // use_function_id, pre-0.67 class method placeholders reserved 55; // use_method_name, pre-0.67 class method placeholders ClassParameterInfo class_parameter_info = 56; reserved 57; // _experimental_resources reserved 58; reserved 59; uint32 batch_max_size = 60; // Maximum number of inputs to fetch at once uint64 batch_linger_ms = 61; // Miliseconds to block before a response is needed bool i6pn_enabled = 62; bool _experimental_concurrent_cancellations = 63; uint32 target_concurrent_inputs = 64; // TODO(irfansharif): Remove, once https://github.com/modal-labs/modal/pull/15645 lands. bool _experimental_task_templates_enabled = 65; // forces going through the new gpu-fallbacks integration path, even if no fallback options are specified repeated TaskTemplate _experimental_task_templates = 66; // for fallback options, where the first/most-preferred "template" is derived from fields above // When the function is a "grouped" one, this records the # of tasks we want // to schedule in tandem. uint32 _experimental_group_size = 67; // When set on a "grouped" function, constrains placement across GPU-memory // fabrics: the cluster is placed in co-fabric blocks of this size. uint32 _experimental_fabric_size = 94; // If set, the function will be run in an untrusted environment. bool untrusted = 68; uint32 _experimental_buffer_containers = 69; // To be replaced by autoscaler_settings.buffer_containers // _experimental_proxy_ip -> ProxyInfo // TODO: deprecate. optional string _experimental_proxy_ip = 70 [deprecated=true]; bool runtime_perf_record = 71; // For internal debugging use only. Schedule schedule = 72; bool snapshot_debug = 73; // For internal debugging use only. // Mapping of method names to method definitions, only non-empty for class service functions map method_definitions = 74; bool method_definitions_set = 75; bool _experimental_custom_scaling = 76; string cloud_provider_str = 77; // Supersedes cloud_provider bool _experimental_enable_gpu_snapshot = 78; // Experimental support for GPU snapshotting AutoscalerSettings autoscaler_settings = 79; // Bundle of parameters related to autoscaling FunctionSchema function_schema = 80; // Function schema, may be missing: client doesn't block deployment if it fails to get it // 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. map experimental_options = 81; // Deprecated: still set by client but ignored by server. The scheduler // derives this from the image's builder_version directly. bool mount_client_dependencies = 82; repeated string flash_service_urls = 83; string flash_service_label = 84; bool enable_gpu_snapshot = 85; // GPU memory snapshotting (alpha) uint32 startup_timeout_secs = 86; repeated DataFormat supported_input_formats = 87; // can be used as inputs repeated DataFormat supported_output_formats = 88; optional HTTPConfig http_config = 89; // 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 string implementation_name = 90; bool single_use_containers = 91; // When True, containers will shut down after handling a single input bool is_server = 92; // When True, the function is a server function string routing_region = 93; // Where inputs to a function should be routed through. // True when the function is a Sessioned Server. Only valid together with is_server. bool is_sessioned = 95; } message FunctionAsyncInvokeRequest { string function_id = 1; string parent_input_id = 2; FunctionInput input = 3; } message FunctionAsyncInvokeResponse { bool retry_with_blob_upload = 1; string function_call_id = 2; } message FunctionBindParamsRequest { string function_id = 1; bytes serialized_params = 2; FunctionOptions function_options = 3; string environment_name = 4; string auth_secret = 5; // Only used for the input plane. } message FunctionBindParamsResponse { string bound_function_id = 1; FunctionHandleMetadata handle_metadata = 2; } message FunctionCallCallGraphInfo { string function_call_id = 1; string parent_input_id = 2; string function_name = 3; string module_name = 4; } message FunctionCallCancelRequest { string function_call_id = 1; bool terminate_containers = 2; optional string function_id = 3; // Only provided for sync input cancellation on the input plane. Async input cancellation does not provide this field this. } message FunctionCallFetchRequest { message Tail { // Number of most recent inputs to return. Must be between 1 and 1000. uint32 count = 1; } string function_id = 1; oneof query_oneof { Tail tail = 3; } // Include the root Function and its eligible variants. bool all_variants = 4; } message FunctionCallFetchResponse { // The requested number of most recent inputs from the last seven days, ordered from newest to oldest. repeated FunctionCallInputInfo function_call_inputs = 1; } message FunctionCallFromIdRequest { string function_call_id = 1; } // Everything you need to build a FunctionCallHandler. message FunctionCallFromIdResponse { string function_call_id = 1; int32 num_inputs = 2; FunctionCallHandleMetadata metadata = 3; } message FunctionCallGetDataRequest { oneof call_info { string function_call_id = 1; string attempt_token = 3; } uint64 last_index = 2; reserved 4; // use_gapless_read } message FunctionCallGetInfoRequest { string function_id = 1; string function_call_id = 2; } message FunctionCallGetInfoResponse { FunctionCallInfo info = 1; } message FunctionCallHandleMetadata { string app_id = 1; string function_id = 2; } message FunctionCallInfo { string function_call_id = 1; int32 idx = 2; reserved 3, 4, 5; // old fields double created_at = 6; // when the call was created double scheduled_at = 7; // if cron job, when run was scheduled reserved 8, 9, 10, 11; // old fields InputCategoryInfo pending_inputs = 12; InputCategoryInfo failed_inputs = 13; InputCategoryInfo succeeded_inputs = 14; InputCategoryInfo timeout_inputs = 15; InputCategoryInfo cancelled_inputs = 16; int32 total_inputs = 17; } message FunctionCallInputInfo { google.protobuf.Timestamp enqueued_at = 1; optional google.protobuf.Timestamp started_at = 2; optional string container_id = 3; optional double startup_time_seconds = 4; optional double execution_time_seconds = 5; FunctionCallInputStatus status = 6; string function_call_id = 7; optional string service_method_name = 8; } message FunctionCallListRequest { string function_id = 1; } message FunctionCallListResponse { repeated FunctionCallInfo function_calls = 1; } message FunctionCallPutDataRequest { oneof call_info { string function_call_id = 1; string attempt_token = 3; } repeated DataChunk data_chunks = 2; } message FunctionCreateRequest { Function function = 1; string app_id = 2 ; Schedule schedule = 6 [deprecated=true]; // Deprecated: now passed in the Function definition string existing_function_id = 7; reserved 8; // defer_updates FunctionData function_data = 9; // supersedes 'function' field above } message FunctionCreateResponse { string function_id = 1; string __deprecated_web_url = 2 [ deprecated = true]; // Used up until 0.62.212 Function function = 4; // deprecated soon FunctionHandleMetadata handle_metadata = 5; repeated Warning server_warnings = 6; FunctionData function_data = 7; } message FunctionData { // 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. string module_name = 1; string function_name = 2; Function.FunctionType function_type = 3; // Scheduling related fields. uint32 warm_pool_size = 4; uint32 concurrency_limit = 5; uint32 task_idle_timeout_secs = 6; // When the function is a "grouped" one, this records the # of tasks we want // to schedule in tandem. uint32 _experimental_group_size = 19; uint32 _experimental_fabric_size = 43; uint32 _experimental_buffer_containers = 22; bool _experimental_custom_scaling = 23; bool _experimental_enable_gpu_snapshot = 30; string worker_id = 7; // for internal debugging use only uint32 timeout_secs = 8; string web_url = 9; WebUrlInfo web_url_info = 10; WebhookConfig webhook_config = 11; repeated CustomDomainInfo custom_domain_info = 12; // _experimental_proxy_ip -> ProxyInfo // TODO: deprecate. optional string _experimental_proxy_ip = 24 [deprecated=true]; // Mapping of method names to method definitions, only non-empty for class service functions map method_definitions = 25; bool method_definitions_set = 26; bool is_class = 13; // if "Function" is actually a class grouping multiple methods - applies across all underlying tasks ClassParameterInfo class_parameter_info = 14; bool is_method = 15; reserved 16; // use_function_id, pre-0.67 class method placeholders reserved 17; // use_method_name, pre-0.67 class method placeholders message RankedFunction { uint32 rank = 1; Function function = 2; } repeated RankedFunction ranked_functions = 18; Schedule schedule = 20; reserved 21; bool untrusted = 27; // If set, the function will be run in an untrusted environment. bool snapshot_debug = 28; // For internal debugging use only. bool runtime_perf_record = 29; // For internal debugging use only. AutoscalerSettings autoscaler_settings = 31; // Bundle of parameters related to autoscaling FunctionSchema function_schema = 32; map experimental_options = 33; repeated string flash_service_urls = 34; string flash_service_label = 35; uint32 startup_timeout_secs = 36; repeated DataFormat supported_input_formats = 37; repeated DataFormat supported_output_formats = 38; optional HTTPConfig http_config = 39; // 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 string implementation_name = 40; bool is_server = 41; // When True, the function is a server function string routing_region = 42; // Where inputs to a function should be routed through. // True when the function is a Sessioned Server. Only valid together with is_server. bool is_sessioned = 44; } message FunctionExtended { uint32 type_identifier = 1; // FunctionExtended is a union type that exists while we migrate between // storage of FunctionData vs. Functions, internally. Once migrated at the // storage level, we can get rid of this union type and replace with access // that expects FunctionData only. oneof function_extended { Function function_singleton = 2; FunctionData function_data = 3; } } message FunctionFinishInputsRequest { string function_id = 1; string function_call_id = 2; uint32 num_inputs = 3; } message FunctionGetByIdRequest { string function_id = 1; } message FunctionGetByIdResponse { FunctionData function = 1; FunctionHandleMetadata handle_metadata = 2; } message FunctionGetCallGraphRequest { string function_call_id = 2; } message FunctionGetCallGraphResponse { repeated InputCallGraphInfo inputs = 1; repeated FunctionCallCallGraphInfo function_calls = 2; // Set by the server when the graph has more nodes than it will return, so `inputs` is a prefix of the graph. bool truncated = 3; } message FunctionGetCurrentStatsRequest { string function_id = 1; } message FunctionGetDynamicConcurrencyRequest{ string function_id = 1; uint32 target_concurrency = 2; uint32 max_concurrency = 3; } message FunctionGetDynamicConcurrencyResponse { uint32 concurrency = 1; } message FunctionGetFlashAuthTokenRequest { string function_id = 1; } message FunctionGetFlashAuthTokenResponse { string token = 1; } message FunctionGetInputsItem { string input_id = 1; FunctionInput input = 2; bool kill_switch = 3; reserved 4; // previously used string function_call_id = 5; FunctionCallInvocationType function_call_invocation_type = 6; uint32 retry_count = 7; optional int32 function_map_idx = 8; // intercepted and only used by the worker. string attempt_token = 9; bool from_input_plane = 10; } message FunctionGetInputsRequest { string function_id = 1; reserved 3; // max_values reserved 5; // average_call_time int32 input_concurrency = 6; // Container aims to fetch multiple inputs at the same time reserved 9; reserved 10; uint32 batch_max_size = 11; // Maximum number of inputs to fetch at once uint64 batch_linger_ms = 12; // Miliseconds to block before a response is needed } message FunctionGetInputsResponse { repeated FunctionGetInputsItem inputs = 3; float rate_limit_sleep_duration = 4; // How long to sleep before requesting another input. } message FunctionGetOutputsItem { GenericResult result = 1; int32 idx = 2; string input_id = 3; DataFormat data_format = 5; // for result.data_oneof string task_id = 6; double input_started_at = 7; double output_created_at = 8; uint32 retry_count = 9; string fc_trace_tag = 10; // datadog function call trace tag } message FunctionGetOutputsRequest { string function_call_id = 1; int32 max_values = 2; float timeout = 3; string last_entry_id = 6; bool clear_on_success = 7; // expires *any* remaining outputs soon after this call, not just the returned ones double requested_at = 8; // Used for waypoints. // The jwts the client expects the server to be processing. This is optional and used for sync inputs only. repeated string input_jwts = 9; optional int32 start_idx = 10; // for async batch requests. this indicates which index to start from. optional int32 end_idx = 11; // for async batch requests. this indicates which index to end at. } message FunctionGetOutputsResponse { repeated int32 idxs = 3; repeated FunctionGetOutputsItem outputs = 4; string last_entry_id = 5; int32 num_unfinished_inputs = 6; } message FunctionGetRequest { string app_name = 1; string object_tag = 2; reserved 3; // removed namespace string environment_name = 4; int32 app_version = 5; } message FunctionGetResponse { string function_id = 1; FunctionHandleMetadata handle_metadata = 2; repeated Warning server_warnings = 4; FunctionData function = 5; } message FunctionGetSchedulingParamsRequest { string function_id = 1; } message FunctionGetSchedulingParamsResponse { AutoscalerConfiguration autoscaler_configuration = 1; } message FunctionGetSerializedRequest { string function_id = 1; } message FunctionGetSerializedResponse { bytes function_serialized = 1; bytes class_serialized = 2; } message FunctionGetTimeRangeStatsRequest { string function_id = 1; google.protobuf.Timestamp since = 2; // Inclusive. google.protobuf.Timestamp until = 3; // Exclusive. // Aggregate the root Function pool and its non-version-pinned variant pools. bool rollup = 4; // Filter stats for a specific container optional string container_id = 5; // ta-* } message FunctionGetTimeRangeStatsResponse { google.protobuf.Timestamp since = 1; // Inclusive. google.protobuf.Timestamp until = 2; // Exclusive. // Counts of inputs that finish in the requested time range. uint64 input_success_count = 3; uint64 input_failure_count = 4; uint64 input_timeout_count = 5; // Number of inputs assigned but not finished at the exclusive end of the time range. uint64 input_running_at_end_count = 6; // Metrics include execution_time, end_to_end_latency, subject to change // as requirements evolve map input_percentile_stats = 7; // 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. uint64 container_started_count = 8; uint64 container_error_count = 9; uint64 container_creating_at_end_count = 10; // Metrics include cpu_usage, memory_usage, gpu_utilization subject to change // as requirements evolve map container_percentile_stats = 11; // 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. uint32 variant_count = 12; } message FunctionHandleMetadata { // 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 // Should be a subset and use IDs/types from `Function` above string function_name = 2; Function.FunctionType function_type = 8; string web_url = 28; bool is_method = 39; reserved 40; // use_function_id, pre-0.67 class method placeholders string use_method_name = 41; // used for methods string definition_id = 42; ClassParameterInfo class_parameter_info = 43; // Mapping of method names to their metadata, only non-empty for class service functions map method_handle_metadata = 44; FunctionSchema function_schema = 45; optional string input_plane_url = 46; optional string input_plane_region = 47; // Use optional to ensure unset values default to None instead of 0 optional uint64 max_object_size_bytes = 48; optional uint64 max_async_object_size_bytes = 53; repeated string _experimental_flash_urls = 49; // (Optional) urls for flash services repeated DataFormat supported_input_formats = 50; repeated DataFormat supported_output_formats = 51; string app_id = 52; // The base Function ID for a variant, or the Function's own ID otherwise. string base_function_id = 54; } message FunctionInput { // serialized (args, kwargs). oneof args_oneof { bytes args = 1; string args_blob_id = 7; } bool final_input = 9; DataFormat data_format = 10; // For args_oneof. optional string method_name = 11; // specifies which method to call when calling a class/object function } message FunctionListVariantsRequest { string function_id = 1; FunctionVariantCursor cursor = 2; uint32 limit = 3; } message FunctionListVariantsResponse { repeated FunctionVariantInfo infos = 1; // Pass back as cursor to fetch the next page. Unset once the listing is complete. FunctionVariantCursor next_cursor = 2; // Set by the server when it ordered the variants by how many tasks each is running, busiest first. bool ordered_by_task_count = 3; } // Structured error detail attached to a failed FunctionGet lookup. message FunctionLookupError { enum Reason { REASON_UNSPECIFIED = 0; REASON_CLASS_NAME_USED = 1; } Reason reason = 1; } message FunctionMapRequest { string function_id = 1; string parent_input_id = 2; bool return_exceptions = 3; FunctionCallType function_call_type = 4; repeated FunctionPutInputsItem pipelined_inputs = 5; FunctionCallInvocationType function_call_invocation_type = 6; bool from_spawn_map = 7; } message FunctionMapResponse { string function_call_id = 1; repeated FunctionPutInputsResponseItem pipelined_inputs = 2; FunctionRetryPolicy retry_policy = 3; string function_call_jwt = 4; bool sync_client_retries_enabled = 5; uint32 max_inputs_outstanding = 6; } // todo(ayush): update this to also use `autoscaler_settings` message FunctionOptions { repeated string secret_ids = 1; repeated string mount_ids = 2; // Currently not supported optional Resources resources = 3; optional FunctionRetryPolicy retry_policy = 4; optional uint32 concurrency_limit = 5; optional uint32 timeout_secs = 6; optional uint32 task_idle_timeout_secs = 7; optional uint32 warm_pool_size = 8; repeated VolumeMount volume_mounts = 9; optional uint32 target_concurrent_inputs = 10; bool replace_volume_mounts = 11; bool replace_secret_ids = 12; optional uint32 buffer_containers = 13; optional uint32 max_concurrent_inputs = 14; optional uint32 batch_max_size = 15; optional uint64 batch_linger_ms = 16; optional SchedulerPlacement scheduler_placement = 17; optional string cloud_provider_str = 18; bool replace_cloud_bucket_mounts = 19; repeated CloudBucketMount cloud_bucket_mounts = 20; optional int32 pinned_app_version = 21; optional string routing_region = 22; } message FunctionPrecreateRequest { string app_id = 1; string function_name = 2 ; string existing_function_id = 3; Function.FunctionType function_type = 4; WebhookConfig webhook_config = 5; reserved 6; // use_function_id, pre-0.67 class method placeholders reserved 7; // use_method_name, pre-0.67 class method placeholders // Mapping of method names to method definitions, only non-empty for class service functions map method_definitions = 8; FunctionSchema function_schema = 9; repeated DataFormat supported_input_formats = 10; repeated DataFormat supported_output_formats = 11; } message FunctionPrecreateResponse { string function_id = 1; FunctionHandleMetadata handle_metadata = 2; } message FunctionPutInputsItem { int32 idx = 1; FunctionInput input = 2; bool r2_failed = 3; reserved 4; // r2_latency_ms uint64 r2_throughput_bytes_s = 5; repeated BlobUploadResult blob_upload_results = 6; } message FunctionPutInputsRequest { string function_id = 1; string function_call_id = 3; repeated FunctionPutInputsItem inputs = 4; } message FunctionPutInputsResponse { repeated FunctionPutInputsResponseItem inputs = 1; } message FunctionPutInputsResponseItem { int32 idx = 1; string input_id = 2; string input_jwt = 3; } message FunctionPutOutputsItem { string input_id = 1; GenericResult result = 2; double input_started_at = 3; double output_created_at = 4; DataFormat data_format = 7; // for result.data_oneof uint32 retry_count = 8; string function_call_id = 9; // injected by the worker optional int32 function_map_idx = 10; // injected by the worker bool from_input_plane = 11; // injected by the worker } message FunctionPutOutputsRequest { repeated FunctionPutOutputsItem outputs = 4; double requested_at = 5; // Used for waypoints. } message FunctionRetryInputsItem { string input_jwt = 1; FunctionInput input = 2; uint32 retry_count = 3; } message FunctionRetryInputsRequest { string function_call_jwt = 1; repeated FunctionRetryInputsItem inputs = 2; } message FunctionRetryInputsResponse { repeated string input_jwts = 1; } message FunctionRetryPolicy { float backoff_coefficient = 1; uint32 initial_delay_ms = 2; uint32 max_delay_ms = 3; // NOTE: two-byte field number not used for special reason. copy-paste error. Ref: PR #2542 uint32 retries = 18; } message FunctionSchema { enum FunctionSchemaType { FUNCTION_SCHEMA_UNSPECIFIED = 0; FUNCTION_SCHEMA_V1 = 1; } FunctionSchemaType schema_type = 1; // allows easy disambiguation between empty schema and no schema collection etc. repeated ClassParameterSpec arguments = 2; GenericPayloadType return_type = 3; } message FunctionStats { uint32 backlog = 1; uint32 num_total_tasks = 3; uint32 num_running_inputs = 4; uint32 input_headroom = 5; } message FunctionUpdateSchedulingParamsRequest { string function_id = 1; uint32 warm_pool_size_override = 2; AutoscalerSettings settings = 3; } message FunctionUpdateSchedulingParamsResponse { AutoscalerSettings current_settings = 1; } message FunctionVariantCursor { double created_before = 1; string function_id = 2; } message FunctionVariantInfo { string function_id = 1; bytes serialized_params = 2; FunctionOptions function_options = 3; } message GPUConfig { GPUType type = 1; // Deprecated, at some point uint32 count = 2; string gpu_type = 4; } message GeneratorDone { // Sent as the output when a generator finishes running. uint64 items_total = 1; } message GenericPayloadType { ParameterType base_type = 1; repeated GenericPayloadType sub_types = 2; // sub-type for generic types like lists } message GenericResult { // Used for both tasks and function outputs enum GenericStatus { GENERIC_STATUS_UNSPECIFIED = 0; GENERIC_STATUS_SUCCESS = 1; GENERIC_STATUS_FAILURE = 2; // Used when a task was killed using an external signal. GENERIC_STATUS_TERMINATED = 3; GENERIC_STATUS_TIMEOUT = 4; // 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; // Used when sandboxes are terminated due to idle_timeout GENERIC_STATUS_IDLE_TIMEOUT = 7; // 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; } GenericStatus status = 1; // Status of the task or function output. string exception = 2; // Exception message for failures, if available. int32 exitcode = 3; // Status code of the container entrypoint or builder process if it terminates unexpectedly. string traceback = 4; // String value of the Python traceback. bytes serialized_tb = 11; // Pickled traceback object. bytes tb_line_cache = 12; // Pickled line cache for traceback object. oneof data_oneof { bytes data = 5; // Inline data of the result. string data_blob_id = 10; // Blob ID for large data. } string propagation_reason = 13; // (?) } message HTTPConfig { uint32 port = 1; repeated string proxy_regions = 2; uint32 startup_timeout = 3; uint32 exit_grace_period = 4; bool h2_enabled = 5; uint32 target_concurrency = 6; bool unauthenticated = 7; optional LiftAndShiftConfig lift_and_shift_config = 8; } message Image { repeated BaseImage base_images = 5; repeated string dockerfile_commands = 6; repeated ImageContextFile context_files = 7; string version = 11; repeated string secret_ids = 12; // Part of Image definition, because presence of GPU drivers // affects the image that's built. string context_mount_id = 15; GPUConfig gpu_config = 16; ImageRegistryConfig image_registry_config = 17; string build_function_def = 14; // deprecated after 0.58.96 bytes build_function_globals = 18; // deprecated after 0.58.96 // If set, overrides the runtime used by the function. Specify either "runc" or "gvisor". string runtime = 19; // Not included in image definition checksum as debug features do not affect built image. bool runtime_debug = 20; BuildFunction build_function = 21; // Build arguments for the image (--build-arg) for ARG substitution in Dockerfile. map build_args = 22; // Volume mount for RUN commands repeated VolumeMount volume_mounts = 23; // CPU architecture the image is built for. Images with an unspecified // arch predate this field and are treated as x86_64. Arch arch = 24; } message ImageBuildChainGetRequest { string image_id = 1; } message ImageBuildChainGetResponse { repeated ImageBuildStep build_steps = 1; } message ImageBuildStep { string image_id = 1; google.protobuf.Timestamp started_at = 2; google.protobuf.Timestamp finished_at = 3; string builder_app_id = 4; string builder_task_id = 5; } message ImageContextFile { string filename = 1; bytes data = 2; } message ImageDeleteRequest { string image_id = 1; } message ImageFromIdRequest { string image_id = 1; } message ImageFromIdResponse { string image_id = 1; ImageMetadata metadata = 2; } message ImageGetByTagRequest { // Named image reference: "[[workspace/]environment/]name[:tag]". // The tag suffix defaults to "latest" when omitted. string tag = 1; // 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. string environment_name = 2; } message ImageGetByTagResponse { string image_id = 1; } message ImageGetOrCreateRequest { Image image = 2; string app_id = 4; string existing_image_id = 5; // ignored string build_function_id = 6; bool force_build = 7; DeploymentNamespace namespace = 8; string builder_version = 9; // Only admins can publish global images, but this provides an extra failsafe bool allow_global_deployment = 10; // Force the Image to build but don't clobber any Images with the same recipe in the cache bool ignore_cache = 11; } message ImageGetOrCreateResponse { // image_id is set regardless if the image is built (use ImageJoinStreaming to wait for build) string image_id = 1; // result of build - only set if the image has finished building (regardless if success or not) GenericResult result = 2; // image metadata - only set if the image has built successfully ImageMetadata metadata = 3; } message ImageJoinStreamingRequest { string image_id = 1; float timeout = 2; string last_entry_id = 3; bool include_logs_for_finished = 4; } message ImageJoinStreamingResponse { GenericResult result = 1; repeated TaskLogs task_logs = 2; string entry_id = 3; bool eof = 4; ImageMetadata metadata = 5; // set on success } message ImageListTagsItem { string tag = 1; string image_id = 2; string revision_id = 3; double created_at = 4; double updated_at = 5; } message ImageListTagsRequest { string environment_name = 1; // Prefix search over full "name:tag" strings. string tag_prefix = 2; // Defaults to 100. Values above 100 are rejected by the server. uint32 max_objects = 3; string page_token = 4; } message ImageListTagsResponse { repeated ImageListTagsItem items = 1; string next_page_token = 2; string environment_name = 3; } message ImageMetadata { // The output of `python -VV. Not set if missing optional string python_version_info = 1; // Installed python packages, as listed by by `pip list`. // package name -> version. Empty if missing map python_packages = 2; // 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 `/`. optional string workdir = 3; // The version of glibc in this image, if any. optional string libc_version_info = 4; // The builder version for/with which the image was created. optional string image_builder_version = 5; } message ImagePublishRequest { string image_id = 1; // Named image reference: "[[workspace/]environment/]name[:tag]". // The tag suffix defaults to "latest" when omitted. string tag = 2; // 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. string environment_name = 3; // Explicit opt-in required when publishing to a public environment. bool allow_public = 4; } message ImagePublishResponse { string image_id = 1; string revision_id = 2; } message ImageRegistryConfig { RegistryAuthType registry_auth_type = 1; string secret_id = 2; } message ImageTagRevisionsItem { string image_id = 1; string revision_id = 2; double created_at = 3; string published_by = 4; } message ImageTagRevisionsRequest { // Named image reference: "[[workspace/]environment/]name[:tag]". // The tag suffix defaults to "latest" when omitted. string tag = 1; // 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. string environment_name = 2; // Defaults to 100. Values above 100 are rejected by the server. uint32 max_objects = 3; string page_token = 4; } message ImageTagRevisionsResponse { repeated ImageTagRevisionsItem items = 1; string next_page_token = 2; string tag = 3; string environment_name = 4; } message InputCallGraphInfo { string input_id = 1; GenericResult.GenericStatus status = 2; string function_call_id = 3; string task_id = 4; } message InputCategoryInfo { int32 total = 1; repeated InputInfo latest = 2; } message InputInfo { string input_id = 1; int32 idx = 2; string task_id = 3; double started_at = 4; double finished_at = 5; double task_startup_time = 6; bool task_first_input = 7; } message LiftAndShiftConfig {} message ListPagination { int32 max_objects = 1; double created_before = 2; } message MapAwaitRequest { oneof call_info { string function_call_id = 1; string map_token = 5; } string last_entry_id = 2; double requested_at = 3; // Used for waypoints. float timeout = 4; } message MapAwaitResponse { repeated FunctionGetOutputsItem outputs = 1; string last_entry_id = 2; } message MapCheckInputsRequest { string last_entry_id = 1; float timeout = 2; repeated string attempt_tokens = 3; } message MapCheckInputsResponse { repeated bool lost = 1; } message MapStartOrContinueItem { FunctionPutInputsItem input = 1; optional string attempt_token = 2; // None if this is a fresh input, otherwise it is the attempt token for a retry. } message MapStartOrContinueRequest { string function_id = 1; string parent_input_id = 2; // Clients will send call_info on map continue requests. oneof call_info { string function_call_id = 3; string map_token = 5; } repeated MapStartOrContinueItem items = 4; bool proxied = 6; } message 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. string map_token = 6; string function_id = 1; string function_call_id = 2; uint32 max_inputs_outstanding = 3; repeated string attempt_tokens = 4; FunctionRetryPolicy retry_policy = 5; } message MethodDefinition { string function_name = 1; Function.FunctionType function_type = 2; WebhookConfig webhook_config = 3; string web_url = 4; WebUrlInfo web_url_info = 5; repeated CustomDomainInfo custom_domain_info = 6; FunctionSchema function_schema = 7; repeated DataFormat supported_input_formats = 8; repeated DataFormat supported_output_formats = 9; } message MountBatchedCheckExistenceRequest { repeated string sha256_hex_hashes = 1; } message MountBatchedCheckExistenceResponse { repeated string missing_sha256_hex_hashes = 1; } message MountFile { string filename = 1; string sha256_hex = 3; // SHA-256 checksum of the file. optional uint64 size = 4; // Size of the file in bytes — ignored in MountBuild(). optional uint32 mode = 5; // Unix file permission bits `st_mode`. } message MountGetOrCreateRequest { string deployment_name = 1; DeploymentNamespace namespace = 2; string environment_name = 3; ObjectCreationType object_creation_type = 4; repeated MountFile files = 5; string app_id = 6; // only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP } message MountGetOrCreateResponse { string mount_id = 1; MountHandleMetadata handle_metadata = 2; } message MountHandleMetadata { string content_checksum_sha256_hex = 1; } message MountPutFileRequest { string sha256_hex = 2; oneof data_oneof { bytes data = 3; string data_blob_id = 5; } } message MountPutFileResponse { bool exists = 2; } message MultiPartUpload { int64 part_length = 1; // split upload based on this part length - all except the last part must have this length repeated string upload_urls = 2; string completion_url = 3; } message MultiPartUploadList { repeated MultiPartUpload items = 1; } message NetworkAccess { enum NetworkAccessType { UNSPECIFIED = 0; OPEN = 1; BLOCKED = 2; ALLOWLIST = 3; } NetworkAccessType network_access_type = 1; repeated string allowed_cidrs = 2; repeated string allowed_domains = 3; } message NotebookKernelPublishResultsRequest { // See kernelshim.py for the differences between this and `ExecuteResult`. // https://jupyter-client.readthedocs.io/en/stable/messaging.html#execution-results message ExecuteReply { string status = 1; uint32 execution_count = 2; double duration = 3; } // IOPub message or reply received from the kernel for a cell. message CellResult { string cell_id = 1; oneof result_type { // Persistent output that is saved in the notebook. NotebookOutput output = 2; // Clear all previous outputs of the cell. bool clear_output = 3; // Cell has finished executing, return the kernel's execute_reply. ExecuteReply execute_reply = 4; } } string notebook_id = 1; repeated CellResult results = 2; } // A single output from a notebook. When you execute a cell, it produces an // array of these outputs as the code runs. // // https://github.com/jupyter/nbformat/blob/v5.10.4/nbformat/v4/nbformat.v4.schema.json#L301-L309 message NotebookOutput { // Result of executing a code cell. message ExecuteResult { uint32 execution_count = 1; google.protobuf.Struct data = 2; // mimebundle google.protobuf.Struct metadata = 3; } // Data displayed as a result of code cell execution. message DisplayData { google.protobuf.Struct data = 1; // mimebundle google.protobuf.Struct metadata = 2; // This should not be included in saved notebook. optional string transient_display_id = 3; } // Stream output from a code cell (stdout / stderr). message Stream { string name = 1; // stdout | stderr string text = 2; // multiline_string } // Output of an error that occurred during code cell execution. message Error { string ename = 1; string evalue = 2; repeated string traceback = 3; } oneof output_type { ExecuteResult execute_result = 1; DisplayData display_data = 2; Stream stream = 3; Error error = 4; } } message Object { string object_id = 1; oneof handle_metadata_oneof { FunctionHandleMetadata function_handle_metadata = 3; MountHandleMetadata mount_handle_metadata = 4; ClassHandleMetadata class_handle_metadata = 5; SandboxHandleMetadata sandbox_handle_metadata = 6; VolumeMetadata volume_metadata = 7; } } message ObjectDependency { string object_id = 1; } // Policy for outbound traffic from a sandbox. message OutboundPolicy { // Replace headers in outbound HTTPS requests, potentially with secret values. repeated HeaderReplacement header_replacements = 1; message HeaderReplacement { // Domain that the header replacements are scoped to. Supports wildcards in // subdomain positions. string domain = 1; // Reference to a secret usable in the header value templates. Can be // empty if no secret value is used. string secret_id = 4; // 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: `$$`. map headers = 5; reserved 2, 3; reserved "header_name", "header_value"; } } message PTYInfo { bool enabled = 1; // Soon deprecated uint32 winsz_rows = 2; uint32 winsz_cols = 3; string env_term = 4; string env_colorterm = 5; string env_term_program = 6; enum PTYType { PTY_TYPE_UNSPECIFIED = 0; // Nothing PTY_TYPE_FUNCTION = 1; // Run function in PTY PTY_TYPE_SHELL = 2; // Replace function with shell } PTYType pty_type = 7; bool no_terminate_on_idle_stdin = 8; } message PortSpec { uint32 port = 1; bool unencrypted = 2; optional TunnelType tunnel_type = 3; } message PortSpecs { repeated PortSpec ports = 1; } message Probe { message ExecCommand { // Command and args to execute directly (argv form, not shell-parsed). repeated string argv = 1; } oneof probe_oneof { uint32 tcp_port = 1; ExecCommand exec_command = 2; } optional uint32 interval_ms = 3; } message Proxy { string name = 1; double created_at = 2; string environment_name = 3; repeated ProxyIp proxy_ips = 4; string proxy_id = 5; string region = 6; } message ProxyAddIpRequest { string proxy_id = 1; } message ProxyAddIpResponse { ProxyIp proxy_ip = 1; } message ProxyCreateRequest { string name = 1; string environment_name = 2; string region = 3; } message ProxyCreateResponse { Proxy proxy = 1; } message ProxyDeleteRequest { string proxy_id = 1; } message ProxyGetOrCreateRequest { string deployment_name = 1; reserved 2; // namespace string environment_name = 3; ObjectCreationType object_creation_type = 4; // must be UNSPECIFIED } message ProxyGetOrCreateResponse { string proxy_id = 1; } message ProxyGetRequest { string name = 1; string environment_name = 2; } message ProxyGetResponse { Proxy proxy = 1; } message ProxyInfo { string elastic_ip = 1; string proxy_key = 2; string remote_addr = 3; int32 remote_port = 4; ProxyType proxy_type = 5; bool use_oidc = 6; string vprox_node_id = 7; } message ProxyIp { string proxy_ip = 1; ProxyIpStatus status = 2; double created_at = 3; string environment_name = 4; } message ProxyListResponse { repeated Proxy proxies = 1; } message ProxyRemoveIpRequest { string proxy_ip = 1; } message QueueClearRequest { string queue_id = 1; bytes partition_key = 2; bool all_partitions = 3; } message QueueDeleteRequest { string queue_id = 1; } message QueueGetByIdRequest { string queue_id = 1; } message QueueGetByIdResponse { string queue_id = 1; QueueMetadata metadata = 2; } message QueueGetOrCreateRequest { string deployment_name = 1; reserved 2; // removed namespace string environment_name = 3; ObjectCreationType object_creation_type = 4; } message QueueGetOrCreateResponse { string queue_id = 1; QueueMetadata metadata = 2; } message QueueGetRequest { string queue_id = 1; float timeout = 3; int32 n_values = 4; bytes partition_key = 5; } message QueueGetResponse { repeated bytes values = 2; } message QueueHeartbeatRequest { string queue_id = 1; } message QueueItem { bytes value = 1; string entry_id = 2; } message QueueLenRequest { string queue_id = 1; bytes partition_key = 2; bool total = 3; } message QueueLenResponse { int32 len = 1; } message QueueListRequest { string environment_name = 1; int32 total_size_limit = 2; // Limit on "number of partitions" reported, since checking them is costly ListPagination pagination = 3; } message QueueListResponse { message QueueInfo { string name = 1; double created_at = 2; // Superseded by metadata, used by clients up to 1.1.2 int32 num_partitions = 3; int32 total_size = 4; string queue_id = 5; QueueMetadata metadata = 6; } repeated QueueInfo queues = 1; string environment_name = 2; } message QueueMetadata { string name = 1; CreationInfo creation_info = 2; } message QueueNextItemsRequest { string queue_id = 1; bytes partition_key = 2; string last_entry_id = 3; float item_poll_timeout = 4; // seconds } message QueueNextItemsResponse { repeated QueueItem items = 1; } message QueuePutRequest { string queue_id = 1; repeated bytes values = 4; bytes partition_key = 5; int32 partition_ttl_seconds = 6; } // Retry repolicy used by GRPCError.details for the server to give instructions // for the client to retry. message RPCRetryPolicy { float retry_after_secs = 1; } // A copy google.rpc.Status for GRPCError.details: // https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto // RPCStatus is compatible with google.rpc.Status, so one can encode messages using // google.rpc.Status. The `details` field can be a list of any message, but for client // to decode it, the messages should be defined here (`modal_proto`). message RPCStatus { int32 code = 1; string message = 2; repeated google.protobuf.Any details = 3; } message RateLimit { int32 limit = 1; RateLimitInterval interval = 2; } message ResourceInfo { message ResourceValue { uint32 value = 1; bool is_default = 2; } ResourceValue memory_mb = 1; // MiB ResourceValue milli_cpu = 2; // milli CPU cores string gpu_type = 3; uint32 memory_mb_max = 4 ; // MiB uint32 ephemeral_disk_mb = 5; // MiB uint32 milli_cpu_max = 6; // milli CPU cores } message Resources { uint32 memory_mb = 2; // MiB uint32 milli_cpu = 3; // milli CPU cores GPUConfig gpu_config = 4; uint32 memory_mb_max = 5; // MiB uint32 ephemeral_disk_mb = 6; // MiB uint32 milli_cpu_max = 7; // milli CPU cores bool rdma = 8; // Whether to use RDMA interfaces } message RuntimeInputMessage { bytes message = 1; uint64 message_index = 2; bool eof = 3; } message RuntimeOutputBatch { repeated RuntimeOutputMessage items = 1; uint64 batch_index = 2; // if an exit code is given, this is the final message that will be sent. optional int32 exit_code = 3; repeated RuntimeOutputMessage stdout = 4; repeated RuntimeOutputMessage stderr = 5; repeated RuntimeOutputMessage info = 6; } // Used for `modal container exec`, `modal shell`, and Sandboxes message RuntimeOutputMessage { // only stdout / stderr is used FileDescriptor file_descriptor = 1; string message = 2; bytes message_bytes = 3; } message S3Mount { string bucket_name = 1; string mount_path = 2; string credentials_secret_id = 3; bool read_only = 4; } message Sandbox { repeated string entrypoint_args = 1; repeated string mount_ids = 2; string image_id = 3; repeated string secret_ids = 4; Resources resources = 5; CloudProvider cloud_provider = 6; // Deprecated at some point uint32 timeout_secs = 7; // The max lifetime of a sandbox in seconds. optional string workdir = 8; repeated SharedVolumeMount nfs_mounts = 9; bool runtime_debug = 10; // For internal debugging use only. bool block_network = 11; // deprecated, use network_access instead repeated S3Mount s3_mounts = 12; repeated CloudBucketMount cloud_bucket_mounts = 14; repeated VolumeMount volume_mounts = 13; PTYInfo pty_info = 15; // If set, tasks will be scheduled using the new scheduler, which also knows // to look at fine-grained placement constraints. reserved 16; // _experimental_scheduler optional SchedulerPlacement scheduler_placement = 17; reserved 18; // _experimental_resources string worker_id = 19; // for internal debugging use only oneof open_ports_oneof { PortSpecs open_ports = 20; } bool i6pn_enabled = 21; // Network access configuration beyond simple allow/block. NetworkAccess network_access = 22; optional string proxy_id = 23; // 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). bool enable_snapshot = 24; // Used to pin gVisor version for memory-snapshottable sandboxes. // This field is set by the server, not the client. optional uint32 snapshot_version = 25; string cloud_provider_str = 26; // Supersedes cloud_provider // Specifies container runtime behavior for sandboxes which are restored from a snapshot. // Set by the backend at snapshot creation time. optional string runsc_runtime_version = 27; // If set, overrides the runtime used by the function, either "runc" or "gvisor". optional string runtime = 28; // If set, the sandbox will be created with verbose logging enabled. bool verbose = 29; // If set, the sandbox will be created with a name. optional string name = 30; // Deprecated: use experimental_options_v2 instead. map experimental_options = 31 [deprecated = true]; // Experimental options map experimental_options_v2 = 41; repeated string preload_path_prefixes = 32; // Internal use only. // Optional idle timeout in seconds. If set, the sandbox will be terminated after being idle for this duration. optional uint32 idle_timeout_secs = 33; // Deprecated: direct sandbox commands are always enabled. bool direct_sandbox_commands_enabled = 34 [deprecated = true]; // 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. string _restore_instance_type = 35; // If set, connections to this sandbox will be subdomains of this domain rather than the default. string custom_domain = 36; // 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). bool include_oidc_identity_token = 37; // Probe used to determine when the sandbox has become ready. optional Probe readiness_probe = 38; // If set, only connections from these CIDRs will be allowed to connect to the sandbox // (tunnels and auth proxy). repeated string inbound_cidr_allowlist = 39; StringMap environment_variables = 40; optional OutboundPolicy outbound_policy = 42; // 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. bool include_x509_svid = 43; } message SandboxContainerCreateV2Request { // Sandbox the container joins; it runs inside that sandbox's task. string sandbox_id = 1; // Logical container name, unique within the sandbox. string container_name = 2; // Same definition type as SandboxCreateV2. Fields a container cannot honor // (resources, timeouts, scheduling constraints, ...) are rejected. Sandbox definition = 3; StringMap ephemeral_secrets = 4; map cloud_bucket_mount_credentials = 5; } message SandboxContainerCreateV2Response { string container_id = 1; string container_name = 2; } message SandboxCreateConnectTokenRequest { string sandbox_id = 1; string user_metadata = 2; // Uses port 8080 if unspecified. optional uint32 port = 3; } message SandboxCreateConnectTokenResponse { string url = 1; string token = 2; } message SandboxCreateRequest { string app_id = 1; Sandbox definition = 2; string environment_name = 3; // *DEPRECATED* 7/16/2025 repeated SandboxTag tags = 4; } message SandboxCreateResponse { string sandbox_id = 1; SandboxHandleMetadata metadata = 2; } message SandboxCreateV2Request { string app_id = 1; Sandbox definition = 2; StringMap ephemeral_secrets = 3; repeated SandboxTag tags = 4; map cloud_bucket_mount_credentials = 5; } message SandboxCreateV2Response { string sandbox_id = 1; repeated TunnelData tunnels = 2; string task_id = 3; SandboxHandleMetadata metadata = 4; CommandRouterAccess command_router_access = 5; } // Used by the sandbox controller to get command router access for V2 sandboxes. // For all other use cases, use TaskGetCommandRouterAccess instead. message SandboxGetCommandRouterAccessRequest { oneof target { string sandbox_id = 1; string task_id = 2; } } message SandboxGetCommandRouterAccessResponse { string jwt = 1; string url = 2; // 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. string worker_ipv4_address = 3; } message SandboxGetExitSnapshotRequest { string sandbox_id = 1; float timeout = 2; } message SandboxGetExitSnapshotResponse { message Success { string image_id = 1; } message Pending { } enum ErrorCode { ERROR_CODE_UNSPECIFIED = 0; ERROR_CODE_TIMEOUT = 1; ERROR_CODE_INTERNAL = 2; // 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; } message Error { ErrorCode error_code = 1; string message = 2; } oneof outcome { Success success = 1; Pending pending = 2; Error error = 3; } } message SandboxGetFromNameRequest { string sandbox_name = 1; string environment_name = 2; string app_name = 3; } message SandboxGetFromNameResponse { string sandbox_id = 1; SandboxHandleMetadata metadata = 2; } message SandboxGetLogsRequest { string sandbox_id = 1; FileDescriptor file_descriptor = 2; float timeout = 3; string last_entry_id = 4; } message SandboxGetResourceUsageRequest { string sandbox_id = 1; } message SandboxGetResourceUsageResponse { uint64 cpu_core_nanosecs = 1; uint64 mem_gib_nanosecs = 2; uint64 gpu_nanosecs = 3; optional string gpu_type = 4; } message SandboxGetTaskIdRequest { string sandbox_id = 1; optional float timeout = 2; // Legacy clients do not provide a timeout. New clients must always provide a timeout. bool wait_until_ready = 3; // If true, waits until the container's postStart hook has been run before returning. Useful for detecting init failures. } message SandboxGetTaskIdResponse { optional string task_id = 1; // This is None if the sandbox was terminated before a task could be scheduled. optional GenericResult task_result = 2; // If the task has already exited, this is the result. } message SandboxGetTunnelsRequest { string sandbox_id = 1; float timeout = 2; } message SandboxGetTunnelsResponse { GenericResult result = 1; repeated TunnelData tunnels = 2; } message SandboxHandleMetadata { GenericResult result = 1; string app_id = 2; } message SandboxInfo { string id = 1; reserved 2; // modal.client.Sandbox definition double created_at = 3; TaskInfo task_info = 4; string app_id = 5; repeated SandboxTag tags = 6; // TODO: Not yet exposed in client library. string name = 7; string image_id = 8; ResourceInfo resource_info = 9; repeated string regions = 10; uint32 timeout_secs = 11; optional uint32 idle_timeout_secs = 12; optional double ready_at = 13; optional Probe readiness_probe = 14; repeated TunnelData tunnels = 15; SandboxHandleMetadata metadata = 16; } message SandboxListRequest { string app_id = 1; double before_timestamp = 2; string environment_name = 3; bool include_finished = 4; repeated SandboxTag tags = 5; } message SandboxListResponse { repeated SandboxInfo sandboxes = 1; } message SandboxRestoreRequest { enum SandboxNameOverrideType { SANDBOX_NAME_OVERRIDE_TYPE_UNSPECIFIED = 0; SANDBOX_NAME_OVERRIDE_TYPE_NONE = 1; SANDBOX_NAME_OVERRIDE_TYPE_STRING = 2; } string snapshot_id = 1; string sandbox_name_override = 2; SandboxNameOverrideType sandbox_name_override_type = 3; string worker_id = 4; // For internal debugging use only. bool replace_volume_mounts = 5; repeated VolumeMount volume_mounts = 6; } message SandboxRestoreResponse { string sandbox_id = 1; } message SandboxRestoreV2Request { string snapshot_id = 1; string sandbox_name_override = 2; SandboxRestoreRequest.SandboxNameOverrideType sandbox_name_override_type = 3; string worker_id = 4; // For internal debugging use only. } message SandboxRestoreV2Response { string sandbox_id = 1; repeated TunnelData tunnels = 2; string task_id = 3; SandboxHandleMetadata metadata = 4; CommandRouterAccess command_router_access = 5; } message SandboxSetNameRequest { string sandbox_id = 1; string name = 2; } message SandboxSetNameResponse {} message SandboxSnapshotFsAsyncGetRequest { string image_id = 1; float timeout = 2; } message SandboxSnapshotFsAsyncRequest { string sandbox_id = 1; } message SandboxSnapshotFsAsyncResponse { string image_id = 1; } message SandboxSnapshotFsRequest { string sandbox_id = 1; float timeout = 2; } message SandboxSnapshotFsResponse { string image_id = 1; GenericResult result = 2; // Metadata may be empty since we may skip it for performance reasons. ImageMetadata image_metadata = 3; } message SandboxSnapshotGetRequest { string snapshot_id = 1; } message SandboxSnapshotGetResponse { string snapshot_id = 1; SandboxSnapshotHandleMetadata handle_metadata = 2; } message SandboxSnapshotHandleMetadata { bool is_v2 = 1; } message SandboxSnapshotRequest { string sandbox_id = 1; } message SandboxSnapshotResponse { string snapshot_id = 1; } message SandboxSnapshotWaitRequest { string snapshot_id = 1; float timeout = 2; } message SandboxSnapshotWaitResponse { GenericResult result = 1; } message SandboxStdinWriteRequest { string sandbox_id = 1; bytes input = 2; uint32 index = 3; bool eof = 4; } message SandboxStdinWriteResponse { } message SandboxTag { string tag_name = 1; string tag_value = 2; } message SandboxTagsGetRequest { string sandbox_id = 1; } message SandboxTagsGetResponse { repeated SandboxTag tags = 1; } message SandboxTagsSetRequest { string environment_name = 1; string sandbox_id = 2; repeated SandboxTag tags = 3; } message SandboxTerminateRequest { string sandbox_id = 1; } message SandboxTerminateResponse { GenericResult existing_result = 1; } message SandboxWaitRequest { string sandbox_id = 1; float timeout = 2; } message SandboxWaitResponse { GenericResult result = 1; SandboxHandleMetadata metadata = 2; } message SandboxWaitUntilReadyRequest { string sandbox_id = 1; float timeout = 2; } message SandboxWaitUntilReadyResponse { double ready_at = 1; } message Schedule { message Cron { string cron_string = 1; string timezone = 2; } message Period { int32 years = 1; int32 months = 2; int32 weeks = 3; int32 days = 4; int32 hours = 5; int32 minutes = 6; float seconds = 7; } oneof schedule_oneof { Cron cron = 1; Period period = 2; } } // Scheduling constraints for Functions and Sandboxes. message SchedulerPlacement { repeated string regions = 4; optional string _zone = 2 [deprecated = true]; optional string _lifecycle = 3 [deprecated = true]; repeated string _instance_types = 5 [deprecated = true]; bool nonpreemptible = 6; // Functions only reserved 1; } message SecretCreateRequest { // Not used by client anymore map env_dict = 1; string app_id = 2; string template_type = 3; // todo: not used? string existing_secret_id = 4; } message SecretCreateResponse { // Not used by client anymore string secret_id = 1; } message SecretDeleteRequest { string secret_id = 1; } message SecretGetOrCreateRequest { string deployment_name = 1; reserved 2; // removed namespace string environment_name = 3; ObjectCreationType object_creation_type = 4; // Not used atm map env_dict = 5; string app_id = 6; // only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP repeated string required_keys = 7; } message SecretGetOrCreateResponse { string secret_id = 1; SecretMetadata metadata = 2; } message SecretListItem { string label = 1; double created_at = 2; // Superseded by metadata, used by clients up to 1.1.2 double last_used_at = 3; string environment_name = 4; // Unused by client string secret_id = 5; SecretMetadata metadata = 6; } message SecretListRequest { string environment_name = 1; ListPagination pagination = 2; } message SecretListResponse { repeated SecretListItem items = 1; string environment_name = 2; } message SecretMetadata { string name = 1; CreationInfo creation_info = 2; repeated string keys = 3; } message SecretUpdateRequest { message Update { string key = 1; optional string value = 2; // If not set, the key is removed. } string secret_id = 1; repeated Update updates = 2; } message ServerGetTimeRangeStatsRequest { string function_id = 1; google.protobuf.Timestamp since = 2; // Inclusive. google.protobuf.Timestamp until = 3; // Exclusive. // Filter stats for a specific container optional string container_id = 4; } message ServerGetTimeRangeStatsResponse { message ServerInferenceStats { LLMEngine engine = 1; ServerInferenceStatsStatus status = 2; // Metrics include time_to_first_token, inter_token_latency, and // end_to_end_latency, subject to change as requirements evolve. map percentile_stats = 3; // Metrics include input_tokens_per_second, cached_input_tokens_per_second, // and output_tokens_per_second, subject to change as requirements evolve. map scalar_stats = 4; } message ServerStatusCodeCount { uint32 status_code = 1; uint64 count = 2; } google.protobuf.Timestamp since = 1; // Inclusive. google.protobuf.Timestamp until = 2; // Exclusive. uint64 request_count = 3; repeated ServerStatusCodeCount request_count_by_status_code = 4; double request_rate_per_second = 5; // Metrics include request_latency, subject to change as requirements evolve. map request_percentile_stats = 6; // Metrics include startup_time, cpu_usage, memory_usage, and // gpu_utilization, subject to change as requirements evolve. map container_percentile_stats = 7; // Absent when the image does not contain a supported inference engine. ServerInferenceStats inference = 8; // 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. uint64 container_started_count = 9; uint64 container_error_count = 10; uint64 container_creating_at_end_count = 11; } message ServerRequestFetchRequest { message Tail { // Number of most recent requests to return. Must be between 1 and 1000. uint32 count = 1; } string function_id = 1; oneof query_oneof { Tail tail = 3; } } message ServerRequestFetchResponse { // The requested number of most recent requests from the last seven days, ordered from newest to oldest. repeated ServerRequestInfo requests = 1; } message ServerRequestInfo { string route = 1; google.protobuf.Timestamp timestamp = 2; string container_id = 3; double duration_seconds = 4; int32 status = 5; } message ServiceUser { string name = 1; string token_id = 2; string created_by = 3; double created_at = 4; double last_used_at = 5; string created_by_avatar_url = 6; string service_user_id = 7; } message ServiceUserIdentity { string service_user_id = 1; string service_user_name = 2; UserIdentity created_by = 3; } message ServiceUserListResponse { repeated ServiceUser service_users = 1; } // SharedVolume in the backend corresponds to NetworkFileSystem in the current API message SharedVolumeDeleteRequest { string shared_volume_id = 1; } message SharedVolumeGetFileRequest { string shared_volume_id = 1; string path = 2; } message SharedVolumeGetFileResponse { oneof data_oneof { bytes data = 1; string data_blob_id = 2; } } message SharedVolumeGetOrCreateRequest { string deployment_name = 1; reserved 2; // removed namespace string environment_name = 3; ObjectCreationType object_creation_type = 4; string app_id = 5; // only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP } message SharedVolumeGetOrCreateResponse { string shared_volume_id = 1; } message SharedVolumeHeartbeatRequest { string shared_volume_id = 1; } message SharedVolumeListFilesRequest { string shared_volume_id = 1; string path = 2; } message SharedVolumeListFilesResponse { repeated FileEntry entries = 1; } message SharedVolumeListItem { string label = 1; // app name of object entity app string shared_volume_id = 2; double created_at = 3; CloudProvider cloud_provider = 4; } message SharedVolumeListRequest { string environment_name = 1; } message SharedVolumeListResponse { repeated SharedVolumeListItem items = 1; string environment_name = 2; } message SharedVolumeMount { string mount_path = 1; string shared_volume_id = 2; CloudProvider cloud_provider = 3; reserved 4; // allow_cross_region } message SharedVolumePutFileRequest { string shared_volume_id = 1; string path = 2; string sha256_hex = 3; oneof data_oneof { bytes data = 4; string data_blob_id = 5; } bool resumable = 6; // remove when required client version >= 47 } message SharedVolumePutFileResponse { bool exists = 1; } message SharedVolumeRemoveFileRequest { string shared_volume_id = 1; string path = 2; bool recursive = 3; } message StatsPercentile { // The percentile expressed in basis points: 5000 is p50 and 9990 is p99.9. uint32 percentile_basis_points = 1; double value = 2; } message StatsPercentileDistribution { // Unit identifier such as "seconds", "cores", "gibibytes", or "fraction". string unit = 1; repeated StatsPercentile percentiles = 2; } message StringMap { map contents = 1; } message SystemErrorMessage { SystemErrorCode error_code = 1; string error_message = 2; } message TaskClusterHelloRequest { string task_id = 1; string container_ip = 2; string imex_host_ip = 3; } message TaskClusterHelloResponse { string cluster_id = 1; uint32 cluster_rank = 2; // All IPv6 addresses in cluster, ordered by cluster rank repeated string container_ips = 3; repeated string container_ipv4_ips = 4; // All nvidia-imex IPs in fabric, ordered by cluster rank, // and otherwise absent on non-NVL72 systems repeated string imex_peer_ips = 5; // GPU-memory-fabric labels, ordered by cluster rank repeated string fabric_ids = 6; } message TaskCurrentInputsResponse { repeated string input_ids = 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. message TaskGetCommandRouterAccessRequest { string task_id = 1; } message TaskGetCommandRouterAccessResponse { string jwt = 1; string url = 2; } message TaskGetInfoRequest { string task_id = 1; } message TaskGetInfoResponse { string app_id = 1; TaskInfo info = 2; } message TaskInfo { string id = 1; double started_at = 2; // For Function containers, this corresponds to the "ready" time, after startup phase double finished_at = 3; modal.client.GenericResult result = 4; double enqueued_at = 5; string gpu_type = 6; string sandbox_id = 7; TaskSnapshotBehavior snapshot_behavior = 8; GPUConfig gpu_config = 9; } message TaskListRequest { string environment_name = 1; string app_id = 2; } message TaskListResponse { repeated TaskStats tasks = 1; } message TaskLogs { string data = 1; TaskState task_state = 6; double timestamp = 7; FileDescriptor file_descriptor = 8; TaskProgress task_progress = 9; string function_call_id = 10; string input_id = 11; uint64 timestamp_ns = 12 [jstype = JS_STRING]; string container_id = 13; string container_name = 14; } message TaskLogsBatch { string task_id = 1; repeated TaskLogs items = 2; string entry_id = 5; bool app_done = 10; string function_id = 11; string input_id = 12; string image_id = 13; // Used for image logs bool eof = 14; string pty_exec_id = 15; // Used for interactive functions string root_function_id = 16; uint32 ttl_days = 17; string sandbox_id = 18; } message TaskProgress { uint64 len = 1; uint64 pos = 2; ProgressType progress_type = 3; string description = 4; } message TaskResultRequest { GenericResult result = 2; } message TaskStats { string task_id = 1; string app_id = 2; string app_description = 3; double started_at = 4; double enqueued_at = 5; } message TaskTemplate { uint32 rank = 1; Resources resources = 2; uint32 target_concurrent_inputs = 3; uint32 max_concurrent_inputs = 4; // TODO(irfansharif): Just move this into a column in the task table instead? // Deprecate all above fields and get rid of this message altogether uint32 index = 5; // pointer into FunctionData, if using that as the underlying definition type } message TemplateListRequest { } message TemplateListResponse { message TemplateListItem { string name = 1; string repo = 2; string ref = 3; } repeated TemplateListItem items = 1; } message TokenCreateResponse { string token_id = 1; string token_secret = 2; } message TokenDeleteRequest { string token_id = 2; } message TokenFlowCreateRequest { string utm_source = 3; int32 localhost_port = 4; string next_url = 5; uint32 expires_in_seconds = 6; } message TokenFlowCreateResponse { string token_flow_id = 1; string web_url = 2; string code = 3; string wait_secret = 4; }; message TokenFlowWaitRequest { float timeout = 1; string token_flow_id = 2; string wait_secret = 3; } message TokenFlowWaitResponse { string token_id = 1; string token_secret = 2; bool timeout = 3; string workspace_username = 4; } message TokenInfoGetRequest {} message TokenInfoGetResponse { string token_id = 1; string workspace_id = 2; string workspace_name = 3; oneof identity { UserIdentity user_identity = 4; ServiceUserIdentity service_user_identity = 5; } // Token metadata google.protobuf.Timestamp created_at = 6; google.protobuf.Timestamp expires_at = 7; string token_name = 8; } message TunnelData { string host = 1; uint32 port = 2; optional string unencrypted_host = 3; optional uint32 unencrypted_port = 4; uint32 container_port = 5; } message TunnelStartRequest { uint32 port = 1; bool unencrypted = 2; optional TunnelType tunnel_type = 3; } message TunnelStartResponse { string host = 1; uint32 port = 2; optional string unencrypted_host = 3; optional uint32 unencrypted_port = 4; } message TunnelStopRequest { uint32 port = 1; } message TunnelStopResponse { bool exists = 1; } message UploadUrlList { repeated string items = 1; } // Used for capturing context about an action performed by a user message UserActionInfo { string user_id = 1; string service_user_id = 4; double timestamp = 2; // Resolved display name, could be a user or service user. string requested_by = 3; } message UserGroupEnvironmentSetRequest { string environment_id = 1; string user_group_id = 2; EnvironmentRole role = 3; } message UserIdentity { string user_id = 1; string username = 2; } message VolumeCommitRequest { // NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies // a volume mount. string volume_id = 1; // 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. optional string container_id = 2; } message VolumeCommitResponse { bool skip_reload = 1; } message VolumeCopyFiles2Request { string volume_id = 1; repeated string src_paths = 2; string dst_path = 3; bool recursive = 4; } message VolumeCopyFilesRequest { string volume_id = 1; repeated string src_paths = 2; string dst_path = 3; bool recursive = 4; } message VolumeCreateOptions { map experimental_options = 1; } message VolumeDeleteRequest { string volume_id = 1; string environment_name = 2 [deprecated=true]; } message VolumeGetByIdRequest { string volume_id = 1; } message VolumeGetByIdResponse { string volume_id = 1; VolumeMetadata metadata = 2; } message VolumeGetFile2Request { string volume_id = 1; string path = 2; uint64 start = 3; uint64 len = 4; // 0 is interpreted as 'read to end' // 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. bool client_pads_blocks = 5; } message VolumeGetFile2Response { repeated string get_urls = 1; uint64 size = 2; // total file size uint64 start = 3; // file position of first byte returned uint64 len = 4; // number of bytes returned } message VolumeGetFileRequest { string volume_id = 1; string path = 2; uint64 start = 3; uint64 len = 4; // 0 is interpreted as 'read to end' } message VolumeGetFileResponse { oneof data_oneof { bytes data = 1; string data_blob_id = 2; } uint64 size = 3; // total file size uint64 start = 4; // file position of first byte returned uint64 len = 5; // number of bytes returned } message VolumeGetOrCreateRequest { string deployment_name = 1; reserved 2; // removed namespace string environment_name = 3; ObjectCreationType object_creation_type = 4; string app_id = 5; // only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP VolumeFsVersion version = 6; optional VolumeCreateOptions create_options = 7; } message VolumeGetOrCreateResponse { string volume_id = 1; VolumeFsVersion version = 2; // Not used directly; version is part of the metadata VolumeMetadata metadata = 3; } message VolumeHeartbeatRequest { string volume_id = 1; } message VolumeListFiles2Request { string volume_id = 1; string path = 2; bool recursive = 4; optional uint32 max_entries = 3; } message VolumeListFiles2Response { repeated FileEntry entries = 1; } message VolumeListFilesRequest { string volume_id = 1; string path = 2; bool recursive = 4; optional uint32 max_entries = 3; } message VolumeListFilesResponse { repeated FileEntry entries = 1; } message VolumeListItem { string label = 1; // app name of object entity app string volume_id = 2; double created_at = 3; // Superseded by metadata, used by clients up to 1.1.2 VolumeMetadata metadata = 4; } message VolumeListRequest { string environment_name = 1; ListPagination pagination = 2; } message VolumeListResponse { repeated VolumeListItem items = 1; string environment_name = 2; } message VolumeMetadata { VolumeFsVersion version = 1; string name = 2; CreationInfo creation_info = 3; } message VolumeMount { string volume_id = 1; string mount_path = 2; bool allow_background_commits = 3; bool read_only = 4; optional string sub_path = 5; } message VolumePutFiles2Request { // The ID of the volume to put/upload files into. string volume_id = 1; // List of files to put/upload. repeated File files = 2; // If set to true, prevent overwriting existing files. (Note that we don't // allow overwriting existing directories with uploaded files regardless.) bool disallow_overwrite_existing_files = 3; message File { // Destination path of the file to be uploaded, including any parent dirs // etc.; for example "foo/bar/baz.txt" string path = 1; // The total size of the file, in bytes. uint64 size = 2; // The blocks, in units of 8MiB, that this file consists of. repeated Block blocks = 3; // Unix file permission bits `st_mode`. optional uint32 mode = 4; } message Block { // The SHA256 digest of the contents of this block, in raw (ie. 32 bytes) // form for compactness. bytes contents_sha256 = 1; // 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`. optional bytes put_response = 2; } } message 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. repeated MissingBlock missing_blocks = 1; message MissingBlock { // Index of the file in the original `files` field of the request. uint64 file_index = 1; // The index of the block in the original `files[file_index].blocks` of the // request. uint64 block_index = 2; // Make a HTTP PUT request to this endpoint with the blocks' contents as // the body. string put_url = 3; } } message VolumePutFilesRequest { string volume_id = 1; // TODO(staffan): This is obviously unfortunately named, but provides what we need - consider renaming. repeated MountFile files = 2; // If set to true, prevent overwriting existing files. (Note that we don't allow overwriting // existing directories with uploaded files regardless.) bool disallow_overwrite_existing_files = 3; } message VolumeReloadRequest { // NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies // a volume mount. string volume_id = 1; } message VolumeRemoveFile2Request { string volume_id = 1; string path = 2; bool recursive = 3; } message VolumeRemoveFileRequest { string volume_id = 1; string path = 2; bool recursive = 3; } message VolumeRenameRequest { string volume_id = 1; string name = 2; } message Warning { enum WarningType { WARNING_TYPE_UNSPECIFIED = 0; WARNING_TYPE_CLIENT_DEPRECATION = 1; WARNING_TYPE_RESOURCE_LIMIT = 2; WARNING_TYPE_FUNCTION_CONFIGURATION = 3; } WarningType type = 1; string message = 2; } message WebUrlInfo { bool truncated = 1; bool has_unique_hash = 2 [deprecated=true]; bool label_stolen = 3; } message WebhookConfig { WebhookType type = 1; string method = 2; string requested_suffix = 4; // User-supplied "label" component of URL WebhookAsyncMode async_mode = 5; repeated CustomDomainConfig custom_domains = 6; uint32 web_server_port = 7; float web_server_startup_timeout = 8; bool web_endpoint_docs = 9; bool requires_proxy_auth = 10; string ephemeral_suffix = 11; // Additional URL suffix added for ephemeral Apps } message WebhookToken { string token_id = 1; double created_at = 2; bool scoped = 3; string name = 4; UserIdentity created_by = 5; } message WebhookTokenCreateRequest { bool scoped = 1; string name = 2; } message WebhookTokenEnvironmentAddRequest { string token_id = 1; string environment_id = 2; } message WebhookTokenEnvironmentListRequest { string token_id = 1; } message WebhookTokenEnvironmentListResponse { repeated string environment_ids = 1; } message WebhookTokenEnvironmentRemoveRequest { string token_id = 1; string environment_id = 2; } message WebhookTokenListForEnvironmentRequest { string environment_name = 1; } message WebhookTokenListResponse { repeated WebhookToken tokens = 1; } message WorkspaceBillingRatesRequest {} message WorkspaceBillingRatesResponse { // compute rates are per unit per hour, storage rate is per GiB-month map rates = 1; map deprecation_warnings = 2; map deprecation_errors = 3; string formatted = 4; } message WorkspaceBillingReportItem { string object_id = 1; string description = 2; string environment_name = 3; google.protobuf.Timestamp interval = 4; string cost = 5; map tags = 6; map cost_by_resource = 8; } message WorkspaceBillingReportRequest { // Workspace ID will be implicit in the request metadata google.protobuf.Timestamp start_timestamp = 1; google.protobuf.Timestamp end_timestamp = 2; string resolution = 3; // e.g. 'd' or 'h'; server defines what we accept repeated string tag_names = 4; repeated string environment_ids = 5; repeated string app_ids = 6; } message WorkspaceBillingSummaryRequest { // all query intervals are implicitly one month long (to line up with billing cycles) google.protobuf.Timestamp start_timestamp = 1; } message WorkspaceBillingSummaryResponse { google.protobuf.Timestamp start_timestamp = 1; google.protobuf.Timestamp end_timestamp = 2; string metered_cost = 3; string billed_cost = 4; // keyed by deployed, ephemeral, volume, notebook, tokens map metered_cost_breakdown = 5; // keyed by plan, credits, reservations, storage map adjustments = 6; } message WorkspaceDashboardUrlRequest { string environment_name = 1; } message WorkspaceDashboardUrlResponse { string url = 1; } message WorkspaceMembersListItem { string member_id = 1; string member_displayname = 2; MemberRole member_role = 3; double joined_at = 4; double last_active_at = 5; reserved 6; double deleted_at = 7; string user_id = 8; IdentityProviderType identity_provider_type = 9; string email = 10; string avatar_url = 11; string idp_external_id = 12; } message WorkspaceMembersListResponse { repeated WorkspaceMembersListItem members = 1; } message WorkspaceNameLookupResponse { string workspace_name = 1 [deprecated=true]; string username = 2; } message WorkspaceSetDefaultEnvironmentRequest { string environment_name = 1; } message WorkspaceSetDefaultEnvironmentSettingsRequest { // Omitted = no-op. INHERIT clears the workspace default so environments // with no override have no block. Rejects UNSPECIFIED. optional EnvironmentBlockUnauthenticatedResources block_unauthenticated_resources = 1; } message WorkspaceSetDefaultEnvironmentSettingsResponse { EnvironmentSettings default_environment_settings = 1; } message WorkspaceSetImageBuilderVersionRequest { string new_image_builder_version = 1; } message WorkspaceSetImageBuilderVersionResponse { string image_builder_version = 1; } message WorkspaceSettingsResponse { string default_environment_name = 1; string image_builder_version = 2; } service ModalClient { // Apps rpc AppClientDisconnect(AppClientDisconnectRequest) returns (google.protobuf.Empty); rpc AppCountLogs(AppCountLogsRequest) returns (AppCountLogsResponse); rpc AppCreate(AppCreateRequest) returns (AppCreateResponse); rpc AppDeploy(AppDeployRequest) returns (AppDeployResponse); rpc AppDeploymentHistory(AppDeploymentHistoryRequest) returns (AppDeploymentHistoryResponse); rpc AppFetchLogs(AppFetchLogsRequest) returns (AppFetchLogsResponse); rpc AppGetByDeploymentName(AppGetByDeploymentNameRequest) returns (AppGetByDeploymentNameResponse); rpc AppGetInfo(AppGetInfoRequest) returns (AppGetInfoResponse); rpc AppGetLayout(AppGetLayoutRequest) returns (AppGetLayoutResponse); rpc AppGetLifecycle(AppGetLifecycleRequest) returns (AppGetLifecycleResponse); rpc AppGetLogs(AppGetLogsRequest) returns (stream TaskLogsBatch); rpc AppGetObjects(AppGetObjectsRequest) returns (AppGetObjectsResponse); rpc AppGetOrCreate(AppGetOrCreateRequest) returns (AppGetOrCreateResponse); rpc AppGetTags(AppGetTagsRequest) returns (AppGetTagsResponse); rpc AppHeartbeat(AppHeartbeatRequest) returns (google.protobuf.Empty); rpc AppList(AppListRequest) returns (AppListResponse); rpc AppLookup(AppLookupRequest) returns (AppLookupResponse); rpc AppPromote(AppPromoteRequest) returns (AppPromoteResponse); rpc AppPublish(AppPublishRequest) returns (AppPublishResponse); rpc AppRollback(AppRollbackRequest) returns (AppRollbackResponse); rpc AppRollover(AppRolloverRequest) returns (AppRolloverResponse); rpc AppSetObjects(AppSetObjectsRequest) returns (google.protobuf.Empty); rpc AppSetTags(AppSetTagsRequest) returns (google.protobuf.Empty); rpc AppStop(AppStopRequest) returns (google.protobuf.Empty); // Input Plane rpc AttemptAwait(AttemptAwaitRequest) returns (AttemptAwaitResponse); rpc AttemptRetry(AttemptRetryRequest) returns (AttemptRetryResponse); rpc AttemptStart(AttemptStartRequest) returns (AttemptStartResponse); // Auth Token rpc AuthTokenGet(AuthTokenGetRequest) returns (AuthTokenGetResponse); // Blobs rpc BlobCreate(BlobCreateRequest) returns (BlobCreateResponse); rpc BlobGet(BlobGetRequest) returns (BlobGetResponse); // Classes rpc ClassCreate(ClassCreateRequest) returns (ClassCreateResponse); rpc ClassGet(ClassGetRequest) returns (ClassGetResponse); // Clients rpc ClientHello(google.protobuf.Empty) returns (ClientHelloResponse); // Clusters rpc ClusterGet(ClusterGetRequest) returns (ClusterGetResponse); rpc ClusterList(ClusterListRequest) returns (ClusterListResponse); // Container rpc ContainerCheckpoint(ContainerCheckpointRequest) returns (google.protobuf.Empty); rpc ContainerExec(ContainerExecRequest) returns (ContainerExecResponse); rpc ContainerExecGetOutput(ContainerExecGetOutputRequest) returns (stream RuntimeOutputBatch); rpc ContainerExecPutInput(ContainerExecPutInputRequest) returns (google.protobuf.Empty); rpc ContainerExecWait(ContainerExecWaitRequest) returns (ContainerExecWaitResponse); rpc ContainerFilesystemExec(ContainerFilesystemExecRequest) returns (ContainerFilesystemExecResponse); rpc ContainerFilesystemExecGetOutput(ContainerFilesystemExecGetOutputRequest) returns (stream FilesystemRuntimeOutputBatch); rpc ContainerHeartbeat(ContainerHeartbeatRequest) returns (ContainerHeartbeatResponse); rpc ContainerHello(google.protobuf.Empty) returns (google.protobuf.Empty); rpc ContainerLog(ContainerLogRequest) returns (google.protobuf.Empty); rpc ContainerReloadVolumes(ContainerReloadVolumesRequest) returns (ContainerReloadVolumesResponse); rpc ContainerServerLifecycleReady(ContainerServerLifecycleReadyRequest) returns (google.protobuf.Empty); rpc ContainerStop(ContainerStopRequest) returns (ContainerStopResponse); // Curl rpc CurlGetAuthToken(CurlAuthTokenRequest) returns (CurlAuthTokenResponse); // Dicts rpc DictClear(DictClearRequest) returns (google.protobuf.Empty); rpc DictContains(DictContainsRequest) returns (DictContainsResponse); rpc DictContents(DictContentsRequest) returns (stream DictEntry); rpc DictDelete(DictDeleteRequest) returns (google.protobuf.Empty); rpc DictGet(DictGetRequest) returns (DictGetResponse); rpc DictGetById(DictGetByIdRequest) returns (DictGetByIdResponse); rpc DictGetOrCreate(DictGetOrCreateRequest) returns (DictGetOrCreateResponse); rpc DictHeartbeat(DictHeartbeatRequest) returns (google.protobuf.Empty); rpc DictLen(DictLenRequest) returns (DictLenResponse); rpc DictList(DictListRequest) returns (DictListResponse); rpc DictPop(DictPopRequest) returns (DictPopResponse); rpc DictUpdate(DictUpdateRequest) returns (DictUpdateResponse); // Domains rpc DomainCertificateVerify(DomainCertificateVerifyRequest) returns (DomainCertificateVerifyResponse); rpc DomainCreate(DomainCreateRequest) returns (DomainCreateResponse); rpc DomainList(DomainListRequest) returns (DomainListResponse); // Endpoints rpc EndpointCreate(EndpointCreateRequest) returns (EndpointCreateResponse); rpc EndpointGetByName(EndpointGetByNameRequest) returns (EndpointGetByNameResponse); rpc EndpointGetLifecycle(EndpointGetLifecycleRequest) returns (EndpointGetLifecycleResponse); rpc EndpointList(EndpointListRequest) returns (EndpointListResponse); rpc EndpointStop(EndpointStopRequest) returns (EndpointStopResponse); // Environments rpc EnvironmentBillingSummary(EnvironmentBillingSummaryRequest) returns (EnvironmentBillingSummaryResponse); rpc EnvironmentCreate(EnvironmentCreateRequest) returns (google.protobuf.Empty); rpc EnvironmentDelete(EnvironmentDeleteRequest) returns (google.protobuf.Empty); rpc EnvironmentGetBudget(EnvironmentGetBudgetRequest) returns (EnvironmentGetBudgetResponse); rpc EnvironmentGetManaged(EnvironmentGetManagedRequest) returns (EnvironmentGetManagedResponse); rpc EnvironmentGetOrCreate(EnvironmentGetOrCreateRequest) returns (EnvironmentGetOrCreateResponse); rpc EnvironmentGetRoles(EnvironmentGetRolesRequest) returns (EnvironmentGetRolesResponse); rpc EnvironmentList(google.protobuf.Empty) returns (EnvironmentListResponse); rpc EnvironmentRoleSet(EnvironmentRoleSetRequest) returns (google.protobuf.Empty); rpc EnvironmentSetBudget(EnvironmentSetBudgetRequest) returns (google.protobuf.Empty); rpc EnvironmentSetDefaultMemberRole(EnvironmentSetDefaultMemberRoleRequest) returns (google.protobuf.Empty); rpc EnvironmentSetManaged(EnvironmentSetManagedRequest) returns (google.protobuf.Empty); rpc EnvironmentUpdate(EnvironmentUpdateRequest) returns (EnvironmentListItem); // Modal Flash (experimental) rpc FlashContainerDeregister(FlashContainerDeregisterRequest) returns (google.protobuf.Empty); rpc FlashContainerList(FlashContainerListRequest) returns (FlashContainerListResponse); rpc FlashContainerRegister(FlashContainerRegisterRequest) returns (FlashContainerRegisterResponse); rpc FlashSetTargetSlotsMetrics(FlashSetTargetSlotsMetricsRequest) returns (FlashSetTargetSlotsMetricsResponse); // Functions rpc FunctionAsyncInvoke(FunctionAsyncInvokeRequest) returns (FunctionAsyncInvokeResponse); rpc FunctionBindParams(FunctionBindParamsRequest) returns (FunctionBindParamsResponse); rpc FunctionCallCancel(FunctionCallCancelRequest) returns (google.protobuf.Empty); rpc FunctionCallFetch(FunctionCallFetchRequest) returns (FunctionCallFetchResponse); rpc FunctionCallFromId(FunctionCallFromIdRequest) returns (FunctionCallFromIdResponse); rpc FunctionCallGetDataIn(FunctionCallGetDataRequest) returns (stream DataChunk); rpc FunctionCallGetDataOut(FunctionCallGetDataRequest) returns (stream DataChunk); rpc FunctionCallGetInfo(FunctionCallGetInfoRequest) returns (FunctionCallGetInfoResponse); rpc FunctionCallList(FunctionCallListRequest) returns (FunctionCallListResponse); rpc FunctionCallPutDataOut(FunctionCallPutDataRequest) returns (google.protobuf.Empty); rpc FunctionCreate(FunctionCreateRequest) returns (FunctionCreateResponse); rpc FunctionFinishInputs(FunctionFinishInputsRequest) returns (google.protobuf.Empty); // For map RPCs, to signal that all inputs have been sent rpc FunctionGet(FunctionGetRequest) returns (FunctionGetResponse); rpc FunctionGetById(FunctionGetByIdRequest) returns (FunctionGetByIdResponse); rpc FunctionGetCallGraph(FunctionGetCallGraphRequest) returns (FunctionGetCallGraphResponse); rpc FunctionGetCurrentStats(FunctionGetCurrentStatsRequest) returns (FunctionStats); rpc FunctionGetDynamicConcurrency(FunctionGetDynamicConcurrencyRequest) returns (FunctionGetDynamicConcurrencyResponse); rpc FunctionGetFlashAuthToken(FunctionGetFlashAuthTokenRequest) returns (FunctionGetFlashAuthTokenResponse); rpc FunctionGetInputs(FunctionGetInputsRequest) returns (FunctionGetInputsResponse); // For containers to request next call rpc FunctionGetOutputs(FunctionGetOutputsRequest) returns (FunctionGetOutputsResponse); // Returns the next result(s) for an entire function call (FunctionMap) rpc FunctionGetSchedulingParams(FunctionGetSchedulingParamsRequest) returns (FunctionGetSchedulingParamsResponse); rpc FunctionGetSerialized(FunctionGetSerializedRequest) returns (FunctionGetSerializedResponse); rpc FunctionGetTimeRangeStats(FunctionGetTimeRangeStatsRequest) returns (FunctionGetTimeRangeStatsResponse); rpc FunctionListVariants(FunctionListVariantsRequest) returns (FunctionListVariantsResponse); rpc FunctionMap(FunctionMapRequest) returns (FunctionMapResponse); rpc FunctionPrecreate(FunctionPrecreateRequest) returns (FunctionPrecreateResponse); rpc FunctionPutInputs(FunctionPutInputsRequest) returns (FunctionPutInputsResponse); rpc FunctionPutOutputs(FunctionPutOutputsRequest) returns (google.protobuf.Empty); // For containers to return result rpc FunctionRetryInputs(FunctionRetryInputsRequest) returns (FunctionRetryInputsResponse); rpc FunctionStartPtyShell(google.protobuf.Empty) returns (google.protobuf.Empty); rpc FunctionUpdateSchedulingParams(FunctionUpdateSchedulingParamsRequest) returns (FunctionUpdateSchedulingParamsResponse); // Images rpc ImageBuildChainGet(ImageBuildChainGetRequest) returns (ImageBuildChainGetResponse); rpc ImageDelete(ImageDeleteRequest) returns (google.protobuf.Empty); rpc ImageFromId(ImageFromIdRequest) returns (ImageFromIdResponse); rpc ImageGetByTag(ImageGetByTagRequest) returns (ImageGetByTagResponse); rpc ImageGetOrCreate(ImageGetOrCreateRequest) returns (ImageGetOrCreateResponse); rpc ImageJoinStreaming(ImageJoinStreamingRequest) returns (stream ImageJoinStreamingResponse); rpc ImageListTags(ImageListTagsRequest) returns (ImageListTagsResponse); rpc ImagePublish(ImagePublishRequest) returns (ImagePublishResponse); rpc ImageTagRevisions(ImageTagRevisionsRequest) returns (ImageTagRevisionsResponse); // Input Plane Map rpc MapAwait(MapAwaitRequest) returns (MapAwaitResponse); rpc MapCheckInputs(MapCheckInputsRequest) returns (MapCheckInputsResponse); rpc MapStartOrContinue(MapStartOrContinueRequest) returns (MapStartOrContinueResponse); // Mounts rpc MountBatchedCheckExistence(MountBatchedCheckExistenceRequest) returns (MountBatchedCheckExistenceResponse); rpc MountGetOrCreate(MountGetOrCreateRequest) returns (MountGetOrCreateResponse); rpc MountPutFile(MountPutFileRequest) returns (MountPutFileResponse); // Notebooks rpc NotebookKernelPublishResults(NotebookKernelPublishResultsRequest) returns (google.protobuf.Empty); // Proxies rpc ProxyAddIp(ProxyAddIpRequest) returns (ProxyAddIpResponse); rpc ProxyCreate(ProxyCreateRequest) returns (ProxyCreateResponse); rpc ProxyDelete(ProxyDeleteRequest) returns (google.protobuf.Empty); rpc ProxyGet(ProxyGetRequest) returns (ProxyGetResponse); rpc ProxyGetOrCreate(ProxyGetOrCreateRequest) returns (ProxyGetOrCreateResponse); rpc ProxyList(google.protobuf.Empty) returns (ProxyListResponse); rpc ProxyRemoveIp(ProxyRemoveIpRequest) returns (google.protobuf.Empty); // Queues rpc QueueClear(QueueClearRequest) returns (google.protobuf.Empty); rpc QueueDelete(QueueDeleteRequest) returns (google.protobuf.Empty); rpc QueueGet(QueueGetRequest) returns (QueueGetResponse); rpc QueueGetById(QueueGetByIdRequest) returns (QueueGetByIdResponse); rpc QueueGetOrCreate(QueueGetOrCreateRequest) returns (QueueGetOrCreateResponse); rpc QueueHeartbeat(QueueHeartbeatRequest) returns (google.protobuf.Empty); rpc QueueLen(QueueLenRequest) returns (QueueLenResponse); rpc QueueList(QueueListRequest) returns (QueueListResponse); rpc QueueNextItems(QueueNextItemsRequest) returns (QueueNextItemsResponse); rpc QueuePut(QueuePutRequest) returns (google.protobuf.Empty); // Sandboxes rpc SandboxContainerCreateV2(SandboxContainerCreateV2Request) returns (SandboxContainerCreateV2Response); rpc SandboxCreate(SandboxCreateRequest) returns (SandboxCreateResponse); rpc SandboxCreateConnectToken(SandboxCreateConnectTokenRequest) returns (SandboxCreateConnectTokenResponse); rpc SandboxCreateConnectTokenV2(SandboxCreateConnectTokenRequest) returns (SandboxCreateConnectTokenResponse); rpc SandboxCreateV2(SandboxCreateV2Request) returns (SandboxCreateV2Response); rpc SandboxGetCommandRouterAccess(SandboxGetCommandRouterAccessRequest) returns (SandboxGetCommandRouterAccessResponse); rpc SandboxGetExitSnapshot(SandboxGetExitSnapshotRequest) returns (SandboxGetExitSnapshotResponse); rpc SandboxGetExitSnapshotV2(SandboxGetExitSnapshotRequest) returns (SandboxGetExitSnapshotResponse); rpc SandboxGetFromName(SandboxGetFromNameRequest) returns (SandboxGetFromNameResponse); rpc SandboxGetFromNameV2(SandboxGetFromNameRequest) returns (SandboxGetFromNameResponse); rpc SandboxGetLogs(SandboxGetLogsRequest) returns (stream TaskLogsBatch); rpc SandboxGetResourceUsage(SandboxGetResourceUsageRequest) returns (SandboxGetResourceUsageResponse); rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec rpc SandboxGetTaskIdV2(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); rpc SandboxGetTunnels(SandboxGetTunnelsRequest) returns (SandboxGetTunnelsResponse); rpc SandboxGetTunnelsV2(SandboxGetTunnelsRequest) returns (SandboxGetTunnelsResponse); rpc SandboxList(SandboxListRequest) returns (SandboxListResponse); rpc SandboxListV2(SandboxListRequest) returns (SandboxListResponse); rpc SandboxRestore(SandboxRestoreRequest) returns (SandboxRestoreResponse); rpc SandboxRestoreV2(SandboxRestoreV2Request) returns (SandboxRestoreV2Response); rpc SandboxSetName(SandboxSetNameRequest) returns (SandboxSetNameResponse); rpc SandboxSnapshot(SandboxSnapshotRequest) returns (SandboxSnapshotResponse); rpc SandboxSnapshotFs(SandboxSnapshotFsRequest) returns (SandboxSnapshotFsResponse); rpc SandboxSnapshotFsAsync(SandboxSnapshotFsAsyncRequest) returns (SandboxSnapshotFsAsyncResponse); rpc SandboxSnapshotFsAsyncGet(SandboxSnapshotFsAsyncGetRequest) returns (SandboxSnapshotFsResponse); rpc SandboxSnapshotGet(SandboxSnapshotGetRequest) returns (SandboxSnapshotGetResponse); rpc SandboxSnapshotWait(SandboxSnapshotWaitRequest) returns (SandboxSnapshotWaitResponse); rpc SandboxStdinWrite(SandboxStdinWriteRequest) returns (SandboxStdinWriteResponse); rpc SandboxTagsGet(SandboxTagsGetRequest) returns (SandboxTagsGetResponse); rpc SandboxTagsGetV2(SandboxTagsGetRequest) returns (SandboxTagsGetResponse); rpc SandboxTagsSet(SandboxTagsSetRequest) returns (google.protobuf.Empty); rpc SandboxTagsSetV2(SandboxTagsSetRequest) returns (google.protobuf.Empty); rpc SandboxTerminate(SandboxTerminateRequest) returns (SandboxTerminateResponse); rpc SandboxTerminateV2(SandboxTerminateRequest) returns (SandboxTerminateResponse); rpc SandboxWait(SandboxWaitRequest) returns (SandboxWaitResponse); rpc SandboxWaitUntilReady(SandboxWaitUntilReadyRequest) returns (SandboxWaitUntilReadyResponse); rpc SandboxWaitV2(SandboxWaitRequest) returns (SandboxWaitResponse); // Secrets rpc SecretDelete(SecretDeleteRequest) returns (google.protobuf.Empty); rpc SecretGetOrCreate(SecretGetOrCreateRequest) returns (SecretGetOrCreateResponse); rpc SecretList(SecretListRequest) returns (SecretListResponse); rpc SecretUpdate(SecretUpdateRequest) returns (google.protobuf.Empty); // Servers rpc ServerGetTimeRangeStats(ServerGetTimeRangeStatsRequest) returns (ServerGetTimeRangeStatsResponse); rpc ServerRequestFetch(ServerRequestFetchRequest) returns (ServerRequestFetchResponse); // Service users rpc ServiceUserList(google.protobuf.Empty) returns (ServiceUserListResponse); // SharedVolumes rpc SharedVolumeDelete(SharedVolumeDeleteRequest) returns (google.protobuf.Empty); rpc SharedVolumeGetFile(SharedVolumeGetFileRequest) returns (SharedVolumeGetFileResponse); rpc SharedVolumeGetOrCreate(SharedVolumeGetOrCreateRequest) returns (SharedVolumeGetOrCreateResponse); rpc SharedVolumeHeartbeat(SharedVolumeHeartbeatRequest) returns (google.protobuf.Empty); rpc SharedVolumeList(SharedVolumeListRequest) returns (SharedVolumeListResponse); rpc SharedVolumeListFiles(SharedVolumeListFilesRequest) returns (SharedVolumeListFilesResponse); rpc SharedVolumeListFilesStream(SharedVolumeListFilesRequest) returns (stream SharedVolumeListFilesResponse); rpc SharedVolumePutFile(SharedVolumePutFileRequest) returns (SharedVolumePutFileResponse); rpc SharedVolumeRemoveFile(SharedVolumeRemoveFileRequest) returns (google.protobuf.Empty); // Tasks rpc TaskClusterHello(TaskClusterHelloRequest) returns (TaskClusterHelloResponse); rpc TaskCurrentInputs(google.protobuf.Empty) returns (TaskCurrentInputsResponse); rpc TaskGetCommandRouterAccess(TaskGetCommandRouterAccessRequest) returns (TaskGetCommandRouterAccessResponse); rpc TaskGetInfo(TaskGetInfoRequest) returns (TaskGetInfoResponse); rpc TaskList(TaskListRequest) returns (TaskListResponse); rpc TaskResult(TaskResultRequest) returns (google.protobuf.Empty); // Templates rpc TemplateList(TemplateListRequest) returns (TemplateListResponse); // Tokens (web auth flow) rpc TokenFlowCreate(TokenFlowCreateRequest) returns (TokenFlowCreateResponse); rpc TokenFlowWait(TokenFlowWaitRequest) returns (TokenFlowWaitResponse); rpc TokenInfoGet(TokenInfoGetRequest) returns (TokenInfoGetResponse); // Tunnels rpc TunnelStart(TunnelStartRequest) returns (TunnelStartResponse); rpc TunnelStop(TunnelStopRequest) returns (TunnelStopResponse); // User groups rpc UserGroupEnvironmentSet(UserGroupEnvironmentSetRequest) returns (google.protobuf.Empty); // Volumes rpc VolumeCommit(VolumeCommitRequest) returns (VolumeCommitResponse); rpc VolumeCopyFiles(VolumeCopyFilesRequest) returns (google.protobuf.Empty); rpc VolumeCopyFiles2(VolumeCopyFiles2Request) returns (google.protobuf.Empty); rpc VolumeDelete(VolumeDeleteRequest) returns (google.protobuf.Empty); rpc VolumeGetById(VolumeGetByIdRequest) returns (VolumeGetByIdResponse); rpc VolumeGetFile(VolumeGetFileRequest) returns (VolumeGetFileResponse); rpc VolumeGetFile2(VolumeGetFile2Request) returns (VolumeGetFile2Response); rpc VolumeGetOrCreate(VolumeGetOrCreateRequest) returns (VolumeGetOrCreateResponse); rpc VolumeHeartbeat(VolumeHeartbeatRequest) returns (google.protobuf.Empty); rpc VolumeList(VolumeListRequest) returns (VolumeListResponse); rpc VolumeListFiles(VolumeListFilesRequest) returns (stream VolumeListFilesResponse); rpc VolumeListFiles2(VolumeListFiles2Request) returns (stream VolumeListFiles2Response); rpc VolumePutFiles(VolumePutFilesRequest) returns (google.protobuf.Empty); rpc VolumePutFiles2(VolumePutFiles2Request) returns (VolumePutFiles2Response); rpc VolumeReload(VolumeReloadRequest) returns (google.protobuf.Empty); rpc VolumeRemoveFile(VolumeRemoveFileRequest) returns (google.protobuf.Empty); rpc VolumeRemoveFile2(VolumeRemoveFile2Request) returns (google.protobuf.Empty); rpc VolumeRename(VolumeRenameRequest) returns (google.protobuf.Empty); // Webhook tokens (proxy tokens) rpc WebhookTokenCreate(WebhookTokenCreateRequest) returns (TokenCreateResponse); rpc WebhookTokenDelete(TokenDeleteRequest) returns (google.protobuf.Empty); rpc WebhookTokenEnvironmentAdd(WebhookTokenEnvironmentAddRequest) returns (google.protobuf.Empty); rpc WebhookTokenEnvironmentList(WebhookTokenEnvironmentListRequest) returns (WebhookTokenEnvironmentListResponse); rpc WebhookTokenEnvironmentRemove(WebhookTokenEnvironmentRemoveRequest) returns (google.protobuf.Empty); rpc WebhookTokenList(google.protobuf.Empty) returns (WebhookTokenListResponse); rpc WebhookTokenListForEnvironment(WebhookTokenListForEnvironmentRequest) returns (WebhookTokenListResponse); // Workspaces rpc WorkspaceBillingRates(WorkspaceBillingRatesRequest) returns (WorkspaceBillingRatesResponse); rpc WorkspaceBillingReport(WorkspaceBillingReportRequest) returns (stream WorkspaceBillingReportItem); rpc WorkspaceBillingSummary(WorkspaceBillingSummaryRequest) returns (WorkspaceBillingSummaryResponse); rpc WorkspaceDashboardUrlGet(WorkspaceDashboardUrlRequest) returns (WorkspaceDashboardUrlResponse); rpc WorkspaceMembersList(google.protobuf.Empty) returns (WorkspaceMembersListResponse); rpc WorkspaceNameLookup(google.protobuf.Empty) returns (WorkspaceNameLookupResponse); rpc WorkspaceSetDefaultEnvironment(WorkspaceSetDefaultEnvironmentRequest) returns (google.protobuf.Empty); rpc WorkspaceSetDefaultEnvironmentSettings(WorkspaceSetDefaultEnvironmentSettingsRequest) returns (WorkspaceSetDefaultEnvironmentSettingsResponse); rpc WorkspaceSetImageBuilderVersion(WorkspaceSetImageBuilderVersionRequest) returns (WorkspaceSetImageBuilderVersionResponse); rpc WorkspaceSettings(google.protobuf.Empty) returns (WorkspaceSettingsResponse); }