modal 1.1.5.dev36__py3-none-any.whl → 1.1.5.dev38__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of modal might be problematic. Click here for more details.
- modal/cli/run.py +2 -3
- modal/client.pyi +2 -2
- {modal-1.1.5.dev36.dist-info → modal-1.1.5.dev38.dist-info}/METADATA +1 -1
- {modal-1.1.5.dev36.dist-info → modal-1.1.5.dev38.dist-info}/RECORD +15 -9
- modal_proto/sandbox_router.proto +125 -0
- modal_proto/sandbox_router_grpc.py +89 -0
- modal_proto/sandbox_router_pb2.py +128 -0
- modal_proto/sandbox_router_pb2.pyi +291 -0
- modal_proto/sandbox_router_pb2_grpc.py +169 -0
- modal_proto/sandbox_router_pb2_grpc.pyi +63 -0
- modal_version/__init__.py +1 -1
- {modal-1.1.5.dev36.dist-info → modal-1.1.5.dev38.dist-info}/WHEEL +0 -0
- {modal-1.1.5.dev36.dist-info → modal-1.1.5.dev38.dist-info}/entry_points.txt +0 -0
- {modal-1.1.5.dev36.dist-info → modal-1.1.5.dev38.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.5.dev36.dist-info → modal-1.1.5.dev38.dist-info}/top_level.txt +0 -0
modal/cli/run.py
CHANGED
|
@@ -467,11 +467,10 @@ def deploy(
|
|
|
467
467
|
if not name:
|
|
468
468
|
raise ExecutionError(
|
|
469
469
|
"You need to either supply an explicit deployment name on the command line "
|
|
470
|
-
"or have a name set on the
|
|
470
|
+
"or have a name set on the App.\n"
|
|
471
471
|
"\n"
|
|
472
472
|
"Examples:\n"
|
|
473
|
-
'app = modal.App("some-name")'
|
|
474
|
-
"or\n"
|
|
473
|
+
'app = modal.App("some-name")\n'
|
|
475
474
|
"modal deploy ... --name=some-name"
|
|
476
475
|
)
|
|
477
476
|
|
modal/client.pyi
CHANGED
|
@@ -33,7 +33,7 @@ class _Client:
|
|
|
33
33
|
server_url: str,
|
|
34
34
|
client_type: int,
|
|
35
35
|
credentials: typing.Optional[tuple[str, str]],
|
|
36
|
-
version: str = "1.1.5.
|
|
36
|
+
version: str = "1.1.5.dev38",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -164,7 +164,7 @@ class Client:
|
|
|
164
164
|
server_url: str,
|
|
165
165
|
client_type: int,
|
|
166
166
|
credentials: typing.Optional[tuple[str, str]],
|
|
167
|
-
version: str = "1.1.5.
|
|
167
|
+
version: str = "1.1.5.dev38",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=OBFaL-8KVMtBMEmspHA76LvblPdnSgdoGioLkQBjhdQ,48851
|
|
|
22
22
|
modal/app.pyi,sha256=Cqk3pOeEEroCLejj3yJ3XHDqt0rMzeSA295gMKEx6Ww,43955
|
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
|
24
24
|
modal/client.py,sha256=kyAIVB3Ay-XKJizQ_1ufUFB__EagV0MLmHJpyYyJ7J0,18636
|
|
25
|
-
modal/client.pyi,sha256=
|
|
25
|
+
modal/client.pyi,sha256=GaytSjbXpZrgmIDsrPI8VaG4kJO4sw-2Sa4jkyZGYIA,15831
|
|
26
26
|
modal/cloud_bucket_mount.py,sha256=I2GRXYhOWLIz2kJZjXu75jAm9EJkBNcutGc6jR2ReUw,5928
|
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=VuUOipMIHqFXMkD-3g2bsoqpSxV5qswlFHDOqPQzYAo,7405
|
|
28
28
|
modal/cls.py,sha256=R1uLQbdqWRRjvxs0I57a4hZZELZkBVCxOKxvKryU5_s,41639
|
|
@@ -139,7 +139,7 @@ modal/cli/launch.py,sha256=VARim2SCzgtI1ZuxQ6JgTTtvFwGA5czCwQZQHWC8Zcc,6498
|
|
|
139
139
|
modal/cli/network_file_system.py,sha256=I9IqTpVfk32uKYwGd8LTldkQx6UKYrQYNZ26q7Ab5Oo,8126
|
|
140
140
|
modal/cli/profile.py,sha256=g8X6tFFK9ccKyu2he9Yu19WLSLNdztzECgmIV__XJFs,3257
|
|
141
141
|
modal/cli/queues.py,sha256=5vKtKQ7YExdaxNPYZ0g5suU9sX0-F5h0zy0qBV-hN80,6140
|
|
142
|
-
modal/cli/run.py,sha256=
|
|
142
|
+
modal/cli/run.py,sha256=lVY0U9SsWmRnIdThLBDL3-ufnGun7GuG_wlR4S9WUUc,24929
|
|
143
143
|
modal/cli/secret.py,sha256=-Nnk3fq1IEzMtC9VUn61AKmdvZzZ9XQyiKVgQYRpajo,8127
|
|
144
144
|
modal/cli/token.py,sha256=NAmQzKBfEHkcldWKeFxAVIqQBoo1RTp7_A4yc7-8qM0,1911
|
|
145
145
|
modal/cli/utils.py,sha256=aUXDU9_VgcJrGaGRy4bGf4dqwKYXHCpoO27x4m_bpuo,3293
|
|
@@ -153,7 +153,7 @@ modal/experimental/__init__.py,sha256=fCqzo_f3vcY750vHtd7CtLs5dvdM_C0ZLLGb3zXuK9
|
|
|
153
153
|
modal/experimental/flash.py,sha256=7qRAL2Nrwbb60YKobcnpM0zJ8vw4xGJqabLPFgEzMZE,28295
|
|
154
154
|
modal/experimental/flash.pyi,sha256=R9VV0UDotiY9BRUjacB-xI4qhR3yBymAvEZFRFHztLs,15143
|
|
155
155
|
modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
|
|
156
|
-
modal-1.1.5.
|
|
156
|
+
modal-1.1.5.dev38.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
157
157
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
|
158
158
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
|
159
159
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
|
@@ -176,10 +176,16 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
|
|
|
176
176
|
modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
177
177
|
modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
|
|
178
178
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
179
|
-
|
|
179
|
+
modal_proto/sandbox_router.proto,sha256=YArdCZiY3CCkSYdbwhJlYEQfKuTUU-TdJHQIJ4uq0So,4497
|
|
180
|
+
modal_proto/sandbox_router_grpc.py,sha256=tz1bqLamxHqnInwhEMzM78EOd27U_ZKnFIGh2s2UyO0,4139
|
|
181
|
+
modal_proto/sandbox_router_pb2.py,sha256=d2SS7o-V_nVEbA_6eazIfV2cf7rLvY4ttdH9rGuA_J4,9261
|
|
182
|
+
modal_proto/sandbox_router_pb2.pyi,sha256=yZyf9_bqJas4NxQ1DuA6ZgMJYE9sFsidhqZw_O8Y7KM,13007
|
|
183
|
+
modal_proto/sandbox_router_pb2_grpc.py,sha256=zonC5flvCwxeZYJPENj1IJo2Mr0J58DpoC1_8IdPYik,8243
|
|
184
|
+
modal_proto/sandbox_router_pb2_grpc.pyi,sha256=4QgCB9b7_ykvH8YD-hfnogVH9CLyHVDC5QNb03l4_X8,2735
|
|
185
|
+
modal_version/__init__.py,sha256=8Deh1jIuJSIeiHLLUfz-85igphLsOkMUJzNMqg21yko,121
|
|
180
186
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
|
181
|
-
modal-1.1.5.
|
|
182
|
-
modal-1.1.5.
|
|
183
|
-
modal-1.1.5.
|
|
184
|
-
modal-1.1.5.
|
|
185
|
-
modal-1.1.5.
|
|
187
|
+
modal-1.1.5.dev38.dist-info/METADATA,sha256=FtBsWXeSSJx0yT1qnzbX-uRgprU96_2M9AgP--MqbI4,2460
|
|
188
|
+
modal-1.1.5.dev38.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
189
|
+
modal-1.1.5.dev38.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
|
190
|
+
modal-1.1.5.dev38.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
|
191
|
+
modal-1.1.5.dev38.dist-info/RECORD,,
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "modal_proto/api.proto";
|
|
4
|
+
|
|
5
|
+
package modal.sandbox_router;
|
|
6
|
+
|
|
7
|
+
enum SandboxExecStderrConfig {
|
|
8
|
+
// The output will be discarded.
|
|
9
|
+
SANDBOX_EXEC_STDERR_CONFIG_DEVNULL = 0;
|
|
10
|
+
// The output will be streamed to the client.
|
|
11
|
+
SANDBOX_EXEC_STDERR_CONFIG_PIPE = 1;
|
|
12
|
+
// A special value that can be used to indicate that the stderr stream should
|
|
13
|
+
// be merged with the stdout stream.
|
|
14
|
+
SANDBOX_EXEC_STDERR_CONFIG_STDOUT = 2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
enum SandboxExecStdioFileDescriptor {
|
|
18
|
+
// Read from stdout.
|
|
19
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT = 0;
|
|
20
|
+
// Read from stderr.
|
|
21
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR = 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
enum SandboxExecStdoutConfig {
|
|
25
|
+
// The output will be discarded.
|
|
26
|
+
SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL = 0;
|
|
27
|
+
// The output will be streamed to the client.
|
|
28
|
+
SANDBOX_EXEC_STDOUT_CONFIG_PIPE = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message SandboxExecStartRequest {
|
|
32
|
+
// The task ID of the sandbox to execute the command in.
|
|
33
|
+
string task_id = 1;
|
|
34
|
+
// Execution ID. This ID will be used to identify the execution for other
|
|
35
|
+
// requests and ensure exec commands are idempotent.
|
|
36
|
+
//
|
|
37
|
+
// TODO(saltzm): Could instead have a separate idempotency key from the exec_id
|
|
38
|
+
// like present day, and have the server generate the exec_id and return it in
|
|
39
|
+
// the ExecStartResponse.
|
|
40
|
+
string exec_id = 2;
|
|
41
|
+
// Command arguments to execute.
|
|
42
|
+
repeated string command_args= 3;
|
|
43
|
+
// Configures how the stdout of the command will be handled.
|
|
44
|
+
SandboxExecStdoutConfig stdout_config = 4;
|
|
45
|
+
// Configures how the stderr of the command will be handled.
|
|
46
|
+
SandboxExecStderrConfig stderr_config = 5;
|
|
47
|
+
// Timeout in seconds for the exec'd command to exit. If the command does not
|
|
48
|
+
// exit within this duration, the command will be killed. This is NOT the
|
|
49
|
+
// timeout for the ExecStartRequest RPC to complete.
|
|
50
|
+
uint32 timeout_secs = 6;
|
|
51
|
+
// Working directory for the command.
|
|
52
|
+
optional string workdir = 7;
|
|
53
|
+
// Secret IDs to mount into the sandbox.
|
|
54
|
+
repeated string secret_ids = 8;
|
|
55
|
+
// PTY info for the command.
|
|
56
|
+
optional modal.client.PTYInfo pty_info = 9;
|
|
57
|
+
// Enable debugging capabilities on the container runtime. Used only for
|
|
58
|
+
// internal debugging.
|
|
59
|
+
bool runtime_debug = 10;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message SandboxExecStartResponse { }
|
|
63
|
+
|
|
64
|
+
message SandboxExecStdinWriteRequest {
|
|
65
|
+
// The task ID of the sandbox running the exec'd command.
|
|
66
|
+
string task_id = 1;
|
|
67
|
+
// The execution ID of the command to write to.
|
|
68
|
+
string exec_id = 2;
|
|
69
|
+
// The offset to start writing to. This is used to resume writing from the
|
|
70
|
+
// last write position if the connection is closed and reopened.
|
|
71
|
+
uint64 offset = 3;
|
|
72
|
+
bytes data = 4;
|
|
73
|
+
// If true, close the stdin stream after writing any provided data.
|
|
74
|
+
// This signals EOF to the exec'd process.
|
|
75
|
+
bool eof = 5;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message SandboxExecStdinWriteResponse { }
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
message SandboxExecStdioReadRequest {
|
|
82
|
+
// The task ID of the sandbox running the exec'd command.
|
|
83
|
+
string task_id = 1;
|
|
84
|
+
// The execution ID of the command to read from.
|
|
85
|
+
string exec_id = 2;
|
|
86
|
+
// The offset to start reading from. This is used to resume reading from the
|
|
87
|
+
// last read position if the connection is closed and reopened.
|
|
88
|
+
uint64 offset = 3;
|
|
89
|
+
// Which file descriptor to read from.
|
|
90
|
+
SandboxExecStdioFileDescriptor file_descriptor = 4;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message SandboxExecStdioReadResponse {
|
|
94
|
+
// The data read from the file descriptor.
|
|
95
|
+
bytes data = 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message SandboxExecWaitRequest {
|
|
99
|
+
// The task ID of the sandbox running the exec'd command.
|
|
100
|
+
string task_id = 1;
|
|
101
|
+
// The execution ID of the command to wait on.
|
|
102
|
+
string exec_id = 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message SandboxExecWaitResponse {
|
|
106
|
+
oneof exit_status {
|
|
107
|
+
// The exit code of the command.
|
|
108
|
+
int32 code = 3;
|
|
109
|
+
// The signal that terminated the command.
|
|
110
|
+
int32 signal = 4;
|
|
111
|
+
}
|
|
112
|
+
// TODO(saltzm): Give a way for the user to distinguish between normal exit
|
|
113
|
+
// and termination by Modal (due to sandbox timeout, exec exceeded deadline, etc.)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
service SandboxRouter {
|
|
117
|
+
// Execute a command in the sandbox.
|
|
118
|
+
rpc SandboxExecStart(SandboxExecStartRequest) returns (SandboxExecStartResponse);
|
|
119
|
+
// Write to the stdin stream of an exec'd command.
|
|
120
|
+
rpc SandboxExecStdinWrite(SandboxExecStdinWriteRequest) returns (SandboxExecStdinWriteResponse);
|
|
121
|
+
// Get a stream of output from the stdout or stderr stream of an exec'd command.
|
|
122
|
+
rpc SandboxExecStdioRead(SandboxExecStdioReadRequest) returns (stream SandboxExecStdioReadResponse);
|
|
123
|
+
// Wait for an exec'd command to exit and return the exit code.
|
|
124
|
+
rpc SandboxExecWait(SandboxExecWaitRequest) returns (SandboxExecWaitResponse);
|
|
125
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Generated by the Protocol Buffers compiler. DO NOT EDIT!
|
|
2
|
+
# source: modal_proto/sandbox_router.proto
|
|
3
|
+
# plugin: grpclib.plugin.main
|
|
4
|
+
import abc
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import grpclib.const
|
|
8
|
+
import grpclib.client
|
|
9
|
+
if typing.TYPE_CHECKING:
|
|
10
|
+
import grpclib.server
|
|
11
|
+
|
|
12
|
+
import modal_proto.api_pb2
|
|
13
|
+
import modal_proto.sandbox_router_pb2
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SandboxRouterBase(abc.ABC):
|
|
17
|
+
|
|
18
|
+
@abc.abstractmethod
|
|
19
|
+
async def SandboxExecStart(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecStartRequest, modal_proto.sandbox_router_pb2.SandboxExecStartResponse]') -> None:
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
@abc.abstractmethod
|
|
23
|
+
async def SandboxExecStdinWrite(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest, modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse]') -> None:
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
@abc.abstractmethod
|
|
27
|
+
async def SandboxExecStdioRead(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest, modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse]') -> None:
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
@abc.abstractmethod
|
|
31
|
+
async def SandboxExecWait(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecWaitRequest, modal_proto.sandbox_router_pb2.SandboxExecWaitResponse]') -> None:
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
|
|
35
|
+
return {
|
|
36
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStart': grpclib.const.Handler(
|
|
37
|
+
self.SandboxExecStart,
|
|
38
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
39
|
+
modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
40
|
+
modal_proto.sandbox_router_pb2.SandboxExecStartResponse,
|
|
41
|
+
),
|
|
42
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite': grpclib.const.Handler(
|
|
43
|
+
self.SandboxExecStdinWrite,
|
|
44
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
45
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
46
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse,
|
|
47
|
+
),
|
|
48
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead': grpclib.const.Handler(
|
|
49
|
+
self.SandboxExecStdioRead,
|
|
50
|
+
grpclib.const.Cardinality.UNARY_STREAM,
|
|
51
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
52
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse,
|
|
53
|
+
),
|
|
54
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecWait': grpclib.const.Handler(
|
|
55
|
+
self.SandboxExecWait,
|
|
56
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
57
|
+
modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
58
|
+
modal_proto.sandbox_router_pb2.SandboxExecWaitResponse,
|
|
59
|
+
),
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class SandboxRouterStub:
|
|
64
|
+
|
|
65
|
+
def __init__(self, channel: grpclib.client.Channel) -> None:
|
|
66
|
+
self.SandboxExecStart = grpclib.client.UnaryUnaryMethod(
|
|
67
|
+
channel,
|
|
68
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStart',
|
|
69
|
+
modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
70
|
+
modal_proto.sandbox_router_pb2.SandboxExecStartResponse,
|
|
71
|
+
)
|
|
72
|
+
self.SandboxExecStdinWrite = grpclib.client.UnaryUnaryMethod(
|
|
73
|
+
channel,
|
|
74
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite',
|
|
75
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
76
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse,
|
|
77
|
+
)
|
|
78
|
+
self.SandboxExecStdioRead = grpclib.client.UnaryStreamMethod(
|
|
79
|
+
channel,
|
|
80
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead',
|
|
81
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
82
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse,
|
|
83
|
+
)
|
|
84
|
+
self.SandboxExecWait = grpclib.client.UnaryUnaryMethod(
|
|
85
|
+
channel,
|
|
86
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecWait',
|
|
87
|
+
modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
88
|
+
modal_proto.sandbox_router_pb2.SandboxExecWaitResponse,
|
|
89
|
+
)
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: modal_proto/sandbox_router.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf.internal import enum_type_wrapper
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import message as _message
|
|
9
|
+
from google.protobuf import reflection as _reflection
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
# @@protoc_insertion_point(imports)
|
|
12
|
+
|
|
13
|
+
_sym_db = _symbol_database.Default()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from modal_proto import api_pb2 as modal__proto_dot_api__pb2
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n modal_proto/sandbox_router.proto\x12\x14modal.sandbox_router\x1a\x15modal_proto/api.proto\"\xfb\x02\n\x17SandboxExecStartRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ommand_args\x18\x03 \x03(\t\x12\x44\n\rstdout_config\x18\x04 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStdoutConfig\x12\x44\n\rstderr_config\x18\x05 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStderrConfig\x12\x14\n\x0ctimeout_secs\x18\x06 \x01(\r\x12\x14\n\x07workdir\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x12\n\nsecret_ids\x18\x08 \x03(\t\x12,\n\x08pty_info\x18\t \x01(\x0b\x32\x15.modal.client.PTYInfoH\x01\x88\x01\x01\x12\x15\n\rruntime_debug\x18\n \x01(\x08\x42\n\n\x08_workdirB\x0b\n\t_pty_info\"\x1a\n\x18SandboxExecStartResponse\"k\n\x1cSandboxExecStdinWriteRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x05 \x01(\x08\"\x1f\n\x1dSandboxExecStdinWriteResponse\"\x9e\x01\n\x1bSandboxExecStdioReadRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12M\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x34.modal.sandbox_router.SandboxExecStdioFileDescriptor\",\n\x1cSandboxExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\":\n\x16SandboxExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"J\n\x17SandboxExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x03 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x04 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status*\x8d\x01\n\x17SandboxExecStderrConfig\x12&\n\"SANDBOX_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12%\n!SANDBOX_EXEC_STDERR_CONFIG_STDOUT\x10\x02*~\n\x1eSandboxExecStdioFileDescriptor\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*f\n\x17SandboxExecStdoutConfig\x12&\n\"SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\xf6\x03\n\rSandboxRouter\x12q\n\x10SandboxExecStart\x12-.modal.sandbox_router.SandboxExecStartRequest\x1a..modal.sandbox_router.SandboxExecStartResponse\x12\x80\x01\n\x15SandboxExecStdinWrite\x12\x32.modal.sandbox_router.SandboxExecStdinWriteRequest\x1a\x33.modal.sandbox_router.SandboxExecStdinWriteResponse\x12\x7f\n\x14SandboxExecStdioRead\x12\x31.modal.sandbox_router.SandboxExecStdioReadRequest\x1a\x32.modal.sandbox_router.SandboxExecStdioReadResponse0\x01\x12n\n\x0fSandboxExecWait\x12,.modal.sandbox_router.SandboxExecWaitRequest\x1a-.modal.sandbox_router.SandboxExecWaitResponseb\x06proto3')
|
|
20
|
+
|
|
21
|
+
_SANDBOXEXECSTDERRCONFIG = DESCRIPTOR.enum_types_by_name['SandboxExecStderrConfig']
|
|
22
|
+
SandboxExecStderrConfig = enum_type_wrapper.EnumTypeWrapper(_SANDBOXEXECSTDERRCONFIG)
|
|
23
|
+
_SANDBOXEXECSTDIOFILEDESCRIPTOR = DESCRIPTOR.enum_types_by_name['SandboxExecStdioFileDescriptor']
|
|
24
|
+
SandboxExecStdioFileDescriptor = enum_type_wrapper.EnumTypeWrapper(_SANDBOXEXECSTDIOFILEDESCRIPTOR)
|
|
25
|
+
_SANDBOXEXECSTDOUTCONFIG = DESCRIPTOR.enum_types_by_name['SandboxExecStdoutConfig']
|
|
26
|
+
SandboxExecStdoutConfig = enum_type_wrapper.EnumTypeWrapper(_SANDBOXEXECSTDOUTCONFIG)
|
|
27
|
+
SANDBOX_EXEC_STDERR_CONFIG_DEVNULL = 0
|
|
28
|
+
SANDBOX_EXEC_STDERR_CONFIG_PIPE = 1
|
|
29
|
+
SANDBOX_EXEC_STDERR_CONFIG_STDOUT = 2
|
|
30
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT = 0
|
|
31
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR = 1
|
|
32
|
+
SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL = 0
|
|
33
|
+
SANDBOX_EXEC_STDOUT_CONFIG_PIPE = 1
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
_SANDBOXEXECSTARTREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStartRequest']
|
|
37
|
+
_SANDBOXEXECSTARTRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStartResponse']
|
|
38
|
+
_SANDBOXEXECSTDINWRITEREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStdinWriteRequest']
|
|
39
|
+
_SANDBOXEXECSTDINWRITERESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStdinWriteResponse']
|
|
40
|
+
_SANDBOXEXECSTDIOREADREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStdioReadRequest']
|
|
41
|
+
_SANDBOXEXECSTDIOREADRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStdioReadResponse']
|
|
42
|
+
_SANDBOXEXECWAITREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecWaitRequest']
|
|
43
|
+
_SANDBOXEXECWAITRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecWaitResponse']
|
|
44
|
+
SandboxExecStartRequest = _reflection.GeneratedProtocolMessageType('SandboxExecStartRequest', (_message.Message,), {
|
|
45
|
+
'DESCRIPTOR' : _SANDBOXEXECSTARTREQUEST,
|
|
46
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
47
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStartRequest)
|
|
48
|
+
})
|
|
49
|
+
_sym_db.RegisterMessage(SandboxExecStartRequest)
|
|
50
|
+
|
|
51
|
+
SandboxExecStartResponse = _reflection.GeneratedProtocolMessageType('SandboxExecStartResponse', (_message.Message,), {
|
|
52
|
+
'DESCRIPTOR' : _SANDBOXEXECSTARTRESPONSE,
|
|
53
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
54
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStartResponse)
|
|
55
|
+
})
|
|
56
|
+
_sym_db.RegisterMessage(SandboxExecStartResponse)
|
|
57
|
+
|
|
58
|
+
SandboxExecStdinWriteRequest = _reflection.GeneratedProtocolMessageType('SandboxExecStdinWriteRequest', (_message.Message,), {
|
|
59
|
+
'DESCRIPTOR' : _SANDBOXEXECSTDINWRITEREQUEST,
|
|
60
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
61
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdinWriteRequest)
|
|
62
|
+
})
|
|
63
|
+
_sym_db.RegisterMessage(SandboxExecStdinWriteRequest)
|
|
64
|
+
|
|
65
|
+
SandboxExecStdinWriteResponse = _reflection.GeneratedProtocolMessageType('SandboxExecStdinWriteResponse', (_message.Message,), {
|
|
66
|
+
'DESCRIPTOR' : _SANDBOXEXECSTDINWRITERESPONSE,
|
|
67
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
68
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdinWriteResponse)
|
|
69
|
+
})
|
|
70
|
+
_sym_db.RegisterMessage(SandboxExecStdinWriteResponse)
|
|
71
|
+
|
|
72
|
+
SandboxExecStdioReadRequest = _reflection.GeneratedProtocolMessageType('SandboxExecStdioReadRequest', (_message.Message,), {
|
|
73
|
+
'DESCRIPTOR' : _SANDBOXEXECSTDIOREADREQUEST,
|
|
74
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
75
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdioReadRequest)
|
|
76
|
+
})
|
|
77
|
+
_sym_db.RegisterMessage(SandboxExecStdioReadRequest)
|
|
78
|
+
|
|
79
|
+
SandboxExecStdioReadResponse = _reflection.GeneratedProtocolMessageType('SandboxExecStdioReadResponse', (_message.Message,), {
|
|
80
|
+
'DESCRIPTOR' : _SANDBOXEXECSTDIOREADRESPONSE,
|
|
81
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
82
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdioReadResponse)
|
|
83
|
+
})
|
|
84
|
+
_sym_db.RegisterMessage(SandboxExecStdioReadResponse)
|
|
85
|
+
|
|
86
|
+
SandboxExecWaitRequest = _reflection.GeneratedProtocolMessageType('SandboxExecWaitRequest', (_message.Message,), {
|
|
87
|
+
'DESCRIPTOR' : _SANDBOXEXECWAITREQUEST,
|
|
88
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
89
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecWaitRequest)
|
|
90
|
+
})
|
|
91
|
+
_sym_db.RegisterMessage(SandboxExecWaitRequest)
|
|
92
|
+
|
|
93
|
+
SandboxExecWaitResponse = _reflection.GeneratedProtocolMessageType('SandboxExecWaitResponse', (_message.Message,), {
|
|
94
|
+
'DESCRIPTOR' : _SANDBOXEXECWAITRESPONSE,
|
|
95
|
+
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
96
|
+
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecWaitResponse)
|
|
97
|
+
})
|
|
98
|
+
_sym_db.RegisterMessage(SandboxExecWaitResponse)
|
|
99
|
+
|
|
100
|
+
_SANDBOXROUTER = DESCRIPTOR.services_by_name['SandboxRouter']
|
|
101
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
102
|
+
|
|
103
|
+
DESCRIPTOR._options = None
|
|
104
|
+
_SANDBOXEXECSTDERRCONFIG._serialized_start=977
|
|
105
|
+
_SANDBOXEXECSTDERRCONFIG._serialized_end=1118
|
|
106
|
+
_SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_start=1120
|
|
107
|
+
_SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_end=1246
|
|
108
|
+
_SANDBOXEXECSTDOUTCONFIG._serialized_start=1248
|
|
109
|
+
_SANDBOXEXECSTDOUTCONFIG._serialized_end=1350
|
|
110
|
+
_SANDBOXEXECSTARTREQUEST._serialized_start=82
|
|
111
|
+
_SANDBOXEXECSTARTREQUEST._serialized_end=461
|
|
112
|
+
_SANDBOXEXECSTARTRESPONSE._serialized_start=463
|
|
113
|
+
_SANDBOXEXECSTARTRESPONSE._serialized_end=489
|
|
114
|
+
_SANDBOXEXECSTDINWRITEREQUEST._serialized_start=491
|
|
115
|
+
_SANDBOXEXECSTDINWRITEREQUEST._serialized_end=598
|
|
116
|
+
_SANDBOXEXECSTDINWRITERESPONSE._serialized_start=600
|
|
117
|
+
_SANDBOXEXECSTDINWRITERESPONSE._serialized_end=631
|
|
118
|
+
_SANDBOXEXECSTDIOREADREQUEST._serialized_start=634
|
|
119
|
+
_SANDBOXEXECSTDIOREADREQUEST._serialized_end=792
|
|
120
|
+
_SANDBOXEXECSTDIOREADRESPONSE._serialized_start=794
|
|
121
|
+
_SANDBOXEXECSTDIOREADRESPONSE._serialized_end=838
|
|
122
|
+
_SANDBOXEXECWAITREQUEST._serialized_start=840
|
|
123
|
+
_SANDBOXEXECWAITREQUEST._serialized_end=898
|
|
124
|
+
_SANDBOXEXECWAITRESPONSE._serialized_start=900
|
|
125
|
+
_SANDBOXEXECWAITRESPONSE._serialized_end=974
|
|
126
|
+
_SANDBOXROUTER._serialized_start=1353
|
|
127
|
+
_SANDBOXROUTER._serialized_end=1855
|
|
128
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import builtins
|
|
6
|
+
import collections.abc
|
|
7
|
+
import google.protobuf.descriptor
|
|
8
|
+
import google.protobuf.internal.containers
|
|
9
|
+
import google.protobuf.internal.enum_type_wrapper
|
|
10
|
+
import google.protobuf.message
|
|
11
|
+
import modal_proto.api_pb2
|
|
12
|
+
import sys
|
|
13
|
+
import typing
|
|
14
|
+
|
|
15
|
+
if sys.version_info >= (3, 10):
|
|
16
|
+
import typing as typing_extensions
|
|
17
|
+
else:
|
|
18
|
+
import typing_extensions
|
|
19
|
+
|
|
20
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
21
|
+
|
|
22
|
+
class _SandboxExecStderrConfig:
|
|
23
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
24
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
25
|
+
|
|
26
|
+
class _SandboxExecStderrConfigEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SandboxExecStderrConfig.ValueType], builtins.type): # noqa: F821
|
|
27
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
28
|
+
SANDBOX_EXEC_STDERR_CONFIG_DEVNULL: _SandboxExecStderrConfig.ValueType # 0
|
|
29
|
+
"""The output will be discarded."""
|
|
30
|
+
SANDBOX_EXEC_STDERR_CONFIG_PIPE: _SandboxExecStderrConfig.ValueType # 1
|
|
31
|
+
"""The output will be streamed to the client."""
|
|
32
|
+
SANDBOX_EXEC_STDERR_CONFIG_STDOUT: _SandboxExecStderrConfig.ValueType # 2
|
|
33
|
+
"""A special value that can be used to indicate that the stderr stream should
|
|
34
|
+
be merged with the stdout stream.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
class SandboxExecStderrConfig(_SandboxExecStderrConfig, metaclass=_SandboxExecStderrConfigEnumTypeWrapper): ...
|
|
38
|
+
|
|
39
|
+
SANDBOX_EXEC_STDERR_CONFIG_DEVNULL: SandboxExecStderrConfig.ValueType # 0
|
|
40
|
+
"""The output will be discarded."""
|
|
41
|
+
SANDBOX_EXEC_STDERR_CONFIG_PIPE: SandboxExecStderrConfig.ValueType # 1
|
|
42
|
+
"""The output will be streamed to the client."""
|
|
43
|
+
SANDBOX_EXEC_STDERR_CONFIG_STDOUT: SandboxExecStderrConfig.ValueType # 2
|
|
44
|
+
"""A special value that can be used to indicate that the stderr stream should
|
|
45
|
+
be merged with the stdout stream.
|
|
46
|
+
"""
|
|
47
|
+
global___SandboxExecStderrConfig = SandboxExecStderrConfig
|
|
48
|
+
|
|
49
|
+
class _SandboxExecStdioFileDescriptor:
|
|
50
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
51
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
52
|
+
|
|
53
|
+
class _SandboxExecStdioFileDescriptorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SandboxExecStdioFileDescriptor.ValueType], builtins.type): # noqa: F821
|
|
54
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
55
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT: _SandboxExecStdioFileDescriptor.ValueType # 0
|
|
56
|
+
"""Read from stdout."""
|
|
57
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR: _SandboxExecStdioFileDescriptor.ValueType # 1
|
|
58
|
+
"""Read from stderr."""
|
|
59
|
+
|
|
60
|
+
class SandboxExecStdioFileDescriptor(_SandboxExecStdioFileDescriptor, metaclass=_SandboxExecStdioFileDescriptorEnumTypeWrapper): ...
|
|
61
|
+
|
|
62
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT: SandboxExecStdioFileDescriptor.ValueType # 0
|
|
63
|
+
"""Read from stdout."""
|
|
64
|
+
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR: SandboxExecStdioFileDescriptor.ValueType # 1
|
|
65
|
+
"""Read from stderr."""
|
|
66
|
+
global___SandboxExecStdioFileDescriptor = SandboxExecStdioFileDescriptor
|
|
67
|
+
|
|
68
|
+
class _SandboxExecStdoutConfig:
|
|
69
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
70
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
71
|
+
|
|
72
|
+
class _SandboxExecStdoutConfigEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SandboxExecStdoutConfig.ValueType], builtins.type): # noqa: F821
|
|
73
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
74
|
+
SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL: _SandboxExecStdoutConfig.ValueType # 0
|
|
75
|
+
"""The output will be discarded."""
|
|
76
|
+
SANDBOX_EXEC_STDOUT_CONFIG_PIPE: _SandboxExecStdoutConfig.ValueType # 1
|
|
77
|
+
"""The output will be streamed to the client."""
|
|
78
|
+
|
|
79
|
+
class SandboxExecStdoutConfig(_SandboxExecStdoutConfig, metaclass=_SandboxExecStdoutConfigEnumTypeWrapper): ...
|
|
80
|
+
|
|
81
|
+
SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL: SandboxExecStdoutConfig.ValueType # 0
|
|
82
|
+
"""The output will be discarded."""
|
|
83
|
+
SANDBOX_EXEC_STDOUT_CONFIG_PIPE: SandboxExecStdoutConfig.ValueType # 1
|
|
84
|
+
"""The output will be streamed to the client."""
|
|
85
|
+
global___SandboxExecStdoutConfig = SandboxExecStdoutConfig
|
|
86
|
+
|
|
87
|
+
class SandboxExecStartRequest(google.protobuf.message.Message):
|
|
88
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
89
|
+
|
|
90
|
+
TASK_ID_FIELD_NUMBER: builtins.int
|
|
91
|
+
EXEC_ID_FIELD_NUMBER: builtins.int
|
|
92
|
+
COMMAND_ARGS_FIELD_NUMBER: builtins.int
|
|
93
|
+
STDOUT_CONFIG_FIELD_NUMBER: builtins.int
|
|
94
|
+
STDERR_CONFIG_FIELD_NUMBER: builtins.int
|
|
95
|
+
TIMEOUT_SECS_FIELD_NUMBER: builtins.int
|
|
96
|
+
WORKDIR_FIELD_NUMBER: builtins.int
|
|
97
|
+
SECRET_IDS_FIELD_NUMBER: builtins.int
|
|
98
|
+
PTY_INFO_FIELD_NUMBER: builtins.int
|
|
99
|
+
RUNTIME_DEBUG_FIELD_NUMBER: builtins.int
|
|
100
|
+
task_id: builtins.str
|
|
101
|
+
"""The task ID of the sandbox to execute the command in."""
|
|
102
|
+
exec_id: builtins.str
|
|
103
|
+
"""Execution ID. This ID will be used to identify the execution for other
|
|
104
|
+
requests and ensure exec commands are idempotent.
|
|
105
|
+
|
|
106
|
+
TODO(saltzm): Could instead have a separate idempotency key from the exec_id
|
|
107
|
+
like present day, and have the server generate the exec_id and return it in
|
|
108
|
+
the ExecStartResponse.
|
|
109
|
+
"""
|
|
110
|
+
@property
|
|
111
|
+
def command_args(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
112
|
+
"""Command arguments to execute."""
|
|
113
|
+
stdout_config: global___SandboxExecStdoutConfig.ValueType
|
|
114
|
+
"""Configures how the stdout of the command will be handled."""
|
|
115
|
+
stderr_config: global___SandboxExecStderrConfig.ValueType
|
|
116
|
+
"""Configures how the stderr of the command will be handled."""
|
|
117
|
+
timeout_secs: builtins.int
|
|
118
|
+
"""Timeout in seconds for the exec'd command to exit. If the command does not
|
|
119
|
+
exit within this duration, the command will be killed. This is NOT the
|
|
120
|
+
timeout for the ExecStartRequest RPC to complete.
|
|
121
|
+
"""
|
|
122
|
+
workdir: builtins.str
|
|
123
|
+
"""Working directory for the command."""
|
|
124
|
+
@property
|
|
125
|
+
def secret_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
126
|
+
"""Secret IDs to mount into the sandbox."""
|
|
127
|
+
@property
|
|
128
|
+
def pty_info(self) -> modal_proto.api_pb2.PTYInfo:
|
|
129
|
+
"""PTY info for the command."""
|
|
130
|
+
runtime_debug: builtins.bool
|
|
131
|
+
"""Enable debugging capabilities on the container runtime. Used only for
|
|
132
|
+
internal debugging.
|
|
133
|
+
"""
|
|
134
|
+
def __init__(
|
|
135
|
+
self,
|
|
136
|
+
*,
|
|
137
|
+
task_id: builtins.str = ...,
|
|
138
|
+
exec_id: builtins.str = ...,
|
|
139
|
+
command_args: collections.abc.Iterable[builtins.str] | None = ...,
|
|
140
|
+
stdout_config: global___SandboxExecStdoutConfig.ValueType = ...,
|
|
141
|
+
stderr_config: global___SandboxExecStderrConfig.ValueType = ...,
|
|
142
|
+
timeout_secs: builtins.int = ...,
|
|
143
|
+
workdir: builtins.str | None = ...,
|
|
144
|
+
secret_ids: collections.abc.Iterable[builtins.str] | None = ...,
|
|
145
|
+
pty_info: modal_proto.api_pb2.PTYInfo | None = ...,
|
|
146
|
+
runtime_debug: builtins.bool = ...,
|
|
147
|
+
) -> None: ...
|
|
148
|
+
def HasField(self, field_name: typing_extensions.Literal["_pty_info", b"_pty_info", "_workdir", b"_workdir", "pty_info", b"pty_info", "workdir", b"workdir"]) -> builtins.bool: ...
|
|
149
|
+
def ClearField(self, field_name: typing_extensions.Literal["_pty_info", b"_pty_info", "_workdir", b"_workdir", "command_args", b"command_args", "exec_id", b"exec_id", "pty_info", b"pty_info", "runtime_debug", b"runtime_debug", "secret_ids", b"secret_ids", "stderr_config", b"stderr_config", "stdout_config", b"stdout_config", "task_id", b"task_id", "timeout_secs", b"timeout_secs", "workdir", b"workdir"]) -> None: ...
|
|
150
|
+
@typing.overload
|
|
151
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_pty_info", b"_pty_info"]) -> typing_extensions.Literal["pty_info"] | None: ...
|
|
152
|
+
@typing.overload
|
|
153
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_workdir", b"_workdir"]) -> typing_extensions.Literal["workdir"] | None: ...
|
|
154
|
+
|
|
155
|
+
global___SandboxExecStartRequest = SandboxExecStartRequest
|
|
156
|
+
|
|
157
|
+
class SandboxExecStartResponse(google.protobuf.message.Message):
|
|
158
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
159
|
+
|
|
160
|
+
def __init__(
|
|
161
|
+
self,
|
|
162
|
+
) -> None: ...
|
|
163
|
+
|
|
164
|
+
global___SandboxExecStartResponse = SandboxExecStartResponse
|
|
165
|
+
|
|
166
|
+
class SandboxExecStdinWriteRequest(google.protobuf.message.Message):
|
|
167
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
168
|
+
|
|
169
|
+
TASK_ID_FIELD_NUMBER: builtins.int
|
|
170
|
+
EXEC_ID_FIELD_NUMBER: builtins.int
|
|
171
|
+
OFFSET_FIELD_NUMBER: builtins.int
|
|
172
|
+
DATA_FIELD_NUMBER: builtins.int
|
|
173
|
+
EOF_FIELD_NUMBER: builtins.int
|
|
174
|
+
task_id: builtins.str
|
|
175
|
+
"""The task ID of the sandbox running the exec'd command."""
|
|
176
|
+
exec_id: builtins.str
|
|
177
|
+
"""The execution ID of the command to write to."""
|
|
178
|
+
offset: builtins.int
|
|
179
|
+
"""The offset to start writing to. This is used to resume writing from the
|
|
180
|
+
last write position if the connection is closed and reopened.
|
|
181
|
+
"""
|
|
182
|
+
data: builtins.bytes
|
|
183
|
+
eof: builtins.bool
|
|
184
|
+
"""If true, close the stdin stream after writing any provided data.
|
|
185
|
+
This signals EOF to the exec'd process.
|
|
186
|
+
"""
|
|
187
|
+
def __init__(
|
|
188
|
+
self,
|
|
189
|
+
*,
|
|
190
|
+
task_id: builtins.str = ...,
|
|
191
|
+
exec_id: builtins.str = ...,
|
|
192
|
+
offset: builtins.int = ...,
|
|
193
|
+
data: builtins.bytes = ...,
|
|
194
|
+
eof: builtins.bool = ...,
|
|
195
|
+
) -> None: ...
|
|
196
|
+
def ClearField(self, field_name: typing_extensions.Literal["data", b"data", "eof", b"eof", "exec_id", b"exec_id", "offset", b"offset", "task_id", b"task_id"]) -> None: ...
|
|
197
|
+
|
|
198
|
+
global___SandboxExecStdinWriteRequest = SandboxExecStdinWriteRequest
|
|
199
|
+
|
|
200
|
+
class SandboxExecStdinWriteResponse(google.protobuf.message.Message):
|
|
201
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
202
|
+
|
|
203
|
+
def __init__(
|
|
204
|
+
self,
|
|
205
|
+
) -> None: ...
|
|
206
|
+
|
|
207
|
+
global___SandboxExecStdinWriteResponse = SandboxExecStdinWriteResponse
|
|
208
|
+
|
|
209
|
+
class SandboxExecStdioReadRequest(google.protobuf.message.Message):
|
|
210
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
211
|
+
|
|
212
|
+
TASK_ID_FIELD_NUMBER: builtins.int
|
|
213
|
+
EXEC_ID_FIELD_NUMBER: builtins.int
|
|
214
|
+
OFFSET_FIELD_NUMBER: builtins.int
|
|
215
|
+
FILE_DESCRIPTOR_FIELD_NUMBER: builtins.int
|
|
216
|
+
task_id: builtins.str
|
|
217
|
+
"""The task ID of the sandbox running the exec'd command."""
|
|
218
|
+
exec_id: builtins.str
|
|
219
|
+
"""The execution ID of the command to read from."""
|
|
220
|
+
offset: builtins.int
|
|
221
|
+
"""The offset to start reading from. This is used to resume reading from the
|
|
222
|
+
last read position if the connection is closed and reopened.
|
|
223
|
+
"""
|
|
224
|
+
file_descriptor: global___SandboxExecStdioFileDescriptor.ValueType
|
|
225
|
+
"""Which file descriptor to read from."""
|
|
226
|
+
def __init__(
|
|
227
|
+
self,
|
|
228
|
+
*,
|
|
229
|
+
task_id: builtins.str = ...,
|
|
230
|
+
exec_id: builtins.str = ...,
|
|
231
|
+
offset: builtins.int = ...,
|
|
232
|
+
file_descriptor: global___SandboxExecStdioFileDescriptor.ValueType = ...,
|
|
233
|
+
) -> None: ...
|
|
234
|
+
def ClearField(self, field_name: typing_extensions.Literal["exec_id", b"exec_id", "file_descriptor", b"file_descriptor", "offset", b"offset", "task_id", b"task_id"]) -> None: ...
|
|
235
|
+
|
|
236
|
+
global___SandboxExecStdioReadRequest = SandboxExecStdioReadRequest
|
|
237
|
+
|
|
238
|
+
class SandboxExecStdioReadResponse(google.protobuf.message.Message):
|
|
239
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
240
|
+
|
|
241
|
+
DATA_FIELD_NUMBER: builtins.int
|
|
242
|
+
data: builtins.bytes
|
|
243
|
+
"""The data read from the file descriptor."""
|
|
244
|
+
def __init__(
|
|
245
|
+
self,
|
|
246
|
+
*,
|
|
247
|
+
data: builtins.bytes = ...,
|
|
248
|
+
) -> None: ...
|
|
249
|
+
def ClearField(self, field_name: typing_extensions.Literal["data", b"data"]) -> None: ...
|
|
250
|
+
|
|
251
|
+
global___SandboxExecStdioReadResponse = SandboxExecStdioReadResponse
|
|
252
|
+
|
|
253
|
+
class SandboxExecWaitRequest(google.protobuf.message.Message):
|
|
254
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
255
|
+
|
|
256
|
+
TASK_ID_FIELD_NUMBER: builtins.int
|
|
257
|
+
EXEC_ID_FIELD_NUMBER: builtins.int
|
|
258
|
+
task_id: builtins.str
|
|
259
|
+
"""The task ID of the sandbox running the exec'd command."""
|
|
260
|
+
exec_id: builtins.str
|
|
261
|
+
"""The execution ID of the command to wait on."""
|
|
262
|
+
def __init__(
|
|
263
|
+
self,
|
|
264
|
+
*,
|
|
265
|
+
task_id: builtins.str = ...,
|
|
266
|
+
exec_id: builtins.str = ...,
|
|
267
|
+
) -> None: ...
|
|
268
|
+
def ClearField(self, field_name: typing_extensions.Literal["exec_id", b"exec_id", "task_id", b"task_id"]) -> None: ...
|
|
269
|
+
|
|
270
|
+
global___SandboxExecWaitRequest = SandboxExecWaitRequest
|
|
271
|
+
|
|
272
|
+
class SandboxExecWaitResponse(google.protobuf.message.Message):
|
|
273
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
274
|
+
|
|
275
|
+
CODE_FIELD_NUMBER: builtins.int
|
|
276
|
+
SIGNAL_FIELD_NUMBER: builtins.int
|
|
277
|
+
code: builtins.int
|
|
278
|
+
"""The exit code of the command."""
|
|
279
|
+
signal: builtins.int
|
|
280
|
+
"""The signal that terminated the command."""
|
|
281
|
+
def __init__(
|
|
282
|
+
self,
|
|
283
|
+
*,
|
|
284
|
+
code: builtins.int = ...,
|
|
285
|
+
signal: builtins.int = ...,
|
|
286
|
+
) -> None: ...
|
|
287
|
+
def HasField(self, field_name: typing_extensions.Literal["code", b"code", "exit_status", b"exit_status", "signal", b"signal"]) -> builtins.bool: ...
|
|
288
|
+
def ClearField(self, field_name: typing_extensions.Literal["code", b"code", "exit_status", b"exit_status", "signal", b"signal"]) -> None: ...
|
|
289
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["exit_status", b"exit_status"]) -> typing_extensions.Literal["code", "signal"] | None: ...
|
|
290
|
+
|
|
291
|
+
global___SandboxExecWaitResponse = SandboxExecWaitResponse
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from modal_proto import sandbox_router_pb2 as modal__proto_dot_sandbox__router__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SandboxRouterStub(object):
|
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.SandboxExecStart = channel.unary_unary(
|
|
18
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStart',
|
|
19
|
+
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.SerializeToString,
|
|
20
|
+
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartResponse.FromString,
|
|
21
|
+
)
|
|
22
|
+
self.SandboxExecStdinWrite = channel.unary_unary(
|
|
23
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite',
|
|
24
|
+
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteRequest.SerializeToString,
|
|
25
|
+
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteResponse.FromString,
|
|
26
|
+
)
|
|
27
|
+
self.SandboxExecStdioRead = channel.unary_stream(
|
|
28
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead',
|
|
29
|
+
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadRequest.SerializeToString,
|
|
30
|
+
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadResponse.FromString,
|
|
31
|
+
)
|
|
32
|
+
self.SandboxExecWait = channel.unary_unary(
|
|
33
|
+
'/modal.sandbox_router.SandboxRouter/SandboxExecWait',
|
|
34
|
+
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitRequest.SerializeToString,
|
|
35
|
+
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitResponse.FromString,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class SandboxRouterServicer(object):
|
|
40
|
+
"""Missing associated documentation comment in .proto file."""
|
|
41
|
+
|
|
42
|
+
def SandboxExecStart(self, request, context):
|
|
43
|
+
"""Execute a command in the sandbox.
|
|
44
|
+
"""
|
|
45
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
46
|
+
context.set_details('Method not implemented!')
|
|
47
|
+
raise NotImplementedError('Method not implemented!')
|
|
48
|
+
|
|
49
|
+
def SandboxExecStdinWrite(self, request, context):
|
|
50
|
+
"""Write to the stdin stream of an exec'd command.
|
|
51
|
+
"""
|
|
52
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
53
|
+
context.set_details('Method not implemented!')
|
|
54
|
+
raise NotImplementedError('Method not implemented!')
|
|
55
|
+
|
|
56
|
+
def SandboxExecStdioRead(self, request, context):
|
|
57
|
+
"""Get a stream of output from the stdout or stderr stream of an exec'd command.
|
|
58
|
+
"""
|
|
59
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
60
|
+
context.set_details('Method not implemented!')
|
|
61
|
+
raise NotImplementedError('Method not implemented!')
|
|
62
|
+
|
|
63
|
+
def SandboxExecWait(self, request, context):
|
|
64
|
+
"""Wait for an exec'd command to exit and return the exit code.
|
|
65
|
+
"""
|
|
66
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
67
|
+
context.set_details('Method not implemented!')
|
|
68
|
+
raise NotImplementedError('Method not implemented!')
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def add_SandboxRouterServicer_to_server(servicer, server):
|
|
72
|
+
rpc_method_handlers = {
|
|
73
|
+
'SandboxExecStart': grpc.unary_unary_rpc_method_handler(
|
|
74
|
+
servicer.SandboxExecStart,
|
|
75
|
+
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.FromString,
|
|
76
|
+
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartResponse.SerializeToString,
|
|
77
|
+
),
|
|
78
|
+
'SandboxExecStdinWrite': grpc.unary_unary_rpc_method_handler(
|
|
79
|
+
servicer.SandboxExecStdinWrite,
|
|
80
|
+
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteRequest.FromString,
|
|
81
|
+
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteResponse.SerializeToString,
|
|
82
|
+
),
|
|
83
|
+
'SandboxExecStdioRead': grpc.unary_stream_rpc_method_handler(
|
|
84
|
+
servicer.SandboxExecStdioRead,
|
|
85
|
+
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadRequest.FromString,
|
|
86
|
+
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadResponse.SerializeToString,
|
|
87
|
+
),
|
|
88
|
+
'SandboxExecWait': grpc.unary_unary_rpc_method_handler(
|
|
89
|
+
servicer.SandboxExecWait,
|
|
90
|
+
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitRequest.FromString,
|
|
91
|
+
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitResponse.SerializeToString,
|
|
92
|
+
),
|
|
93
|
+
}
|
|
94
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
95
|
+
'modal.sandbox_router.SandboxRouter', rpc_method_handlers)
|
|
96
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# This class is part of an EXPERIMENTAL API.
|
|
100
|
+
class SandboxRouter(object):
|
|
101
|
+
"""Missing associated documentation comment in .proto file."""
|
|
102
|
+
|
|
103
|
+
@staticmethod
|
|
104
|
+
def SandboxExecStart(request,
|
|
105
|
+
target,
|
|
106
|
+
options=(),
|
|
107
|
+
channel_credentials=None,
|
|
108
|
+
call_credentials=None,
|
|
109
|
+
insecure=False,
|
|
110
|
+
compression=None,
|
|
111
|
+
wait_for_ready=None,
|
|
112
|
+
timeout=None,
|
|
113
|
+
metadata=None):
|
|
114
|
+
return grpc.experimental.unary_unary(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecStart',
|
|
115
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.SerializeToString,
|
|
116
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecStartResponse.FromString,
|
|
117
|
+
options, channel_credentials,
|
|
118
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
119
|
+
|
|
120
|
+
@staticmethod
|
|
121
|
+
def SandboxExecStdinWrite(request,
|
|
122
|
+
target,
|
|
123
|
+
options=(),
|
|
124
|
+
channel_credentials=None,
|
|
125
|
+
call_credentials=None,
|
|
126
|
+
insecure=False,
|
|
127
|
+
compression=None,
|
|
128
|
+
wait_for_ready=None,
|
|
129
|
+
timeout=None,
|
|
130
|
+
metadata=None):
|
|
131
|
+
return grpc.experimental.unary_unary(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite',
|
|
132
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteRequest.SerializeToString,
|
|
133
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteResponse.FromString,
|
|
134
|
+
options, channel_credentials,
|
|
135
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
136
|
+
|
|
137
|
+
@staticmethod
|
|
138
|
+
def SandboxExecStdioRead(request,
|
|
139
|
+
target,
|
|
140
|
+
options=(),
|
|
141
|
+
channel_credentials=None,
|
|
142
|
+
call_credentials=None,
|
|
143
|
+
insecure=False,
|
|
144
|
+
compression=None,
|
|
145
|
+
wait_for_ready=None,
|
|
146
|
+
timeout=None,
|
|
147
|
+
metadata=None):
|
|
148
|
+
return grpc.experimental.unary_stream(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead',
|
|
149
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadRequest.SerializeToString,
|
|
150
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadResponse.FromString,
|
|
151
|
+
options, channel_credentials,
|
|
152
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
153
|
+
|
|
154
|
+
@staticmethod
|
|
155
|
+
def SandboxExecWait(request,
|
|
156
|
+
target,
|
|
157
|
+
options=(),
|
|
158
|
+
channel_credentials=None,
|
|
159
|
+
call_credentials=None,
|
|
160
|
+
insecure=False,
|
|
161
|
+
compression=None,
|
|
162
|
+
wait_for_ready=None,
|
|
163
|
+
timeout=None,
|
|
164
|
+
metadata=None):
|
|
165
|
+
return grpc.experimental.unary_unary(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecWait',
|
|
166
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecWaitRequest.SerializeToString,
|
|
167
|
+
modal__proto_dot_sandbox__router__pb2.SandboxExecWaitResponse.FromString,
|
|
168
|
+
options, channel_credentials,
|
|
169
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import abc
|
|
6
|
+
import collections.abc
|
|
7
|
+
import grpc
|
|
8
|
+
import modal_proto.sandbox_router_pb2
|
|
9
|
+
|
|
10
|
+
class SandboxRouterStub:
|
|
11
|
+
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
12
|
+
SandboxExecStart: grpc.UnaryUnaryMultiCallable[
|
|
13
|
+
modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
14
|
+
modal_proto.sandbox_router_pb2.SandboxExecStartResponse,
|
|
15
|
+
]
|
|
16
|
+
"""Execute a command in the sandbox."""
|
|
17
|
+
SandboxExecStdinWrite: grpc.UnaryUnaryMultiCallable[
|
|
18
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
19
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse,
|
|
20
|
+
]
|
|
21
|
+
"""Write to the stdin stream of an exec'd command."""
|
|
22
|
+
SandboxExecStdioRead: grpc.UnaryStreamMultiCallable[
|
|
23
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
24
|
+
modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse,
|
|
25
|
+
]
|
|
26
|
+
"""Get a stream of output from the stdout or stderr stream of an exec'd command."""
|
|
27
|
+
SandboxExecWait: grpc.UnaryUnaryMultiCallable[
|
|
28
|
+
modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
29
|
+
modal_proto.sandbox_router_pb2.SandboxExecWaitResponse,
|
|
30
|
+
]
|
|
31
|
+
"""Wait for an exec'd command to exit and return the exit code."""
|
|
32
|
+
|
|
33
|
+
class SandboxRouterServicer(metaclass=abc.ABCMeta):
|
|
34
|
+
@abc.abstractmethod
|
|
35
|
+
def SandboxExecStart(
|
|
36
|
+
self,
|
|
37
|
+
request: modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
38
|
+
context: grpc.ServicerContext,
|
|
39
|
+
) -> modal_proto.sandbox_router_pb2.SandboxExecStartResponse:
|
|
40
|
+
"""Execute a command in the sandbox."""
|
|
41
|
+
@abc.abstractmethod
|
|
42
|
+
def SandboxExecStdinWrite(
|
|
43
|
+
self,
|
|
44
|
+
request: modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
45
|
+
context: grpc.ServicerContext,
|
|
46
|
+
) -> modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse:
|
|
47
|
+
"""Write to the stdin stream of an exec'd command."""
|
|
48
|
+
@abc.abstractmethod
|
|
49
|
+
def SandboxExecStdioRead(
|
|
50
|
+
self,
|
|
51
|
+
request: modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
52
|
+
context: grpc.ServicerContext,
|
|
53
|
+
) -> collections.abc.Iterator[modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse]:
|
|
54
|
+
"""Get a stream of output from the stdout or stderr stream of an exec'd command."""
|
|
55
|
+
@abc.abstractmethod
|
|
56
|
+
def SandboxExecWait(
|
|
57
|
+
self,
|
|
58
|
+
request: modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
59
|
+
context: grpc.ServicerContext,
|
|
60
|
+
) -> modal_proto.sandbox_router_pb2.SandboxExecWaitResponse:
|
|
61
|
+
"""Wait for an exec'd command to exit and return the exit code."""
|
|
62
|
+
|
|
63
|
+
def add_SandboxRouterServicer_to_server(servicer: SandboxRouterServicer, server: grpc.Server) -> None: ...
|
modal_version/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|