Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Improve types

Tomas Valenta1a6d34ea118b
diff --git a/packages/js-sdk/src/envd/process/v1/process_pb.ts b/packages/js-sdk/src/envd/process/v1/process_pb.ts
index c4ffcfd32..8d9d83ef0 100644
--- a/packages/js-sdk/src/envd/process/v1/process_pb.ts
+++ b/packages/js-sdk/src/envd/process/v1/process_pb.ts
@@ -132,9 +132,9 @@ export class ProcessConfig extends Message<ProcessConfig> {
envs: { [key: string]: string } = {};
/**
- * @generated from field: string cwd = 4;
+ * @generated from field: optional string cwd = 4;
*/
- cwd = "";
+ cwd?: string;
constructor(data?: PartialMessage<ProcessConfig>) {
super();
@@ -147,7 +147,7 @@ export class ProcessConfig extends Message<ProcessConfig> {
{ no: 1, name: "cmd", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 3, name: "envs", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
- { no: 4, name: "cwd", kind: "scalar", T: 9 /* ScalarType.STRING */ },
+ { no: 4, name: "cwd", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProcessConfig {
diff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.ts
index f687e7ef1..adb88c91a 100644
--- a/packages/js-sdk/src/sandbox/index.ts
+++ b/packages/js-sdk/src/sandbox/index.ts
@@ -11,7 +11,7 @@ export interface SandboxOpts extends ConnectionOpts {
* A dictionary of strings that is stored alongside the running sandbox.
* You can see this metadata when you list running sandboxes.
*/
- metadata?: { [key: string]: string }
+ metadata?: Record<string, string>
logger?: Logger
timeout?: number
}
diff --git a/packages/js-sdk/src/sandbox/process.ts b/packages/js-sdk/src/sandbox/process.ts
index 9fe5bf113..6d56aa7ef 100644
--- a/packages/js-sdk/src/sandbox/process.ts
+++ b/packages/js-sdk/src/sandbox/process.ts
@@ -70,11 +70,11 @@ export class Process {
onStderr,
onStdout,
}: {
- cwd?: string,
- user?: string,
- envs?: Record<string, string>,
- onStdout?: (data: string) => any,
- onStderr?: (data: string) => any,
+ cwd: string | undefined,
+ user: 'root' | 'user' | undefined,
+ envs: Record<string, string> | undefined,
+ onStdout: ((data: string) => any) | undefined,
+ onStderr: ((data: string) => any) | undefined,
}
): Promise<ProcessHandle> {
const params: PlainMessage<StartRequest> = {
@@ -86,9 +86,9 @@ export class Process {
},
process: {
cmd: '/bin/bash',
- cwd: cwd || '/',
+ cwd,
envs: envs || {},
- args: ['-c', '-l', cmd],
+ args: ['-l', '-c', cmd],
},
}
@@ -122,8 +122,8 @@ export class Process {
onStderr,
onStdout,
}: {
- onStdout?: (data: string) => any,
- onStderr?: (data: string) => any,
+ onStdout: ((data: string) => any) | undefined,
+ onStderr: ((data: string) => any) | undefined,
}
): Promise<ProcessHandle> {
const params: PlainMessage<ConnectRequest> = {
@@ -202,7 +202,7 @@ export class Process {
cmd: '/bin/bash',
cwd: '/',
envs: {},
- args: ['-l'],
+ args: ['-i', '-l'],
},
pty: {
size: {
@@ -289,8 +289,8 @@ export class Process {
onStderr,
onStdout,
}: {
- onStdout?: (data: string) => any,
- onStderr?: (data: string) => any,
+ onStdout: ((data: string) => any) | undefined,
+ onStderr: ((data: string) => any) | undefined,
}
) {
const start = createDeferredPromise<ProcessEvent_StartEvent>()
diff --git a/packages/js-sdk/src/sandbox/sandboxApi.ts b/packages/js-sdk/src/sandbox/sandboxApi.ts
index f97e91605..b52aac5c3 100644
--- a/packages/js-sdk/src/sandbox/sandboxApi.ts
+++ b/packages/js-sdk/src/sandbox/sandboxApi.ts
@@ -5,7 +5,7 @@ export interface RunningSandbox {
sandboxID: string
templateID: string
name?: string
- metadata?: { [key: string]: string }
+ metadata?: Record<string, string>
startedAt: Date
}
@@ -51,7 +51,7 @@ export class SandboxApi {
protected static async createSandbox(
template: string,
opts: ConnectionOpts & {
- metadata?: { [key: string]: string },
+ metadata?: Record<string, string>,
timeout?: number,
} = {}): Promise<string> {
const config = new ConnectionConfig(opts)
diff --git a/packages/python-sdk/e2b/sandbox/process.py b/packages/python-sdk/e2b/sandbox/process.py
index 9444dd1d3..ee7f68c27 100644
--- a/packages/python-sdk/e2b/sandbox/process.py
+++ b/packages/python-sdk/e2b/sandbox/process.py
@@ -1,7 +1,7 @@
import logging
import connect
-from typing import Dict, Optional, Callable, Any, Generator, Union
+from typing import Dict, Optional, Callable, Any, Generator, Union, Literal
from envd.process.v1 import process_connect, process_pb2
from pydantic import BaseModel
@@ -106,14 +106,15 @@ class Process:
self,
cmd: str,
envs: Optional[Dict[str, str]] = {},
- user: str = "user",
+ user: Literal["root", "user"] = "user",
cwd: Optional[str] = None,
):
params = process_pb2.StartRequest(
owner=process_pb2.Credential(username=user),
process=process_pb2.ProcessConfig(
- cmd=cmd,
+ cmd="/bin/bash",
envs=envs,
+ args=["-l", "-c", cmd],
cwd=cwd,
),
)
diff --git a/packages/python-sdk/envd/filesystem/v1/filesystem_connect.py b/packages/python-sdk/envd/filesystem/v1/filesystem_connect.py
index 84e87c888..99432fc4c 100644
--- a/packages/python-sdk/envd/filesystem/v1/filesystem_connect.py
+++ b/packages/python-sdk/envd/filesystem/v1/filesystem_connect.py
@@ -3,9 +3,7 @@ from typing import Any, Generator
import connect
-from envd.filesystem.v1 import (
- filesystem_pb2 as envd_dot_filesystem_dot_v1_dot_filesystem__pb2,
-)
+from envd.filesystem.v1 import filesystem_pb2 as envd_dot_filesystem_dot_v1_dot_filesystem__pb2
FilesystemServiceName = "envd.filesystem.v1.FilesystemService"
@@ -18,7 +16,7 @@ class FilesystemServiceClient:
response_type=envd_dot_filesystem_dot_v1_dot_filesystem__pb2.StatResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._list = connect.Client(
pool=pool,
@@ -26,7 +24,7 @@ class FilesystemServiceClient:
response_type=envd_dot_filesystem_dot_v1_dot_filesystem__pb2.ListResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._watch = connect.Client(
pool=pool,
@@ -34,7 +32,7 @@ class FilesystemServiceClient:
response_type=envd_dot_filesystem_dot_v1_dot_filesystem__pb2.WatchResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._remove = connect.Client(
pool=pool,
@@ -42,27 +40,17 @@ class FilesystemServiceClient:
response_type=envd_dot_filesystem_dot_v1_dot_filesystem__pb2.RemoveResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
- def stat(
- self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.StatRequest, **opts
- ) -> envd_dot_filesystem_dot_v1_dot_filesystem__pb2.StatResponse:
+ def stat(self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.StatRequest, **opts) -> envd_dot_filesystem_dot_v1_dot_filesystem__pb2.StatResponse:
return self._stat.call_unary(req, **opts)
- def list(
- self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.ListRequest, **opts
- ) -> envd_dot_filesystem_dot_v1_dot_filesystem__pb2.ListResponse:
+ def list(self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.ListRequest, **opts) -> envd_dot_filesystem_dot_v1_dot_filesystem__pb2.ListResponse:
return self._list.call_unary(req, **opts)
- def watch(
- self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.WatchRequest, **opts
- ) -> Generator[
- envd_dot_filesystem_dot_v1_dot_filesystem__pb2.WatchResponse, Any, None
- ]:
+ def watch(self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.WatchRequest , **opts) -> Generator[envd_dot_filesystem_dot_v1_dot_filesystem__pb2.WatchResponse, Any, None]:
return self._watch.call_server_stream(req, **opts)
- def remove(
- self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.RemoveRequest, **opts
- ) -> envd_dot_filesystem_dot_v1_dot_filesystem__pb2.RemoveResponse:
+ def remove(self, req: envd_dot_filesystem_dot_v1_dot_filesystem__pb2.RemoveRequest, **opts) -> envd_dot_filesystem_dot_v1_dot_filesystem__pb2.RemoveResponse:
return self._remove.call_unary(req, **opts)
diff --git a/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.py b/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.py
index dbf76b845..021cd200a 100644
--- a/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.py
+++ b/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.py
@@ -7,50 +7,45 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
-
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n#envd/filesystem/v1/filesystem.proto\x12\x12\x65nvd.filesystem.v1"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"\x10\n\x0eRemoveResponse"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"C\n\x0cStatResponse\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1d.envd.filesystem.v1.EntryInfoR\x05\x65ntry"Q\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x04type\x18\x02 \x01(\x0e\x32\x1c.envd.filesystem.v1.FileTypeR\x04type"!\n\x0bListRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"G\n\x0cListResponse\x12\x37\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1d.envd.filesystem.v1.EntryInfoR\x07\x65ntries""\n\x0cWatchRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"J\n\rWatchResponse\x12\x39\n\x05\x65vent\x18\x01 \x01(\x0b\x32#.envd.filesystem.v1.FilesystemEventR\x05\x65vent"X\n\x0f\x46ilesystemEvent\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x31\n\x04type\x18\x02 \x01(\x0e\x32\x1d.envd.filesystem.v1.EventTypeR\x04type*R\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46ILE_TYPE_FILE\x10\x01\x12\x17\n\x13\x46ILE_TYPE_DIRECTORY\x10\x02*\x98\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45VENT_TYPE_CREATE\x10\x01\x12\x14\n\x10\x45VENT_TYPE_WRITE\x10\x02\x12\x15\n\x11\x45VENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11\x45VENT_TYPE_RENAME\x10\x04\x12\x14\n\x10\x45VENT_TYPE_CHMOD\x10\x05\x32\xca\x02\n\x11\x46ilesystemService\x12I\n\x04Stat\x12\x1f.envd.filesystem.v1.StatRequest\x1a .envd.filesystem.v1.StatResponse\x12I\n\x04List\x12\x1f.envd.filesystem.v1.ListRequest\x1a .envd.filesystem.v1.ListResponse\x12N\n\x05Watch\x12 .envd.filesystem.v1.WatchRequest\x1a!.envd.filesystem.v1.WatchResponse0\x01\x12O\n\x06Remove\x12!.envd.filesystem.v1.RemoveRequest\x1a".envd.filesystem.v1.RemoveResponseB\x93\x01\n\x16\x63om.envd.filesystem.v1B\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x45\x46X\xaa\x02\x12\x45nvd.Filesystem.V1\xca\x02\x12\x45nvd\\Filesystem\\V1\xe2\x02\x1e\x45nvd\\Filesystem\\V1\\GPBMetadata\xea\x02\x14\x45nvd::Filesystem::V1b\x06proto3'
-)
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#envd/filesystem/v1/filesystem.proto\x12\x12\x65nvd.filesystem.v1\"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\"\x10\n\x0eRemoveResponse\"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\"C\n\x0cStatResponse\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1d.envd.filesystem.v1.EntryInfoR\x05\x65ntry\"Q\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x04type\x18\x02 \x01(\x0e\x32\x1c.envd.filesystem.v1.FileTypeR\x04type\"!\n\x0bListRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\"G\n\x0cListResponse\x12\x37\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1d.envd.filesystem.v1.EntryInfoR\x07\x65ntries\"\"\n\x0cWatchRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\"J\n\rWatchResponse\x12\x39\n\x05\x65vent\x18\x01 \x01(\x0b\x32#.envd.filesystem.v1.FilesystemEventR\x05\x65vent\"X\n\x0f\x46ilesystemEvent\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x31\n\x04type\x18\x02 \x01(\x0e\x32\x1d.envd.filesystem.v1.EventTypeR\x04type*R\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46ILE_TYPE_FILE\x10\x01\x12\x17\n\x13\x46ILE_TYPE_DIRECTORY\x10\x02*\x98\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45VENT_TYPE_CREATE\x10\x01\x12\x14\n\x10\x45VENT_TYPE_WRITE\x10\x02\x12\x15\n\x11\x45VENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11\x45VENT_TYPE_RENAME\x10\x04\x12\x14\n\x10\x45VENT_TYPE_CHMOD\x10\x05\x32\xca\x02\n\x11\x46ilesystemService\x12I\n\x04Stat\x12\x1f.envd.filesystem.v1.StatRequest\x1a .envd.filesystem.v1.StatResponse\x12I\n\x04List\x12\x1f.envd.filesystem.v1.ListRequest\x1a .envd.filesystem.v1.ListResponse\x12N\n\x05Watch\x12 .envd.filesystem.v1.WatchRequest\x1a!.envd.filesystem.v1.WatchResponse0\x01\x12O\n\x06Remove\x12!.envd.filesystem.v1.RemoveRequest\x1a\".envd.filesystem.v1.RemoveResponseB\x93\x01\n\x16\x63om.envd.filesystem.v1B\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x45\x46X\xaa\x02\x12\x45nvd.Filesystem.V1\xca\x02\x12\x45nvd\\Filesystem\\V1\xe2\x02\x1e\x45nvd\\Filesystem\\V1\\GPBMetadata\xea\x02\x14\x45nvd::Filesystem::V1b\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(
- DESCRIPTOR, "envd.filesystem.v1.filesystem_pb2", _globals
-)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'envd.filesystem.v1.filesystem_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
- _globals["DESCRIPTOR"]._loaded_options = None
- _globals[
- "DESCRIPTOR"
- ]._serialized_options = b"\n\026com.envd.filesystem.v1B\017FilesystemProtoP\001\242\002\003EFX\252\002\022Envd.Filesystem.V1\312\002\022Envd\\Filesystem\\V1\342\002\036Envd\\Filesystem\\V1\\GPBMetadata\352\002\024Envd::Filesystem::V1"
- _globals["_FILETYPE"]._serialized_start = 611
- _globals["_FILETYPE"]._serialized_end = 693
- _globals["_EVENTTYPE"]._serialized_start = 696
- _globals["_EVENTTYPE"]._serialized_end = 848
- _globals["_REMOVEREQUEST"]._serialized_start = 59
- _globals["_REMOVEREQUEST"]._serialized_end = 94
- _globals["_REMOVERESPONSE"]._serialized_start = 96
- _globals["_REMOVERESPONSE"]._serialized_end = 112
- _globals["_STATREQUEST"]._serialized_start = 114
- _globals["_STATREQUEST"]._serialized_end = 147
- _globals["_STATRESPONSE"]._serialized_start = 149
- _globals["_STATRESPONSE"]._serialized_end = 216
- _globals["_ENTRYINFO"]._serialized_start = 218
- _globals["_ENTRYINFO"]._serialized_end = 299
- _globals["_LISTREQUEST"]._serialized_start = 301
- _globals["_LISTREQUEST"]._serialized_end = 334
- _globals["_LISTRESPONSE"]._serialized_start = 336
- _globals["_LISTRESPONSE"]._serialized_end = 407
- _globals["_WATCHREQUEST"]._serialized_start = 409
- _globals["_WATCHREQUEST"]._serialized_end = 443
- _globals["_WATCHRESPONSE"]._serialized_start = 445
- _globals["_WATCHRESPONSE"]._serialized_end = 519
- _globals["_FILESYSTEMEVENT"]._serialized_start = 521
- _globals["_FILESYSTEMEVENT"]._serialized_end = 609
- _globals["_FILESYSTEMSERVICE"]._serialized_start = 851
- _globals["_FILESYSTEMSERVICE"]._serialized_end = 1181
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\026com.envd.filesystem.v1B\017FilesystemProtoP\001\242\002\003EFX\252\002\022Envd.Filesystem.V1\312\002\022Envd\\Filesystem\\V1\342\002\036Envd\\Filesystem\\V1\\GPBMetadata\352\002\024Envd::Filesystem::V1'
+ _globals['_FILETYPE']._serialized_start=611
+ _globals['_FILETYPE']._serialized_end=693
+ _globals['_EVENTTYPE']._serialized_start=696
+ _globals['_EVENTTYPE']._serialized_end=848
+ _globals['_REMOVEREQUEST']._serialized_start=59
+ _globals['_REMOVEREQUEST']._serialized_end=94
+ _globals['_REMOVERESPONSE']._serialized_start=96
+ _globals['_REMOVERESPONSE']._serialized_end=112
+ _globals['_STATREQUEST']._serialized_start=114
+ _globals['_STATREQUEST']._serialized_end=147
+ _globals['_STATRESPONSE']._serialized_start=149
+ _globals['_STATRESPONSE']._serialized_end=216
+ _globals['_ENTRYINFO']._serialized_start=218
+ _globals['_ENTRYINFO']._serialized_end=299
+ _globals['_LISTREQUEST']._serialized_start=301
+ _globals['_LISTREQUEST']._serialized_end=334
+ _globals['_LISTRESPONSE']._serialized_start=336
+ _globals['_LISTRESPONSE']._serialized_end=407
+ _globals['_WATCHREQUEST']._serialized_start=409
+ _globals['_WATCHREQUEST']._serialized_end=443
+ _globals['_WATCHRESPONSE']._serialized_start=445
+ _globals['_WATCHRESPONSE']._serialized_end=519
+ _globals['_FILESYSTEMEVENT']._serialized_start=521
+ _globals['_FILESYSTEMEVENT']._serialized_end=609
+ _globals['_FILESYSTEMSERVICE']._serialized_start=851
+ _globals['_FILESYSTEMSERVICE']._serialized_end=1181
# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.pyi b/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.pyi
index 2332d36cc..c5068c5f1 100644
--- a/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.pyi
+++ b/packages/python-sdk/envd/filesystem/v1/filesystem_pb2.pyi
@@ -2,13 +2,7 @@ from google.protobuf.internal import containers as _containers
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
-from typing import (
- ClassVar as _ClassVar,
- Iterable as _Iterable,
- Mapping as _Mapping,
- Optional as _Optional,
- Union as _Union,
-)
+from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
DESCRIPTOR: _descriptor.FileDescriptor
@@ -26,7 +20,6 @@ class EventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
EVENT_TYPE_REMOVE: _ClassVar[EventType]
EVENT_TYPE_RENAME: _ClassVar[EventType]
EVENT_TYPE_CHMOD: _ClassVar[EventType]
-
FILE_TYPE_UNSPECIFIED: FileType
FILE_TYPE_FILE: FileType
FILE_TYPE_DIRECTORY: FileType
@@ -65,9 +58,7 @@ class EntryInfo(_message.Message):
TYPE_FIELD_NUMBER: _ClassVar[int]
name: str
type: FileType
- def __init__(
- self, name: _Optional[str] = ..., type: _Optional[_Union[FileType, str]] = ...
- ) -> None: ...
+ def __init__(self, name: _Optional[str] = ..., type: _Optional[_Union[FileType, str]] = ...) -> None: ...
class ListRequest(_message.Message):
__slots__ = ("path",)
@@ -79,9 +70,7 @@ class ListResponse(_message.Message):
__slots__ = ("entries",)
ENTRIES_FIELD_NUMBER: _ClassVar[int]
entries: _containers.RepeatedCompositeFieldContainer[EntryInfo]
- def __init__(
- self, entries: _Optional[_Iterable[_Union[EntryInfo, _Mapping]]] = ...
- ) -> None: ...
+ def __init__(self, entries: _Optional[_Iterable[_Union[EntryInfo, _Mapping]]] = ...) -> None: ...
class WatchRequest(_message.Message):
__slots__ = ("path",)
@@ -93,9 +82,7 @@ class WatchResponse(_message.Message):
__slots__ = ("event",)
EVENT_FIELD_NUMBER: _ClassVar[int]
event: FilesystemEvent
- def __init__(
- self, event: _Optional[_Union[FilesystemEvent, _Mapping]] = ...
- ) -> None: ...
+ def __init__(self, event: _Optional[_Union[FilesystemEvent, _Mapping]] = ...) -> None: ...
class FilesystemEvent(_message.Message):
__slots__ = ("path", "type")
@@ -103,6 +90,4 @@ class FilesystemEvent(_message.Message):
TYPE_FIELD_NUMBER: _ClassVar[int]
path: str
type: EventType
- def __init__(
- self, path: _Optional[str] = ..., type: _Optional[_Union[EventType, str]] = ...
- ) -> None: ...
+ def __init__(self, path: _Optional[str] = ..., type: _Optional[_Union[EventType, str]] = ...) -> None: ...
diff --git a/packages/python-sdk/envd/process/v1/process_connect.py b/packages/python-sdk/envd/process/v1/process_connect.py
index cd99291bf..0bec00c57 100644
--- a/packages/python-sdk/envd/process/v1/process_connect.py
+++ b/packages/python-sdk/envd/process/v1/process_connect.py
@@ -16,7 +16,7 @@ class ProcessServiceClient:
response_type=envd_dot_process_dot_v1_dot_process__pb2.ListResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._connect = connect.Client(
pool=pool,
@@ -24,7 +24,7 @@ class ProcessServiceClient:
response_type=envd_dot_process_dot_v1_dot_process__pb2.ConnectResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._start = connect.Client(
pool=pool,
@@ -32,7 +32,7 @@ class ProcessServiceClient:
response_type=envd_dot_process_dot_v1_dot_process__pb2.StartResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._update = connect.Client(
pool=pool,
@@ -40,7 +40,7 @@ class ProcessServiceClient:
response_type=envd_dot_process_dot_v1_dot_process__pb2.UpdateResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._stream_input = connect.Client(
pool=pool,
@@ -48,7 +48,7 @@ class ProcessServiceClient:
response_type=envd_dot_process_dot_v1_dot_process__pb2.StreamInputResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._send_input = connect.Client(
pool=pool,
@@ -56,7 +56,7 @@ class ProcessServiceClient:
response_type=envd_dot_process_dot_v1_dot_process__pb2.SendInputResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
self._send_signal = connect.Client(
pool=pool,
@@ -64,40 +64,26 @@ class ProcessServiceClient:
response_type=envd_dot_process_dot_v1_dot_process__pb2.SendSignalResponse,
compressor=compressor,
json=json,
- **opts,
+ **opts
)
- def list(
- self, req: envd_dot_process_dot_v1_dot_process__pb2.ListRequest, **opts
- ) -> envd_dot_process_dot_v1_dot_process__pb2.ListResponse:
+ def list(self, req: envd_dot_process_dot_v1_dot_process__pb2.ListRequest, **opts) -> envd_dot_process_dot_v1_dot_process__pb2.ListResponse:
return self._list.call_unary(req, **opts)
- def connect(
- self, req: envd_dot_process_dot_v1_dot_process__pb2.ConnectRequest, **opts
- ) -> Generator[envd_dot_process_dot_v1_dot_process__pb2.ConnectResponse, Any, None]:
+ def connect(self, req: envd_dot_process_dot_v1_dot_process__pb2.ConnectRequest , **opts) -> Generator[envd_dot_process_dot_v1_dot_process__pb2.ConnectResponse, Any, None]:
return self._connect.call_server_stream(req, **opts)
- def start(
- self, req: envd_dot_process_dot_v1_dot_process__pb2.StartRequest, **opts
- ) -> Generator[envd_dot_process_dot_v1_dot_process__pb2.StartResponse, Any, None]:
+ def start(self, req: envd_dot_process_dot_v1_dot_process__pb2.StartRequest , **opts) -> Generator[envd_dot_process_dot_v1_dot_process__pb2.StartResponse, Any, None]:
return self._start.call_server_stream(req, **opts)
- def update(
- self, req: envd_dot_process_dot_v1_dot_process__pb2.UpdateRequest, **opts
- ) -> envd_dot_process_dot_v1_dot_process__pb2.UpdateResponse:
+ def update(self, req: envd_dot_process_dot_v1_dot_process__pb2.UpdateRequest, **opts) -> envd_dot_process_dot_v1_dot_process__pb2.UpdateResponse:
return self._update.call_unary(req, **opts)
- def stream_input(
- self, req: envd_dot_process_dot_v1_dot_process__pb2.StreamInputRequest, **opts
- ) -> envd_dot_process_dot_v1_dot_process__pb2.StreamInputResponse:
+ def stream_input(self, req: envd_dot_process_dot_v1_dot_process__pb2.StreamInputRequest, **opts) -> envd_dot_process_dot_v1_dot_process__pb2.StreamInputResponse:
return self._stream_input.call_client_stream(req, **opts)
- def send_input(
- self, req: envd_dot_process_dot_v1_dot_process__pb2.SendInputRequest, **opts
- ) -> envd_dot_process_dot_v1_dot_process__pb2.SendInputResponse:
+ def send_input(self, req: envd_dot_process_dot_v1_dot_process__pb2.SendInputRequest, **opts) -> envd_dot_process_dot_v1_dot_process__pb2.SendInputResponse:
return self._send_input.call_unary(req, **opts)
- def send_signal(
- self, req: envd_dot_process_dot_v1_dot_process__pb2.SendSignalRequest, **opts
- ) -> envd_dot_process_dot_v1_dot_process__pb2.SendSignalResponse:
+ def send_signal(self, req: envd_dot_process_dot_v1_dot_process__pb2.SendSignalRequest, **opts) -> envd_dot_process_dot_v1_dot_process__pb2.SendSignalResponse:
return self._send_signal.call_unary(req, **opts)
diff --git a/packages/python-sdk/envd/process/v1/process_pb2.py b/packages/python-sdk/envd/process/v1/process_pb2.py
index 38271cbb8..920ff80de 100644
--- a/packages/python-sdk/envd/process/v1/process_pb2.py
+++ b/packages/python-sdk/envd/process/v1/process_pb2.py
@@ -7,84 +7,79 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
-
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n\x1d\x65nvd/process/v1/process.proto\x12\x0f\x65nvd.process.v1"d\n\x03PTY\x12-\n\x04size\x18\x01 \x01(\x0b\x32\x19.envd.process.v1.PTY.SizeR\x04size\x1a.\n\x04Size\x12\x12\n\x04\x63ols\x18\x01 \x01(\rR\x04\x63ols\x12\x12\n\x04rows\x18\x02 \x01(\rR\x04rows"\xbe\x01\n\rProcessConfig\x12\x10\n\x03\x63md\x18\x01 \x01(\tR\x03\x63md\x12\x12\n\x04\x61rgs\x18\x02 \x03(\tR\x04\x61rgs\x12<\n\x04\x65nvs\x18\x03 \x03(\x0b\x32(.envd.process.v1.ProcessConfig.EnvsEntryR\x04\x65nvs\x12\x10\n\x03\x63wd\x18\x04 \x01(\tR\x03\x63wd\x1a\x37\n\tEnvsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01"\r\n\x0bListRequest"L\n\x0cListResponse\x12<\n\tprocesses\x18\x01 \x03(\x0b\x32\x1e.envd.process.v1.ProcessConfigR\tprocesses"8\n\nCredential\x12\x1c\n\x08username\x18\x01 \x01(\tH\x00R\x08usernameB\x0c\n\ncredential"\xb0\x01\n\x0cStartRequest\x12\x38\n\x07process\x18\x01 \x01(\x0b\x32\x1e.envd.process.v1.ProcessConfigR\x07process\x12+\n\x03pty\x18\x02 \x01(\x0b\x32\x14.envd.process.v1.PTYH\x00R\x03pty\x88\x01\x01\x12\x31\n\x05owner\x18\x03 \x01(\x0b\x32\x1b.envd.process.v1.CredentialR\x05ownerB\x06\n\x04_pty"\x80\x01\n\rUpdateRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x12+\n\x03pty\x18\x02 \x01(\x0b\x32\x14.envd.process.v1.PTYH\x00R\x03pty\x88\x01\x01\x42\x06\n\x04_pty"\x10\n\x0eUpdateResponse"\xda\x03\n\x0cProcessEvent\x12@\n\x05start\x18\x01 \x01(\x0b\x32(.envd.process.v1.ProcessEvent.StartEventH\x00R\x05start\x12=\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\'.envd.process.v1.ProcessEvent.DataEventH\x00R\x04\x64\x61ta\x12:\n\x03\x65nd\x18\x03 \x01(\x0b\x32&.envd.process.v1.ProcessEvent.EndEventH\x00R\x03\x65nd\x1a\x1e\n\nStartEvent\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x1a]\n\tDataEvent\x12\x18\n\x06stdout\x18\x01 \x01(\x0cH\x00R\x06stdout\x12\x18\n\x06stderr\x18\x02 \x01(\x0cH\x00R\x06stderr\x12\x12\n\x03pty\x18\x03 \x01(\x0cH\x00R\x03ptyB\x08\n\x06output\x1a\x84\x01\n\x08\x45ndEvent\x12\x1b\n\texit_code\x18\x01 \x01(\x11R\x08\x65xitCode\x12\x1e\n\nterminated\x18\x02 \x01(\x08R\nterminated\x12\x16\n\x06status\x18\x03 \x01(\tR\x06status\x12\x19\n\x05\x65rror\x18\x04 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x42\x08\n\x06_errorB\x07\n\x05\x65vent"D\n\rStartResponse\x12\x33\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1d.envd.process.v1.ProcessEventR\x05\x65vent"F\n\x0f\x43onnectResponse\x12\x33\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1d.envd.process.v1.ProcessEventR\x05\x65vent"\x83\x01\n\x10SendInputRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x12\x33\n\x05input\x18\x02 \x01(\x0b\x32\x1d.envd.process.v1.ProcessInputR\x05input"\x13\n\x11SendInputResponse"C\n\x0cProcessInput\x12\x16\n\x05stdin\x18\x01 \x01(\x0cH\x00R\x05stdin\x12\x12\n\x03pty\x18\x02 \x01(\x0cH\x00R\x03ptyB\x07\n\x05input"\xb6\x02\n\x12StreamInputRequest\x12\x46\n\x05start\x18\x01 \x01(\x0b\x32..envd.process.v1.StreamInputRequest.StartEventH\x00R\x05start\x12\x43\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32-.envd.process.v1.StreamInputRequest.DataEventH\x00R\x04\x64\x61ta\x1aH\n\nStartEvent\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x1a@\n\tDataEvent\x12\x33\n\x05input\x18\x02 \x01(\x0b\x32\x1d.envd.process.v1.ProcessInputR\x05inputB\x07\n\x05\x65vent"\x15\n\x13StreamInputResponse"\x80\x01\n\x11SendSignalRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x12/\n\x06signal\x18\x02 \x01(\x0e\x32\x17.envd.process.v1.SignalR\x06signal"\x14\n\x12SendSignalResponse"L\n\x0e\x43onnectRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process"1\n\x0fProcessSelector\x12\x12\n\x03pid\x18\x01 \x01(\rH\x00R\x03pidB\n\n\x08selector*H\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\x12\n\x0eSIGNAL_SIGTERM\x10\x0f\x12\x12\n\x0eSIGNAL_SIGKILL\x10\t2\xc1\x04\n\x0eProcessService\x12\x43\n\x04List\x12\x1c.envd.process.v1.ListRequest\x1a\x1d.envd.process.v1.ListResponse\x12N\n\x07\x43onnect\x12\x1f.envd.process.v1.ConnectRequest\x1a .envd.process.v1.ConnectResponse0\x01\x12H\n\x05Start\x12\x1d.envd.process.v1.StartRequest\x1a\x1e.envd.process.v1.StartResponse0\x01\x12I\n\x06Update\x12\x1e.envd.process.v1.UpdateRequest\x1a\x1f.envd.process.v1.UpdateResponse\x12Z\n\x0bStreamInput\x12#.envd.process.v1.StreamInputRequest\x1a$.envd.process.v1.StreamInputResponse(\x01\x12R\n\tSendInput\x12!.envd.process.v1.SendInputRequest\x1a".envd.process.v1.SendInputResponse\x12U\n\nSendSignal\x12".envd.process.v1.SendSignalRequest\x1a#.envd.process.v1.SendSignalResponseB\x81\x01\n\x13\x63om.envd.process.v1B\x0cProcessProtoP\x01\xa2\x02\x03\x45PX\xaa\x02\x0f\x45nvd.Process.V1\xca\x02\x0f\x45nvd\\Process\\V1\xe2\x02\x1b\x45nvd\\Process\\V1\\GPBMetadata\xea\x02\x11\x45nvd::Process::V1b\x06proto3'
-)
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x65nvd/process/v1/process.proto\x12\x0f\x65nvd.process.v1\"d\n\x03PTY\x12-\n\x04size\x18\x01 \x01(\x0b\x32\x19.envd.process.v1.PTY.SizeR\x04size\x1a.\n\x04Size\x12\x12\n\x04\x63ols\x18\x01 \x01(\rR\x04\x63ols\x12\x12\n\x04rows\x18\x02 \x01(\rR\x04rows\"\xcb\x01\n\rProcessConfig\x12\x10\n\x03\x63md\x18\x01 \x01(\tR\x03\x63md\x12\x12\n\x04\x61rgs\x18\x02 \x03(\tR\x04\x61rgs\x12<\n\x04\x65nvs\x18\x03 \x03(\x0b\x32(.envd.process.v1.ProcessConfig.EnvsEntryR\x04\x65nvs\x12\x15\n\x03\x63wd\x18\x04 \x01(\tH\x00R\x03\x63wd\x88\x01\x01\x1a\x37\n\tEnvsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x06\n\x04_cwd\"\r\n\x0bListRequest\"L\n\x0cListResponse\x12<\n\tprocesses\x18\x01 \x03(\x0b\x32\x1e.envd.process.v1.ProcessConfigR\tprocesses\"8\n\nCredential\x12\x1c\n\x08username\x18\x01 \x01(\tH\x00R\x08usernameB\x0c\n\ncredential\"\xb0\x01\n\x0cStartRequest\x12\x38\n\x07process\x18\x01 \x01(\x0b\x32\x1e.envd.process.v1.ProcessConfigR\x07process\x12+\n\x03pty\x18\x02 \x01(\x0b\x32\x14.envd.process.v1.PTYH\x00R\x03pty\x88\x01\x01\x12\x31\n\x05owner\x18\x03 \x01(\x0b\x32\x1b.envd.process.v1.CredentialR\x05ownerB\x06\n\x04_pty\"\x80\x01\n\rUpdateRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x12+\n\x03pty\x18\x02 \x01(\x0b\x32\x14.envd.process.v1.PTYH\x00R\x03pty\x88\x01\x01\x42\x06\n\x04_pty\"\x10\n\x0eUpdateResponse\"\xda\x03\n\x0cProcessEvent\x12@\n\x05start\x18\x01 \x01(\x0b\x32(.envd.process.v1.ProcessEvent.StartEventH\x00R\x05start\x12=\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\'.envd.process.v1.ProcessEvent.DataEventH\x00R\x04\x64\x61ta\x12:\n\x03\x65nd\x18\x03 \x01(\x0b\x32&.envd.process.v1.ProcessEvent.EndEventH\x00R\x03\x65nd\x1a\x1e\n\nStartEvent\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x1a]\n\tDataEvent\x12\x18\n\x06stdout\x18\x01 \x01(\x0cH\x00R\x06stdout\x12\x18\n\x06stderr\x18\x02 \x01(\x0cH\x00R\x06stderr\x12\x12\n\x03pty\x18\x03 \x01(\x0cH\x00R\x03ptyB\x08\n\x06output\x1a\x84\x01\n\x08\x45ndEvent\x12\x1b\n\texit_code\x18\x01 \x01(\x11R\x08\x65xitCode\x12\x1e\n\nterminated\x18\x02 \x01(\x08R\nterminated\x12\x16\n\x06status\x18\x03 \x01(\tR\x06status\x12\x19\n\x05\x65rror\x18\x04 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x42\x08\n\x06_errorB\x07\n\x05\x65vent\"D\n\rStartResponse\x12\x33\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1d.envd.process.v1.ProcessEventR\x05\x65vent\"F\n\x0f\x43onnectResponse\x12\x33\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1d.envd.process.v1.ProcessEventR\x05\x65vent\"\x83\x01\n\x10SendInputRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x12\x33\n\x05input\x18\x02 \x01(\x0b\x32\x1d.envd.process.v1.ProcessInputR\x05input\"\x13\n\x11SendInputResponse\"C\n\x0cProcessInput\x12\x16\n\x05stdin\x18\x01 \x01(\x0cH\x00R\x05stdin\x12\x12\n\x03pty\x18\x02 \x01(\x0cH\x00R\x03ptyB\x07\n\x05input\"\xb6\x02\n\x12StreamInputRequest\x12\x46\n\x05start\x18\x01 \x01(\x0b\x32..envd.process.v1.StreamInputRequest.StartEventH\x00R\x05start\x12\x43\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32-.envd.process.v1.StreamInputRequest.DataEventH\x00R\x04\x64\x61ta\x1aH\n\nStartEvent\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x1a@\n\tDataEvent\x12\x33\n\x05input\x18\x02 \x01(\x0b\x32\x1d.envd.process.v1.ProcessInputR\x05inputB\x07\n\x05\x65vent\"\x15\n\x13StreamInputResponse\"\x80\x01\n\x11SendSignalRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\x12/\n\x06signal\x18\x02 \x01(\x0e\x32\x17.envd.process.v1.SignalR\x06signal\"\x14\n\x12SendSignalResponse\"L\n\x0e\x43onnectRequest\x12:\n\x07process\x18\x01 \x01(\x0b\x32 .envd.process.v1.ProcessSelectorR\x07process\"1\n\x0fProcessSelector\x12\x12\n\x03pid\x18\x01 \x01(\rH\x00R\x03pidB\n\n\x08selector*H\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\x12\n\x0eSIGNAL_SIGTERM\x10\x0f\x12\x12\n\x0eSIGNAL_SIGKILL\x10\t2\xc1\x04\n\x0eProcessService\x12\x43\n\x04List\x12\x1c.envd.process.v1.ListRequest\x1a\x1d.envd.process.v1.ListResponse\x12N\n\x07\x43onnect\x12\x1f.envd.process.v1.ConnectRequest\x1a .envd.process.v1.ConnectResponse0\x01\x12H\n\x05Start\x12\x1d.envd.process.v1.StartRequest\x1a\x1e.envd.process.v1.StartResponse0\x01\x12I\n\x06Update\x12\x1e.envd.process.v1.UpdateRequest\x1a\x1f.envd.process.v1.UpdateResponse\x12Z\n\x0bStreamInput\x12#.envd.process.v1.StreamInputRequest\x1a$.envd.process.v1.StreamInputResponse(\x01\x12R\n\tSendInput\x12!.envd.process.v1.SendInputRequest\x1a\".envd.process.v1.SendInputResponse\x12U\n\nSendSignal\x12\".envd.process.v1.SendSignalRequest\x1a#.envd.process.v1.SendSignalResponseB\x81\x01\n\x13\x63om.envd.process.v1B\x0cProcessProtoP\x01\xa2\x02\x03\x45PX\xaa\x02\x0f\x45nvd.Process.V1\xca\x02\x0f\x45nvd\\Process\\V1\xe2\x02\x1b\x45nvd\\Process\\V1\\GPBMetadata\xea\x02\x11\x45nvd::Process::V1b\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(
- DESCRIPTOR, "envd.process.v1.process_pb2", _globals
-)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'envd.process.v1.process_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
- _globals["DESCRIPTOR"]._loaded_options = None
- _globals[
- "DESCRIPTOR"
- ]._serialized_options = b"\n\023com.envd.process.v1B\014ProcessProtoP\001\242\002\003EPX\252\002\017Envd.Process.V1\312\002\017Envd\\Process\\V1\342\002\033Envd\\Process\\V1\\GPBMetadata\352\002\021Envd::Process::V1"
- _globals["_PROCESSCONFIG_ENVSENTRY"]._loaded_options = None
- _globals["_PROCESSCONFIG_ENVSENTRY"]._serialized_options = b"8\001"
- _globals["_SIGNAL"]._serialized_start = 2285
- _globals["_SIGNAL"]._serialized_end = 2357
- _globals["_PTY"]._serialized_start = 50
- _globals["_PTY"]._serialized_end = 150
- _globals["_PTY_SIZE"]._serialized_start = 104
- _globals["_PTY_SIZE"]._serialized_end = 150
- _globals["_PROCESSCONFIG"]._serialized_start = 153
- _globals["_PROCESSCONFIG"]._serialized_end = 343
- _globals["_PROCESSCONFIG_ENVSENTRY"]._serialized_start = 288
- _globals["_PROCESSCONFIG_ENVSENTRY"]._serialized_end = 343
- _globals["_LISTREQUEST"]._serialized_start = 345
- _globals["_LISTREQUEST"]._serialized_end = 358
- _globals["_LISTRESPONSE"]._serialized_start = 360
- _globals["_LISTRESPONSE"]._serialized_end = 436
- _globals["_CREDENTIAL"]._serialized_start = 438
- _globals["_CREDENTIAL"]._serialized_end = 494
- _globals["_STARTREQUEST"]._serialized_start = 497
- _globals["_STARTREQUEST"]._serialized_end = 673
- _globals["_UPDATEREQUEST"]._serialized_start = 676
- _globals["_UPDATEREQUEST"]._serialized_end = 804
- _globals["_UPDATERESPONSE"]._serialized_start = 806
- _globals["_UPDATERESPONSE"]._serialized_end = 822
- _globals["_PROCESSEVENT"]._serialized_start = 825
- _globals["_PROCESSEVENT"]._serialized_end = 1299
- _globals["_PROCESSEVENT_STARTEVENT"]._serialized_start = 1030
- _globals["_PROCESSEVENT_STARTEVENT"]._serialized_end = 1060
- _globals["_PROCESSEVENT_DATAEVENT"]._serialized_start = 1062
- _globals["_PROCESSEVENT_DATAEVENT"]._serialized_end = 1155
- _globals["_PROCESSEVENT_ENDEVENT"]._serialized_start = 1158
- _globals["_PROCESSEVENT_ENDEVENT"]._serialized_end = 1290
- _globals["_STARTRESPONSE"]._serialized_start = 1301
- _globals["_STARTRESPONSE"]._serialized_end = 1369
- _globals["_CONNECTRESPONSE"]._serialized_start = 1371
- _globals["_CONNECTRESPONSE"]._serialized_end = 1441
- _globals["_SENDINPUTREQUEST"]._serialized_start = 1444
- _globals["_SENDINPUTREQUEST"]._serialized_end = 1575
- _globals["_SENDINPUTRESPONSE"]._serialized_start = 1577
- _globals["_SENDINPUTRESPONSE"]._serialized_end = 1596
- _globals["_PROCESSINPUT"]._serialized_start = 1598
- _globals["_PROCESSINPUT"]._serialized_end = 1665
- _globals["_STREAMINPUTREQUEST"]._serialized_start = 1668
- _globals["_STREAMINPUTREQUEST"]._serialized_end = 1978
- _globals["_STREAMINPUTREQUEST_STARTEVENT"]._serialized_start = 1831
- _globals["_STREAMINPUTREQUEST_STARTEVENT"]._serialized_end = 1903
- _globals["_STREAMINPUTREQUEST_DATAEVENT"]._serialized_start = 1905
- _globals["_STREAMINPUTREQUEST_DATAEVENT"]._serialized_end = 1969
- _globals["_STREAMINPUTRESPONSE"]._serialized_start = 1980
- _globals["_STREAMINPUTRESPONSE"]._serialized_end = 2001
- _globals["_SENDSIGNALREQUEST"]._serialized_start = 2004
- _globals["_SENDSIGNALREQUEST"]._serialized_end = 2132
- _globals["_SENDSIGNALRESPONSE"]._serialized_start = 2134
- _globals["_SENDSIGNALRESPONSE"]._serialized_end = 2154
- _globals["_CONNECTREQUEST"]._serialized_start = 2156
- _globals["_CONNECTREQUEST"]._serialized_end = 2232
- _globals["_PROCESSSELECTOR"]._serialized_start = 2234
- _globals["_PROCESSSELECTOR"]._serialized_end = 2283
- _globals["_PROCESSSERVICE"]._serialized_start = 2360
- _globals["_PROCESSSERVICE"]._serialized_end = 2937
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\023com.envd.process.v1B\014ProcessProtoP\001\242\002\003EPX\252\002\017Envd.Process.V1\312\002\017Envd\\Process\\V1\342\002\033Envd\\Process\\V1\\GPBMetadata\352\002\021Envd::Process::V1'
+ _globals['_PROCESSCONFIG_ENVSENTRY']._loaded_options = None
+ _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_options = b'8\001'
+ _globals['_SIGNAL']._serialized_start=2298
+ _globals['_SIGNAL']._serialized_end=2370
+ _globals['_PTY']._serialized_start=50
+ _globals['_PTY']._serialized_end=150
+ _globals['_PTY_SIZE']._serialized_start=104
+ _globals['_PTY_SIZE']._serialized_end=150
+ _globals['_PROCESSCONFIG']._serialized_start=153
+ _globals['_PROCESSCONFIG']._serialized_end=356
+ _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_start=293
+ _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_end=348
+ _globals['_LISTREQUEST']._serialized_start=358
+ _globals['_LISTREQUEST']._serialized_end=371
+ _globals['_LISTRESPONSE']._serialized_start=373
+ _globals['_LISTRESPONSE']._serialized_end=449
+ _globals['_CREDENTIAL']._serialized_start=451
+ _globals['_CREDENTIAL']._serialized_end=507
+ _globals['_STARTREQUEST']._serialized_start=510
+ _globals['_STARTREQUEST']._serialized_end=686
+ _globals['_UPDATEREQUEST']._serialized_start=689
+ _globals['_UPDATEREQUEST']._serialized_end=817
+ _globals['_UPDATERESPONSE']._serialized_start=819
+ _globals['_UPDATERESPONSE']._serialized_end=835
+ _globals['_PROCESSEVENT']._serialized_start=838
+ _globals['_PROCESSEVENT']._serialized_end=1312
+ _globals['_PROCESSEVENT_STARTEVENT']._serialized_start=1043
+ _globals['_PROCESSEVENT_STARTEVENT']._serialized_end=1073
+ _globals['_PROCESSEVENT_DATAEVENT']._serialized_start=1075
+ _globals['_PROCESSEVENT_DATAEVENT']._serialized_end=1168
+ _globals['_PROCESSEVENT_ENDEVENT']._serialized_start=1171
+ _globals['_PROCESSEVENT_ENDEVENT']._serialized_end=1303
+ _globals['_STARTRESPONSE']._serialized_start=1314
+ _globals['_STARTRESPONSE']._serialized_end=1382
+ _globals['_CONNECTRESPONSE']._serialized_start=1384
+ _globals['_CONNECTRESPONSE']._serialized_end=1454
+ _globals['_SENDINPUTREQUEST']._serialized_start=1457
+ _globals['_SENDINPUTREQUEST']._serialized_end=1588
+ _globals['_SENDINPUTRESPONSE']._serialized_start=1590
+ _globals['_SENDINPUTRESPONSE']._serialized_end=1609
+ _globals['_PROCESSINPUT']._serialized_start=1611
+ _globals['_PROCESSINPUT']._serialized_end=1678
+ _globals['_STREAMINPUTREQUEST']._serialized_start=1681
+ _globals['_STREAMINPUTREQUEST']._serialized_end=1991
+ _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_start=1844
+ _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_end=1916
+ _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_start=1918
+ _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_end=1982
+ _globals['_STREAMINPUTRESPONSE']._serialized_start=1993
+ _globals['_STREAMINPUTRESPONSE']._serialized_end=2014
+ _globals['_SENDSIGNALREQUEST']._serialized_start=2017
+ _globals['_SENDSIGNALREQUEST']._serialized_end=2145
+ _globals['_SENDSIGNALRESPONSE']._serialized_start=2147
+ _globals['_SENDSIGNALRESPONSE']._serialized_end=2167
+ _globals['_CONNECTREQUEST']._serialized_start=2169
+ _globals['_CONNECTREQUEST']._serialized_end=2245
+ _globals['_PROCESSSELECTOR']._serialized_start=2247
+ _globals['_PROCESSSELECTOR']._serialized_end=2296
+ _globals['_PROCESSSERVICE']._serialized_start=2373
+ _globals['_PROCESSSERVICE']._serialized_end=2950
# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/envd/process/v1/process_pb2.pyi b/packages/python-sdk/envd/process/v1/process_pb2.pyi
index 6338afd33..78e78f55c 100644
--- a/packages/python-sdk/envd/process/v1/process_pb2.pyi
+++ b/packages/python-sdk/envd/process/v1/process_pb2.pyi
@@ -2,13 +2,7 @@ from google.protobuf.internal import containers as _containers
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
-from typing import (
- ClassVar as _ClassVar,
- Iterable as _Iterable,
- Mapping as _Mapping,
- Optional as _Optional,
- Union as _Union,
-)
+from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
DESCRIPTOR: _descriptor.FileDescriptor
@@ -17,39 +11,32 @@ class Signal(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
SIGNAL_UNSPECIFIED: _ClassVar[Signal]
SIGNAL_SIGTERM: _ClassVar[Signal]
SIGNAL_SIGKILL: _ClassVar[Signal]
-
SIGNAL_UNSPECIFIED: Signal
SIGNAL_SIGTERM: Signal
SIGNAL_SIGKILL: Signal
class PTY(_message.Message):
__slots__ = ("size",)
-
class Size(_message.Message):
__slots__ = ("cols", "rows")
COLS_FIELD_NUMBER: _ClassVar[int]
ROWS_FIELD_NUMBER: _ClassVar[int]
cols: int
rows: int
- def __init__(
- self, cols: _Optional[int] = ..., rows: _Optional[int] = ...
- ) -> None: ...
+ def __init__(self, cols: _Optional[int] = ..., rows: _Optional[int] = ...) -> None: ...
SIZE_FIELD_NUMBER: _ClassVar[int]
size: PTY.Size
def __init__(self, size: _Optional[_Union[PTY.Size, _Mapping]] = ...) -> None: ...
class ProcessConfig(_message.Message):
__slots__ = ("cmd", "args", "envs", "cwd")
-
class EnvsEntry(_message.Message):
__slots__ = ("key", "value")
KEY_FIELD_NUMBER: _ClassVar[int]
VALUE_FIELD_NUMBER: _ClassVar[int]
key: str
value: str
- def __init__(
- self, key: _Optional[str] = ..., value: _Optional[str] = ...
- ) -> None: ...
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
CMD_FIELD_NUMBER: _ClassVar[int]
ARGS_FIELD_NUMBER: _ClassVar[int]
ENVS_FIELD_NUMBER: _ClassVar[int]
@@ -58,13 +45,7 @@ class ProcessConfig(_message.Message):
args: _containers.RepeatedScalarFieldContainer[str]
envs: _containers.ScalarMap[str, str]
cwd: str
- def __init__(
- self,
- cmd: _Optional[str] = ...,
- args: _Optional[_Iterable[str]] = ...,
- envs: _Optional[_Mapping[str, str]] = ...,
- cwd: _Optional[str] = ...,
- ) -> None: ...
+ def __init__(self, cmd: _Optional[str] = ..., args: _Optional[_Iterable[str]] = ..., envs: _Optional[_Mapping[str, str]] = ..., cwd: _Optional[str] = ...) -> None: ...
class ListRequest(_message.Message):
__slots__ = ()
@@ -74,9 +55,7 @@ class ListResponse(_message.Message):
__slots__ = ("processes",)
PROCESSES_FIELD_NUMBER: _ClassVar[int]
processes: _containers.RepeatedCompositeFieldContainer[ProcessConfig]
- def __init__(
- self, processes: _Optional[_Iterable[_Union[ProcessConfig, _Mapping]]] = ...
- ) -> None: ...
+ def __init__(self, processes: _Optional[_Iterable[_Union[ProcessConfig, _Mapping]]] = ...) -> None: ...
class Credential(_message.Message):
__slots__ = ("username",)
@@ -92,12 +71,7 @@ class StartRequest(_message.Message):
process: ProcessConfig
pty: PTY
owner: Credential
- def __init__(
- self,
- process: _Optional[_Union[ProcessConfig, _Mapping]] = ...,
- pty: _Optional[_Union[PTY, _Mapping]] = ...,
- owner: _Optional[_Union[Credential, _Mapping]] = ...,
- ) -> None: ...
+ def __init__(self, process: _Optional[_Union[ProcessConfig, _Mapping]] = ..., pty: _Optional[_Union[PTY, _Mapping]] = ..., owner: _Optional[_Union[Credential, _Mapping]] = ...) -> None: ...
class UpdateRequest(_message.Message):
__slots__ = ("process", "pty")
@@ -105,11 +79,7 @@ class UpdateRequest(_message.Message):
PTY_FIELD_NUMBER: _ClassVar[int]
process: ProcessSelector
pty: PTY
- def __init__(
- self,
- process: _Optional[_Union[ProcessSelector, _Mapping]] = ...,
- pty: _Optional[_Union[PTY, _Mapping]] = ...,
- ) -> None: ...
+ def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ..., pty: _Optional[_Union[PTY, _Mapping]] = ...) -> None: ...
class UpdateResponse(_message.Message):
__slots__ = ()
@@ -117,13 +87,11 @@ class UpdateResponse(_message.Message):
class ProcessEvent(_message.Message):
__slots__ = ("start", "data", "end")
-
class StartEvent(_message.Message):
__slots__ = ("pid",)
PID_FIELD_NUMBER: _ClassVar[int]
pid: int
def __init__(self, pid: _Optional[int] = ...) -> None: ...
-
class DataEvent(_message.Message):
__slots__ = ("stdout", "stderr", "pty")
STDOUT_FIELD_NUMBER: _ClassVar[int]
@@ -132,13 +100,7 @@ class ProcessEvent(_message.Message):
stdout: bytes
stderr: bytes
pty: bytes
- def __init__(
- self,
- stdout: _Optional[bytes] = ...,
- stderr: _Optional[bytes] = ...,
- pty: _Optional[bytes] = ...,
- ) -> None: ...
-
+ def __init__(self, stdout: _Optional[bytes] = ..., stderr: _Optional[bytes] = ..., pty: _Optional[bytes] = ...) -> None: ...
class EndEvent(_message.Message):
__slots__ = ("exit_code", "terminated", "status", "error")
EXIT_CODE_FIELD_NUMBER: _ClassVar[int]
@@ -149,41 +111,26 @@ class ProcessEvent(_message.Message):
terminated: bool
status: str
error: str
- def __init__(
- self,
- exit_code: _Optional[int] = ...,
- terminated: bool = ...,
- status: _Optional[str] = ...,
- error: _Optional[str] = ...,
- ) -> None: ...
+ def __init__(self, exit_code: _Optional[int] = ..., terminated: bool = ..., status: _Optional[str] = ..., error: _Optional[str] = ...) -> None: ...
START_FIELD_NUMBER: _ClassVar[int]
DATA_FIELD_NUMBER: _ClassVar[int]
END_FIELD_NUMBER: _ClassVar[int]
start: ProcessEvent.StartEvent
data: ProcessEvent.DataEvent
end: ProcessEvent.EndEvent
- def __init__(
- self,
- start: _Optional[_Union[ProcessEvent.StartEvent, _Mapping]] = ...,
- data: _Optional[_Union[ProcessEvent.DataEvent, _Mapping]] = ...,
- end: _Optional[_Union[ProcessEvent.EndEvent, _Mapping]] = ...,
- ) -> None: ...
+ def __init__(self, start: _Optional[_Union[ProcessEvent.StartEvent, _Mapping]] = ..., data: _Optional[_Union[ProcessEvent.DataEvent, _Mapping]] = ..., end: _Optional[_Union[ProcessEvent.EndEvent, _Mapping]] = ...) -> None: ...
class StartResponse(_message.Message):
__slots__ = ("event",)
EVENT_FIELD_NUMBER: _ClassVar[int]
event: ProcessEvent
- def __init__(
- self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...
- ) -> None: ...
+ def __init__(self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...) -> None: ...
class ConnectResponse(_message.Message):
__slots__ = ("event",)
EVENT_FIELD_NUMBER: _ClassVar[int]
event: ProcessEvent
- def __init__(
- self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...
- ) -> None: ...
+ def __init__(self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...) -> None: ...
class SendInputRequest(_message.Message):
__slots__ = ("process", "input")
@@ -191,11 +138,7 @@ class SendInputRequest(_message.Message):
INPUT_FIELD_NUMBER: _ClassVar[int]
process: ProcessSelector
input: ProcessInput
- def __init__(
- self,
- process: _Optional[_Union[ProcessSelector, _Mapping]] = ...,
- input: _Optional[_Union[ProcessInput, _Mapping]] = ...,
- ) -> None: ...
+ def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ..., input: _Optional[_Union[ProcessInput, _Mapping]] = ...) -> None: ...
class SendInputResponse(_message.Message):
__slots__ = ()
@@ -207,37 +150,25 @@ class ProcessInput(_message.Message):
PTY_FIELD_NUMBER: _ClassVar[int]
stdin: bytes
pty: bytes
- def __init__(
- self, stdin: _Optional[bytes] = ..., pty: _Optional[bytes] = ...
- ) -> None: ...
+ def __init__(self, stdin: _Optional[bytes] = ..., pty: _Optional[bytes] = ...) -> None: ...
class StreamInputRequest(_message.Message):
__slots__ = ("start", "data")
-
class StartEvent(_message.Message):
__slots__ = ("process",)
PROCESS_FIELD_NUMBER: _ClassVar[int]
process: ProcessSelector
- def __init__(
- self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...
- ) -> None: ...
-
+ def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...) -> None: ...
class DataEvent(_message.Message):
__slots__ = ("input",)
INPUT_FIELD_NUMBER: _ClassVar[int]
input: ProcessInput
- def __init__(
- self, input: _Optional[_Union[ProcessInput, _Mapping]] = ...
- ) -> None: ...
+ def __init__(self, input: _Optional[_Union[ProcessInput, _Mapping]] = ...) -> None: ...
START_FIELD_NUMBER: _ClassVar[int]
DATA_FIELD_NUMBER: _ClassVar[int]
start: StreamInputRequest.StartEvent
data: StreamInputRequest.DataEvent
- def __init__(
- self,
- start: _Optional[_Union[StreamInputRequest.StartEvent, _Mapping]] = ...,
- data: _Optional[_Union[StreamInputRequest.DataEvent, _Mapping]] = ...,
- ) -> None: ...
+ def __init__(self, start: _Optional[_Union[StreamInputRequest.StartEvent, _Mapping]] = ..., data: _Optional[_Union[StreamInputRequest.DataEvent, _Mapping]] = ...) -> None: ...
class StreamInputResponse(_message.Message):
__slots__ = ()
@@ -249,11 +180,7 @@ class SendSignalRequest(_message.Message):
SIGNAL_FIELD_NUMBER: _ClassVar[int]
process: ProcessSelector
signal: Signal
- def __init__(
- self,
- process: _Optional[_Union[ProcessSelector, _Mapping]] = ...,
- signal: _Optional[_Union[Signal, str]] = ...,
- ) -> None: ...
+ def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ..., signal: _Optional[_Union[Signal, str]] = ...) -> None: ...
class SendSignalResponse(_message.Message):
__slots__ = ()
@@ -263,9 +190,7 @@ class ConnectRequest(_message.Message):
__slots__ = ("process",)
PROCESS_FIELD_NUMBER: _ClassVar[int]
process: ProcessSelector
- def __init__(
- self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...
- ) -> None: ...
+ def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...) -> None: ...
class ProcessSelector(_message.Message):
__slots__ = ("pid",)
diff --git a/spec/envd/process/v1/process.proto b/spec/envd/process/v1/process.proto
index dc74d9a10..33dd62f22 100644
--- a/spec/envd/process/v1/process.proto
+++ b/spec/envd/process/v1/process.proto
@@ -30,7 +30,7 @@ message ProcessConfig {
repeated string args = 2;
map<string, string> envs = 3;
- string cwd = 4;
+ optional string cwd = 4;
}
message ListRequest {}