Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Regenrate RPC; Fix namespacing

Tomas Valentaef19d8f822c8
diff --git a/Makefile b/Makefile
index 435924980..c4c652dc8 100644
--- a/Makefile
+++ b/Makefile
@@ -8,4 +8,4 @@ generate:
cd packages/python-sdk && make generate
cd packages/js-sdk && pnpm generate
cd packages/connect-python && make bin/protoc-gen-connect-python
- cd spec && buf generate
\ No newline at end of file
+ cd spec/envd && buf generate && cd ../../packages/python-sdk && ./scripts/fix-python-pb.sh
diff --git a/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts b/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts
index bf16154a9..1d7705772 100644
--- a/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts
+++ b/packages/js-sdk/src/envd/filesystem/filesystem_connect.ts
@@ -1,19 +1,19 @@
// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
-// @generated from file envd/filesystem/filesystem.proto (package envd.filesystem, syntax proto3)
+// @generated from file filesystem/filesystem.proto (package filesystem, syntax proto3)
/* eslint-disable */
// @ts-nocheck
-import { ListRequest, ListResponse, RemoveRequest, RemoveResponse, StatRequest, StatResponse, WatchRequest, WatchResponse } from "./filesystem_pb.js";
+import { ListRequest, ListResponse, MakeDirRequest, MakeDirResponse, RemoveRequest, RemoveResponse, StatRequest, StatResponse, WatchRequest, WatchResponse } from "./filesystem_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
- * @generated from service envd.filesystem.FilesystemService
+ * @generated from service filesystem.Filesystem
*/
-export const FilesystemService = {
- typeName: "envd.filesystem.FilesystemService",
+export const Filesystem = {
+ typeName: "filesystem.Filesystem",
methods: {
/**
- * @generated from rpc envd.filesystem.FilesystemService.Stat
+ * @generated from rpc filesystem.Filesystem.Stat
*/
stat: {
name: "Stat",
@@ -22,7 +22,16 @@ export const FilesystemService = {
kind: MethodKind.Unary,
},
/**
- * @generated from rpc envd.filesystem.FilesystemService.List
+ * @generated from rpc filesystem.Filesystem.MakeDir
+ */
+ makeDir: {
+ name: "MakeDir",
+ I: MakeDirRequest,
+ O: MakeDirResponse,
+ kind: MethodKind.Unary,
+ },
+ /**
+ * @generated from rpc filesystem.Filesystem.List
*/
list: {
name: "List",
@@ -31,7 +40,7 @@ export const FilesystemService = {
kind: MethodKind.Unary,
},
/**
- * @generated from rpc envd.filesystem.FilesystemService.Watch
+ * @generated from rpc filesystem.Filesystem.Watch
*/
watch: {
name: "Watch",
@@ -40,7 +49,7 @@ export const FilesystemService = {
kind: MethodKind.ServerStreaming,
},
/**
- * @generated from rpc envd.filesystem.FilesystemService.Remove
+ * @generated from rpc filesystem.Filesystem.Remove
*/
remove: {
name: "Remove",
diff --git a/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts b/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
index 9b75905d4..5da329d33 100644
--- a/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
+++ b/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
@@ -1,5 +1,5 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
-// @generated from file envd/filesystem/filesystem.proto (package envd.filesystem, syntax proto3)
+// @generated from file filesystem/filesystem.proto (package filesystem, syntax proto3)
/* eslint-disable */
// @ts-nocheck
@@ -8,7 +8,7 @@ import { Message, proto3 } from "@bufbuild/protobuf";
import { User } from "../permissions/permissions_pb.js";
/**
- * @generated from enum envd.filesystem.FileType
+ * @generated from enum filesystem.FileType
*/
export enum FileType {
/**
@@ -27,14 +27,14 @@ export enum FileType {
DIRECTORY = 2,
}
// Retrieve enum metadata with: proto3.getEnumType(FileType)
-proto3.util.setEnumType(FileType, "envd.filesystem.FileType", [
+proto3.util.setEnumType(FileType, "filesystem.FileType", [
{ no: 0, name: "FILE_TYPE_UNSPECIFIED" },
{ no: 1, name: "FILE_TYPE_FILE" },
{ no: 2, name: "FILE_TYPE_DIRECTORY" },
]);
/**
- * @generated from enum envd.filesystem.EventType
+ * @generated from enum filesystem.EventType
*/
export enum EventType {
/**
@@ -68,7 +68,7 @@ export enum EventType {
CHMOD = 5,
}
// Retrieve enum metadata with: proto3.getEnumType(EventType)
-proto3.util.setEnumType(EventType, "envd.filesystem.EventType", [
+proto3.util.setEnumType(EventType, "filesystem.EventType", [
{ no: 0, name: "EVENT_TYPE_UNSPECIFIED" },
{ no: 1, name: "EVENT_TYPE_CREATE" },
{ no: 2, name: "EVENT_TYPE_WRITE" },
@@ -78,7 +78,81 @@ proto3.util.setEnumType(EventType, "envd.filesystem.EventType", [
]);
/**
- * @generated from message envd.filesystem.RemoveRequest
+ * @generated from message filesystem.MakeDirRequest
+ */
+export class MakeDirRequest extends Message<MakeDirRequest> {
+ /**
+ * @generated from field: string path = 1;
+ */
+ path = "";
+
+ /**
+ * @generated from field: permissions.User user = 2;
+ */
+ user?: User;
+
+ constructor(data?: PartialMessage<MakeDirRequest>) {
+ super();
+ proto3.util.initPartial(data, this);
+ }
+
+ static readonly runtime: typeof proto3 = proto3;
+ static readonly typeName = "filesystem.MakeDirRequest";
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
+ { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
+ { no: 2, name: "user", kind: "message", T: User },
+ ]);
+
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MakeDirRequest {
+ return new MakeDirRequest().fromBinary(bytes, options);
+ }
+
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MakeDirRequest {
+ return new MakeDirRequest().fromJson(jsonValue, options);
+ }
+
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MakeDirRequest {
+ return new MakeDirRequest().fromJsonString(jsonString, options);
+ }
+
+ static equals(a: MakeDirRequest | PlainMessage<MakeDirRequest> | undefined, b: MakeDirRequest | PlainMessage<MakeDirRequest> | undefined): boolean {
+ return proto3.util.equals(MakeDirRequest, a, b);
+ }
+}
+
+/**
+ * @generated from message filesystem.MakeDirResponse
+ */
+export class MakeDirResponse extends Message<MakeDirResponse> {
+ constructor(data?: PartialMessage<MakeDirResponse>) {
+ super();
+ proto3.util.initPartial(data, this);
+ }
+
+ static readonly runtime: typeof proto3 = proto3;
+ static readonly typeName = "filesystem.MakeDirResponse";
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
+ ]);
+
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MakeDirResponse {
+ return new MakeDirResponse().fromBinary(bytes, options);
+ }
+
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MakeDirResponse {
+ return new MakeDirResponse().fromJson(jsonValue, options);
+ }
+
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MakeDirResponse {
+ return new MakeDirResponse().fromJsonString(jsonString, options);
+ }
+
+ static equals(a: MakeDirResponse | PlainMessage<MakeDirResponse> | undefined, b: MakeDirResponse | PlainMessage<MakeDirResponse> | undefined): boolean {
+ return proto3.util.equals(MakeDirResponse, a, b);
+ }
+}
+
+/**
+ * @generated from message filesystem.RemoveRequest
*/
export class RemoveRequest extends Message<RemoveRequest> {
/**
@@ -87,7 +161,7 @@ export class RemoveRequest extends Message<RemoveRequest> {
path = "";
/**
- * @generated from field: envd.permissions.User user = 2;
+ * @generated from field: permissions.User user = 2;
*/
user?: User;
@@ -97,7 +171,7 @@ export class RemoveRequest extends Message<RemoveRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.RemoveRequest";
+ static readonly typeName = "filesystem.RemoveRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "user", kind: "message", T: User },
@@ -121,7 +195,7 @@ export class RemoveRequest extends Message<RemoveRequest> {
}
/**
- * @generated from message envd.filesystem.RemoveResponse
+ * @generated from message filesystem.RemoveResponse
*/
export class RemoveResponse extends Message<RemoveResponse> {
constructor(data?: PartialMessage<RemoveResponse>) {
@@ -130,7 +204,7 @@ export class RemoveResponse extends Message<RemoveResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.RemoveResponse";
+ static readonly typeName = "filesystem.RemoveResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
@@ -152,7 +226,7 @@ export class RemoveResponse extends Message<RemoveResponse> {
}
/**
- * @generated from message envd.filesystem.StatRequest
+ * @generated from message filesystem.StatRequest
*/
export class StatRequest extends Message<StatRequest> {
/**
@@ -161,7 +235,7 @@ export class StatRequest extends Message<StatRequest> {
path = "";
/**
- * @generated from field: envd.permissions.User user = 2;
+ * @generated from field: permissions.User user = 2;
*/
user?: User;
@@ -171,7 +245,7 @@ export class StatRequest extends Message<StatRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.StatRequest";
+ static readonly typeName = "filesystem.StatRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "user", kind: "message", T: User },
@@ -195,11 +269,11 @@ export class StatRequest extends Message<StatRequest> {
}
/**
- * @generated from message envd.filesystem.StatResponse
+ * @generated from message filesystem.StatResponse
*/
export class StatResponse extends Message<StatResponse> {
/**
- * @generated from field: envd.filesystem.EntryInfo entry = 1;
+ * @generated from field: filesystem.EntryInfo entry = 1;
*/
entry?: EntryInfo;
@@ -209,7 +283,7 @@ export class StatResponse extends Message<StatResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.StatResponse";
+ static readonly typeName = "filesystem.StatResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "entry", kind: "message", T: EntryInfo },
]);
@@ -232,7 +306,7 @@ export class StatResponse extends Message<StatResponse> {
}
/**
- * @generated from message envd.filesystem.EntryInfo
+ * @generated from message filesystem.EntryInfo
*/
export class EntryInfo extends Message<EntryInfo> {
/**
@@ -241,7 +315,7 @@ export class EntryInfo extends Message<EntryInfo> {
name = "";
/**
- * @generated from field: envd.filesystem.FileType type = 2;
+ * @generated from field: filesystem.FileType type = 2;
*/
type = FileType.UNSPECIFIED;
@@ -251,7 +325,7 @@ export class EntryInfo extends Message<EntryInfo> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.EntryInfo";
+ static readonly typeName = "filesystem.EntryInfo";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "type", kind: "enum", T: proto3.getEnumType(FileType) },
@@ -275,7 +349,7 @@ export class EntryInfo extends Message<EntryInfo> {
}
/**
- * @generated from message envd.filesystem.ListRequest
+ * @generated from message filesystem.ListRequest
*/
export class ListRequest extends Message<ListRequest> {
/**
@@ -284,7 +358,7 @@ export class ListRequest extends Message<ListRequest> {
path = "";
/**
- * @generated from field: envd.permissions.User user = 2;
+ * @generated from field: permissions.User user = 2;
*/
user?: User;
@@ -294,7 +368,7 @@ export class ListRequest extends Message<ListRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.ListRequest";
+ static readonly typeName = "filesystem.ListRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "user", kind: "message", T: User },
@@ -318,11 +392,11 @@ export class ListRequest extends Message<ListRequest> {
}
/**
- * @generated from message envd.filesystem.ListResponse
+ * @generated from message filesystem.ListResponse
*/
export class ListResponse extends Message<ListResponse> {
/**
- * @generated from field: repeated envd.filesystem.EntryInfo entries = 1;
+ * @generated from field: repeated filesystem.EntryInfo entries = 1;
*/
entries: EntryInfo[] = [];
@@ -332,7 +406,7 @@ export class ListResponse extends Message<ListResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.ListResponse";
+ static readonly typeName = "filesystem.ListResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "entries", kind: "message", T: EntryInfo, repeated: true },
]);
@@ -355,7 +429,7 @@ export class ListResponse extends Message<ListResponse> {
}
/**
- * @generated from message envd.filesystem.WatchRequest
+ * @generated from message filesystem.WatchRequest
*/
export class WatchRequest extends Message<WatchRequest> {
/**
@@ -364,7 +438,7 @@ export class WatchRequest extends Message<WatchRequest> {
path = "";
/**
- * @generated from field: envd.permissions.User user = 2;
+ * @generated from field: permissions.User user = 2;
*/
user?: User;
@@ -374,7 +448,7 @@ export class WatchRequest extends Message<WatchRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.WatchRequest";
+ static readonly typeName = "filesystem.WatchRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "user", kind: "message", T: User },
@@ -398,11 +472,11 @@ export class WatchRequest extends Message<WatchRequest> {
}
/**
- * @generated from message envd.filesystem.WatchResponse
+ * @generated from message filesystem.WatchResponse
*/
export class WatchResponse extends Message<WatchResponse> {
/**
- * @generated from field: envd.filesystem.FilesystemEvent event = 1;
+ * @generated from field: filesystem.FilesystemEvent event = 1;
*/
event?: FilesystemEvent;
@@ -412,7 +486,7 @@ export class WatchResponse extends Message<WatchResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.WatchResponse";
+ static readonly typeName = "filesystem.WatchResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "event", kind: "message", T: FilesystemEvent },
]);
@@ -435,7 +509,7 @@ export class WatchResponse extends Message<WatchResponse> {
}
/**
- * @generated from message envd.filesystem.FilesystemEvent
+ * @generated from message filesystem.FilesystemEvent
*/
export class FilesystemEvent extends Message<FilesystemEvent> {
/**
@@ -444,7 +518,7 @@ export class FilesystemEvent extends Message<FilesystemEvent> {
path = "";
/**
- * @generated from field: envd.filesystem.EventType type = 2;
+ * @generated from field: filesystem.EventType type = 2;
*/
type = EventType.UNSPECIFIED;
@@ -454,7 +528,7 @@ export class FilesystemEvent extends Message<FilesystemEvent> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.filesystem.FilesystemEvent";
+ static readonly typeName = "filesystem.FilesystemEvent";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "type", kind: "enum", T: proto3.getEnumType(EventType) },
diff --git a/packages/js-sdk/src/envd/permissions/permissions_pb.ts b/packages/js-sdk/src/envd/permissions/permissions_pb.ts
index 2de3546a9..6430e5b6e 100644
--- a/packages/js-sdk/src/envd/permissions/permissions_pb.ts
+++ b/packages/js-sdk/src/envd/permissions/permissions_pb.ts
@@ -1,5 +1,5 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
-// @generated from file envd/permissions/permissions.proto (package envd.permissions, syntax proto3)
+// @generated from file permissions/permissions.proto (package permissions, syntax proto3)
/* eslint-disable */
// @ts-nocheck
@@ -7,11 +7,11 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM
import { Message, proto3 } from "@bufbuild/protobuf";
/**
- * @generated from message envd.permissions.User
+ * @generated from message permissions.User
*/
export class User extends Message<User> {
/**
- * @generated from oneof envd.permissions.User.selector
+ * @generated from oneof permissions.User.selector
*/
selector: {
/**
@@ -27,7 +27,7 @@ export class User extends Message<User> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.permissions.User";
+ static readonly typeName = "permissions.User";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "selector" },
]);
diff --git a/packages/js-sdk/src/envd/process/process_connect.ts b/packages/js-sdk/src/envd/process/process_connect.ts
index e36d3b16a..d80c84948 100644
--- a/packages/js-sdk/src/envd/process/process_connect.ts
+++ b/packages/js-sdk/src/envd/process/process_connect.ts
@@ -1,5 +1,5 @@
// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
-// @generated from file envd/process/process.proto (package envd.process, syntax proto3)
+// @generated from file process/process.proto (package process, syntax proto3)
/* eslint-disable */
// @ts-nocheck
@@ -7,13 +7,13 @@ import { ConnectRequest, ConnectResponse, ListRequest, ListResponse, SendInputRe
import { MethodKind } from "@bufbuild/protobuf";
/**
- * @generated from service envd.process.ProcessService
+ * @generated from service process.Process
*/
-export const ProcessService = {
- typeName: "envd.process.ProcessService",
+export const Process = {
+ typeName: "process.Process",
methods: {
/**
- * @generated from rpc envd.process.ProcessService.List
+ * @generated from rpc process.Process.List
*/
list: {
name: "List",
@@ -22,7 +22,7 @@ export const ProcessService = {
kind: MethodKind.Unary,
},
/**
- * @generated from rpc envd.process.ProcessService.Connect
+ * @generated from rpc process.Process.Connect
*/
connect: {
name: "Connect",
@@ -31,7 +31,7 @@ export const ProcessService = {
kind: MethodKind.ServerStreaming,
},
/**
- * @generated from rpc envd.process.ProcessService.Start
+ * @generated from rpc process.Process.Start
*/
start: {
name: "Start",
@@ -40,7 +40,7 @@ export const ProcessService = {
kind: MethodKind.ServerStreaming,
},
/**
- * @generated from rpc envd.process.ProcessService.Update
+ * @generated from rpc process.Process.Update
*/
update: {
name: "Update",
@@ -51,7 +51,7 @@ export const ProcessService = {
/**
* Client input stream ensures ordering of messages
*
- * @generated from rpc envd.process.ProcessService.StreamInput
+ * @generated from rpc process.Process.StreamInput
*/
streamInput: {
name: "StreamInput",
@@ -60,7 +60,7 @@ export const ProcessService = {
kind: MethodKind.ClientStreaming,
},
/**
- * @generated from rpc envd.process.ProcessService.SendInput
+ * @generated from rpc process.Process.SendInput
*/
sendInput: {
name: "SendInput",
@@ -69,7 +69,7 @@ export const ProcessService = {
kind: MethodKind.Unary,
},
/**
- * @generated from rpc envd.process.ProcessService.SendSignal
+ * @generated from rpc process.Process.SendSignal
*/
sendSignal: {
name: "SendSignal",
diff --git a/packages/js-sdk/src/envd/process/process_pb.ts b/packages/js-sdk/src/envd/process/process_pb.ts
index 02dc410fd..e9bb23ffa 100644
--- a/packages/js-sdk/src/envd/process/process_pb.ts
+++ b/packages/js-sdk/src/envd/process/process_pb.ts
@@ -1,5 +1,5 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
-// @generated from file envd/process/process.proto (package envd.process, syntax proto3)
+// @generated from file process/process.proto (package process, syntax proto3)
/* eslint-disable */
// @ts-nocheck
@@ -8,7 +8,7 @@ import { Message, proto3 } from "@bufbuild/protobuf";
import { User } from "../permissions/permissions_pb.js";
/**
- * @generated from enum envd.process.Signal
+ * @generated from enum process.Signal
*/
export enum Signal {
/**
@@ -27,18 +27,18 @@ export enum Signal {
SIGKILL = 9,
}
// Retrieve enum metadata with: proto3.getEnumType(Signal)
-proto3.util.setEnumType(Signal, "envd.process.Signal", [
+proto3.util.setEnumType(Signal, "process.Signal", [
{ no: 0, name: "SIGNAL_UNSPECIFIED" },
{ no: 15, name: "SIGNAL_SIGTERM" },
{ no: 9, name: "SIGNAL_SIGKILL" },
]);
/**
- * @generated from message envd.process.PTY
+ * @generated from message process.PTY
*/
export class PTY extends Message<PTY> {
/**
- * @generated from field: envd.process.PTY.Size size = 1;
+ * @generated from field: process.PTY.Size size = 1;
*/
size?: PTY_Size;
@@ -48,7 +48,7 @@ export class PTY extends Message<PTY> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.PTY";
+ static readonly typeName = "process.PTY";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "size", kind: "message", T: PTY_Size },
]);
@@ -71,7 +71,7 @@ export class PTY extends Message<PTY> {
}
/**
- * @generated from message envd.process.PTY.Size
+ * @generated from message process.PTY.Size
*/
export class PTY_Size extends Message<PTY_Size> {
/**
@@ -90,7 +90,7 @@ export class PTY_Size extends Message<PTY_Size> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.PTY.Size";
+ static readonly typeName = "process.PTY.Size";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "cols", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: "rows", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
@@ -114,7 +114,7 @@ export class PTY_Size extends Message<PTY_Size> {
}
/**
- * @generated from message envd.process.ProcessConfig
+ * @generated from message process.ProcessConfig
*/
export class ProcessConfig extends Message<ProcessConfig> {
/**
@@ -143,7 +143,7 @@ export class ProcessConfig extends Message<ProcessConfig> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessConfig";
+ static readonly typeName = "process.ProcessConfig";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "cmd", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
@@ -169,7 +169,7 @@ export class ProcessConfig extends Message<ProcessConfig> {
}
/**
- * @generated from message envd.process.ListRequest
+ * @generated from message process.ListRequest
*/
export class ListRequest extends Message<ListRequest> {
constructor(data?: PartialMessage<ListRequest>) {
@@ -178,7 +178,7 @@ export class ListRequest extends Message<ListRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ListRequest";
+ static readonly typeName = "process.ListRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
@@ -200,11 +200,11 @@ export class ListRequest extends Message<ListRequest> {
}
/**
- * @generated from message envd.process.ProcessInfo
+ * @generated from message process.ProcessInfo
*/
export class ProcessInfo extends Message<ProcessInfo> {
/**
- * @generated from field: envd.process.ProcessConfig config = 1;
+ * @generated from field: process.ProcessConfig config = 1;
*/
config?: ProcessConfig;
@@ -224,7 +224,7 @@ export class ProcessInfo extends Message<ProcessInfo> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessInfo";
+ static readonly typeName = "process.ProcessInfo";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "config", kind: "message", T: ProcessConfig },
{ no: 2, name: "pid", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
@@ -249,11 +249,11 @@ export class ProcessInfo extends Message<ProcessInfo> {
}
/**
- * @generated from message envd.process.ListResponse
+ * @generated from message process.ListResponse
*/
export class ListResponse extends Message<ListResponse> {
/**
- * @generated from field: repeated envd.process.ProcessInfo processes = 1;
+ * @generated from field: repeated process.ProcessInfo processes = 1;
*/
processes: ProcessInfo[] = [];
@@ -263,7 +263,7 @@ export class ListResponse extends Message<ListResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ListResponse";
+ static readonly typeName = "process.ListResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "processes", kind: "message", T: ProcessInfo, repeated: true },
]);
@@ -286,16 +286,16 @@ export class ListResponse extends Message<ListResponse> {
}
/**
- * @generated from message envd.process.StartRequest
+ * @generated from message process.StartRequest
*/
export class StartRequest extends Message<StartRequest> {
/**
- * @generated from field: envd.process.ProcessConfig process = 1;
+ * @generated from field: process.ProcessConfig process = 1;
*/
process?: ProcessConfig;
/**
- * @generated from field: optional envd.process.PTY pty = 2;
+ * @generated from field: optional process.PTY pty = 2;
*/
pty?: PTY;
@@ -305,7 +305,7 @@ export class StartRequest extends Message<StartRequest> {
tag?: string;
/**
- * @generated from field: envd.permissions.User user = 4;
+ * @generated from field: permissions.User user = 4;
*/
user?: User;
@@ -315,7 +315,7 @@ export class StartRequest extends Message<StartRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.StartRequest";
+ static readonly typeName = "process.StartRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "process", kind: "message", T: ProcessConfig },
{ no: 2, name: "pty", kind: "message", T: PTY, opt: true },
@@ -341,16 +341,16 @@ export class StartRequest extends Message<StartRequest> {
}
/**
- * @generated from message envd.process.UpdateRequest
+ * @generated from message process.UpdateRequest
*/
export class UpdateRequest extends Message<UpdateRequest> {
/**
- * @generated from field: envd.process.ProcessSelector process = 1;
+ * @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
/**
- * @generated from field: optional envd.process.PTY pty = 2;
+ * @generated from field: optional process.PTY pty = 2;
*/
pty?: PTY;
@@ -360,7 +360,7 @@ export class UpdateRequest extends Message<UpdateRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.UpdateRequest";
+ static readonly typeName = "process.UpdateRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "process", kind: "message", T: ProcessSelector },
{ no: 2, name: "pty", kind: "message", T: PTY, opt: true },
@@ -384,7 +384,7 @@ export class UpdateRequest extends Message<UpdateRequest> {
}
/**
- * @generated from message envd.process.UpdateResponse
+ * @generated from message process.UpdateResponse
*/
export class UpdateResponse extends Message<UpdateResponse> {
constructor(data?: PartialMessage<UpdateResponse>) {
@@ -393,7 +393,7 @@ export class UpdateResponse extends Message<UpdateResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.UpdateResponse";
+ static readonly typeName = "process.UpdateResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
@@ -415,27 +415,27 @@ export class UpdateResponse extends Message<UpdateResponse> {
}
/**
- * @generated from message envd.process.ProcessEvent
+ * @generated from message process.ProcessEvent
*/
export class ProcessEvent extends Message<ProcessEvent> {
/**
- * @generated from oneof envd.process.ProcessEvent.event
+ * @generated from oneof process.ProcessEvent.event
*/
event: {
/**
- * @generated from field: envd.process.ProcessEvent.StartEvent start = 1;
+ * @generated from field: process.ProcessEvent.StartEvent start = 1;
*/
value: ProcessEvent_StartEvent;
case: "start";
} | {
/**
- * @generated from field: envd.process.ProcessEvent.DataEvent data = 2;
+ * @generated from field: process.ProcessEvent.DataEvent data = 2;
*/
value: ProcessEvent_DataEvent;
case: "data";
} | {
/**
- * @generated from field: envd.process.ProcessEvent.EndEvent end = 3;
+ * @generated from field: process.ProcessEvent.EndEvent end = 3;
*/
value: ProcessEvent_EndEvent;
case: "end";
@@ -447,7 +447,7 @@ export class ProcessEvent extends Message<ProcessEvent> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessEvent";
+ static readonly typeName = "process.ProcessEvent";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "start", kind: "message", T: ProcessEvent_StartEvent, oneof: "event" },
{ no: 2, name: "data", kind: "message", T: ProcessEvent_DataEvent, oneof: "event" },
@@ -472,7 +472,7 @@ export class ProcessEvent extends Message<ProcessEvent> {
}
/**
- * @generated from message envd.process.ProcessEvent.StartEvent
+ * @generated from message process.ProcessEvent.StartEvent
*/
export class ProcessEvent_StartEvent extends Message<ProcessEvent_StartEvent> {
/**
@@ -486,7 +486,7 @@ export class ProcessEvent_StartEvent extends Message<ProcessEvent_StartEvent> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessEvent.StartEvent";
+ static readonly typeName = "process.ProcessEvent.StartEvent";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "pid", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
]);
@@ -509,11 +509,11 @@ export class ProcessEvent_StartEvent extends Message<ProcessEvent_StartEvent> {
}
/**
- * @generated from message envd.process.ProcessEvent.DataEvent
+ * @generated from message process.ProcessEvent.DataEvent
*/
export class ProcessEvent_DataEvent extends Message<ProcessEvent_DataEvent> {
/**
- * @generated from oneof envd.process.ProcessEvent.DataEvent.output
+ * @generated from oneof process.ProcessEvent.DataEvent.output
*/
output: {
/**
@@ -541,7 +541,7 @@ export class ProcessEvent_DataEvent extends Message<ProcessEvent_DataEvent> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessEvent.DataEvent";
+ static readonly typeName = "process.ProcessEvent.DataEvent";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "stdout", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "output" },
{ no: 2, name: "stderr", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "output" },
@@ -566,7 +566,7 @@ export class ProcessEvent_DataEvent extends Message<ProcessEvent_DataEvent> {
}
/**
- * @generated from message envd.process.ProcessEvent.EndEvent
+ * @generated from message process.ProcessEvent.EndEvent
*/
export class ProcessEvent_EndEvent extends Message<ProcessEvent_EndEvent> {
/**
@@ -575,9 +575,9 @@ export class ProcessEvent_EndEvent extends Message<ProcessEvent_EndEvent> {
exitCode = 0;
/**
- * @generated from field: bool terminated = 2;
+ * @generated from field: bool exited = 2;
*/
- terminated = false;
+ exited = false;
/**
* @generated from field: string status = 3;
@@ -595,10 +595,10 @@ export class ProcessEvent_EndEvent extends Message<ProcessEvent_EndEvent> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessEvent.EndEvent";
+ static readonly typeName = "process.ProcessEvent.EndEvent";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "exit_code", kind: "scalar", T: 17 /* ScalarType.SINT32 */ },
- { no: 2, name: "terminated", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
+ { no: 2, name: "exited", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 3, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);
@@ -621,11 +621,11 @@ export class ProcessEvent_EndEvent extends Message<ProcessEvent_EndEvent> {
}
/**
- * @generated from message envd.process.StartResponse
+ * @generated from message process.StartResponse
*/
export class StartResponse extends Message<StartResponse> {
/**
- * @generated from field: envd.process.ProcessEvent event = 1;
+ * @generated from field: process.ProcessEvent event = 1;
*/
event?: ProcessEvent;
@@ -635,7 +635,7 @@ export class StartResponse extends Message<StartResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.StartResponse";
+ static readonly typeName = "process.StartResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "event", kind: "message", T: ProcessEvent },
]);
@@ -658,11 +658,11 @@ export class StartResponse extends Message<StartResponse> {
}
/**
- * @generated from message envd.process.ConnectResponse
+ * @generated from message process.ConnectResponse
*/
export class ConnectResponse extends Message<ConnectResponse> {
/**
- * @generated from field: envd.process.ProcessEvent event = 1;
+ * @generated from field: process.ProcessEvent event = 1;
*/
event?: ProcessEvent;
@@ -672,7 +672,7 @@ export class ConnectResponse extends Message<ConnectResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ConnectResponse";
+ static readonly typeName = "process.ConnectResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "event", kind: "message", T: ProcessEvent },
]);
@@ -695,16 +695,16 @@ export class ConnectResponse extends Message<ConnectResponse> {
}
/**
- * @generated from message envd.process.SendInputRequest
+ * @generated from message process.SendInputRequest
*/
export class SendInputRequest extends Message<SendInputRequest> {
/**
- * @generated from field: envd.process.ProcessSelector process = 1;
+ * @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
/**
- * @generated from field: envd.process.ProcessInput input = 2;
+ * @generated from field: process.ProcessInput input = 2;
*/
input?: ProcessInput;
@@ -714,7 +714,7 @@ export class SendInputRequest extends Message<SendInputRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.SendInputRequest";
+ static readonly typeName = "process.SendInputRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "process", kind: "message", T: ProcessSelector },
{ no: 2, name: "input", kind: "message", T: ProcessInput },
@@ -738,7 +738,7 @@ export class SendInputRequest extends Message<SendInputRequest> {
}
/**
- * @generated from message envd.process.SendInputResponse
+ * @generated from message process.SendInputResponse
*/
export class SendInputResponse extends Message<SendInputResponse> {
constructor(data?: PartialMessage<SendInputResponse>) {
@@ -747,7 +747,7 @@ export class SendInputResponse extends Message<SendInputResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.SendInputResponse";
+ static readonly typeName = "process.SendInputResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
@@ -769,11 +769,11 @@ export class SendInputResponse extends Message<SendInputResponse> {
}
/**
- * @generated from message envd.process.ProcessInput
+ * @generated from message process.ProcessInput
*/
export class ProcessInput extends Message<ProcessInput> {
/**
- * @generated from oneof envd.process.ProcessInput.input
+ * @generated from oneof process.ProcessInput.input
*/
input: {
/**
@@ -795,7 +795,7 @@ export class ProcessInput extends Message<ProcessInput> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessInput";
+ static readonly typeName = "process.ProcessInput";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "stdin", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "input" },
{ no: 2, name: "pty", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "input" },
@@ -819,21 +819,21 @@ export class ProcessInput extends Message<ProcessInput> {
}
/**
- * @generated from message envd.process.StreamInputRequest
+ * @generated from message process.StreamInputRequest
*/
export class StreamInputRequest extends Message<StreamInputRequest> {
/**
- * @generated from oneof envd.process.StreamInputRequest.event
+ * @generated from oneof process.StreamInputRequest.event
*/
event: {
/**
- * @generated from field: envd.process.StreamInputRequest.StartEvent start = 1;
+ * @generated from field: process.StreamInputRequest.StartEvent start = 1;
*/
value: StreamInputRequest_StartEvent;
case: "start";
} | {
/**
- * @generated from field: envd.process.StreamInputRequest.DataEvent data = 2;
+ * @generated from field: process.StreamInputRequest.DataEvent data = 2;
*/
value: StreamInputRequest_DataEvent;
case: "data";
@@ -845,7 +845,7 @@ export class StreamInputRequest extends Message<StreamInputRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.StreamInputRequest";
+ static readonly typeName = "process.StreamInputRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "start", kind: "message", T: StreamInputRequest_StartEvent, oneof: "event" },
{ no: 2, name: "data", kind: "message", T: StreamInputRequest_DataEvent, oneof: "event" },
@@ -869,11 +869,11 @@ export class StreamInputRequest extends Message<StreamInputRequest> {
}
/**
- * @generated from message envd.process.StreamInputRequest.StartEvent
+ * @generated from message process.StreamInputRequest.StartEvent
*/
export class StreamInputRequest_StartEvent extends Message<StreamInputRequest_StartEvent> {
/**
- * @generated from field: envd.process.ProcessSelector process = 1;
+ * @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
@@ -883,7 +883,7 @@ export class StreamInputRequest_StartEvent extends Message<StreamInputRequest_St
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.StreamInputRequest.StartEvent";
+ static readonly typeName = "process.StreamInputRequest.StartEvent";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "process", kind: "message", T: ProcessSelector },
]);
@@ -906,11 +906,11 @@ export class StreamInputRequest_StartEvent extends Message<StreamInputRequest_St
}
/**
- * @generated from message envd.process.StreamInputRequest.DataEvent
+ * @generated from message process.StreamInputRequest.DataEvent
*/
export class StreamInputRequest_DataEvent extends Message<StreamInputRequest_DataEvent> {
/**
- * @generated from field: envd.process.ProcessInput input = 2;
+ * @generated from field: process.ProcessInput input = 2;
*/
input?: ProcessInput;
@@ -920,7 +920,7 @@ export class StreamInputRequest_DataEvent extends Message<StreamInputRequest_Dat
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.StreamInputRequest.DataEvent";
+ static readonly typeName = "process.StreamInputRequest.DataEvent";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 2, name: "input", kind: "message", T: ProcessInput },
]);
@@ -943,7 +943,7 @@ export class StreamInputRequest_DataEvent extends Message<StreamInputRequest_Dat
}
/**
- * @generated from message envd.process.StreamInputResponse
+ * @generated from message process.StreamInputResponse
*/
export class StreamInputResponse extends Message<StreamInputResponse> {
constructor(data?: PartialMessage<StreamInputResponse>) {
@@ -952,7 +952,7 @@ export class StreamInputResponse extends Message<StreamInputResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.StreamInputResponse";
+ static readonly typeName = "process.StreamInputResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
@@ -974,16 +974,16 @@ export class StreamInputResponse extends Message<StreamInputResponse> {
}
/**
- * @generated from message envd.process.SendSignalRequest
+ * @generated from message process.SendSignalRequest
*/
export class SendSignalRequest extends Message<SendSignalRequest> {
/**
- * @generated from field: envd.process.ProcessSelector process = 1;
+ * @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
/**
- * @generated from field: envd.process.Signal signal = 2;
+ * @generated from field: process.Signal signal = 2;
*/
signal = Signal.UNSPECIFIED;
@@ -993,7 +993,7 @@ export class SendSignalRequest extends Message<SendSignalRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.SendSignalRequest";
+ static readonly typeName = "process.SendSignalRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "process", kind: "message", T: ProcessSelector },
{ no: 2, name: "signal", kind: "enum", T: proto3.getEnumType(Signal) },
@@ -1017,7 +1017,7 @@ export class SendSignalRequest extends Message<SendSignalRequest> {
}
/**
- * @generated from message envd.process.SendSignalResponse
+ * @generated from message process.SendSignalResponse
*/
export class SendSignalResponse extends Message<SendSignalResponse> {
constructor(data?: PartialMessage<SendSignalResponse>) {
@@ -1026,7 +1026,7 @@ export class SendSignalResponse extends Message<SendSignalResponse> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.SendSignalResponse";
+ static readonly typeName = "process.SendSignalResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
@@ -1048,11 +1048,11 @@ export class SendSignalResponse extends Message<SendSignalResponse> {
}
/**
- * @generated from message envd.process.ConnectRequest
+ * @generated from message process.ConnectRequest
*/
export class ConnectRequest extends Message<ConnectRequest> {
/**
- * @generated from field: envd.process.ProcessSelector process = 1;
+ * @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
@@ -1062,7 +1062,7 @@ export class ConnectRequest extends Message<ConnectRequest> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ConnectRequest";
+ static readonly typeName = "process.ConnectRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "process", kind: "message", T: ProcessSelector },
]);
@@ -1085,11 +1085,11 @@ export class ConnectRequest extends Message<ConnectRequest> {
}
/**
- * @generated from message envd.process.ProcessSelector
+ * @generated from message process.ProcessSelector
*/
export class ProcessSelector extends Message<ProcessSelector> {
/**
- * @generated from oneof envd.process.ProcessSelector.selector
+ * @generated from oneof process.ProcessSelector.selector
*/
selector: {
/**
@@ -1111,7 +1111,7 @@ export class ProcessSelector extends Message<ProcessSelector> {
}
static readonly runtime: typeof proto3 = proto3;
- static readonly typeName = "envd.process.ProcessSelector";
+ static readonly typeName = "process.ProcessSelector";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "pid", kind: "scalar", T: 13 /* ScalarType.UINT32 */, oneof: "selector" },
{ no: 2, name: "tag", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "selector" },
diff --git a/packages/js-sdk/src/envd/schema.gen.ts b/packages/js-sdk/src/envd/schema.gen.ts
index ddde6da99..c91618de5 100644
--- a/packages/js-sdk/src/envd/schema.gen.ts
+++ b/packages/js-sdk/src/envd/schema.gen.ts
@@ -9,13 +9,18 @@ export interface paths {
/** Download a file */
get: {
parameters: {
+ query: {
+ username: components["parameters"]["User"];
+ };
path: {
path: components["parameters"]["FilePath"];
};
};
responses: {
200: components["responses"]["DownloadSuccess"];
- 400: components["responses"]["DirectoryPathError"];
+ 400: components["responses"]["BadRequest"];
+ 403: components["responses"]["DirectoryPathError"];
+ 404: components["responses"]["FileNotFound"];
500: components["responses"]["InternalServerError"];
};
};
@@ -23,7 +28,7 @@ export interface paths {
put: {
parameters: {
query: {
- user: components["parameters"]["User"];
+ username: components["parameters"]["User"];
};
path: {
path: components["parameters"]["FilePath"];
@@ -33,12 +38,14 @@ export interface paths {
responses: {
200: components["responses"]["ExistingFileUploadSuccess"];
201: components["responses"]["NewFileUploadSuccess"];
- 400: components["responses"]["DirectoryPathError"];
+ 400: components["responses"]["BadRequest"];
+ 403: components["responses"]["DirectoryPathError"];
500: components["responses"]["InternalServerError"];
+ 507: components["responses"]["NotEnoughDiskSpace"];
};
};
};
- "/host/sync": {
+ "/sync": {
/** Ensure the time and metadata is synced with the host */
post: {
responses: {
@@ -46,7 +53,6 @@ export interface paths {
204: {
content: never;
};
- 500: components["responses"]["InternalServerError"];
};
};
};
@@ -64,7 +70,13 @@ export interface components {
};
};
responses: {
- /** @description Bad Request - The specified path is a directory. */
+ /** @description Bad request */
+ BadRequest: {
+ content: {
+ "application/json": components["schemas"]["Error"];
+ };
+ };
+ /** @description Directory path error */
DirectoryPathError: {
content: {
"application/json": components["schemas"]["Error"];
@@ -86,6 +98,12 @@ export interface components {
};
content: never;
};
+ /** @description File not found */
+ FileNotFound: {
+ content: {
+ "application/json": components["schemas"]["Error"];
+ };
+ };
/** @description Internal server error */
InternalServerError: {
content: {
@@ -101,11 +119,17 @@ export interface components {
};
content: never;
};
+ /** @description Not enough disk space */
+ NotEnoughDiskSpace: {
+ content: {
+ "application/json": components["schemas"]["Error"];
+ };
+ };
};
parameters: {
- /** @description Absolute path to the file, URL encoded. */
+ /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
FilePath: string;
- /** @description User owning the file */
+ /** @description User used for setting the owner, or resolving relative paths. */
User: string;
};
requestBodies: {
diff --git a/packages/js-sdk/src/sandbox/filesystem/index.ts b/packages/js-sdk/src/sandbox/filesystem/index.ts
index 9cae2f0bf..1666584fd 100644
--- a/packages/js-sdk/src/sandbox/filesystem/index.ts
+++ b/packages/js-sdk/src/sandbox/filesystem/index.ts
@@ -9,7 +9,7 @@ import {
import { ConnectionOpts, defaultUsername, Username } from '../../connectionConfig'
import { EnvdApiClient } from '../../envd/api'
-import { FilesystemService } from '../../envd/filesystem/filesystem_connect'
+import { Filesystem as FilesystemService } from '../../envd/filesystem/filesystem_connect'
import {
EntryInfo as FsEntryInfo,
} from '../../envd/filesystem/filesystem_pb'
@@ -47,7 +47,9 @@ export class Filesystem {
params: {
path: {
path,
- user: opts?.user ?? defaultUsername,
+ },
+ query: {
+ username: opts?.user ?? defaultUsername,
},
},
parseAs: format === 'bytes' ? 'arrayBuffer' : format,
@@ -74,7 +76,7 @@ export class Filesystem {
path,
},
query: {
- user: opts?.user ?? defaultUsername,
+ username: opts?.user ?? defaultUsername,
},
},
bodySerializer(body) {
@@ -104,6 +106,20 @@ export class Filesystem {
return res.entries
}
+ async makeDir(path: string, opts?: FilesystemRequestOpts): Promise<void> {
+ await this.rpc.makeDir({
+ path,
+ user: {
+ selector: {
+ case: 'username',
+ value: opts?.user || defaultUsername,
+ },
+ },
+ }, {
+ timeoutMs: opts?.requestTimeoutMs ?? this.connectionConfig.requestTimeoutMs,
+ })
+ }
+
async remove(path: string, opts?: FilesystemRequestOpts): Promise<void> {
await this.rpc.remove({
path,
diff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.ts
index c54a7ceb5..b93489988 100644
--- a/packages/js-sdk/src/sandbox/index.ts
+++ b/packages/js-sdk/src/sandbox/index.ts
@@ -48,6 +48,8 @@ export class Sandbox extends SandboxApi {
get uploadUrl() {
const url = new URL('/files', this.envdApiUrl)
url.searchParams.set('user', defaultUsername)
+ // This makes it so that the filepath in the multipart form data is used.
+ url.searchParams.set('path', '')
return url.toString()
}
diff --git a/packages/js-sdk/src/sandbox/process/index.ts b/packages/js-sdk/src/sandbox/process/index.ts
index 1a7fe6ba2..47a12d825 100644
--- a/packages/js-sdk/src/sandbox/process/index.ts
+++ b/packages/js-sdk/src/sandbox/process/index.ts
@@ -5,7 +5,7 @@ import {
Transport,
} from '@connectrpc/connect'
-import { ProcessService } from '../../envd/process/process_connect'
+import { Process as ProcessService } from '../../envd/process/process_connect'
import {
ProcessInfo as PsProcessInfo,
Signal,
diff --git a/packages/js-sdk/src/sandbox/process/processHandle.ts b/packages/js-sdk/src/sandbox/process/processHandle.ts
index 749f75a21..44fed3b36 100644
--- a/packages/js-sdk/src/sandbox/process/processHandle.ts
+++ b/packages/js-sdk/src/sandbox/process/processHandle.ts
@@ -1,5 +1,4 @@
import {
- ProcessEvent_EndEvent,
ConnectResponse,
StartResponse,
} from '../../envd/process/process_pb'
@@ -16,46 +15,31 @@ interface ProcessStderr {
export type ProcessOutput = ProcessStdout | ProcessStderr
export class ProcessHandle {
- private readonly end: Promise<{
- exit: ProcessEvent_EndEvent,
- stdout: Uint8Array[],
- stderr: Uint8Array[],
- }>
+ private rawStdout = new Uint8Array()
+ private rawStderr = new Uint8Array()
+
+ private _result?: ProcessResult
constructor(
readonly pid: number,
private readonly handleDisconnect: () => void,
private readonly handleKill: () => Promise<void>,
- events: AsyncIterable<ConnectResponse | StartResponse>,
- private readonly handleStdout?: ((data: string) => void | Promise<void>),
- private readonly handleStderr?: ((data: string) => void | Promise<void>),
- private readonly handlePtyData?: ((data: Uint8Array) => void | Promise<void>),
- ) {
- this.end = this.handleEvents(events)
- }
-
- private static joinUint8Arrays(arrays: Uint8Array[]) {
- const length = arrays.reduce((acc, cur) => acc + cur.length, 0)
- const result = new Uint8Array(length)
- let offset = 0
-
- for (const array of arrays) {
- result.set(array, offset)
- offset += array.length
- }
+ private readonly events: AsyncIterable<ConnectResponse | StartResponse>,
+ ) { }
- return result
+ get result() {
+ return this._result
}
- async wait(): Promise<ProcessResult> {
- const result = await this.end
-
- return {
- exitCode: result.exit.exitCode,
- error: result.exit.error,
- stdout: ProcessHandle.joinUint8Arrays(result.stdout).toString(),
- stderr: ProcessHandle.joinUint8Arrays(result.stderr).toString(),
+ async wait(
+ onStdout?: ((data: string) => void | Promise<void>),
+ onStderr?: ((data: string) => void | Promise<void>),
+ ): Promise<ProcessResult> {
+ for await (const event of this) {
+ event
}
+
+ return this.result
}
async kill() {
@@ -63,37 +47,60 @@ export class ProcessHandle {
await this.handleKill()
}
- private async handleEvents(events: AsyncIterable<ConnectResponse | StartResponse>) {
- const stdout: Uint8Array[] = []
- const stderr: Uint8Array[] = []
-
- for await (const event of events) {
- switch (event.event?.event.case) {
- case 'data':
- switch (event.event.event.value.output.case) {
- case 'stdout':
- stdout.push(event.event.event.value.output.value)
- await this.handleStdout?.(event.event.event.value.output.value.toString())
- break
- case 'stderr':
- stderr.push(event.event.event.value.output.value)
- await this.handleStderr?.(event.event.event.value.output.value.toString())
- break
- case 'pty':
- await this.handlePtyData?.(event.event.event.value.output.value)
- break
- }
- break
- case 'end':
+ [Symbol.asyncIterator]() {
+ return {
+ next: async (): Promise<IteratorResult<ProcessOutput, ProcessResult>> => {
+ const event = await this.events[Symbol.asyncIterator]().next()
+
+ const value: ConnectResponse | StartResponse = event.value
+
+ switch (value.event?.event.case) {
+ case 'data':
+ switch (value.event.event.value.output.case) {
+ case 'stdout':
+ this.stdout += value.event.event.value.output.value.toString()
+ return {
+ value: { stdout: value.event.event.value.output.value.toString() },
+ done: false,
+ }
+ case 'stderr':
+ this.stderr += value.event.event.value.output.value.toString()
+ return {
+ value: { stderr: value.event.event.value.output.value.toString() },
+ done: false,
+ }
+ }
+ break
+ case 'end':
+ this._result = {
+ exitCode: event.value.exitCode,
+ error: event.value.error,
+ stdout: this.stdout,
+ stderr: this.stderr,
+ }
+ break
+ }
+
+ if (event.done && this.result) {
return {
- exit: event.event.event.value,
- stdout,
- stderr,
+ done: true,
+ value: this.result,
}
- }
- }
+ }
+
+ throw new Error('Process ended without an end event')
+ },
+ return: async () => {
+ return { value: this.result, done: true }
+ },
+ // throw: async () => {
- throw new Error('Process ended without an end event')
+
+
+
+ // // throw new Error('Process ended without an end event')
+ // }
+ }
}
}
diff --git a/packages/js-sdk/src/sandbox/pty.ts b/packages/js-sdk/src/sandbox/pty.ts
index b41dcfc0f..b2c31e3d2 100644
--- a/packages/js-sdk/src/sandbox/pty.ts
+++ b/packages/js-sdk/src/sandbox/pty.ts
@@ -4,19 +4,19 @@ import {
Transport,
} from '@connectrpc/connect'
-import { ProcessService } from '../envd/process/process_connect'
+import { Process as ProcessService } from '../envd/process/process_connect'
import {
Signal,
StartResponse,
StreamInputRequest,
} from '../envd/process/process_pb'
import { ConnectionConfig, ConnectionOpts, defaultUsername } from '../connectionConfig'
-import { ProcessHandle } from './process/processHandle'
import { PartialMessage } from '@bufbuild/protobuf'
-export interface StreamInputHandle {
- stop: () => void
- sendData: (data: Uint8Array) => void
+export interface PtyHandle {
+ kill: () => void
+ resize: (size: { cols: number, rows: number }) => void
+ handleInput: (data: Uint8Array) => Promise<void> | void
}
export class Pty {
@@ -24,11 +24,10 @@ export class Pty {
constructor(private readonly transport: Transport, private readonly connectionConfig: ConnectionConfig) { }
- async create({ cols, rows, onData }: {
+ async create({ cols, rows }: {
cols: number,
rows: number,
- onData: (data: Uint8Array) => void | Promise<void>,
- }, opts?: Pick<ConnectionOpts, 'requestTimeoutMs'>): Promise<ProcessHandle> {
+ }, opts?: Pick<ConnectionOpts, 'requestTimeoutMs'>) {
const controller = new AbortController()
const events = this.rpc.start({
@@ -64,18 +63,62 @@ export class Pty {
const pid = startEvent.event.event.value.pid
- return new ProcessHandle(
- pid,
- () => controller.abort(),
- () => this.kill(pid),
- events,
- undefined,
- undefined,
- onData,
- )
+ const input = await this.streamInput(pid, opts)
+
+ const kill = async () => {
+ input.stop()
+ controller.abort()
+ await this.kill(pid)
+ }
+
+ return {
+ kill,
+ resize: (size: { cols: number, rows: number }) => this.resize(pid, size),
+ sendInput: (data: Uint8Array) => input.sendData(data),
+ output: {
+ [Symbol.asyncIterator]() {
+ return {
+ next: async () => {
+ const event = await events[Symbol.asyncIterator]().next()
+
+ const value: StartResponse = event.value
+
+ switch (value.event?.event.case) {
+ case 'data':
+ switch (value.event.event.value.output.case) {
+ case 'pty':
+ return {
+ done: false,
+ value: value.event.event.value.output.value,
+ }
+ }
+ }
+
+ try {
+ await kill()
+ } catch (e) {
+ console.error('Failed to kill process', e)
+ }
+
+ throw new Error('Process exited')
+ },
+ throw: async (e?: any) => {
+ try {
+ await kill()
+ } catch (e) {
+ console.error('Failed to kill process', e)
+ }
+
+ throw e
+ },
+ [Symbol.asyncIterator]() { return this },
+ }
+ },
+ }
+ }
}
- async streamInput(pid: number, opts?: Pick<ConnectionOpts, 'requestTimeoutMs'>): Promise<StreamInputHandle> {
+ private async streamInput(pid: number, opts?: Pick<ConnectionOpts, 'requestTimeoutMs'>) {
const controller = new AbortController()
const events = new AsyncQueue<PartialMessage<StreamInputRequest>>()
@@ -117,7 +160,7 @@ export class Pty {
}
}
- async resize(
+ private async resize(
pid: number,
size: {
cols: number,
diff --git a/packages/js-sdk/tsconfig.json b/packages/js-sdk/tsconfig.json
index 56772c4b4..003041d44 100644
--- a/packages/js-sdk/tsconfig.json
+++ b/packages/js-sdk/tsconfig.json
@@ -17,6 +17,7 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
+ "experimentalDecorators": true,
"declaration": true,
},
"include": [
diff --git a/packages/python-sdk/e2b/__init__.py b/packages/python-sdk/e2b/__init__.py
index 4e4c57e3b..40cad42a1 100644
--- a/packages/python-sdk/e2b/__init__.py
+++ b/packages/python-sdk/e2b/__init__.py
@@ -13,5 +13,5 @@ from .sandbox.process.process_handle import (
ProcessStdout,
)
from .sandbox.filesystem.watch_handle import WatchHandle
-from envd.filesystem.filesystem_pb2 import FilesystemEvent, FileType, EntryInfo
from .sandbox.filesystem.filesystem import FileFormat
+from e2b.envd.filesystem.filesystem_pb2 import FilesystemEvent, FileType, EntryInfo
diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_connect.py b/packages/python-sdk/e2b/envd/filesystem/filesystem_connect.py
new file mode 100644
index 000000000..64605277a
--- /dev/null
+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_connect.py
@@ -0,0 +1,67 @@
+# Code generated by protoc-gen-connect-python 0.1.0.dev2, DO NOT EDIT.
+from typing import Any, Generator
+
+import connect
+
+from e2b.envd.filesystem import filesystem_pb2 as filesystem_dot_filesystem__pb2
+
+FilesystemName = "filesystem.Filesystem"
+
+
+class FilesystemClient:
+ def __init__(self, base_url, *, pool=None, compressor=None, json=False, **opts):
+ self._stat = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{FilesystemName}/Stat",
+ response_type=filesystem_dot_filesystem__pb2.StatResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._make_dir = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{FilesystemName}/MakeDir",
+ response_type=filesystem_dot_filesystem__pb2.MakeDirResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._list = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{FilesystemName}/List",
+ response_type=filesystem_dot_filesystem__pb2.ListResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._watch = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{FilesystemName}/Watch",
+ response_type=filesystem_dot_filesystem__pb2.WatchResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._remove = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{FilesystemName}/Remove",
+ response_type=filesystem_dot_filesystem__pb2.RemoveResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+
+ def stat(self, req: filesystem_dot_filesystem__pb2.StatRequest, **opts) -> filesystem_dot_filesystem__pb2.StatResponse:
+ return self._stat.call_unary(req, **opts)
+
+ def make_dir(self, req: filesystem_dot_filesystem__pb2.MakeDirRequest, **opts) -> filesystem_dot_filesystem__pb2.MakeDirResponse:
+ return self._make_dir.call_unary(req, **opts)
+
+ def list(self, req: filesystem_dot_filesystem__pb2.ListRequest, **opts) -> filesystem_dot_filesystem__pb2.ListResponse:
+ return self._list.call_unary(req, **opts)
+
+ def watch(self, req: filesystem_dot_filesystem__pb2.WatchRequest , **opts) -> Generator[filesystem_dot_filesystem__pb2.WatchResponse, Any, None]:
+ return self._watch.call_server_stream(req, **opts)
+
+ def remove(self, req: filesystem_dot_filesystem__pb2.RemoveRequest, **opts) -> filesystem_dot_filesystem__pb2.RemoveResponse:
+ return self._remove.call_unary(req, **opts)
diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py
new file mode 100644
index 000000000..713c08762
--- /dev/null
+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: filesystem/filesystem.proto
+# Protobuf Python Version: 5.26.1
+"""Generated protocol buffer code."""
+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()
+
+
+from e2b.envd.permissions import permissions_pb2 as permissions_dot_permissions__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66ilesystem/filesystem.proto\x12\nfilesystem\x1a\x1dpermissions/permissions.proto\"K\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"\x11\n\x0fMakeDirResponse\"J\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"\x10\n\x0eRemoveResponse\"H\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\";\n\x0cStatResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry\"I\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x14.filesystem.FileTypeR\x04type\"H\n\x0bListRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"?\n\x0cListResponse\x12/\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.filesystem.EntryInfoR\x07\x65ntries\"I\n\x0cWatchRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"B\n\rWatchResponse\x12\x31\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1b.filesystem.FilesystemEventR\x05\x65vent\"P\n\x0f\x46ilesystemEvent\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x15.filesystem.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\xc7\x02\n\nFilesystem\x12\x39\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12\x42\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x12\x39\n\x04List\x12\x17.filesystem.ListRequest\x1a\x18.filesystem.ListResponse\x12>\n\x05Watch\x12\x18.filesystem.WatchRequest\x1a\x19.filesystem.WatchResponse0\x01\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponseBi\n\x0e\x63om.filesystemB\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x46XX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16\x46ilesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'filesystem.filesystem_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\016com.filesystemB\017FilesystemProtoP\001\242\002\003FXX\252\002\nFilesystem\312\002\nFilesystem\342\002\026Filesystem\\GPBMetadata\352\002\nFilesystem'
+ _globals['_FILETYPE']._serialized_start=838
+ _globals['_FILETYPE']._serialized_end=920
+ _globals['_EVENTTYPE']._serialized_start=923
+ _globals['_EVENTTYPE']._serialized_end=1075
+ _globals['_MAKEDIRREQUEST']._serialized_start=74
+ _globals['_MAKEDIRREQUEST']._serialized_end=149
+ _globals['_MAKEDIRRESPONSE']._serialized_start=151
+ _globals['_MAKEDIRRESPONSE']._serialized_end=168
+ _globals['_REMOVEREQUEST']._serialized_start=170
+ _globals['_REMOVEREQUEST']._serialized_end=244
+ _globals['_REMOVERESPONSE']._serialized_start=246
+ _globals['_REMOVERESPONSE']._serialized_end=262
+ _globals['_STATREQUEST']._serialized_start=264
+ _globals['_STATREQUEST']._serialized_end=336
+ _globals['_STATRESPONSE']._serialized_start=338
+ _globals['_STATRESPONSE']._serialized_end=397
+ _globals['_ENTRYINFO']._serialized_start=399
+ _globals['_ENTRYINFO']._serialized_end=472
+ _globals['_LISTREQUEST']._serialized_start=474
+ _globals['_LISTREQUEST']._serialized_end=546
+ _globals['_LISTRESPONSE']._serialized_start=548
+ _globals['_LISTRESPONSE']._serialized_end=611
+ _globals['_WATCHREQUEST']._serialized_start=613
+ _globals['_WATCHREQUEST']._serialized_end=686
+ _globals['_WATCHRESPONSE']._serialized_start=688
+ _globals['_WATCHRESPONSE']._serialized_end=754
+ _globals['_FILESYSTEMEVENT']._serialized_start=756
+ _globals['_FILESYSTEMEVENT']._serialized_end=836
+ _globals['_FILESYSTEM']._serialized_start=1078
+ _globals['_FILESYSTEM']._serialized_end=1405
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/envd/filesystem/filesystem_pb2.pyi b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi
similarity index 88%
rename from packages/python-sdk/envd/filesystem/filesystem_pb2.pyi
rename to packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi
index 0db25253a..5253a9274 100644
--- a/packages/python-sdk/envd/filesystem/filesystem_pb2.pyi
+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi
@@ -1,4 +1,4 @@
-from envd.permissions import permissions_pb2 as _permissions_pb2
+from e2b.envd.permissions import permissions_pb2 as _permissions_pb2
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
@@ -31,6 +31,18 @@ EVENT_TYPE_REMOVE: EventType
EVENT_TYPE_RENAME: EventType
EVENT_TYPE_CHMOD: EventType
+class MakeDirRequest(_message.Message):
+ __slots__ = ("path", "user")
+ PATH_FIELD_NUMBER: _ClassVar[int]
+ USER_FIELD_NUMBER: _ClassVar[int]
+ path: str
+ user: _permissions_pb2.User
+ def __init__(self, path: _Optional[str] = ..., user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...) -> None: ...
+
+class MakeDirResponse(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
class RemoveRequest(_message.Message):
__slots__ = ("path", "user")
PATH_FIELD_NUMBER: _ClassVar[int]
diff --git a/packages/python-sdk/e2b/envd/permissions/permissions_pb2.py b/packages/python-sdk/e2b/envd/permissions/permissions_pb2.py
new file mode 100644
index 000000000..41dcb86a1
--- /dev/null
+++ b/packages/python-sdk/e2b/envd/permissions/permissions_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: permissions/permissions.proto
+# Protobuf Python Version: 5.26.1
+"""Generated protocol buffer code."""
+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\x1dpermissions/permissions.proto\x12\x0bpermissions\"0\n\x04User\x12\x1c\n\x08username\x18\x01 \x01(\tH\x00R\x08usernameB\n\n\x08selectorBo\n\x0f\x63om.permissionsB\x10PermissionsProtoP\x01\xa2\x02\x03PXX\xaa\x02\x0bPermissions\xca\x02\x0bPermissions\xe2\x02\x17Permissions\\GPBMetadata\xea\x02\x0bPermissionsb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'permissions.permissions_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.permissionsB\020PermissionsProtoP\001\242\002\003PXX\252\002\013Permissions\312\002\013Permissions\342\002\027Permissions\\GPBMetadata\352\002\013Permissions'
+ _globals['_USER']._serialized_start=46
+ _globals['_USER']._serialized_end=94
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/envd/permissions/permissions_pb2.pyi b/packages/python-sdk/e2b/envd/permissions/permissions_pb2.pyi
similarity index 100%
rename from packages/python-sdk/envd/permissions/permissions_pb2.pyi
rename to packages/python-sdk/e2b/envd/permissions/permissions_pb2.pyi
diff --git a/packages/python-sdk/e2b/envd/process/process_connect.py b/packages/python-sdk/e2b/envd/process/process_connect.py
new file mode 100644
index 000000000..7a1f8ab04
--- /dev/null
+++ b/packages/python-sdk/e2b/envd/process/process_connect.py
@@ -0,0 +1,89 @@
+# Code generated by protoc-gen-connect-python 0.1.0.dev2, DO NOT EDIT.
+from typing import Any, Generator
+
+import connect
+
+from e2b.envd.process import process_pb2 as process_dot_process__pb2
+
+ProcessName = "process.Process"
+
+
+class ProcessClient:
+ def __init__(self, base_url, *, pool=None, compressor=None, json=False, **opts):
+ self._list = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{ProcessName}/List",
+ response_type=process_dot_process__pb2.ListResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._connect = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{ProcessName}/Connect",
+ response_type=process_dot_process__pb2.ConnectResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._start = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{ProcessName}/Start",
+ response_type=process_dot_process__pb2.StartResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._update = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{ProcessName}/Update",
+ response_type=process_dot_process__pb2.UpdateResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._stream_input = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{ProcessName}/StreamInput",
+ response_type=process_dot_process__pb2.StreamInputResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._send_input = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{ProcessName}/SendInput",
+ response_type=process_dot_process__pb2.SendInputResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+ self._send_signal = connect.Client(
+ pool=pool,
+ url=f"{base_url}/{ProcessName}/SendSignal",
+ response_type=process_dot_process__pb2.SendSignalResponse,
+ compressor=compressor,
+ json=json,
+ **opts
+ )
+
+ def list(self, req: process_dot_process__pb2.ListRequest, **opts) -> process_dot_process__pb2.ListResponse:
+ return self._list.call_unary(req, **opts)
+
+ def connect(self, req: process_dot_process__pb2.ConnectRequest , **opts) -> Generator[process_dot_process__pb2.ConnectResponse, Any, None]:
+ return self._connect.call_server_stream(req, **opts)
+
+ def start(self, req: process_dot_process__pb2.StartRequest , **opts) -> Generator[process_dot_process__pb2.StartResponse, Any, None]:
+ return self._start.call_server_stream(req, **opts)
+
+ def update(self, req: process_dot_process__pb2.UpdateRequest, **opts) -> process_dot_process__pb2.UpdateResponse:
+ return self._update.call_unary(req, **opts)
+
+ def stream_input(self, req: process_dot_process__pb2.StreamInputRequest, **opts) -> process_dot_process__pb2.StreamInputResponse:
+ return self._stream_input.call_client_stream(req, **opts)
+
+ def send_input(self, req: process_dot_process__pb2.SendInputRequest, **opts) -> process_dot_process__pb2.SendInputResponse:
+ return self._send_input.call_unary(req, **opts)
+
+ def send_signal(self, req: process_dot_process__pb2.SendSignalRequest, **opts) -> process_dot_process__pb2.SendSignalResponse:
+ return self._send_signal.call_unary(req, **opts)
diff --git a/packages/python-sdk/e2b/envd/process/process_pb2.py b/packages/python-sdk/e2b/envd/process/process_pb2.py
new file mode 100644
index 000000000..b58e7f235
--- /dev/null
+++ b/packages/python-sdk/e2b/envd/process/process_pb2.py
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: process/process.proto
+# Protobuf Python Version: 5.26.1
+"""Generated protocol buffer code."""
+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()
+
+
+from e2b.envd.permissions import permissions_pb2 as permissions_dot_permissions__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15process/process.proto\x12\x07process\x1a\x1dpermissions/permissions.proto\"\\\n\x03PTY\x12%\n\x04size\x18\x01 \x01(\x0b\x32\x11.process.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\"\xc3\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\x34\n\x04\x65nvs\x18\x03 \x03(\x0b\x32 .process.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\"n\n\x0bProcessInfo\x12.\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x16.process.ProcessConfigR\x06\x63onfig\x12\x10\n\x03pid\x18\x02 \x01(\rR\x03pid\x12\x15\n\x03tag\x18\x03 \x01(\tH\x00R\x03tag\x88\x01\x01\x42\x06\n\x04_tag\"B\n\x0cListResponse\x12\x32\n\tprocesses\x18\x01 \x03(\x0b\x32\x14.process.ProcessInfoR\tprocesses\"\xb3\x01\n\x0cStartRequest\x12\x30\n\x07process\x18\x01 \x01(\x0b\x32\x16.process.ProcessConfigR\x07process\x12#\n\x03pty\x18\x02 \x01(\x0b\x32\x0c.process.PTYH\x00R\x03pty\x88\x01\x01\x12\x15\n\x03tag\x18\x03 \x01(\tH\x01R\x03tag\x88\x01\x01\x12%\n\x04user\x18\x04 \x01(\x0b\x32\x11.permissions.UserR\x04userB\x06\n\x04_ptyB\x06\n\x04_tag\"p\n\rUpdateRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12#\n\x03pty\x18\x02 \x01(\x0b\x32\x0c.process.PTYH\x00R\x03pty\x88\x01\x01\x42\x06\n\x04_pty\"\x10\n\x0eUpdateResponse\"\xb9\x03\n\x0cProcessEvent\x12\x38\n\x05start\x18\x01 \x01(\x0b\x32 .process.ProcessEvent.StartEventH\x00R\x05start\x12\x35\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.process.ProcessEvent.DataEventH\x00R\x04\x64\x61ta\x12\x32\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x1e.process.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|\n\x08\x45ndEvent\x12\x1b\n\texit_code\x18\x01 \x01(\x11R\x08\x65xitCode\x12\x16\n\x06\x65xited\x18\x02 \x01(\x08R\x06\x65xited\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\"<\n\rStartResponse\x12+\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x15.process.ProcessEventR\x05\x65vent\">\n\x0f\x43onnectResponse\x12+\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x15.process.ProcessEventR\x05\x65vent\"s\n\x10SendInputRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12+\n\x05input\x18\x02 \x01(\x0b\x32\x15.process.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\"\x96\x02\n\x12StreamInputRequest\x12>\n\x05start\x18\x01 \x01(\x0b\x32&.process.StreamInputRequest.StartEventH\x00R\x05start\x12;\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32%.process.StreamInputRequest.DataEventH\x00R\x04\x64\x61ta\x1a@\n\nStartEvent\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x1a\x38\n\tDataEvent\x12+\n\x05input\x18\x02 \x01(\x0b\x32\x15.process.ProcessInputR\x05inputB\x07\n\x05\x65vent\"\x15\n\x13StreamInputResponse\"p\n\x11SendSignalRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12\'\n\x06signal\x18\x02 \x01(\x0e\x32\x0f.process.SignalR\x06signal\"\x14\n\x12SendSignalResponse\"D\n\x0e\x43onnectRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\"E\n\x0fProcessSelector\x12\x12\n\x03pid\x18\x01 \x01(\rH\x00R\x03pid\x12\x12\n\x03tag\x18\x02 \x01(\tH\x00R\x03tagB\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\xca\x03\n\x07Process\x12\x33\n\x04List\x12\x14.process.ListRequest\x1a\x15.process.ListResponse\x12>\n\x07\x43onnect\x12\x17.process.ConnectRequest\x1a\x18.process.ConnectResponse0\x01\x12\x38\n\x05Start\x12\x15.process.StartRequest\x1a\x16.process.StartResponse0\x01\x12\x39\n\x06Update\x12\x16.process.UpdateRequest\x1a\x17.process.UpdateResponse\x12J\n\x0bStreamInput\x12\x1b.process.StreamInputRequest\x1a\x1c.process.StreamInputResponse(\x01\x12\x42\n\tSendInput\x12\x19.process.SendInputRequest\x1a\x1a.process.SendInputResponse\x12\x45\n\nSendSignal\x12\x1a.process.SendSignalRequest\x1a\x1b.process.SendSignalResponseBW\n\x0b\x63om.processB\x0cProcessProtoP\x01\xa2\x02\x03PXX\xaa\x02\x07Process\xca\x02\x07Process\xe2\x02\x13Process\\GPBMetadata\xea\x02\x07Processb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'process.process_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.processB\014ProcessProtoP\001\242\002\003PXX\252\002\007Process\312\002\007Process\342\002\023Process\\GPBMetadata\352\002\007Process'
+ _globals['_PROCESSCONFIG_ENVSENTRY']._loaded_options = None
+ _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_options = b'8\001'
+ _globals['_SIGNAL']._serialized_start=2224
+ _globals['_SIGNAL']._serialized_end=2296
+ _globals['_PTY']._serialized_start=65
+ _globals['_PTY']._serialized_end=157
+ _globals['_PTY_SIZE']._serialized_start=111
+ _globals['_PTY_SIZE']._serialized_end=157
+ _globals['_PROCESSCONFIG']._serialized_start=160
+ _globals['_PROCESSCONFIG']._serialized_end=355
+ _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_start=292
+ _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_end=347
+ _globals['_LISTREQUEST']._serialized_start=357
+ _globals['_LISTREQUEST']._serialized_end=370
+ _globals['_PROCESSINFO']._serialized_start=372
+ _globals['_PROCESSINFO']._serialized_end=482
+ _globals['_LISTRESPONSE']._serialized_start=484
+ _globals['_LISTRESPONSE']._serialized_end=550
+ _globals['_STARTREQUEST']._serialized_start=553
+ _globals['_STARTREQUEST']._serialized_end=732
+ _globals['_UPDATEREQUEST']._serialized_start=734
+ _globals['_UPDATEREQUEST']._serialized_end=846
+ _globals['_UPDATERESPONSE']._serialized_start=848
+ _globals['_UPDATERESPONSE']._serialized_end=864
+ _globals['_PROCESSEVENT']._serialized_start=867
+ _globals['_PROCESSEVENT']._serialized_end=1308
+ _globals['_PROCESSEVENT_STARTEVENT']._serialized_start=1048
+ _globals['_PROCESSEVENT_STARTEVENT']._serialized_end=1078
+ _globals['_PROCESSEVENT_DATAEVENT']._serialized_start=1080
+ _globals['_PROCESSEVENT_DATAEVENT']._serialized_end=1173
+ _globals['_PROCESSEVENT_ENDEVENT']._serialized_start=1175
+ _globals['_PROCESSEVENT_ENDEVENT']._serialized_end=1299
+ _globals['_STARTRESPONSE']._serialized_start=1310
+ _globals['_STARTRESPONSE']._serialized_end=1370
+ _globals['_CONNECTRESPONSE']._serialized_start=1372
+ _globals['_CONNECTRESPONSE']._serialized_end=1434
+ _globals['_SENDINPUTREQUEST']._serialized_start=1436
+ _globals['_SENDINPUTREQUEST']._serialized_end=1551
+ _globals['_SENDINPUTRESPONSE']._serialized_start=1553
+ _globals['_SENDINPUTRESPONSE']._serialized_end=1572
+ _globals['_PROCESSINPUT']._serialized_start=1574
+ _globals['_PROCESSINPUT']._serialized_end=1641
+ _globals['_STREAMINPUTREQUEST']._serialized_start=1644
+ _globals['_STREAMINPUTREQUEST']._serialized_end=1922
+ _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_start=1791
+ _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_end=1855
+ _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_start=1857
+ _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_end=1913
+ _globals['_STREAMINPUTRESPONSE']._serialized_start=1924
+ _globals['_STREAMINPUTRESPONSE']._serialized_end=1945
+ _globals['_SENDSIGNALREQUEST']._serialized_start=1947
+ _globals['_SENDSIGNALREQUEST']._serialized_end=2059
+ _globals['_SENDSIGNALRESPONSE']._serialized_start=2061
+ _globals['_SENDSIGNALRESPONSE']._serialized_end=2081
+ _globals['_CONNECTREQUEST']._serialized_start=2083
+ _globals['_CONNECTREQUEST']._serialized_end=2151
+ _globals['_PROCESSSELECTOR']._serialized_start=2153
+ _globals['_PROCESSSELECTOR']._serialized_end=2222
+ _globals['_PROCESS']._serialized_start=2299
+ _globals['_PROCESS']._serialized_end=2757
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/envd/process/process_pb2.pyi b/packages/python-sdk/e2b/envd/process/process_pb2.pyi
similarity index 95%
rename from packages/python-sdk/envd/process/process_pb2.pyi
rename to packages/python-sdk/e2b/envd/process/process_pb2.pyi
index f2719f51c..f7ce0a5ae 100644
--- a/packages/python-sdk/envd/process/process_pb2.pyi
+++ b/packages/python-sdk/e2b/envd/process/process_pb2.pyi
@@ -1,4 +1,4 @@
-from envd.permissions import permissions_pb2 as _permissions_pb2
+from e2b.envd.permissions import permissions_pb2 as _permissions_pb2
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
@@ -109,16 +109,16 @@ class ProcessEvent(_message.Message):
pty: bytes
def __init__(self, stdout: _Optional[bytes] = ..., stderr: _Optional[bytes] = ..., pty: _Optional[bytes] = ...) -> None: ...
class EndEvent(_message.Message):
- __slots__ = ("exit_code", "terminated", "status", "error")
+ __slots__ = ("exit_code", "exited", "status", "error")
EXIT_CODE_FIELD_NUMBER: _ClassVar[int]
- TERMINATED_FIELD_NUMBER: _ClassVar[int]
+ EXITED_FIELD_NUMBER: _ClassVar[int]
STATUS_FIELD_NUMBER: _ClassVar[int]
ERROR_FIELD_NUMBER: _ClassVar[int]
exit_code: int
- terminated: bool
+ exited: 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] = ..., exited: bool = ..., status: _Optional[str] = ..., error: _Optional[str] = ...) -> None: ...
START_FIELD_NUMBER: _ClassVar[int]
DATA_FIELD_NUMBER: _ClassVar[int]
END_FIELD_NUMBER: _ClassVar[int]
diff --git a/packages/python-sdk/e2b/envd/v1/client/api/files_api.py b/packages/python-sdk/e2b/envd/v1/client/api/files_api.py
index cb3bfef19..1dcf97c8f 100644
--- a/packages/python-sdk/e2b/envd/v1/client/api/files_api.py
+++ b/packages/python-sdk/e2b/envd/v1/client/api/files_api.py
@@ -19,7 +19,7 @@ import warnings
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
-from pydantic import Field, StrictStr
+from pydantic import Field, StrictStr, constr, validator
from typing import Union
@@ -46,7 +46,18 @@ class FilesApi:
def files_path_get(
self,
path: Annotated[
- StrictStr, Field(..., description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ ...,
+ description="Path to the file, URL encoded. Can be relative to user's home directory.",
+ ),
+ ],
+ username: Annotated[
+ constr(strict=True),
+ Field(
+ ...,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
**kwargs
) -> bytearray: # noqa: E501
@@ -55,11 +66,13 @@ class FilesApi:
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.files_path_get(path, async_req=True)
+ >>> thread = api.files_path_get(path, username, async_req=True)
>>> result = thread.get()
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request.
@@ -75,13 +88,26 @@ class FilesApi:
if "_preload_content" in kwargs:
message = "Error! Please call the files_path_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
- return self.files_path_get_with_http_info(path, **kwargs) # noqa: E501
+ return self.files_path_get_with_http_info(
+ path, username, **kwargs
+ ) # noqa: E501
@validate_arguments
def files_path_get_with_http_info(
self,
path: Annotated[
- StrictStr, Field(..., description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ ...,
+ description="Path to the file, URL encoded. Can be relative to user's home directory.",
+ ),
+ ],
+ username: Annotated[
+ constr(strict=True),
+ Field(
+ ...,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
**kwargs
) -> ApiResponse: # noqa: E501
@@ -90,11 +116,13 @@ class FilesApi:
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.files_path_get_with_http_info(path, async_req=True)
+ >>> thread = api.files_path_get_with_http_info(path, username, async_req=True)
>>> result = thread.get()
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
@@ -122,7 +150,7 @@ class FilesApi:
_params = locals()
- _all_params = ["path"]
+ _all_params = ["path", "username"]
_all_params.extend(
[
"async_req",
@@ -154,6 +182,9 @@ class FilesApi:
# process the query parameters
_query_params = []
+ if _params.get("username") is not None: # noqa: E501
+ _query_params.append(("username", _params["username"]))
+
# process the header parameters
_header_params = dict(_params.get("_headers", {}))
# process the form parameters
@@ -172,6 +203,8 @@ class FilesApi:
_response_types_map = {
"200": "bytearray",
"400": "Error",
+ "403": "Error",
+ "404": "Error",
"500": "Error",
}
@@ -198,9 +231,19 @@ class FilesApi:
def files_path_put(
self,
path: Annotated[
- StrictStr, Field(..., description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ ...,
+ description="Path to the file, URL encoded. Can be relative to user's home directory.",
+ ),
+ ],
+ username: Annotated[
+ constr(strict=True),
+ Field(
+ ...,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
- user: Annotated[StrictStr, Field(..., description="User owning the file")],
files_path_put_request: FilesPathPutRequest,
**kwargs
) -> None: # noqa: E501
@@ -209,13 +252,13 @@ class FilesApi:
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.files_path_put(path, user, files_path_put_request, async_req=True)
+ >>> thread = api.files_path_put(path, username, files_path_put_request, async_req=True)
>>> result = thread.get()
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
- :param user: User owning the file (required)
- :type user: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param files_path_put_request: (required)
:type files_path_put_request: FilesPathPutRequest
:param async_req: Whether to execute the request asynchronously.
@@ -234,16 +277,26 @@ class FilesApi:
message = "Error! Please call the files_path_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
return self.files_path_put_with_http_info(
- path, user, files_path_put_request, **kwargs
+ path, username, files_path_put_request, **kwargs
) # noqa: E501
@validate_arguments
def files_path_put_with_http_info(
self,
path: Annotated[
- StrictStr, Field(..., description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ ...,
+ description="Path to the file, URL encoded. Can be relative to user's home directory.",
+ ),
+ ],
+ username: Annotated[
+ constr(strict=True),
+ Field(
+ ...,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
- user: Annotated[StrictStr, Field(..., description="User owning the file")],
files_path_put_request: FilesPathPutRequest,
**kwargs
) -> ApiResponse: # noqa: E501
@@ -252,13 +305,13 @@ class FilesApi:
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.files_path_put_with_http_info(path, user, files_path_put_request, async_req=True)
+ >>> thread = api.files_path_put_with_http_info(path, username, files_path_put_request, async_req=True)
>>> result = thread.get()
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
- :param user: User owning the file (required)
- :type user: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param files_path_put_request: (required)
:type files_path_put_request: FilesPathPutRequest
:param async_req: Whether to execute the request asynchronously.
@@ -288,7 +341,7 @@ class FilesApi:
_params = locals()
- _all_params = ["path", "user", "files_path_put_request"]
+ _all_params = ["path", "username", "files_path_put_request"]
_all_params.extend(
[
"async_req",
@@ -320,8 +373,8 @@ class FilesApi:
# process the query parameters
_query_params = []
- if _params.get("user") is not None: # noqa: E501
- _query_params.append(("User", _params["user"]))
+ if _params.get("username") is not None: # noqa: E501
+ _query_params.append(("username", _params["username"]))
# process the header parameters
_header_params = dict(_params.get("_headers", {}))
diff --git a/packages/python-sdk/e2b/envd/v1/client_README.md b/packages/python-sdk/e2b/envd/v1/client_README.md
index 4cc6f19de..36a0985c0 100644
--- a/packages/python-sdk/e2b/envd/v1/client_README.md
+++ b/packages/python-sdk/e2b/envd/v1/client_README.md
@@ -46,11 +46,12 @@ configuration = e2b.envd.v1.client.Configuration(
with e2b.envd.v1.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = e2b.envd.v1.client.FilesApi(api_client)
- path = 'path_example' # str | Absolute path to the file, URL encoded.
+ path = 'path_example' # str | Path to the file, URL encoded. Can be relative to user's home directory.
+ username = 'username_example' # str | User used for setting the owner, or resolving relative paths.
try:
# Download a file
- api_response = api_instance.files_path_get(path)
+ api_response = api_instance.files_path_get(path, username)
print("The response of FilesApi->files_path_get:\n")
pprint(api_response)
except ApiException as e:
diff --git a/packages/python-sdk/e2b/envd/v2/client/api/files_api.py b/packages/python-sdk/e2b/envd/v2/client/api/files_api.py
index 425ed6688..7bf6dda1b 100644
--- a/packages/python-sdk/e2b/envd/v2/client/api/files_api.py
+++ b/packages/python-sdk/e2b/envd/v2/client/api/files_api.py
@@ -25,7 +25,7 @@ except ImportError:
from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import StrictStr, field_validator
from typing import Union
@@ -52,7 +52,17 @@ class FilesApi:
def files_path_get(
self,
path: Annotated[
- StrictStr, Field(description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ description="Path to the file, URL encoded. Can be relative to user's home directory."
+ ),
+ ],
+ username: Annotated[
+ str,
+ Field(
+ strict=True,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
_request_timeout: Union[
None,
@@ -69,8 +79,10 @@ class FilesApi:
"""Download a file
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -95,6 +107,7 @@ class FilesApi:
_param = self._files_path_get_serialize(
path=path,
+ username=username,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -104,6 +117,8 @@ class FilesApi:
_response_types_map: Dict[str, Optional[str]] = {
"200": "bytearray",
"400": "Error",
+ "403": "Error",
+ "404": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(
@@ -119,7 +134,17 @@ class FilesApi:
def files_path_get_with_http_info(
self,
path: Annotated[
- StrictStr, Field(description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ description="Path to the file, URL encoded. Can be relative to user's home directory."
+ ),
+ ],
+ username: Annotated[
+ str,
+ Field(
+ strict=True,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
_request_timeout: Union[
None,
@@ -136,8 +161,10 @@ class FilesApi:
"""Download a file
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -162,6 +189,7 @@ class FilesApi:
_param = self._files_path_get_serialize(
path=path,
+ username=username,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -171,6 +199,8 @@ class FilesApi:
_response_types_map: Dict[str, Optional[str]] = {
"200": "bytearray",
"400": "Error",
+ "403": "Error",
+ "404": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(
@@ -186,7 +216,17 @@ class FilesApi:
def files_path_get_without_preload_content(
self,
path: Annotated[
- StrictStr, Field(description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ description="Path to the file, URL encoded. Can be relative to user's home directory."
+ ),
+ ],
+ username: Annotated[
+ str,
+ Field(
+ strict=True,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
_request_timeout: Union[
None,
@@ -203,8 +243,10 @@ class FilesApi:
"""Download a file
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -229,6 +271,7 @@ class FilesApi:
_param = self._files_path_get_serialize(
path=path,
+ username=username,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -238,6 +281,8 @@ class FilesApi:
_response_types_map: Dict[str, Optional[str]] = {
"200": "bytearray",
"400": "Error",
+ "403": "Error",
+ "404": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(
@@ -248,6 +293,7 @@ class FilesApi:
def _files_path_get_serialize(
self,
path,
+ username,
_request_auth,
_content_type,
_headers,
@@ -268,6 +314,9 @@ class FilesApi:
if path is not None:
_path_params["path"] = path
# process the query parameters
+ if username is not None:
+ _query_params.append(("username", username))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -299,9 +348,18 @@ class FilesApi:
def files_path_put(
self,
path: Annotated[
- StrictStr, Field(description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ description="Path to the file, URL encoded. Can be relative to user's home directory."
+ ),
+ ],
+ username: Annotated[
+ str,
+ Field(
+ strict=True,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
- user: Annotated[StrictStr, Field(description="User owning the file")],
files_path_put_request: FilesPathPutRequest,
_request_timeout: Union[
None,
@@ -318,10 +376,10 @@ class FilesApi:
"""Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
- :param user: User owning the file (required)
- :type user: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param files_path_put_request: (required)
:type files_path_put_request: FilesPathPutRequest
:param _request_timeout: timeout setting for this request. If one
@@ -348,7 +406,7 @@ class FilesApi:
_param = self._files_path_put_serialize(
path=path,
- user=user,
+ username=username,
files_path_put_request=files_path_put_request,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -370,9 +428,18 @@ class FilesApi:
def files_path_put_with_http_info(
self,
path: Annotated[
- StrictStr, Field(description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ description="Path to the file, URL encoded. Can be relative to user's home directory."
+ ),
+ ],
+ username: Annotated[
+ str,
+ Field(
+ strict=True,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
- user: Annotated[StrictStr, Field(description="User owning the file")],
files_path_put_request: FilesPathPutRequest,
_request_timeout: Union[
None,
@@ -389,10 +456,10 @@ class FilesApi:
"""Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
- :param user: User owning the file (required)
- :type user: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param files_path_put_request: (required)
:type files_path_put_request: FilesPathPutRequest
:param _request_timeout: timeout setting for this request. If one
@@ -419,7 +486,7 @@ class FilesApi:
_param = self._files_path_put_serialize(
path=path,
- user=user,
+ username=username,
files_path_put_request=files_path_put_request,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -441,9 +508,18 @@ class FilesApi:
def files_path_put_without_preload_content(
self,
path: Annotated[
- StrictStr, Field(description="Absolute path to the file, URL encoded.")
+ StrictStr,
+ Field(
+ description="Path to the file, URL encoded. Can be relative to user's home directory."
+ ),
+ ],
+ username: Annotated[
+ str,
+ Field(
+ strict=True,
+ description="User used for setting the owner, or resolving relative paths.",
+ ),
],
- user: Annotated[StrictStr, Field(description="User owning the file")],
files_path_put_request: FilesPathPutRequest,
_request_timeout: Union[
None,
@@ -460,10 +536,10 @@ class FilesApi:
"""Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
- :param path: Absolute path to the file, URL encoded. (required)
+ :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)
:type path: str
- :param user: User owning the file (required)
- :type user: str
+ :param username: User used for setting the owner, or resolving relative paths. (required)
+ :type username: str
:param files_path_put_request: (required)
:type files_path_put_request: FilesPathPutRequest
:param _request_timeout: timeout setting for this request. If one
@@ -490,7 +566,7 @@ class FilesApi:
_param = self._files_path_put_serialize(
path=path,
- user=user,
+ username=username,
files_path_put_request=files_path_put_request,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -507,7 +583,7 @@ class FilesApi:
def _files_path_put_serialize(
self,
path,
- user,
+ username,
files_path_put_request,
_request_auth,
_content_type,
@@ -529,8 +605,8 @@ class FilesApi:
if path is not None:
_path_params["path"] = path
# process the query parameters
- if user is not None:
- _query_params.append(("User", user))
+ if username is not None:
+ _query_params.append(("username", username))
# process the header parameters
# process the form parameters
diff --git a/packages/python-sdk/e2b/envd/v2/client_README.md b/packages/python-sdk/e2b/envd/v2/client_README.md
index f64b0578f..718dfae8a 100644
--- a/packages/python-sdk/e2b/envd/v2/client_README.md
+++ b/packages/python-sdk/e2b/envd/v2/client_README.md
@@ -45,11 +45,12 @@ configuration = e2b.envd.v2.client.Configuration(
with e2b.envd.v2.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = e2b.envd.v2.client.FilesApi(api_client)
- path = 'path_example' # str | Absolute path to the file, URL encoded.
+ path = 'path_example' # str | Path to the file, URL encoded. Can be relative to user's home directory.
+ username = 'username_example' # str | User used for setting the owner, or resolving relative paths.
try:
# Download a file
- api_response = api_instance.files_path_get(path)
+ api_response = api_instance.files_path_get(path, username)
print("The response of FilesApi->files_path_get:\n")
pprint(api_response)
except ApiException as e:
diff --git a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py
index f50171458..d6ff36add 100644
--- a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py
+++ b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py
@@ -6,8 +6,8 @@ from typing import List, Optional, overload, Literal, Union
from e2b.envd import EnvdApiClient, client
from e2b.sandbox.filesystem.watch_handle import WatchHandle
from e2b.connection_config import Username
-from envd.filesystem import filesystem_connect, filesystem_pb2
-from envd.permissions.permissions_pb2 import User
+from e2b.envd.filesystem import filesystem_connect, filesystem_pb2
+from e2b.envd.permissions.permissions_pb2 import User
FileFormat = Literal["text", "bytes", "stream"]
@@ -17,7 +17,7 @@ class Filesystem:
def __init__(self, envd_api_url: str) -> None:
self._envd_api = EnvdApiClient(api_url=envd_api_url)
- self._rpc = filesystem_connect.FilesystemServiceClient(
+ self._rpc = filesystem_connect.FilesystemClient(
envd_api_url,
compressor=connect.GzipCompressor,
)
@@ -58,6 +58,7 @@ class Filesystem:
):
res = client.FilesApi(self._envd_api).files_path_get(
path=path,
+ username=user,
_request_timeout=request_timeout,
)
diff --git a/packages/python-sdk/e2b/sandbox/filesystem/watch_handle.py b/packages/python-sdk/e2b/sandbox/filesystem/watch_handle.py
index 7d04d8de1..42bfb72af 100644
--- a/packages/python-sdk/e2b/sandbox/filesystem/watch_handle.py
+++ b/packages/python-sdk/e2b/sandbox/filesystem/watch_handle.py
@@ -1,6 +1,6 @@
from typing import Any, Generator
-from envd.filesystem.filesystem_pb2 import WatchResponse
+from e2b.envd.filesystem.filesystem_pb2 import WatchResponse
class WatchHandle(Generator):
diff --git a/packages/python-sdk/e2b/sandbox/process/main.py b/packages/python-sdk/e2b/sandbox/process/main.py
index d378a75d4..dcea309a9 100644
--- a/packages/python-sdk/e2b/sandbox/process/main.py
+++ b/packages/python-sdk/e2b/sandbox/process/main.py
@@ -1,16 +1,16 @@
import connect
from typing import Dict, List, Optional, Literal, overload, Union, Callable
-from envd.permissions import permissions_pb2
-from envd.process import process_connect, process_pb2
+from e2b.envd.permissions import permissions_pb2
+from e2b.envd.process import process_connect, process_pb2
from e2b.sandbox.process.process_handle import ProcessHandle, ProcessResult
from e2b.connection_config import Username
class Process:
def __init__(self, envd_api_url: str) -> None:
- self._rpc = process_connect.ProcessServiceClient(
+ self._rpc = process_connect.ProcessClient(
envd_api_url,
compressor=connect.GzipCompressor,
)
diff --git a/packages/python-sdk/e2b/sandbox/process/process_handle.py b/packages/python-sdk/e2b/sandbox/process/process_handle.py
index 82ccb712a..54ede9d55 100644
--- a/packages/python-sdk/e2b/sandbox/process/process_handle.py
+++ b/packages/python-sdk/e2b/sandbox/process/process_handle.py
@@ -1,8 +1,8 @@
from typing import Optional, Callable, Any, Generator, Union
-
-from envd.process import process_pb2
from pydantic import BaseModel
+from e2b.envd.process import process_pb2
+
class ProcessOutput(BaseModel):
pass
diff --git a/packages/python-sdk/envd/filesystem/filesystem_connect.py b/packages/python-sdk/envd/filesystem/filesystem_connect.py
deleted file mode 100644
index 92d726729..000000000
--- a/packages/python-sdk/envd/filesystem/filesystem_connect.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Code generated by protoc-gen-connect-python 0.1.0.dev2, DO NOT EDIT.
-from typing import Any, Generator
-
-import connect
-
-from envd.filesystem import filesystem_pb2 as envd_dot_filesystem_dot_filesystem__pb2
-
-FilesystemServiceName = "envd.filesystem.FilesystemService"
-
-
-class FilesystemServiceClient:
- def __init__(self, base_url, *, pool=None, compressor=None, json=False, **opts):
- self._stat = connect.Client(
- pool=pool,
- url=f"{base_url}/{FilesystemServiceName}/Stat",
- response_type=envd_dot_filesystem_dot_filesystem__pb2.StatResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._list = connect.Client(
- pool=pool,
- url=f"{base_url}/{FilesystemServiceName}/List",
- response_type=envd_dot_filesystem_dot_filesystem__pb2.ListResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._watch = connect.Client(
- pool=pool,
- url=f"{base_url}/{FilesystemServiceName}/Watch",
- response_type=envd_dot_filesystem_dot_filesystem__pb2.WatchResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._remove = connect.Client(
- pool=pool,
- url=f"{base_url}/{FilesystemServiceName}/Remove",
- response_type=envd_dot_filesystem_dot_filesystem__pb2.RemoveResponse,
- compressor=compressor,
- json=json,
- **opts
- )
-
- def stat(self, req: envd_dot_filesystem_dot_filesystem__pb2.StatRequest, **opts) -> envd_dot_filesystem_dot_filesystem__pb2.StatResponse:
- return self._stat.call_unary(req, **opts)
-
- def list(self, req: envd_dot_filesystem_dot_filesystem__pb2.ListRequest, **opts) -> envd_dot_filesystem_dot_filesystem__pb2.ListResponse:
- return self._list.call_unary(req, **opts)
-
- def watch(self, req: envd_dot_filesystem_dot_filesystem__pb2.WatchRequest , **opts) -> Generator[envd_dot_filesystem_dot_filesystem__pb2.WatchResponse, Any, None]:
- return self._watch.call_server_stream(req, **opts)
-
- def remove(self, req: envd_dot_filesystem_dot_filesystem__pb2.RemoveRequest, **opts) -> envd_dot_filesystem_dot_filesystem__pb2.RemoveResponse:
- return self._remove.call_unary(req, **opts)
diff --git a/packages/python-sdk/envd/filesystem/filesystem_pb2.py b/packages/python-sdk/envd/filesystem/filesystem_pb2.py
deleted file mode 100644
index 6e6f635e0..000000000
--- a/packages/python-sdk/envd/filesystem/filesystem_pb2.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: envd/filesystem/filesystem.proto
-# Protobuf Python Version: 5.26.1
-"""Generated protocol buffer code."""
-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()
-
-
-from envd.permissions import permissions_pb2 as envd_dot_permissions_dot_permissions__pb2
-
-
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n envd/filesystem/filesystem.proto\x12\x0f\x65nvd.filesystem\x1a\"envd/permissions/permissions.proto\"O\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12*\n\x04user\x18\x02 \x01(\x0b\x32\x16.envd.permissions.UserR\x04user\"\x10\n\x0eRemoveResponse\"M\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12*\n\x04user\x18\x02 \x01(\x0b\x32\x16.envd.permissions.UserR\x04user\"@\n\x0cStatResponse\x12\x30\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1a.envd.filesystem.EntryInfoR\x05\x65ntry\"N\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x04type\x18\x02 \x01(\x0e\x32\x19.envd.filesystem.FileTypeR\x04type\"M\n\x0bListRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12*\n\x04user\x18\x02 \x01(\x0b\x32\x16.envd.permissions.UserR\x04user\"D\n\x0cListResponse\x12\x34\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1a.envd.filesystem.EntryInfoR\x07\x65ntries\"N\n\x0cWatchRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12*\n\x04user\x18\x02 \x01(\x0b\x32\x16.envd.permissions.UserR\x04user\"G\n\rWatchResponse\x12\x36\n\x05\x65vent\x18\x01 \x01(\x0b\x32 .envd.filesystem.FilesystemEventR\x05\x65vent\"U\n\x0f\x46ilesystemEvent\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12.\n\x04type\x18\x02 \x01(\x0e\x32\x1a.envd.filesystem.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\xb2\x02\n\x11\x46ilesystemService\x12\x43\n\x04Stat\x12\x1c.envd.filesystem.StatRequest\x1a\x1d.envd.filesystem.StatResponse\x12\x43\n\x04List\x12\x1c.envd.filesystem.ListRequest\x1a\x1d.envd.filesystem.ListResponse\x12H\n\x05Watch\x12\x1d.envd.filesystem.WatchRequest\x1a\x1e.envd.filesystem.WatchResponse0\x01\x12I\n\x06Remove\x12\x1e.envd.filesystem.RemoveRequest\x1a\x1f.envd.filesystem.RemoveResponseB\x83\x01\n\x13\x63om.envd.filesystemB\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x45\x46X\xaa\x02\x0f\x45nvd.Filesystem\xca\x02\x0f\x45nvd\\Filesystem\xe2\x02\x1b\x45nvd\\Filesystem\\GPBMetadata\xea\x02\x10\x45nvd::Filesystemb\x06proto3')
-
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'envd.filesystem.filesystem_pb2', _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- _globals['DESCRIPTOR']._loaded_options = None
- _globals['DESCRIPTOR']._serialized_options = b'\n\023com.envd.filesystemB\017FilesystemProtoP\001\242\002\003EFX\252\002\017Envd.Filesystem\312\002\017Envd\\Filesystem\342\002\033Envd\\Filesystem\\GPBMetadata\352\002\020Envd::Filesystem'
- _globals['_FILETYPE']._serialized_start=802
- _globals['_FILETYPE']._serialized_end=884
- _globals['_EVENTTYPE']._serialized_start=887
- _globals['_EVENTTYPE']._serialized_end=1039
- _globals['_REMOVEREQUEST']._serialized_start=89
- _globals['_REMOVEREQUEST']._serialized_end=168
- _globals['_REMOVERESPONSE']._serialized_start=170
- _globals['_REMOVERESPONSE']._serialized_end=186
- _globals['_STATREQUEST']._serialized_start=188
- _globals['_STATREQUEST']._serialized_end=265
- _globals['_STATRESPONSE']._serialized_start=267
- _globals['_STATRESPONSE']._serialized_end=331
- _globals['_ENTRYINFO']._serialized_start=333
- _globals['_ENTRYINFO']._serialized_end=411
- _globals['_LISTREQUEST']._serialized_start=413
- _globals['_LISTREQUEST']._serialized_end=490
- _globals['_LISTRESPONSE']._serialized_start=492
- _globals['_LISTRESPONSE']._serialized_end=560
- _globals['_WATCHREQUEST']._serialized_start=562
- _globals['_WATCHREQUEST']._serialized_end=640
- _globals['_WATCHRESPONSE']._serialized_start=642
- _globals['_WATCHRESPONSE']._serialized_end=713
- _globals['_FILESYSTEMEVENT']._serialized_start=715
- _globals['_FILESYSTEMEVENT']._serialized_end=800
- _globals['_FILESYSTEMSERVICE']._serialized_start=1042
- _globals['_FILESYSTEMSERVICE']._serialized_end=1348
-# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/envd/permissions/permissions_pb2.py b/packages/python-sdk/envd/permissions/permissions_pb2.py
deleted file mode 100644
index 2e6563659..000000000
--- a/packages/python-sdk/envd/permissions/permissions_pb2.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: envd/permissions/permissions.proto
-# Protobuf Python Version: 5.26.1
-"""Generated protocol buffer code."""
-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/permissions/permissions.proto\x12\x10\x65nvd.permissions\"0\n\x04User\x12\x1c\n\x08username\x18\x01 \x01(\tH\x00R\x08usernameB\n\n\x08selectorB\x89\x01\n\x14\x63om.envd.permissionsB\x10PermissionsProtoP\x01\xa2\x02\x03\x45PX\xaa\x02\x10\x45nvd.Permissions\xca\x02\x10\x45nvd\\Permissions\xe2\x02\x1c\x45nvd\\Permissions\\GPBMetadata\xea\x02\x11\x45nvd::Permissionsb\x06proto3')
-
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'envd.permissions.permissions_pb2', _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- _globals['DESCRIPTOR']._loaded_options = None
- _globals['DESCRIPTOR']._serialized_options = b'\n\024com.envd.permissionsB\020PermissionsProtoP\001\242\002\003EPX\252\002\020Envd.Permissions\312\002\020Envd\\Permissions\342\002\034Envd\\Permissions\\GPBMetadata\352\002\021Envd::Permissions'
- _globals['_USER']._serialized_start=56
- _globals['_USER']._serialized_end=104
-# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/envd/process/process_connect.py b/packages/python-sdk/envd/process/process_connect.py
deleted file mode 100644
index 76b7108c1..000000000
--- a/packages/python-sdk/envd/process/process_connect.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# Code generated by protoc-gen-connect-python 0.1.0.dev2, DO NOT EDIT.
-from typing import Any, Generator
-
-import connect
-
-from envd.process import process_pb2 as envd_dot_process_dot_process__pb2
-
-ProcessServiceName = "envd.process.ProcessService"
-
-
-class ProcessServiceClient:
- def __init__(self, base_url, *, pool=None, compressor=None, json=False, **opts):
- self._list = connect.Client(
- pool=pool,
- url=f"{base_url}/{ProcessServiceName}/List",
- response_type=envd_dot_process_dot_process__pb2.ListResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._connect = connect.Client(
- pool=pool,
- url=f"{base_url}/{ProcessServiceName}/Connect",
- response_type=envd_dot_process_dot_process__pb2.ConnectResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._start = connect.Client(
- pool=pool,
- url=f"{base_url}/{ProcessServiceName}/Start",
- response_type=envd_dot_process_dot_process__pb2.StartResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._update = connect.Client(
- pool=pool,
- url=f"{base_url}/{ProcessServiceName}/Update",
- response_type=envd_dot_process_dot_process__pb2.UpdateResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._stream_input = connect.Client(
- pool=pool,
- url=f"{base_url}/{ProcessServiceName}/StreamInput",
- response_type=envd_dot_process_dot_process__pb2.StreamInputResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._send_input = connect.Client(
- pool=pool,
- url=f"{base_url}/{ProcessServiceName}/SendInput",
- response_type=envd_dot_process_dot_process__pb2.SendInputResponse,
- compressor=compressor,
- json=json,
- **opts
- )
- self._send_signal = connect.Client(
- pool=pool,
- url=f"{base_url}/{ProcessServiceName}/SendSignal",
- response_type=envd_dot_process_dot_process__pb2.SendSignalResponse,
- compressor=compressor,
- json=json,
- **opts
- )
-
- def list(self, req: envd_dot_process_dot_process__pb2.ListRequest, **opts) -> envd_dot_process_dot_process__pb2.ListResponse:
- return self._list.call_unary(req, **opts)
-
- def connect(self, req: envd_dot_process_dot_process__pb2.ConnectRequest , **opts) -> Generator[envd_dot_process_dot_process__pb2.ConnectResponse, Any, None]:
- return self._connect.call_server_stream(req, **opts)
-
- def start(self, req: envd_dot_process_dot_process__pb2.StartRequest , **opts) -> Generator[envd_dot_process_dot_process__pb2.StartResponse, Any, None]:
- return self._start.call_server_stream(req, **opts)
-
- def update(self, req: envd_dot_process_dot_process__pb2.UpdateRequest, **opts) -> envd_dot_process_dot_process__pb2.UpdateResponse:
- return self._update.call_unary(req, **opts)
-
- def stream_input(self, req: envd_dot_process_dot_process__pb2.StreamInputRequest, **opts) -> envd_dot_process_dot_process__pb2.StreamInputResponse:
- return self._stream_input.call_client_stream(req, **opts)
-
- def send_input(self, req: envd_dot_process_dot_process__pb2.SendInputRequest, **opts) -> envd_dot_process_dot_process__pb2.SendInputResponse:
- return self._send_input.call_unary(req, **opts)
-
- def send_signal(self, req: envd_dot_process_dot_process__pb2.SendSignalRequest, **opts) -> envd_dot_process_dot_process__pb2.SendSignalResponse:
- return self._send_signal.call_unary(req, **opts)
diff --git a/packages/python-sdk/envd/process/process_pb2.py b/packages/python-sdk/envd/process/process_pb2.py
deleted file mode 100644
index a5ee91b98..000000000
--- a/packages/python-sdk/envd/process/process_pb2.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: envd/process/process.proto
-# Protobuf Python Version: 5.26.1
-"""Generated protocol buffer code."""
-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()
-
-
-from envd.permissions import permissions_pb2 as envd_dot_permissions_dot_permissions__pb2
-
-
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x65nvd/process/process.proto\x12\x0c\x65nvd.process\x1a\"envd/permissions/permissions.proto\"a\n\x03PTY\x12*\n\x04size\x18\x01 \x01(\x0b\x32\x16.envd.process.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\"\xc8\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\x39\n\x04\x65nvs\x18\x03 \x03(\x0b\x32%.envd.process.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\"s\n\x0bProcessInfo\x12\x33\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1b.envd.process.ProcessConfigR\x06\x63onfig\x12\x10\n\x03pid\x18\x02 \x01(\rR\x03pid\x12\x15\n\x03tag\x18\x03 \x01(\tH\x00R\x03tag\x88\x01\x01\x42\x06\n\x04_tag\"G\n\x0cListResponse\x12\x37\n\tprocesses\x18\x01 \x03(\x0b\x32\x19.envd.process.ProcessInfoR\tprocesses\"\xc2\x01\n\x0cStartRequest\x12\x35\n\x07process\x18\x01 \x01(\x0b\x32\x1b.envd.process.ProcessConfigR\x07process\x12(\n\x03pty\x18\x02 \x01(\x0b\x32\x11.envd.process.PTYH\x00R\x03pty\x88\x01\x01\x12\x15\n\x03tag\x18\x03 \x01(\tH\x01R\x03tag\x88\x01\x01\x12*\n\x04user\x18\x04 \x01(\x0b\x32\x16.envd.permissions.UserR\x04userB\x06\n\x04_ptyB\x06\n\x04_tag\"z\n\rUpdateRequest\x12\x37\n\x07process\x18\x01 \x01(\x0b\x32\x1d.envd.process.ProcessSelectorR\x07process\x12(\n\x03pty\x18\x02 \x01(\x0b\x32\x11.envd.process.PTYH\x00R\x03pty\x88\x01\x01\x42\x06\n\x04_pty\"\x10\n\x0eUpdateResponse\"\xd1\x03\n\x0cProcessEvent\x12=\n\x05start\x18\x01 \x01(\x0b\x32%.envd.process.ProcessEvent.StartEventH\x00R\x05start\x12:\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.envd.process.ProcessEvent.DataEventH\x00R\x04\x64\x61ta\x12\x37\n\x03\x65nd\x18\x03 \x01(\x0b\x32#.envd.process.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\"A\n\rStartResponse\x12\x30\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1a.envd.process.ProcessEventR\x05\x65vent\"C\n\x0f\x43onnectResponse\x12\x30\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1a.envd.process.ProcessEventR\x05\x65vent\"}\n\x10SendInputRequest\x12\x37\n\x07process\x18\x01 \x01(\x0b\x32\x1d.envd.process.ProcessSelectorR\x07process\x12\x30\n\x05input\x18\x02 \x01(\x0b\x32\x1a.envd.process.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\"\xaa\x02\n\x12StreamInputRequest\x12\x43\n\x05start\x18\x01 \x01(\x0b\x32+.envd.process.StreamInputRequest.StartEventH\x00R\x05start\x12@\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32*.envd.process.StreamInputRequest.DataEventH\x00R\x04\x64\x61ta\x1a\x45\n\nStartEvent\x12\x37\n\x07process\x18\x01 \x01(\x0b\x32\x1d.envd.process.ProcessSelectorR\x07process\x1a=\n\tDataEvent\x12\x30\n\x05input\x18\x02 \x01(\x0b\x32\x1a.envd.process.ProcessInputR\x05inputB\x07\n\x05\x65vent\"\x15\n\x13StreamInputResponse\"z\n\x11SendSignalRequest\x12\x37\n\x07process\x18\x01 \x01(\x0b\x32\x1d.envd.process.ProcessSelectorR\x07process\x12,\n\x06signal\x18\x02 \x01(\x0e\x32\x14.envd.process.SignalR\x06signal\"\x14\n\x12SendSignalResponse\"I\n\x0e\x43onnectRequest\x12\x37\n\x07process\x18\x01 \x01(\x0b\x32\x1d.envd.process.ProcessSelectorR\x07process\"E\n\x0fProcessSelector\x12\x12\n\x03pid\x18\x01 \x01(\rH\x00R\x03pid\x12\x12\n\x03tag\x18\x02 \x01(\tH\x00R\x03tagB\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\x97\x04\n\x0eProcessService\x12=\n\x04List\x12\x19.envd.process.ListRequest\x1a\x1a.envd.process.ListResponse\x12H\n\x07\x43onnect\x12\x1c.envd.process.ConnectRequest\x1a\x1d.envd.process.ConnectResponse0\x01\x12\x42\n\x05Start\x12\x1a.envd.process.StartRequest\x1a\x1b.envd.process.StartResponse0\x01\x12\x43\n\x06Update\x12\x1b.envd.process.UpdateRequest\x1a\x1c.envd.process.UpdateResponse\x12T\n\x0bStreamInput\x12 .envd.process.StreamInputRequest\x1a!.envd.process.StreamInputResponse(\x01\x12L\n\tSendInput\x12\x1e.envd.process.SendInputRequest\x1a\x1f.envd.process.SendInputResponse\x12O\n\nSendSignal\x12\x1f.envd.process.SendSignalRequest\x1a .envd.process.SendSignalResponseBq\n\x10\x63om.envd.processB\x0cProcessProtoP\x01\xa2\x02\x03\x45PX\xaa\x02\x0c\x45nvd.Process\xca\x02\x0c\x45nvd\\Process\xe2\x02\x18\x45nvd\\Process\\GPBMetadata\xea\x02\rEnvd::Processb\x06proto3')
-
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'envd.process.process_pb2', _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- _globals['DESCRIPTOR']._loaded_options = None
- _globals['DESCRIPTOR']._serialized_options = b'\n\020com.envd.processB\014ProcessProtoP\001\242\002\003EPX\252\002\014Envd.Process\312\002\014Envd\\Process\342\002\030Envd\\Process\\GPBMetadata\352\002\rEnvd::Process'
- _globals['_PROCESSCONFIG_ENVSENTRY']._loaded_options = None
- _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_options = b'8\001'
- _globals['_SIGNAL']._serialized_start=2363
- _globals['_SIGNAL']._serialized_end=2435
- _globals['_PTY']._serialized_start=80
- _globals['_PTY']._serialized_end=177
- _globals['_PTY_SIZE']._serialized_start=131
- _globals['_PTY_SIZE']._serialized_end=177
- _globals['_PROCESSCONFIG']._serialized_start=180
- _globals['_PROCESSCONFIG']._serialized_end=380
- _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_start=317
- _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_end=372
- _globals['_LISTREQUEST']._serialized_start=382
- _globals['_LISTREQUEST']._serialized_end=395
- _globals['_PROCESSINFO']._serialized_start=397
- _globals['_PROCESSINFO']._serialized_end=512
- _globals['_LISTRESPONSE']._serialized_start=514
- _globals['_LISTRESPONSE']._serialized_end=585
- _globals['_STARTREQUEST']._serialized_start=588
- _globals['_STARTREQUEST']._serialized_end=782
- _globals['_UPDATEREQUEST']._serialized_start=784
- _globals['_UPDATEREQUEST']._serialized_end=906
- _globals['_UPDATERESPONSE']._serialized_start=908
- _globals['_UPDATERESPONSE']._serialized_end=924
- _globals['_PROCESSEVENT']._serialized_start=927
- _globals['_PROCESSEVENT']._serialized_end=1392
- _globals['_PROCESSEVENT_STARTEVENT']._serialized_start=1123
- _globals['_PROCESSEVENT_STARTEVENT']._serialized_end=1153
- _globals['_PROCESSEVENT_DATAEVENT']._serialized_start=1155
- _globals['_PROCESSEVENT_DATAEVENT']._serialized_end=1248
- _globals['_PROCESSEVENT_ENDEVENT']._serialized_start=1251
- _globals['_PROCESSEVENT_ENDEVENT']._serialized_end=1383
- _globals['_STARTRESPONSE']._serialized_start=1394
- _globals['_STARTRESPONSE']._serialized_end=1459
- _globals['_CONNECTRESPONSE']._serialized_start=1461
- _globals['_CONNECTRESPONSE']._serialized_end=1528
- _globals['_SENDINPUTREQUEST']._serialized_start=1530
- _globals['_SENDINPUTREQUEST']._serialized_end=1655
- _globals['_SENDINPUTRESPONSE']._serialized_start=1657
- _globals['_SENDINPUTRESPONSE']._serialized_end=1676
- _globals['_PROCESSINPUT']._serialized_start=1678
- _globals['_PROCESSINPUT']._serialized_end=1745
- _globals['_STREAMINPUTREQUEST']._serialized_start=1748
- _globals['_STREAMINPUTREQUEST']._serialized_end=2046
- _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_start=1905
- _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_end=1974
- _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_start=1976
- _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_end=2037
- _globals['_STREAMINPUTRESPONSE']._serialized_start=2048
- _globals['_STREAMINPUTRESPONSE']._serialized_end=2069
- _globals['_SENDSIGNALREQUEST']._serialized_start=2071
- _globals['_SENDSIGNALREQUEST']._serialized_end=2193
- _globals['_SENDSIGNALRESPONSE']._serialized_start=2195
- _globals['_SENDSIGNALRESPONSE']._serialized_end=2215
- _globals['_CONNECTREQUEST']._serialized_start=2217
- _globals['_CONNECTREQUEST']._serialized_end=2290
- _globals['_PROCESSSELECTOR']._serialized_start=2292
- _globals['_PROCESSSELECTOR']._serialized_end=2361
- _globals['_PROCESSSERVICE']._serialized_start=2438
- _globals['_PROCESSSERVICE']._serialized_end=2973
-# @@protoc_insertion_point(module_scope)
diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml
index e3607b394..50a291b72 100644
--- a/packages/python-sdk/pyproject.toml
+++ b/packages/python-sdk/pyproject.toml
@@ -7,7 +7,7 @@ license = "MIT"
readme = "README.md"
homepage = "https://e2b.dev/"
repository = "https://github.com/e2b-dev/e2b/tree/main/packages/python-sdk"
-packages = [{ include = "e2b" }, { include = "envd" }, { include = "connect" }]
+packages = [{ include = "e2b" }, { include = "connect" }]
[tool.poetry.dependencies]
python = "^3.8"
diff --git a/packages/python-sdk/scripts/fix-python-pb.sh b/packages/python-sdk/scripts/fix-python-pb.sh
new file mode 100755
index 000000000..3958fa848
--- /dev/null
+++ b/packages/python-sdk/scripts/fix-python-pb.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+sed -i '.bak' 's/from\ permissions\ import/from e2b.envd.permissions import/g' e2b/envd/permissions/* e2b/envd/process/* e2b/envd/filesystem/*
+sed -i '.bak' 's/from\ process\ import/from e2b.envd.process import/g' e2b/envd/permissions/* e2b/envd/process/* e2b/envd/filesystem/*
+sed -i '.bak' 's/from\ filesystem\ import/from e2b.envd.filesystem import/g' e2b/envd/permissions/* e2b/envd/process/* e2b/envd/filesystem/*
+
+rm e2b/envd/permissions/*.bak
+rm e2b/envd/process/*.bak
+rm e2b/envd/filesystem/*.bak
diff --git a/spec/buf.gen.yaml b/spec/envd/buf.gen.yaml
similarity index 53%
rename from spec/buf.gen.yaml
rename to spec/envd/buf.gen.yaml
index 5a3f4b554..028c1cd0c 100644
--- a/spec/buf.gen.yaml
+++ b/spec/envd/buf.gen.yaml
@@ -3,20 +3,20 @@
version: v1
plugins:
- plugin: es
- out: ../packages/js-sdk/src
+ out: ../../packages/js-sdk/src/envd
opt:
- target=ts
- plugin: connect-es
- out: ../packages/js-sdk/src
+ out: ../../packages/js-sdk/src/envd
opt:
- target=ts
- plugin: python
- out: ../packages/python-sdk
+ out: ../../packages/python-sdk/e2b/envd
opt:
- - pyi_out=../packages/python-sdk
+ - pyi_out=../../packages/python-sdk/e2b/envd
- name: connect-python
- out: ../packages/python-sdk
- path: ../packages/connect-python/bin/protoc-gen-connect-python
+ out: ../../packages/python-sdk/e2b/envd
+ path: ../../packages/connect-python/bin/protoc-gen-connect-python
managed:
enabled: true
diff --git a/spec/envd/envd.yaml b/spec/envd/envd.yaml
index 63def5218..f5956ee8c 100644
--- a/spec/envd/envd.yaml
+++ b/spec/envd/envd.yaml
@@ -14,8 +14,6 @@ paths:
responses:
204:
description: The time and metadata is synced with the host
- 500:
- $ref: "#/components/responses/InternalServerError"
/files/{path}:
get:
@@ -28,7 +26,11 @@ paths:
200:
$ref: "#/components/responses/DownloadSuccess"
400:
+ $ref: "#/components/responses/BadRequest"
+ 403:
$ref: "#/components/responses/DirectoryPathError"
+ 404:
+ $ref: "#/components/responses/FileNotFound"
500:
$ref: "#/components/responses/InternalServerError"
put:
@@ -45,9 +47,13 @@ paths:
201:
$ref: "#/components/responses/NewFileUploadSuccess"
400:
+ $ref: "#/components/responses/BadRequest"
+ 403:
$ref: "#/components/responses/DirectoryPathError"
500:
$ref: "#/components/responses/InternalServerError"
+ 507:
+ $ref: "#/components/responses/NotEnoughDiskSpace"
components:
parameters:
@@ -60,7 +66,7 @@ components:
schema:
type: string
User:
- name: user
+ name: username
in: query
required: true
description: User used for setting the owner, or resolving relative paths.
@@ -83,30 +89,10 @@ components:
responses:
ExistingFileUploadSuccess:
description: The file was updated successfully.
- headers:
- Cache-Control:
- schema:
- type: string
- example: "no-cache, no-store"
NewFileUploadSuccess:
description: The file was created successfully.
- headers:
- Cache-Control:
- schema:
- type: string
- example: "no-cache, no-store"
- Location:
- description: The URL of the uploaded file
- schema:
- type: string
- format: path
DownloadSuccess:
description: Entire file downloaded successfully.
- headers:
- Cache-Control:
- schema:
- type: string
- example: "no-cache, no-store"
content:
application/octet-stream:
schema:
@@ -114,7 +100,7 @@ components:
format: binary
description: The file content
DirectoryPathError:
- description: Bad Request - The specified path is a directory.
+ description: Directory path error
content:
application/json:
schema:
@@ -125,6 +111,24 @@ components:
application/json:
schema:
$ref: "#/components/schemas/Error"
+ FileNotFound:
+ description: File not found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ BadRequest:
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ NotEnoughDiskSpace:
+ description: Not enough disk space
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
schemas:
Error:
diff --git a/spec/envd/filesystem/filesystem.proto b/spec/envd/filesystem/filesystem.proto
index aae5da1bf..4f9d44593 100644
--- a/spec/envd/filesystem/filesystem.proto
+++ b/spec/envd/filesystem/filesystem.proto
@@ -1,16 +1,25 @@
syntax = "proto3";
-import "envd/permissions/permissions.proto";
+import "permissions/permissions.proto";
-package envd.filesystem;
+package filesystem;
-service FilesystemService {
+service Filesystem {
rpc Stat(StatRequest) returns (StatResponse);
+ rpc MakeDir(MakeDirRequest) returns (MakeDirResponse);
rpc List(ListRequest) returns (ListResponse);
rpc Watch(WatchRequest) returns (stream WatchResponse);
rpc Remove(RemoveRequest) returns (RemoveResponse);
}
+message MakeDirRequest {
+ string path = 1;
+
+ permissions.User user = 2;
+}
+
+message MakeDirResponse {}
+
message RemoveRequest {
string path = 1;
diff --git a/spec/envd/permissions/permissions.proto b/spec/envd/permissions/permissions.proto
index 41a6a76c8..80cef04f0 100644
--- a/spec/envd/permissions/permissions.proto
+++ b/spec/envd/permissions/permissions.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-package envd.permissions;
+package permissions;
message User {
oneof selector {
diff --git a/spec/envd/process/process.proto b/spec/envd/process/process.proto
index 9e9dbb619..7d7ab6798 100644
--- a/spec/envd/process/process.proto
+++ b/spec/envd/process/process.proto
@@ -1,10 +1,10 @@
syntax = "proto3";
-import "envd/permissions/permissions.proto";
+import "permissions/permissions.proto";
-package envd.process;
+package process;
-service ProcessService {
+service Process {
rpc List(ListRequest) returns (ListResponse);
rpc Connect(ConnectRequest) returns (stream ConnectResponse);
@@ -85,7 +85,7 @@ message ProcessEvent {
message EndEvent {
sint32 exit_code = 1;
- bool terminated = 2;
+ bool exited = 2;
string status = 3;
optional string error = 4;
}