diff --git a/README.md b/README.md index d50edd1..4cdce66 100644 --- a/README.md +++ b/README.md @@ -146,38 +146,39 @@ stdout without touching the cluster; apply it with kubectl. ## API -The `ate-env-api` service exposes gRPC APIs over HTTP/2 (h2c) for environment lifecycle and in-actor operations, as well as HTTP endpoints for health checks and MCP. +The `ate-env-api` service exposes gRPC APIs for environment +lifecycle and in-actor operations, as well as HTTP endpoints for MCP. ### EnvironmentService -Manages the lifecycle of isolated execution environments. Requests are handled by `ate-env-api` and translated into Agent Substrate control plane operations: +Manages the lifecycle of isolated execution environments (defined in [`proto/ateenv/v1alpha/env.proto`](proto/ateenv/v1alpha/env.proto)). Requests are handled by `ate-env-api` and translated into Agent Substrate control plane operations: -| RPC | Type | Description | -| --- | --- | ----------- | -| `CreateEnvironment` | Unary | Creates and starts a new environment actor from an ActorTemplate | -| `GetEnvironment` | Unary | Retrieves environment details and status | -| `SuspendEnvironment` | Unary | Suspends and checkpoints the environment to snapshot storage | -| `DeleteEnvironment` | Unary | Deletes the environment permanently | +| RPC | Description | +| --- | ----------- | +| `CreateEnvironment` | Creates and starts a new environment actor from an ActorTemplate | +| `GetEnvironment` | Retrieves environment details and status | +| `SuspendEnvironment` | Suspends and checkpoints the environment to snapshot storage | +| `DeleteEnvironment` | Deletes the environment permanently | ### ProcessService -Manages asynchronous process execution and output streaming inside the environment container. Requests are proxied by `ate-env-api` directly to the `ate-env-guest` daemon: +Manages asynchronous process execution and output streaming inside the environment container (defined in [`proto/ateenv/v1alpha/guest.proto`](proto/ateenv/v1alpha/guest.proto)). Requests are proxied by `ate-env-api` directly to the `ate-env-guest` daemon: -| RPC | Type | Description | -| --- | --- | ----------- | -| `StartProcess` | Unary | Launches an asynchronous background process and returns a `process_id` | -| `GetProcess` | Unary | Retrieves process metadata, lifecycle status, timestamps, and exit code | -| `StreamProcessOutputs` | Server Streaming | Streams real-time `stdout` and `stderr` output chunks | -| `KillProcess` | Unary | Terminates a running background process and its child process tree | +| RPC | Description | +| --- | ----------- | +| `StartProcess` | Launches a process and returns a process ID. | +| `GetProcess` | Retrieves process metadata and status | +| `StreamProcessOutputs` | Streams stdout and stderr chunks | +| `KillProcess` | Terminates a running background process | ### FileSystemService -Provides chunked streaming file reading and writing within the environment container without unbounded memory usage. Requests are proxied by `ate-env-api` directly to the `ate-env-guest` daemon: +Provides chunked streaming file reading and writing within the environment container without unbounded memory usage (defined in [`proto/ateenv/v1alpha/guest.proto`](proto/ateenv/v1alpha/guest.proto)). Requests are proxied by `ate-env-api` directly to the `ate-env-guest` daemon: -| RPC | Type | Description | -| --- | --- | ----------- | -| `ReadFile` | Server Streaming | Streams raw binary or text file contents in chunks | -| `WriteFile` | Client Streaming | Streams raw binary or text chunks directly to a target file | +| RPC | Description | +| --- | ----------- | +| `ReadFile` | Streams raw binary or text file contents in chunks | +| `WriteFile` | Streams raw binary or text chunks directly to a target file | ## Built-in MCP Server diff --git a/clients/go/client.go b/clients/go/client.go index e8533ee..bfa6fdb 100644 --- a/clients/go/client.go +++ b/clients/go/client.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/agent-substrate/env/internal/ate" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" @@ -36,9 +36,9 @@ type Client struct { endpoint string opts ClientOptions grpcConn *grpc.ClientConn - grpc ateenvv1.EnvironmentServiceClient - process ateenvv1.ProcessServiceClient - filesystem ateenvv1.FileSystemServiceClient + grpc ateenvv1alpha.EnvironmentServiceClient + process ateenvv1alpha.ProcessServiceClient + filesystem ateenvv1alpha.FileSystemServiceClient } // NewClient returns a Client targeting endpoint. @@ -70,9 +70,9 @@ func NewClient(opts ClientOptions) (*Client, error) { endpoint: endpoint, opts: opts, grpcConn: grpcConn, - grpc: ateenvv1.NewEnvironmentServiceClient(grpcConn), - process: ateenvv1.NewProcessServiceClient(grpcConn), - filesystem: ateenvv1.NewFileSystemServiceClient(grpcConn), + grpc: ateenvv1alpha.NewEnvironmentServiceClient(grpcConn), + process: ateenvv1alpha.NewProcessServiceClient(grpcConn), + filesystem: ateenvv1alpha.NewFileSystemServiceClient(grpcConn), }, nil } @@ -86,7 +86,7 @@ func (c *Client) Close() error { // Create registers a new env with the parameters given in req and // starts it using the gRPC EnvironmentService. -func (c *Client) Create(ctx context.Context, req *ateenvv1.CreateEnvironmentRequest) (*Env, error) { +func (c *Client) Create(ctx context.Context, req *ateenvv1alpha.CreateEnvironmentRequest) (*Env, error) { resp, err := c.grpc.CreateEnvironment(ctx, req) if err != nil { return nil, fromGRPCError(err) @@ -97,7 +97,7 @@ func (c *Client) Create(ctx context.Context, req *ateenvv1.CreateEnvironmentRequ // Suspend checkpoints and stops the environment using the gRPC EnvironmentService. func (c *Client) Suspend(ctx context.Context, atespace, id string) error { - req := &ateenvv1.SuspendEnvironmentRequest{ + req := &ateenvv1alpha.SuspendEnvironmentRequest{ Id: id, Atespace: atespace, } @@ -110,7 +110,7 @@ func (c *Client) Suspend(ctx context.Context, atespace, id string) error { // Delete removes the environment permanently using the gRPC EnvironmentService. func (c *Client) Delete(ctx context.Context, atespace, id string) error { - req := &ateenvv1.DeleteEnvironmentRequest{ + req := &ateenvv1alpha.DeleteEnvironmentRequest{ Id: id, Atespace: atespace, } diff --git a/clients/go/client_test.go b/clients/go/client_test.go index aa99d49..6778f45 100644 --- a/clients/go/client_test.go +++ b/clients/go/client_test.go @@ -16,7 +16,7 @@ import ( "github.com/agent-substrate/env/internal/internaltest/fakecontrol" "github.com/agent-substrate/env/internal/internaltest/fakerouter" "github.com/agent-substrate/env/internal/mcp" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "github.com/agent-substrate/substrate/pkg/proto/ateapipb" "google.golang.org/grpc" ) @@ -63,9 +63,9 @@ func newFixture(t *testing.T) *fixture { t.Cleanup(service.Close) grpcServer := grpc.NewServer() - ateenvv1.RegisterEnvironmentServiceServer(grpcServer, service) - ateenvv1.RegisterProcessServiceServer(grpcServer, service) - ateenvv1.RegisterFileSystemServiceServer(grpcServer, service) + ateenvv1alpha.RegisterEnvironmentServiceServer(grpcServer, service) + ateenvv1alpha.RegisterProcessServiceServer(grpcServer, service) + ateenvv1alpha.RegisterFileSystemServiceServer(grpcServer, service) mux := http.NewServeMux() mux.HandleFunc("GET /healthz", func(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "ok\n") @@ -109,9 +109,9 @@ func (f *fixture) create(t *testing.T, id string) *env.Env { f.router.Register(id, grpcGuestServer) - sb, err := f.client.Create(t.Context(), &ateenvv1.CreateEnvironmentRequest{ + sb, err := f.client.Create(t.Context(), &ateenvv1alpha.CreateEnvironmentRequest{ Id: id, - Template: &ateenvv1.Template{ + Template: &ateenvv1alpha.Template{ Name: "default-env", Atespace: "envs", }, diff --git a/clients/go/env.go b/clients/go/env.go index 0362d8c..f8ea60e 100644 --- a/clients/go/env.go +++ b/clients/go/env.go @@ -9,7 +9,7 @@ import ( "io/fs" "time" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc/metadata" ) @@ -41,7 +41,7 @@ func (e *Env) Delete(ctx context.Context) error { // Shell runs a shell command line inside the environment using ProcessService. func (e *Env) Shell(ctx context.Context, commandLine string) (*ShellResponse, error) { ctx = e.withEnv(ctx) - startResp, err := e.client.process.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startResp, err := e.client.process.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", commandLine}, }) if err != nil { @@ -49,7 +49,7 @@ func (e *Env) Shell(ctx context.Context, commandLine string) (*ShellResponse, er } pid := startResp.GetProcessId() - outStream, err := e.client.process.StreamProcessOutputs(ctx, &ateenvv1.StreamProcessOutputsRequest{ + outStream, err := e.client.process.StreamProcessOutputs(ctx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: pid, Follow: true, }) @@ -67,9 +67,9 @@ func (e *Env) Shell(ctx context.Context, commandLine string) (*ShellResponse, er return nil, fromGRPCError(err) } switch chunk.GetSource() { - case ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT: + case ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT: stdoutBuf.Write(chunk.GetData()) - case ateenvv1.OutputSource_OUTPUT_SOURCE_STDERR: + case ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDERR: stderrBuf.Write(chunk.GetData()) } } @@ -77,13 +77,13 @@ func (e *Env) Shell(ctx context.Context, commandLine string) (*ShellResponse, er // Retrieve final process state / exit code var exitCode int for { - proc, err := e.client.process.GetProcess(ctx, &ateenvv1.GetProcessRequest{ + proc, err := e.client.process.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ ProcessId: pid, }) if err != nil { return nil, fromGRPCError(err) } - if proc.GetStatus() != ateenvv1.ProcessStatus_PROCESS_STATUS_RUNNING { + if proc.GetStatus() != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_RUNNING { exitCode = int(proc.GetExitCode()) break } @@ -105,7 +105,7 @@ func (e *Env) Shell(ctx context.Context, commandLine string) (*ShellResponse, er // The caller must close the returned reader. func (e *Env) ReadFile(ctx context.Context, p string) (io.ReadCloser, error) { ctx = e.withEnv(ctx) - stream, err := e.client.filesystem.ReadFile(ctx, &ateenvv1.ReadFileRequest{ + stream, err := e.client.filesystem.ReadFile(ctx, &ateenvv1alpha.ReadFileRequest{ Path: p, }) if err != nil { @@ -165,7 +165,7 @@ func (e *Env) WriteFile(ctx context.Context, p string, r io.Reader, mode fs.File return fmt.Errorf("env: reading data for %q: %w", p, readErr) } - firstReq := &ateenvv1.WriteFileRequest{ + firstReq := &ateenvv1alpha.WriteFileRequest{ Path: p, Mode: uint32(mode.Perm()), Chunk: buf[:n], @@ -178,7 +178,7 @@ func (e *Env) WriteFile(ctx context.Context, p string, r io.Reader, mode fs.File for { n, err := r.Read(buf) if n > 0 { - if sendErr := stream.Send(&ateenvv1.WriteFileRequest{Chunk: buf[:n]}); sendErr != nil { + if sendErr := stream.Send(&ateenvv1alpha.WriteFileRequest{Chunk: buf[:n]}); sendErr != nil { return fromGRPCError(sendErr) } } diff --git a/clients/python/README.md b/clients/python/README.md index 91b2f49..4aac688 100644 --- a/clients/python/README.md +++ b/clients/python/README.md @@ -32,14 +32,14 @@ plain gRPC (h2c). Behind that endpoint there are two distinct paths: ``` **Lifecycle path.** `Client.create/get/suspend/delete` call -`EnvironmentService` (defined in [`proto/ateenv/v1/env.proto`](../../proto/ateenv/v1/env.proto)). +`EnvironmentService` (defined in [`proto/ateenv/v1alpha/env.proto`](../../proto/ateenv/v1alpha/env.proto)). These RPCs terminate at `ate-env-api`, which translates them into Substrate control-plane operations: creating an actor from an ActorTemplate, reading its status, checkpointing it to a snapshot, deleting it. **Guest path.** Everything on an `Env` handle that executes *inside* the environment — processes and files — calls `ProcessService` and -`FileSystemService` (defined in [`proto/ateenv/v1/guest.proto`](../../proto/ateenv/v1/guest.proto)). +`FileSystemService` (defined in [`proto/ateenv/v1alpha/guest.proto`](../../proto/ateenv/v1alpha/guest.proto)). The client attaches `x-env-id` / `x-env-atespace` gRPC metadata to each of these calls; `ate-env-api` uses that metadata to dial the atenet router with the authority `..`, and the router carries @@ -305,7 +305,7 @@ python3 -m venv .venv ### Regenerating gRPC stubs Generated code under `src/ate_env/_gen/` is committed. After changing -`proto/ateenv/v1/*.proto`, regenerate from the repo root: +`proto/ateenv/v1alpha/*.proto`, regenerate from the repo root: ```bash ./clients/python/scripts/gen-protos.sh # or: make python-protos diff --git a/clients/python/scripts/gen-protos.sh b/clients/python/scripts/gen-protos.sh index 79ea5b9..9ab8d08 100755 --- a/clients/python/scripts/gen-protos.sh +++ b/clients/python/scripts/gen-protos.sh @@ -9,20 +9,20 @@ cd "${ROOT}" PYTHON="${PYTHON:-python3}" OUT_DIR="clients/python/src/ate_env/_gen" -# -I proto (not proto/ateenv/v1) so descriptors register under the -# collision-safe filenames ateenv/v1/{env,guest}.proto. +# -I proto (not proto/ateenv/v1alpha) so descriptors register under the +# collision-safe filenames ateenv/v1alpha/{env,guest}.proto. "${PYTHON}" -m grpc_tools.protoc \ -I proto \ --python_out="${OUT_DIR}" \ --pyi_out="${OUT_DIR}" \ --grpc_python_out="${OUT_DIR}" \ - proto/ateenv/v1/env.proto \ - proto/ateenv/v1/guest.proto + proto/ateenv/v1alpha/env.proto \ + proto/ateenv/v1alpha/guest.proto -# protoc emits `from ateenv.v1 import env_pb2 as ...` in *_pb2_grpc.py, which +# protoc emits `from ateenv.v1alpha import env_pb2 as ...` in *_pb2_grpc.py, which # does not resolve inside the _gen package; rewrite to relative imports. # sed -i with a backup suffix is the only form portable across GNU and BSD sed. -for f in "${OUT_DIR}"/ateenv/v1/*_pb2_grpc.py; do - sed -i.bak 's/^from ateenv\.v1 import \(.*\)$/from . import \1/' "${f}" +for f in "${OUT_DIR}"/ateenv/v1alpha/*_pb2_grpc.py; do + sed -i.bak 's/^from ateenv\.v1alpha import \(.*\)$/from . import \1/' "${f}" rm -f "${f}.bak" done diff --git a/clients/python/src/ate_env/_gen/ateenv/v1/__init__.py b/clients/python/src/ate_env/_gen/ateenv/v1/__init__.py deleted file mode 100644 index ea7f1c0..0000000 --- a/clients/python/src/ate_env/_gen/ateenv/v1/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Generated gRPC/protobuf stubs. Regenerate with clients/python/scripts/gen-protos.sh. diff --git a/clients/python/src/ate_env/_gen/ateenv/v1/env_pb2.py b/clients/python/src/ate_env/_gen/ateenv/v1/env_pb2.py deleted file mode 100644 index 774e57f..0000000 --- a/clients/python/src/ate_env/_gen/ateenv/v1/env_pb2.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: ateenv/v1/env.proto -# Protobuf Python Version: 4.25.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\x13\x61teenv/v1/env.proto\x12\tateenv.v1\"*\n\x08Template\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"\x80\x01\n\x0b\x45nvironment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\x12%\n\x08template\x18\x03 \x01(\x0b\x32\x13.ateenv.v1.Template\x12,\n\x06status\x18\x04 \x01(\x0e\x32\x1c.ateenv.v1.EnvironmentStatus\"_\n\x18\x43reateEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\x12%\n\x08template\x18\x03 \x01(\x0b\x32\x13.ateenv.v1.Template\"H\n\x19\x43reateEnvironmentResponse\x12+\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\x16.ateenv.v1.Environment\"5\n\x15GetEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"E\n\x16GetEnvironmentResponse\x12+\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\x16.ateenv.v1.Environment\"9\n\x19SuspendEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"\x1c\n\x1aSuspendEnvironmentResponse\"8\n\x18\x44\x65leteEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"\x1b\n\x19\x44\x65leteEnvironmentResponse*\xbd\x02\n\x11\x45nvironmentStatus\x12\"\n\x1e\x45NVIRONMENT_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45NVIRONMENT_STATUS_RESUMING\x10\x01\x12\x1e\n\x1a\x45NVIRONMENT_STATUS_RUNNING\x10\x02\x12!\n\x1d\x45NVIRONMENT_STATUS_SUSPENDING\x10\x03\x12 \n\x1c\x45NVIRONMENT_STATUS_SUSPENDED\x10\x04\x12\x1e\n\x1a\x45NVIRONMENT_STATUS_PAUSING\x10\x05\x12\x1d\n\x19\x45NVIRONMENT_STATUS_PAUSED\x10\x06\x12\x1e\n\x1a\x45NVIRONMENT_STATUS_CRASHED\x10\x07\x12\x1f\n\x1b\x45NVIRONMENT_STATUS_DELETING\x10\x08\x32\x8e\x03\n\x12\x45nvironmentService\x12^\n\x11\x43reateEnvironment\x12#.ateenv.v1.CreateEnvironmentRequest\x1a$.ateenv.v1.CreateEnvironmentResponse\x12U\n\x0eGetEnvironment\x12 .ateenv.v1.GetEnvironmentRequest\x1a!.ateenv.v1.GetEnvironmentResponse\x12\x61\n\x12SuspendEnvironment\x12$.ateenv.v1.SuspendEnvironmentRequest\x1a%.ateenv.v1.SuspendEnvironmentResponse\x12^\n\x11\x44\x65leteEnvironment\x12#.ateenv.v1.DeleteEnvironmentRequest\x1a$.ateenv.v1.DeleteEnvironmentResponseB9Z7github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1b\x06proto3') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ateenv.v1.env_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'Z7github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1' - _globals['_ENVIRONMENTSTATUS']._serialized_start=683 - _globals['_ENVIRONMENTSTATUS']._serialized_end=1000 - _globals['_TEMPLATE']._serialized_start=34 - _globals['_TEMPLATE']._serialized_end=76 - _globals['_ENVIRONMENT']._serialized_start=79 - _globals['_ENVIRONMENT']._serialized_end=207 - _globals['_CREATEENVIRONMENTREQUEST']._serialized_start=209 - _globals['_CREATEENVIRONMENTREQUEST']._serialized_end=304 - _globals['_CREATEENVIRONMENTRESPONSE']._serialized_start=306 - _globals['_CREATEENVIRONMENTRESPONSE']._serialized_end=378 - _globals['_GETENVIRONMENTREQUEST']._serialized_start=380 - _globals['_GETENVIRONMENTREQUEST']._serialized_end=433 - _globals['_GETENVIRONMENTRESPONSE']._serialized_start=435 - _globals['_GETENVIRONMENTRESPONSE']._serialized_end=504 - _globals['_SUSPENDENVIRONMENTREQUEST']._serialized_start=506 - _globals['_SUSPENDENVIRONMENTREQUEST']._serialized_end=563 - _globals['_SUSPENDENVIRONMENTRESPONSE']._serialized_start=565 - _globals['_SUSPENDENVIRONMENTRESPONSE']._serialized_end=593 - _globals['_DELETEENVIRONMENTREQUEST']._serialized_start=595 - _globals['_DELETEENVIRONMENTREQUEST']._serialized_end=651 - _globals['_DELETEENVIRONMENTRESPONSE']._serialized_start=653 - _globals['_DELETEENVIRONMENTRESPONSE']._serialized_end=680 - _globals['_ENVIRONMENTSERVICE']._serialized_start=1003 - _globals['_ENVIRONMENTSERVICE']._serialized_end=1401 -# @@protoc_insertion_point(module_scope) diff --git a/clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2.py b/clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2.py deleted file mode 100644 index a509a41..0000000 --- a/clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: ateenv/v1/guest.proto -# Protobuf Python Version: 4.25.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 google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x61teenv/v1/guest.proto\x12\tateenv.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x01\n\x07Process\x12\x12\n\nprocess_id\x18\x01 \x01(\t\x12(\n\x06status\x18\x02 \x01(\x0e\x32\x18.ateenv.v1.ProcessStatus\x12\x11\n\texit_code\x18\x03 \x01(\x05\x12.\n\nstarted_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x95\x01\n\x13StartProcessRequest\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x12\x0b\n\x03\x63wd\x18\x02 \x01(\t\x12\x34\n\x03\x65nv\x18\x03 \x03(\x0b\x32\'.ateenv.v1.StartProcessRequest.EnvEntry\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x14StartProcessResponse\x12\x12\n\nprocess_id\x18\x01 \x01(\t\"\'\n\x11GetProcessRequest\x12\x12\n\nprocess_id\x18\x01 \x01(\t\"o\n\x1bStreamProcessOutputsRequest\x12\x12\n\nprocess_id\x18\x01 \x01(\t\x12\x15\n\rstdout_offset\x18\x02 \x01(\x03\x12\x15\n\rstderr_offset\x18\x03 \x01(\x03\x12\x0e\n\x06\x66ollow\x18\x04 \x01(\x08\"D\n\x0bOutputChunk\x12\'\n\x06source\x18\x01 \x01(\x0e\x32\x17.ateenv.v1.OutputSource\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"(\n\x12KillProcessRequest\x12\x12\n\nprocess_id\x18\x01 \x01(\t\"(\n\x13KillProcessResponse\x12\x11\n\texit_code\x18\x01 \x01(\x05\"\x1f\n\x0fReadFileRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\"\x19\n\tFileChunk\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"=\n\x10WriteFileRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\r\n\x05\x63hunk\x18\x02 \x01(\x0c\x12\x0c\n\x04mode\x18\x03 \x01(\r\"*\n\x11WriteFileResponse\x12\x15\n\rbytes_written\x18\x01 \x01(\x03*\xa3\x01\n\rProcessStatus\x12\x1e\n\x1aPROCESS_STATUS_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROCESS_STATUS_RUNNING\x10\x01\x12\x1c\n\x18PROCESS_STATUS_COMPLETED\x10\x02\x12\x19\n\x15PROCESS_STATUS_FAILED\x10\x03\x12\x1d\n\x19PROCESS_STATUS_TERMINATED\x10\x04*a\n\x0cOutputSource\x12\x1d\n\x19OUTPUT_SOURCE_UNSPECIFIED\x10\x00\x12\x18\n\x14OUTPUT_SOURCE_STDOUT\x10\x01\x12\x18\n\x14OUTPUT_SOURCE_STDERR\x10\x02\x32\xc9\x02\n\x0eProcessService\x12O\n\x0cStartProcess\x12\x1e.ateenv.v1.StartProcessRequest\x1a\x1f.ateenv.v1.StartProcessResponse\x12>\n\nGetProcess\x12\x1c.ateenv.v1.GetProcessRequest\x1a\x12.ateenv.v1.Process\x12X\n\x14StreamProcessOutputs\x12&.ateenv.v1.StreamProcessOutputsRequest\x1a\x16.ateenv.v1.OutputChunk0\x01\x12L\n\x0bKillProcess\x12\x1d.ateenv.v1.KillProcessRequest\x1a\x1e.ateenv.v1.KillProcessResponse2\x9d\x01\n\x11\x46ileSystemService\x12>\n\x08ReadFile\x12\x1a.ateenv.v1.ReadFileRequest\x1a\x14.ateenv.v1.FileChunk0\x01\x12H\n\tWriteFile\x12\x1b.ateenv.v1.WriteFileRequest\x1a\x1c.ateenv.v1.WriteFileResponse(\x01\x42\x39Z7github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1b\x06proto3') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ateenv.v1.guest_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'Z7github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1' - _globals['_STARTPROCESSREQUEST_ENVENTRY']._options = None - _globals['_STARTPROCESSREQUEST_ENVENTRY']._serialized_options = b'8\001' - _globals['_PROCESSSTATUS']._serialized_start=931 - _globals['_PROCESSSTATUS']._serialized_end=1094 - _globals['_OUTPUTSOURCE']._serialized_start=1096 - _globals['_OUTPUTSOURCE']._serialized_end=1193 - _globals['_PROCESS']._serialized_start=70 - _globals['_PROCESS']._serialized_end=257 - _globals['_STARTPROCESSREQUEST']._serialized_start=260 - _globals['_STARTPROCESSREQUEST']._serialized_end=409 - _globals['_STARTPROCESSREQUEST_ENVENTRY']._serialized_start=367 - _globals['_STARTPROCESSREQUEST_ENVENTRY']._serialized_end=409 - _globals['_STARTPROCESSRESPONSE']._serialized_start=411 - _globals['_STARTPROCESSRESPONSE']._serialized_end=453 - _globals['_GETPROCESSREQUEST']._serialized_start=455 - _globals['_GETPROCESSREQUEST']._serialized_end=494 - _globals['_STREAMPROCESSOUTPUTSREQUEST']._serialized_start=496 - _globals['_STREAMPROCESSOUTPUTSREQUEST']._serialized_end=607 - _globals['_OUTPUTCHUNK']._serialized_start=609 - _globals['_OUTPUTCHUNK']._serialized_end=677 - _globals['_KILLPROCESSREQUEST']._serialized_start=679 - _globals['_KILLPROCESSREQUEST']._serialized_end=719 - _globals['_KILLPROCESSRESPONSE']._serialized_start=721 - _globals['_KILLPROCESSRESPONSE']._serialized_end=761 - _globals['_READFILEREQUEST']._serialized_start=763 - _globals['_READFILEREQUEST']._serialized_end=794 - _globals['_FILECHUNK']._serialized_start=796 - _globals['_FILECHUNK']._serialized_end=821 - _globals['_WRITEFILEREQUEST']._serialized_start=823 - _globals['_WRITEFILEREQUEST']._serialized_end=884 - _globals['_WRITEFILERESPONSE']._serialized_start=886 - _globals['_WRITEFILERESPONSE']._serialized_end=928 - _globals['_PROCESSSERVICE']._serialized_start=1196 - _globals['_PROCESSSERVICE']._serialized_end=1525 - _globals['_FILESYSTEMSERVICE']._serialized_start=1528 - _globals['_FILESYSTEMSERVICE']._serialized_end=1685 -# @@protoc_insertion_point(module_scope) diff --git a/clients/python/src/ate_env/_gen/ateenv/v1alpha/__init__.py b/clients/python/src/ate_env/_gen/ateenv/v1alpha/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2.py b/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2.py new file mode 100644 index 0000000..d97a655 --- /dev/null +++ b/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ateenv/v1alpha/env.proto +# Protobuf Python Version: 4.25.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\x18\x61teenv/v1alpha/env.proto\x12\x0e\x61teenv.v1alpha\"*\n\x08Template\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"\x8a\x01\n\x0b\x45nvironment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\x12*\n\x08template\x18\x03 \x01(\x0b\x32\x18.ateenv.v1alpha.Template\x12\x31\n\x06status\x18\x04 \x01(\x0e\x32!.ateenv.v1alpha.EnvironmentStatus\"d\n\x18\x43reateEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\x12*\n\x08template\x18\x03 \x01(\x0b\x32\x18.ateenv.v1alpha.Template\"M\n\x19\x43reateEnvironmentResponse\x12\x30\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\x1b.ateenv.v1alpha.Environment\"5\n\x15GetEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"J\n\x16GetEnvironmentResponse\x12\x30\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\x1b.ateenv.v1alpha.Environment\"9\n\x19SuspendEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"\x1c\n\x1aSuspendEnvironmentResponse\"8\n\x18\x44\x65leteEnvironmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61tespace\x18\x02 \x01(\t\"\x1b\n\x19\x44\x65leteEnvironmentResponse*\xbd\x02\n\x11\x45nvironmentStatus\x12\"\n\x1e\x45NVIRONMENT_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45NVIRONMENT_STATUS_RESUMING\x10\x01\x12\x1e\n\x1a\x45NVIRONMENT_STATUS_RUNNING\x10\x02\x12!\n\x1d\x45NVIRONMENT_STATUS_SUSPENDING\x10\x03\x12 \n\x1c\x45NVIRONMENT_STATUS_SUSPENDED\x10\x04\x12\x1e\n\x1a\x45NVIRONMENT_STATUS_PAUSING\x10\x05\x12\x1d\n\x19\x45NVIRONMENT_STATUS_PAUSED\x10\x06\x12\x1e\n\x1a\x45NVIRONMENT_STATUS_CRASHED\x10\x07\x12\x1f\n\x1b\x45NVIRONMENT_STATUS_DELETING\x10\x08\x32\xb6\x03\n\x12\x45nvironmentService\x12h\n\x11\x43reateEnvironment\x12(.ateenv.v1alpha.CreateEnvironmentRequest\x1a).ateenv.v1alpha.CreateEnvironmentResponse\x12_\n\x0eGetEnvironment\x12%.ateenv.v1alpha.GetEnvironmentRequest\x1a&.ateenv.v1alpha.GetEnvironmentResponse\x12k\n\x12SuspendEnvironment\x12).ateenv.v1alpha.SuspendEnvironmentRequest\x1a*.ateenv.v1alpha.SuspendEnvironmentResponse\x12h\n\x11\x44\x65leteEnvironment\x12(.ateenv.v1alpha.DeleteEnvironmentRequest\x1a).ateenv.v1alpha.DeleteEnvironmentResponseBCZAgithub.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alphab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ateenv.v1alpha.env_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'ZAgithub.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alpha' + _globals['_ENVIRONMENTSTATUS']._serialized_start=718 + _globals['_ENVIRONMENTSTATUS']._serialized_end=1035 + _globals['_TEMPLATE']._serialized_start=44 + _globals['_TEMPLATE']._serialized_end=86 + _globals['_ENVIRONMENT']._serialized_start=89 + _globals['_ENVIRONMENT']._serialized_end=227 + _globals['_CREATEENVIRONMENTREQUEST']._serialized_start=229 + _globals['_CREATEENVIRONMENTREQUEST']._serialized_end=329 + _globals['_CREATEENVIRONMENTRESPONSE']._serialized_start=331 + _globals['_CREATEENVIRONMENTRESPONSE']._serialized_end=408 + _globals['_GETENVIRONMENTREQUEST']._serialized_start=410 + _globals['_GETENVIRONMENTREQUEST']._serialized_end=463 + _globals['_GETENVIRONMENTRESPONSE']._serialized_start=465 + _globals['_GETENVIRONMENTRESPONSE']._serialized_end=539 + _globals['_SUSPENDENVIRONMENTREQUEST']._serialized_start=541 + _globals['_SUSPENDENVIRONMENTREQUEST']._serialized_end=598 + _globals['_SUSPENDENVIRONMENTRESPONSE']._serialized_start=600 + _globals['_SUSPENDENVIRONMENTRESPONSE']._serialized_end=628 + _globals['_DELETEENVIRONMENTREQUEST']._serialized_start=630 + _globals['_DELETEENVIRONMENTREQUEST']._serialized_end=686 + _globals['_DELETEENVIRONMENTRESPONSE']._serialized_start=688 + _globals['_DELETEENVIRONMENTRESPONSE']._serialized_end=715 + _globals['_ENVIRONMENTSERVICE']._serialized_start=1038 + _globals['_ENVIRONMENTSERVICE']._serialized_end=1476 +# @@protoc_insertion_point(module_scope) diff --git a/clients/python/src/ate_env/_gen/ateenv/v1/env_pb2.pyi b/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2.pyi similarity index 100% rename from clients/python/src/ate_env/_gen/ateenv/v1/env_pb2.pyi rename to clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2.pyi diff --git a/clients/python/src/ate_env/_gen/ateenv/v1/env_pb2_grpc.py b/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py similarity index 67% rename from clients/python/src/ate_env/_gen/ateenv/v1/env_pb2_grpc.py rename to clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py index ba84764..1fe5bd7 100644 --- a/clients/python/src/ate_env/_gen/ateenv/v1/env_pb2_grpc.py +++ b/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py @@ -2,7 +2,7 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import env_pb2 as ateenv_dot_v1_dot_env__pb2 +from . import env_pb2 as ateenv_dot_v1alpha_dot_env__pb2 class EnvironmentServiceStub(object): @@ -25,24 +25,24 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateEnvironment = channel.unary_unary( - '/ateenv.v1.EnvironmentService/CreateEnvironment', - request_serializer=ateenv_dot_v1_dot_env__pb2.CreateEnvironmentRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_env__pb2.CreateEnvironmentResponse.FromString, + '/ateenv.v1alpha.EnvironmentService/CreateEnvironment', + request_serializer=ateenv_dot_v1alpha_dot_env__pb2.CreateEnvironmentRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_env__pb2.CreateEnvironmentResponse.FromString, ) self.GetEnvironment = channel.unary_unary( - '/ateenv.v1.EnvironmentService/GetEnvironment', - request_serializer=ateenv_dot_v1_dot_env__pb2.GetEnvironmentRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_env__pb2.GetEnvironmentResponse.FromString, + '/ateenv.v1alpha.EnvironmentService/GetEnvironment', + request_serializer=ateenv_dot_v1alpha_dot_env__pb2.GetEnvironmentRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_env__pb2.GetEnvironmentResponse.FromString, ) self.SuspendEnvironment = channel.unary_unary( - '/ateenv.v1.EnvironmentService/SuspendEnvironment', - request_serializer=ateenv_dot_v1_dot_env__pb2.SuspendEnvironmentRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_env__pb2.SuspendEnvironmentResponse.FromString, + '/ateenv.v1alpha.EnvironmentService/SuspendEnvironment', + request_serializer=ateenv_dot_v1alpha_dot_env__pb2.SuspendEnvironmentRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_env__pb2.SuspendEnvironmentResponse.FromString, ) self.DeleteEnvironment = channel.unary_unary( - '/ateenv.v1.EnvironmentService/DeleteEnvironment', - request_serializer=ateenv_dot_v1_dot_env__pb2.DeleteEnvironmentRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_env__pb2.DeleteEnvironmentResponse.FromString, + '/ateenv.v1alpha.EnvironmentService/DeleteEnvironment', + request_serializer=ateenv_dot_v1alpha_dot_env__pb2.DeleteEnvironmentRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_env__pb2.DeleteEnvironmentResponse.FromString, ) @@ -92,27 +92,27 @@ def add_EnvironmentServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'CreateEnvironment': grpc.unary_unary_rpc_method_handler( servicer.CreateEnvironment, - request_deserializer=ateenv_dot_v1_dot_env__pb2.CreateEnvironmentRequest.FromString, - response_serializer=ateenv_dot_v1_dot_env__pb2.CreateEnvironmentResponse.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_env__pb2.CreateEnvironmentRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_env__pb2.CreateEnvironmentResponse.SerializeToString, ), 'GetEnvironment': grpc.unary_unary_rpc_method_handler( servicer.GetEnvironment, - request_deserializer=ateenv_dot_v1_dot_env__pb2.GetEnvironmentRequest.FromString, - response_serializer=ateenv_dot_v1_dot_env__pb2.GetEnvironmentResponse.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_env__pb2.GetEnvironmentRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_env__pb2.GetEnvironmentResponse.SerializeToString, ), 'SuspendEnvironment': grpc.unary_unary_rpc_method_handler( servicer.SuspendEnvironment, - request_deserializer=ateenv_dot_v1_dot_env__pb2.SuspendEnvironmentRequest.FromString, - response_serializer=ateenv_dot_v1_dot_env__pb2.SuspendEnvironmentResponse.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_env__pb2.SuspendEnvironmentRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_env__pb2.SuspendEnvironmentResponse.SerializeToString, ), 'DeleteEnvironment': grpc.unary_unary_rpc_method_handler( servicer.DeleteEnvironment, - request_deserializer=ateenv_dot_v1_dot_env__pb2.DeleteEnvironmentRequest.FromString, - response_serializer=ateenv_dot_v1_dot_env__pb2.DeleteEnvironmentResponse.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_env__pb2.DeleteEnvironmentRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_env__pb2.DeleteEnvironmentResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( - 'ateenv.v1.EnvironmentService', rpc_method_handlers) + 'ateenv.v1alpha.EnvironmentService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) @@ -141,9 +141,9 @@ def CreateEnvironment(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/ateenv.v1.EnvironmentService/CreateEnvironment', - ateenv_dot_v1_dot_env__pb2.CreateEnvironmentRequest.SerializeToString, - ateenv_dot_v1_dot_env__pb2.CreateEnvironmentResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/ateenv.v1alpha.EnvironmentService/CreateEnvironment', + ateenv_dot_v1alpha_dot_env__pb2.CreateEnvironmentRequest.SerializeToString, + ateenv_dot_v1alpha_dot_env__pb2.CreateEnvironmentResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -158,9 +158,9 @@ def GetEnvironment(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/ateenv.v1.EnvironmentService/GetEnvironment', - ateenv_dot_v1_dot_env__pb2.GetEnvironmentRequest.SerializeToString, - ateenv_dot_v1_dot_env__pb2.GetEnvironmentResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/ateenv.v1alpha.EnvironmentService/GetEnvironment', + ateenv_dot_v1alpha_dot_env__pb2.GetEnvironmentRequest.SerializeToString, + ateenv_dot_v1alpha_dot_env__pb2.GetEnvironmentResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -175,9 +175,9 @@ def SuspendEnvironment(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/ateenv.v1.EnvironmentService/SuspendEnvironment', - ateenv_dot_v1_dot_env__pb2.SuspendEnvironmentRequest.SerializeToString, - ateenv_dot_v1_dot_env__pb2.SuspendEnvironmentResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/ateenv.v1alpha.EnvironmentService/SuspendEnvironment', + ateenv_dot_v1alpha_dot_env__pb2.SuspendEnvironmentRequest.SerializeToString, + ateenv_dot_v1alpha_dot_env__pb2.SuspendEnvironmentResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -192,8 +192,8 @@ def DeleteEnvironment(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/ateenv.v1.EnvironmentService/DeleteEnvironment', - ateenv_dot_v1_dot_env__pb2.DeleteEnvironmentRequest.SerializeToString, - ateenv_dot_v1_dot_env__pb2.DeleteEnvironmentResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/ateenv.v1alpha.EnvironmentService/DeleteEnvironment', + ateenv_dot_v1alpha_dot_env__pb2.DeleteEnvironmentRequest.SerializeToString, + ateenv_dot_v1alpha_dot_env__pb2.DeleteEnvironmentResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2.py b/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2.py new file mode 100644 index 0000000..176ac4d --- /dev/null +++ b/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ateenv/v1alpha/guest.proto +# Protobuf Python Version: 4.25.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 google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x61teenv/v1alpha/guest.proto\x12\x0e\x61teenv.v1alpha\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc0\x01\n\x07Process\x12\x12\n\nprocess_id\x18\x01 \x01(\t\x12-\n\x06status\x18\x02 \x01(\x0e\x32\x1d.ateenv.v1alpha.ProcessStatus\x12\x11\n\texit_code\x18\x03 \x01(\x05\x12.\n\nstarted_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x13StartProcessRequest\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x12\x0b\n\x03\x63wd\x18\x02 \x01(\t\x12\x39\n\x03\x65nv\x18\x03 \x03(\x0b\x32,.ateenv.v1alpha.StartProcessRequest.EnvEntry\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x14StartProcessResponse\x12\x12\n\nprocess_id\x18\x01 \x01(\t\"\'\n\x11GetProcessRequest\x12\x12\n\nprocess_id\x18\x01 \x01(\t\"o\n\x1bStreamProcessOutputsRequest\x12\x12\n\nprocess_id\x18\x01 \x01(\t\x12\x15\n\rstdout_offset\x18\x02 \x01(\x03\x12\x15\n\rstderr_offset\x18\x03 \x01(\x03\x12\x0e\n\x06\x66ollow\x18\x04 \x01(\x08\"I\n\x0bOutputChunk\x12,\n\x06source\x18\x01 \x01(\x0e\x32\x1c.ateenv.v1alpha.OutputSource\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"(\n\x12KillProcessRequest\x12\x12\n\nprocess_id\x18\x01 \x01(\t\"(\n\x13KillProcessResponse\x12\x11\n\texit_code\x18\x01 \x01(\x05\"\x1f\n\x0fReadFileRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\"\x19\n\tFileChunk\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"=\n\x10WriteFileRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\r\n\x05\x63hunk\x18\x02 \x01(\x0c\x12\x0c\n\x04mode\x18\x03 \x01(\r\"*\n\x11WriteFileResponse\x12\x15\n\rbytes_written\x18\x01 \x01(\x03*\xa3\x01\n\rProcessStatus\x12\x1e\n\x1aPROCESS_STATUS_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROCESS_STATUS_RUNNING\x10\x01\x12\x1c\n\x18PROCESS_STATUS_COMPLETED\x10\x02\x12\x19\n\x15PROCESS_STATUS_FAILED\x10\x03\x12\x1d\n\x19PROCESS_STATUS_TERMINATED\x10\x04*a\n\x0cOutputSource\x12\x1d\n\x19OUTPUT_SOURCE_UNSPECIFIED\x10\x00\x12\x18\n\x14OUTPUT_SOURCE_STDOUT\x10\x01\x12\x18\n\x14OUTPUT_SOURCE_STDERR\x10\x02\x32\xf1\x02\n\x0eProcessService\x12Y\n\x0cStartProcess\x12#.ateenv.v1alpha.StartProcessRequest\x1a$.ateenv.v1alpha.StartProcessResponse\x12H\n\nGetProcess\x12!.ateenv.v1alpha.GetProcessRequest\x1a\x17.ateenv.v1alpha.Process\x12\x62\n\x14StreamProcessOutputs\x12+.ateenv.v1alpha.StreamProcessOutputsRequest\x1a\x1b.ateenv.v1alpha.OutputChunk0\x01\x12V\n\x0bKillProcess\x12\".ateenv.v1alpha.KillProcessRequest\x1a#.ateenv.v1alpha.KillProcessResponse2\xb1\x01\n\x11\x46ileSystemService\x12H\n\x08ReadFile\x12\x1f.ateenv.v1alpha.ReadFileRequest\x1a\x19.ateenv.v1alpha.FileChunk0\x01\x12R\n\tWriteFile\x12 .ateenv.v1alpha.WriteFileRequest\x1a!.ateenv.v1alpha.WriteFileResponse(\x01\x42\x43ZAgithub.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alphab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ateenv.v1alpha.guest_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'ZAgithub.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alpha' + _globals['_STARTPROCESSREQUEST_ENVENTRY']._options = None + _globals['_STARTPROCESSREQUEST_ENVENTRY']._serialized_options = b'8\001' + _globals['_PROCESSSTATUS']._serialized_start=956 + _globals['_PROCESSSTATUS']._serialized_end=1119 + _globals['_OUTPUTSOURCE']._serialized_start=1121 + _globals['_OUTPUTSOURCE']._serialized_end=1218 + _globals['_PROCESS']._serialized_start=80 + _globals['_PROCESS']._serialized_end=272 + _globals['_STARTPROCESSREQUEST']._serialized_start=275 + _globals['_STARTPROCESSREQUEST']._serialized_end=429 + _globals['_STARTPROCESSREQUEST_ENVENTRY']._serialized_start=387 + _globals['_STARTPROCESSREQUEST_ENVENTRY']._serialized_end=429 + _globals['_STARTPROCESSRESPONSE']._serialized_start=431 + _globals['_STARTPROCESSRESPONSE']._serialized_end=473 + _globals['_GETPROCESSREQUEST']._serialized_start=475 + _globals['_GETPROCESSREQUEST']._serialized_end=514 + _globals['_STREAMPROCESSOUTPUTSREQUEST']._serialized_start=516 + _globals['_STREAMPROCESSOUTPUTSREQUEST']._serialized_end=627 + _globals['_OUTPUTCHUNK']._serialized_start=629 + _globals['_OUTPUTCHUNK']._serialized_end=702 + _globals['_KILLPROCESSREQUEST']._serialized_start=704 + _globals['_KILLPROCESSREQUEST']._serialized_end=744 + _globals['_KILLPROCESSRESPONSE']._serialized_start=746 + _globals['_KILLPROCESSRESPONSE']._serialized_end=786 + _globals['_READFILEREQUEST']._serialized_start=788 + _globals['_READFILEREQUEST']._serialized_end=819 + _globals['_FILECHUNK']._serialized_start=821 + _globals['_FILECHUNK']._serialized_end=846 + _globals['_WRITEFILEREQUEST']._serialized_start=848 + _globals['_WRITEFILEREQUEST']._serialized_end=909 + _globals['_WRITEFILERESPONSE']._serialized_start=911 + _globals['_WRITEFILERESPONSE']._serialized_end=953 + _globals['_PROCESSSERVICE']._serialized_start=1221 + _globals['_PROCESSSERVICE']._serialized_end=1590 + _globals['_FILESYSTEMSERVICE']._serialized_start=1593 + _globals['_FILESYSTEMSERVICE']._serialized_end=1770 +# @@protoc_insertion_point(module_scope) diff --git a/clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2.pyi b/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2.pyi similarity index 100% rename from clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2.pyi rename to clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2.pyi diff --git a/clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2_grpc.py b/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py similarity index 66% rename from clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2_grpc.py rename to clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py index 383ff37..0d8379f 100644 --- a/clients/python/src/ate_env/_gen/ateenv/v1/guest_pb2_grpc.py +++ b/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py @@ -2,7 +2,7 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import guest_pb2 as ateenv_dot_v1_dot_guest__pb2 +from . import guest_pb2 as ateenv_dot_v1alpha_dot_guest__pb2 class ProcessServiceStub(object): @@ -21,24 +21,24 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.StartProcess = channel.unary_unary( - '/ateenv.v1.ProcessService/StartProcess', - request_serializer=ateenv_dot_v1_dot_guest__pb2.StartProcessRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_guest__pb2.StartProcessResponse.FromString, + '/ateenv.v1alpha.ProcessService/StartProcess', + request_serializer=ateenv_dot_v1alpha_dot_guest__pb2.StartProcessRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.StartProcessResponse.FromString, ) self.GetProcess = channel.unary_unary( - '/ateenv.v1.ProcessService/GetProcess', - request_serializer=ateenv_dot_v1_dot_guest__pb2.GetProcessRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_guest__pb2.Process.FromString, + '/ateenv.v1alpha.ProcessService/GetProcess', + request_serializer=ateenv_dot_v1alpha_dot_guest__pb2.GetProcessRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.Process.FromString, ) self.StreamProcessOutputs = channel.unary_stream( - '/ateenv.v1.ProcessService/StreamProcessOutputs', - request_serializer=ateenv_dot_v1_dot_guest__pb2.StreamProcessOutputsRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_guest__pb2.OutputChunk.FromString, + '/ateenv.v1alpha.ProcessService/StreamProcessOutputs', + request_serializer=ateenv_dot_v1alpha_dot_guest__pb2.StreamProcessOutputsRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.OutputChunk.FromString, ) self.KillProcess = channel.unary_unary( - '/ateenv.v1.ProcessService/KillProcess', - request_serializer=ateenv_dot_v1_dot_guest__pb2.KillProcessRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_guest__pb2.KillProcessResponse.FromString, + '/ateenv.v1alpha.ProcessService/KillProcess', + request_serializer=ateenv_dot_v1alpha_dot_guest__pb2.KillProcessRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.KillProcessResponse.FromString, ) @@ -85,27 +85,27 @@ def add_ProcessServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'StartProcess': grpc.unary_unary_rpc_method_handler( servicer.StartProcess, - request_deserializer=ateenv_dot_v1_dot_guest__pb2.StartProcessRequest.FromString, - response_serializer=ateenv_dot_v1_dot_guest__pb2.StartProcessResponse.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.StartProcessRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_guest__pb2.StartProcessResponse.SerializeToString, ), 'GetProcess': grpc.unary_unary_rpc_method_handler( servicer.GetProcess, - request_deserializer=ateenv_dot_v1_dot_guest__pb2.GetProcessRequest.FromString, - response_serializer=ateenv_dot_v1_dot_guest__pb2.Process.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.GetProcessRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_guest__pb2.Process.SerializeToString, ), 'StreamProcessOutputs': grpc.unary_stream_rpc_method_handler( servicer.StreamProcessOutputs, - request_deserializer=ateenv_dot_v1_dot_guest__pb2.StreamProcessOutputsRequest.FromString, - response_serializer=ateenv_dot_v1_dot_guest__pb2.OutputChunk.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.StreamProcessOutputsRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_guest__pb2.OutputChunk.SerializeToString, ), 'KillProcess': grpc.unary_unary_rpc_method_handler( servicer.KillProcess, - request_deserializer=ateenv_dot_v1_dot_guest__pb2.KillProcessRequest.FromString, - response_serializer=ateenv_dot_v1_dot_guest__pb2.KillProcessResponse.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.KillProcessRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_guest__pb2.KillProcessResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( - 'ateenv.v1.ProcessService', rpc_method_handlers) + 'ateenv.v1alpha.ProcessService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) @@ -130,9 +130,9 @@ def StartProcess(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/ateenv.v1.ProcessService/StartProcess', - ateenv_dot_v1_dot_guest__pb2.StartProcessRequest.SerializeToString, - ateenv_dot_v1_dot_guest__pb2.StartProcessResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/ateenv.v1alpha.ProcessService/StartProcess', + ateenv_dot_v1alpha_dot_guest__pb2.StartProcessRequest.SerializeToString, + ateenv_dot_v1alpha_dot_guest__pb2.StartProcessResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -147,9 +147,9 @@ def GetProcess(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/ateenv.v1.ProcessService/GetProcess', - ateenv_dot_v1_dot_guest__pb2.GetProcessRequest.SerializeToString, - ateenv_dot_v1_dot_guest__pb2.Process.FromString, + return grpc.experimental.unary_unary(request, target, '/ateenv.v1alpha.ProcessService/GetProcess', + ateenv_dot_v1alpha_dot_guest__pb2.GetProcessRequest.SerializeToString, + ateenv_dot_v1alpha_dot_guest__pb2.Process.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -164,9 +164,9 @@ def StreamProcessOutputs(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_stream(request, target, '/ateenv.v1.ProcessService/StreamProcessOutputs', - ateenv_dot_v1_dot_guest__pb2.StreamProcessOutputsRequest.SerializeToString, - ateenv_dot_v1_dot_guest__pb2.OutputChunk.FromString, + return grpc.experimental.unary_stream(request, target, '/ateenv.v1alpha.ProcessService/StreamProcessOutputs', + ateenv_dot_v1alpha_dot_guest__pb2.StreamProcessOutputsRequest.SerializeToString, + ateenv_dot_v1alpha_dot_guest__pb2.OutputChunk.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -181,9 +181,9 @@ def KillProcess(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/ateenv.v1.ProcessService/KillProcess', - ateenv_dot_v1_dot_guest__pb2.KillProcessRequest.SerializeToString, - ateenv_dot_v1_dot_guest__pb2.KillProcessResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/ateenv.v1alpha.ProcessService/KillProcess', + ateenv_dot_v1alpha_dot_guest__pb2.KillProcessRequest.SerializeToString, + ateenv_dot_v1alpha_dot_guest__pb2.KillProcessResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -200,14 +200,14 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.ReadFile = channel.unary_stream( - '/ateenv.v1.FileSystemService/ReadFile', - request_serializer=ateenv_dot_v1_dot_guest__pb2.ReadFileRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_guest__pb2.FileChunk.FromString, + '/ateenv.v1alpha.FileSystemService/ReadFile', + request_serializer=ateenv_dot_v1alpha_dot_guest__pb2.ReadFileRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.FileChunk.FromString, ) self.WriteFile = channel.stream_unary( - '/ateenv.v1.FileSystemService/WriteFile', - request_serializer=ateenv_dot_v1_dot_guest__pb2.WriteFileRequest.SerializeToString, - response_deserializer=ateenv_dot_v1_dot_guest__pb2.WriteFileResponse.FromString, + '/ateenv.v1alpha.FileSystemService/WriteFile', + request_serializer=ateenv_dot_v1alpha_dot_guest__pb2.WriteFileRequest.SerializeToString, + response_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.WriteFileResponse.FromString, ) @@ -235,17 +235,17 @@ def add_FileSystemServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'ReadFile': grpc.unary_stream_rpc_method_handler( servicer.ReadFile, - request_deserializer=ateenv_dot_v1_dot_guest__pb2.ReadFileRequest.FromString, - response_serializer=ateenv_dot_v1_dot_guest__pb2.FileChunk.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.ReadFileRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_guest__pb2.FileChunk.SerializeToString, ), 'WriteFile': grpc.stream_unary_rpc_method_handler( servicer.WriteFile, - request_deserializer=ateenv_dot_v1_dot_guest__pb2.WriteFileRequest.FromString, - response_serializer=ateenv_dot_v1_dot_guest__pb2.WriteFileResponse.SerializeToString, + request_deserializer=ateenv_dot_v1alpha_dot_guest__pb2.WriteFileRequest.FromString, + response_serializer=ateenv_dot_v1alpha_dot_guest__pb2.WriteFileResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( - 'ateenv.v1.FileSystemService', rpc_method_handlers) + 'ateenv.v1alpha.FileSystemService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) @@ -266,9 +266,9 @@ def ReadFile(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_stream(request, target, '/ateenv.v1.FileSystemService/ReadFile', - ateenv_dot_v1_dot_guest__pb2.ReadFileRequest.SerializeToString, - ateenv_dot_v1_dot_guest__pb2.FileChunk.FromString, + return grpc.experimental.unary_stream(request, target, '/ateenv.v1alpha.FileSystemService/ReadFile', + ateenv_dot_v1alpha_dot_guest__pb2.ReadFileRequest.SerializeToString, + ateenv_dot_v1alpha_dot_guest__pb2.FileChunk.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -283,8 +283,8 @@ def WriteFile(request_iterator, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.stream_unary(request_iterator, target, '/ateenv.v1.FileSystemService/WriteFile', - ateenv_dot_v1_dot_guest__pb2.WriteFileRequest.SerializeToString, - ateenv_dot_v1_dot_guest__pb2.WriteFileResponse.FromString, + return grpc.experimental.stream_unary(request_iterator, target, '/ateenv.v1alpha.FileSystemService/WriteFile', + ateenv_dot_v1alpha_dot_guest__pb2.WriteFileRequest.SerializeToString, + ateenv_dot_v1alpha_dot_guest__pb2.WriteFileResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/clients/python/src/ate_env/client.py b/clients/python/src/ate_env/client.py index 5ba0b6c..19b98c5 100644 --- a/clients/python/src/ate_env/client.py +++ b/clients/python/src/ate_env/client.py @@ -5,7 +5,7 @@ import grpc import grpc.aio -from ._gen.ateenv.v1 import env_pb2, env_pb2_grpc, guest_pb2_grpc +from ._gen.ateenv.v1alpha import env_pb2, env_pb2_grpc, guest_pb2_grpc from .env import Env from .errors import map_rpc_error from .types import EnvironmentInfo, _environment_info_from_pb diff --git a/clients/python/src/ate_env/env.py b/clients/python/src/ate_env/env.py index b12ea41..ad9b396 100644 --- a/clients/python/src/ate_env/env.py +++ b/clients/python/src/ate_env/env.py @@ -8,7 +8,7 @@ import grpc -from ._gen.ateenv.v1 import guest_pb2 +from ._gen.ateenv.v1alpha import guest_pb2 from .errors import map_rpc_error from .types import ( EnvironmentInfo, diff --git a/clients/python/src/ate_env/types.py b/clients/python/src/ate_env/types.py index f9721de..e88629a 100644 --- a/clients/python/src/ate_env/types.py +++ b/clients/python/src/ate_env/types.py @@ -1,4 +1,4 @@ -"""Public dataclasses and enums mirroring the ateenv.v1 proto types. +"""Public dataclasses and enums mirroring the ateenv.v1alpha proto types. Generated protobuf classes stay out of the public API; the raw stubs remain reachable under ate_env._gen for callers that need them. @@ -10,7 +10,7 @@ from dataclasses import dataclass from datetime import datetime, timezone -from ._gen.ateenv.v1 import env_pb2, guest_pb2 +from ._gen.ateenv.v1alpha import env_pb2, guest_pb2 __all__ = [ "EnvironmentStatus", @@ -25,7 +25,7 @@ class EnvironmentStatus(enum.IntEnum): - """Lifecycle status of an environment (ateenv.v1.EnvironmentStatus).""" + """Lifecycle status of an environment (ateenv.v1alpha.EnvironmentStatus).""" UNSPECIFIED = 0 RESUMING = 1 @@ -39,7 +39,7 @@ class EnvironmentStatus(enum.IntEnum): class ProcessStatus(enum.IntEnum): - """Execution status of an asynchronous process (ateenv.v1.ProcessStatus).""" + """Execution status of an asynchronous process (ateenv.v1alpha.ProcessStatus).""" UNSPECIFIED = 0 RUNNING = 1 @@ -49,7 +49,7 @@ class ProcessStatus(enum.IntEnum): class OutputSource(enum.IntEnum): - """Output log stream source (ateenv.v1.OutputSource).""" + """Output log stream source (ateenv.v1alpha.OutputSource).""" UNSPECIFIED = 0 STDOUT = 1 diff --git a/clients/python/tests/conftest.py b/clients/python/tests/conftest.py index aa2efa9..e8bddc1 100644 --- a/clients/python/tests/conftest.py +++ b/clients/python/tests/conftest.py @@ -6,7 +6,7 @@ import pytest from ate_env import Client -from ate_env._gen.ateenv.v1 import env_pb2_grpc, guest_pb2_grpc +from ate_env._gen.ateenv.v1alpha import env_pb2_grpc, guest_pb2_grpc from .fakes import FakeEnvironmentService, FakeFileSystemService, FakeProcessService diff --git a/clients/python/tests/fakes.py b/clients/python/tests/fakes.py index 0b4a1c1..cf5bcba 100644 --- a/clients/python/tests/fakes.py +++ b/clients/python/tests/fakes.py @@ -11,7 +11,7 @@ import grpc -from ate_env._gen.ateenv.v1 import env_pb2, env_pb2_grpc, guest_pb2, guest_pb2_grpc +from ate_env._gen.ateenv.v1alpha import env_pb2, env_pb2_grpc, guest_pb2, guest_pb2_grpc CHUNK_SIZE = 64 * 1024 diff --git a/clients/python/tests/test_client.py b/clients/python/tests/test_client.py index 92f2141..19d23af 100644 --- a/clients/python/tests/test_client.py +++ b/clients/python/tests/test_client.py @@ -4,7 +4,7 @@ import pytest from ate_env import Client, EnvironmentStatus, InvalidArgumentError, NotFoundError, RpcError -from ate_env._gen.ateenv.v1 import env_pb2 +from ate_env._gen.ateenv.v1alpha import env_pb2 from ate_env.client import _normalize_target diff --git a/clients/python/tests/test_env_process.py b/clients/python/tests/test_env_process.py index a15d7ad..4de1135 100644 --- a/clients/python/tests/test_env_process.py +++ b/clients/python/tests/test_env_process.py @@ -11,7 +11,7 @@ ProcessStatus, ShellResult, ) -from ate_env._gen.ateenv.v1 import guest_pb2 +from ate_env._gen.ateenv.v1alpha import guest_pb2 from .fakes import FakeProc diff --git a/clients/python/tests/test_types.py b/clients/python/tests/test_types.py index f857ccf..109e1f8 100644 --- a/clients/python/tests/test_types.py +++ b/clients/python/tests/test_types.py @@ -3,7 +3,7 @@ from datetime import datetime, timezone from ate_env import EnvironmentStatus, OutputSource, ProcessStatus -from ate_env._gen.ateenv.v1 import env_pb2, guest_pb2 +from ate_env._gen.ateenv.v1alpha import env_pb2, guest_pb2 from ate_env.types import _environment_info_from_pb, _process_info_from_pb diff --git a/cmd/ate-env-api/main.go b/cmd/ate-env-api/main.go index c0d92fd..64cabf5 100644 --- a/cmd/ate-env-api/main.go +++ b/cmd/ate-env-api/main.go @@ -14,7 +14,7 @@ import ( "github.com/agent-substrate/env/internal/apiservice" "github.com/agent-substrate/env/internal/ate" "github.com/agent-substrate/env/internal/mcp" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc" ) @@ -45,9 +45,9 @@ func main() { defer apisvc.Close() grpcServer := grpc.NewServer() - ateenvv1.RegisterEnvironmentServiceServer(grpcServer, apisvc) - ateenvv1.RegisterProcessServiceServer(grpcServer, apisvc) - ateenvv1.RegisterFileSystemServiceServer(grpcServer, apisvc) + ateenvv1alpha.RegisterEnvironmentServiceServer(grpcServer, apisvc) + ateenvv1alpha.RegisterProcessServiceServer(grpcServer, apisvc) + ateenvv1alpha.RegisterFileSystemServiceServer(grpcServer, apisvc) mux := http.NewServeMux() mux.HandleFunc("GET /healthz", func(w http.ResponseWriter, r *http.Request) { diff --git a/cmd/ate-env-guest/main_test.go b/cmd/ate-env-guest/main_test.go index 335ed5d..aba8c1e 100644 --- a/cmd/ate-env-guest/main_test.go +++ b/cmd/ate-env-guest/main_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/agent-substrate/env/guest" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) @@ -84,13 +84,13 @@ func TestServerHealthzAndGRPC(t *testing.T) { } defer conn.Close() - fsClient := ateenvv1.NewFileSystemServiceClient(conn) + fsClient := ateenvv1alpha.NewFileSystemServiceClient(conn) testFile := filepath.Join(tempDir, "hello.txt") writeStream, err := fsClient.WriteFile(ctx) if err != nil { t.Fatalf("WriteFile failed: %v", err) } - if err := writeStream.Send(&ateenvv1.WriteFileRequest{ + if err := writeStream.Send(&ateenvv1alpha.WriteFileRequest{ Path: testFile, Chunk: []byte("hello world"), }); err != nil { diff --git a/cmd/ate-env/main.go b/cmd/ate-env/main.go index aa11be9..c7a761f 100644 --- a/cmd/ate-env/main.go +++ b/cmd/ate-env/main.go @@ -13,7 +13,7 @@ import ( "strings" "github.com/agent-substrate/env/clients/go" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "github.com/spf13/cobra" ) @@ -120,7 +120,7 @@ func newCreateCommand() *cobra.Command { } defer client.Close() - req := &ateenvv1.CreateEnvironmentRequest{ + req := &ateenvv1alpha.CreateEnvironmentRequest{ Id: args[0], Atespace: atespace, } @@ -129,7 +129,7 @@ func newCreateCommand() *cobra.Command { if tmplAtespace == "" { tmplAtespace = atespace } - req.Template = &ateenvv1.Template{ + req.Template = &ateenvv1alpha.Template{ Name: createTemplate, Atespace: tmplAtespace, } diff --git a/examples/guest-daemon/README.md b/examples/guest-daemon/README.md index 002aa7d..7f38f46 100644 --- a/examples/guest-daemon/README.md +++ b/examples/guest-daemon/README.md @@ -79,37 +79,37 @@ export PATH=$PATH:$(go env GOPATH)/bin ### Start a Background Command ```bash grpcurl -plaintext -d '{"command": ["echo", "Hello Substrate!"]}' \ - localhost:8080 ateenv.v1.ProcessService/StartProcess + localhost:8080 ateenv.v1alpha.ProcessService/StartProcess ``` ### Inspect Process Status ```bash grpcurl -plaintext -d '{"process_id": ""}' \ - localhost:8080 ateenv.v1.ProcessService/GetProcess + localhost:8080 ateenv.v1alpha.ProcessService/GetProcess ``` ### Stream Real-Time Output ```bash grpcurl -plaintext -d '{"process_id": "", "follow": true}' \ - localhost:8080 ateenv.v1.ProcessService/StreamProcessOutputs + localhost:8080 ateenv.v1alpha.ProcessService/StreamProcessOutputs ``` ### Terminate a Process ```bash grpcurl -plaintext -d '{"process_id": ""}' \ - localhost:8080 ateenv.v1.ProcessService/KillProcess + localhost:8080 ateenv.v1alpha.ProcessService/KillProcess ``` ### Write a File (Streamed) ```bash echo '{"path": "hello.txt", "chunk": "SGVsbG8gU3Vic3RyYXRlIQo=", "mode": 420}' | \ - grpcurl -plaintext -d @ localhost:8080 ateenv.v1.FileSystemService/WriteFile + grpcurl -plaintext -d @ localhost:8080 ateenv.v1alpha.FileSystemService/WriteFile ``` ### Read a File (Streamed) ```bash grpcurl -plaintext -d '{"path": "hello.txt"}' \ - localhost:8080 ateenv.v1.FileSystemService/ReadFile + localhost:8080 ateenv.v1alpha.FileSystemService/ReadFile ``` --- diff --git a/examples/guest-daemon/main_test.go b/examples/guest-daemon/main_test.go index ed2b862..b3325b3 100644 --- a/examples/guest-daemon/main_test.go +++ b/examples/guest-daemon/main_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/agent-substrate/env/guest" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/test/bufconn" @@ -50,8 +50,8 @@ func TestGuestDaemonIntegration(t *testing.T) { } defer conn.Close() - procClient := ateenvv1.NewProcessServiceClient(conn) - fsClient := ateenvv1.NewFileSystemServiceClient(conn) + procClient := ateenvv1alpha.NewProcessServiceClient(conn) + fsClient := ateenvv1alpha.NewFileSystemServiceClient(conn) // 1. Write a Python script to disk using FileSystemService scriptPath := filepath.Join(tempDir, "test_job.py") @@ -65,7 +65,7 @@ sys.stderr.write("Job stderr log\n") if err != nil { t.Fatalf("WriteFile failed: %v", err) } - err = writeStream.Send(&ateenvv1.WriteFileRequest{ + err = writeStream.Send(&ateenvv1alpha.WriteFileRequest{ Path: scriptPath, Chunk: scriptContent, Mode: 0755, @@ -82,7 +82,7 @@ sys.stderr.write("Job stderr log\n") } // 2. Start execution using ProcessService - startRes, err := procClient.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := procClient.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"python3", scriptPath}, Cwd: tempDir, }) @@ -91,7 +91,7 @@ sys.stderr.write("Job stderr log\n") } // 3. Stream real-time output - outStream, err := procClient.StreamProcessOutputs(ctx, &ateenvv1.StreamProcessOutputsRequest{ + outStream, err := procClient.StreamProcessOutputs(ctx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: startRes.ProcessId, Follow: true, }) @@ -109,9 +109,9 @@ sys.stderr.write("Job stderr log\n") if err != nil { t.Fatalf("error reading output chunk: %v", err) } - if chunk.Source == ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT { + if chunk.Source == ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT { stdout.Write(chunk.Data) - } else if chunk.Source == ateenvv1.OutputSource_OUTPUT_SOURCE_STDERR { + } else if chunk.Source == ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDERR { stderr.Write(chunk.Data) } } @@ -124,13 +124,13 @@ sys.stderr.write("Job stderr log\n") } // 4. Verify Process metadata - proc, err := procClient.GetProcess(ctx, &ateenvv1.GetProcessRequest{ + proc, err := procClient.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ ProcessId: startRes.ProcessId, }) if err != nil { t.Fatalf("GetProcess failed: %v", err) } - if proc.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_COMPLETED { + if proc.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_COMPLETED { t.Fatalf("expected status COMPLETED, got %v", proc.Status) } if proc.ExitCode != 0 { diff --git a/examples/mcp/main.go b/examples/mcp/main.go index 7a09aa4..1ea20d7 100644 --- a/examples/mcp/main.go +++ b/examples/mcp/main.go @@ -13,7 +13,7 @@ import ( "log" "github.com/agent-substrate/env/clients/go" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "github.com/modelcontextprotocol/go-sdk/mcp" ) @@ -29,7 +29,7 @@ func main() { } defer c.Close() - e, err := c.Create(ctx, &ateenvv1.CreateEnvironmentRequest{Id: "mcp-demo"}) + e, err := c.Create(ctx, &ateenvv1alpha.CreateEnvironmentRequest{Id: "mcp-demo"}) if err != nil { log.Fatalf("creating environment: %v", err) } diff --git a/guest/filesystem/service.go b/guest/filesystem/service.go index 8cf94e3..46feeb0 100644 --- a/guest/filesystem/service.go +++ b/guest/filesystem/service.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -40,10 +40,10 @@ func DefaultConfig() Config { } } -// Service implements ateenvv1.FileSystemServiceServer. +// Service implements ateenvv1alpha.FileSystemServiceServer. // It provides in-actor chunked file transfer and manipulation for cmd/ate-env-guest. type Service struct { - ateenvv1.UnimplementedFileSystemServiceServer + ateenvv1alpha.UnimplementedFileSystemServiceServer rootDir string readBufferSize int } @@ -99,7 +99,7 @@ func (s *Service) resolveAndValidatePath(reqPath string) (string, error) { } // ReadFile streams the contents of a file in chunks to prevent memory bloat/OOM. -func (s *Service) ReadFile(req *ateenvv1.ReadFileRequest, stream ateenvv1.FileSystemService_ReadFileServer) error { +func (s *Service) ReadFile(req *ateenvv1alpha.ReadFileRequest, stream ateenvv1alpha.FileSystemService_ReadFileServer) error { filePath, err := s.resolveAndValidatePath(req.GetPath()) if err != nil { return err @@ -121,7 +121,7 @@ func (s *Service) ReadFile(req *ateenvv1.ReadFileRequest, stream ateenvv1.FileSy for { n, readErr := f.Read(buf) if n > 0 { - if err := stream.Send(&ateenvv1.FileChunk{ + if err := stream.Send(&ateenvv1alpha.FileChunk{ Data: buf[:n], }); err != nil { return err @@ -139,7 +139,7 @@ func (s *Service) ReadFile(req *ateenvv1.ReadFileRequest, stream ateenvv1.FileSy } // WriteFile streams file chunks directly to disk with constant O(1) memory. -func (s *Service) WriteFile(stream ateenvv1.FileSystemService_WriteFileServer) error { +func (s *Service) WriteFile(stream ateenvv1alpha.FileSystemService_WriteFileServer) error { var f *os.File var totalBytes int64 var filePath string @@ -163,7 +163,7 @@ func (s *Service) WriteFile(stream ateenvv1.FileSystemService_WriteFileServer) e return status.Errorf(codes.Internal, "failed to close file %q: %v", reqPath, err) } f = nil - return stream.SendAndClose(&ateenvv1.WriteFileResponse{ + return stream.SendAndClose(&ateenvv1alpha.WriteFileResponse{ BytesWritten: totalBytes, }) } diff --git a/guest/filesystem/service_test.go b/guest/filesystem/service_test.go index 57c2489..98ea044 100644 --- a/guest/filesystem/service_test.go +++ b/guest/filesystem/service_test.go @@ -10,7 +10,7 @@ import ( "path/filepath" "testing" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" @@ -18,7 +18,7 @@ import ( "google.golang.org/grpc/test/bufconn" ) -func setupTestFileSystemServer(t *testing.T, configs ...Config) (ateenvv1.FileSystemServiceClient, func()) { +func setupTestFileSystemServer(t *testing.T, configs ...Config) (ateenvv1alpha.FileSystemServiceClient, func()) { t.Helper() cfg := Config{ @@ -32,7 +32,7 @@ func setupTestFileSystemServer(t *testing.T, configs ...Config) (ateenvv1.FileSy lis := bufconn.Listen(1024 * 1024) server := grpc.NewServer() svc := NewService(cfg) - ateenvv1.RegisterFileSystemServiceServer(server, svc) + ateenvv1alpha.RegisterFileSystemServiceServer(server, svc) go func() { _ = server.Serve(lis) @@ -48,7 +48,7 @@ func setupTestFileSystemServer(t *testing.T, configs ...Config) (ateenvv1.FileSy t.Fatalf("failed to dial bufnet: %v", err) } - client := ateenvv1.NewFileSystemServiceClient(conn) + client := ateenvv1alpha.NewFileSystemServiceClient(conn) cleanup := func() { conn.Close() @@ -74,7 +74,7 @@ func TestWriteAndReadFileSmall(t *testing.T) { t.Fatalf("WriteFile failed: %v", err) } - err = writeStream.Send(&ateenvv1.WriteFileRequest{ + err = writeStream.Send(&ateenvv1alpha.WriteFileRequest{ Path: targetPath, Chunk: testData, Mode: 0644, @@ -93,7 +93,7 @@ func TestWriteAndReadFileSmall(t *testing.T) { } // 2. Read file via server stream - readStream, err := client.ReadFile(ctx, &ateenvv1.ReadFileRequest{ + readStream, err := client.ReadFile(ctx, &ateenvv1alpha.ReadFileRequest{ Path: targetPath, }) if err != nil { @@ -144,7 +144,7 @@ func TestWriteAndReadFileMultiChunk(t *testing.T) { end = len(largeData) } - req := &ateenvv1.WriteFileRequest{ + req := &ateenvv1alpha.WriteFileRequest{ Chunk: largeData[i:end], } if first { @@ -176,7 +176,7 @@ func TestWriteAndReadFileMultiChunk(t *testing.T) { } // Stream read back and compare - readStream, err := client.ReadFile(ctx, &ateenvv1.ReadFileRequest{ + readStream, err := client.ReadFile(ctx, &ateenvv1alpha.ReadFileRequest{ Path: targetPath, }) if err != nil { @@ -218,7 +218,7 @@ func TestSandboxConfinementAndTraversal(t *testing.T) { if err != nil { t.Fatalf("WriteFile init failed: %v", err) } - _ = writeStream.Send(&ateenvv1.WriteFileRequest{ + _ = writeStream.Send(&ateenvv1alpha.WriteFileRequest{ Path: outsidePath, Chunk: []byte("malicious write"), }) @@ -233,7 +233,7 @@ func TestSandboxConfinementAndTraversal(t *testing.T) { if err != nil { t.Fatalf("WriteFile init failed: %v", err) } - _ = writeStream2.Send(&ateenvv1.WriteFileRequest{ + _ = writeStream2.Send(&ateenvv1alpha.WriteFileRequest{ Path: traversalPath, Chunk: []byte("traversal write"), }) @@ -243,7 +243,7 @@ func TestSandboxConfinementAndTraversal(t *testing.T) { } // 3. Attempt read outside sandbox - readStream, err := client.ReadFile(ctx, &ateenvv1.ReadFileRequest{ + readStream, err := client.ReadFile(ctx, &ateenvv1alpha.ReadFileRequest{ Path: "/etc/passwd", }) if err != nil { @@ -259,7 +259,7 @@ func TestSandboxConfinementAndTraversal(t *testing.T) { if err != nil { t.Fatalf("WriteFile init failed: %v", err) } - _ = writeStream3.Send(&ateenvv1.WriteFileRequest{ + _ = writeStream3.Send(&ateenvv1alpha.WriteFileRequest{ Path: "relative_file.txt", Chunk: []byte("valid sandboxed write"), }) @@ -283,7 +283,7 @@ func TestReadFileNotFound(t *testing.T) { defer cleanup() ctx := context.Background() - stream, err := client.ReadFile(ctx, &ateenvv1.ReadFileRequest{ + stream, err := client.ReadFile(ctx, &ateenvv1alpha.ReadFileRequest{ Path: "/non/existent/path/for/sure.txt", }) if err != nil { @@ -301,7 +301,7 @@ func TestReadFileEmptyPath(t *testing.T) { defer cleanup() ctx := context.Background() - stream, err := client.ReadFile(ctx, &ateenvv1.ReadFileRequest{ + stream, err := client.ReadFile(ctx, &ateenvv1alpha.ReadFileRequest{ Path: "", }) if err != nil { @@ -325,7 +325,7 @@ func TestWriteFileMissingPath(t *testing.T) { } // Send chunk with missing path on first message - _ = writeStream.Send(&ateenvv1.WriteFileRequest{ + _ = writeStream.Send(&ateenvv1alpha.WriteFileRequest{ Path: "", Chunk: []byte("orphan chunk"), }) diff --git a/guest/process/service.go b/guest/process/service.go index f22aa36..727fdde 100644 --- a/guest/process/service.go +++ b/guest/process/service.go @@ -6,15 +6,15 @@ import ( "os" "time" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -// Service implements ateenvv1.ProcessServiceServer. +// Service implements ateenvv1alpha.ProcessServiceServer. // It provides in-actor asynchronous process execution and log streaming for cmd/ate-env-guest. type Service struct { - ateenvv1.UnimplementedProcessServiceServer + ateenvv1alpha.UnimplementedProcessServiceServer tracker *Tracker } @@ -26,7 +26,7 @@ func NewService(tracker *Tracker) *Service { } // StartProcess launches a process asynchronously in the background. -func (s *Service) StartProcess(ctx context.Context, req *ateenvv1.StartProcessRequest) (*ateenvv1.StartProcessResponse, error) { +func (s *Service) StartProcess(ctx context.Context, req *ateenvv1alpha.StartProcessRequest) (*ateenvv1alpha.StartProcessResponse, error) { if len(req.GetCommand()) == 0 { return nil, status.Error(codes.InvalidArgument, "command cannot be empty") } @@ -36,13 +36,13 @@ func (s *Service) StartProcess(ctx context.Context, req *ateenvv1.StartProcessRe return nil, err } - return &ateenvv1.StartProcessResponse{ + return &ateenvv1alpha.StartProcessResponse{ ProcessId: state.ProcessID, }, nil } // GetProcess returns the metadata, status, and exit code of a process. -func (s *Service) GetProcess(ctx context.Context, req *ateenvv1.GetProcessRequest) (*ateenvv1.Process, error) { +func (s *Service) GetProcess(ctx context.Context, req *ateenvv1alpha.GetProcessRequest) (*ateenvv1alpha.Process, error) { if req.GetProcessId() == "" { return nil, status.Error(codes.InvalidArgument, "process_id cannot be empty") } @@ -56,7 +56,7 @@ func (s *Service) GetProcess(ctx context.Context, req *ateenvv1.GetProcessReques } // StreamProcessOutputs streams stdout and stderr in real-time or as a snapshot. -func (s *Service) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest, stream ateenvv1.ProcessService_StreamProcessOutputsServer) error { +func (s *Service) StreamProcessOutputs(req *ateenvv1alpha.StreamProcessOutputsRequest, stream ateenvv1alpha.ProcessService_StreamProcessOutputsServer) error { if req.GetProcessId() == "" { return status.Error(codes.InvalidArgument, "process_id cannot be empty") } @@ -78,8 +78,8 @@ func (s *Service) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest return status.Errorf(codes.Internal, "reading stdout: %v", err) } if len(stdoutBytes) > 0 { - if err := stream.Send(&ateenvv1.OutputChunk{ - Source: ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT, + if err := stream.Send(&ateenvv1alpha.OutputChunk{ + Source: ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT, Data: stdoutBytes, }); err != nil { return err @@ -93,8 +93,8 @@ func (s *Service) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest return status.Errorf(codes.Internal, "reading stderr: %v", err) } if len(stderrBytes) > 0 { - if err := stream.Send(&ateenvv1.OutputChunk{ - Source: ateenvv1.OutputSource_OUTPUT_SOURCE_STDERR, + if err := stream.Send(&ateenvv1alpha.OutputChunk{ + Source: ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDERR, Data: stderrBytes, }); err != nil { return err @@ -109,22 +109,22 @@ func (s *Service) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest // Check if process has finished and we consumed all output state.mu.RLock() - isTerminated := state.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_RUNNING + isTerminated := state.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_RUNNING state.mu.RUnlock() if isTerminated { // Final check to see if there were any remaining bytes flushed on exit finalStdout, _, _ := ReadLogs(state.StdoutPath, stdoutOffset) if len(finalStdout) > 0 { - _ = stream.Send(&ateenvv1.OutputChunk{ - Source: ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT, + _ = stream.Send(&ateenvv1alpha.OutputChunk{ + Source: ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT, Data: finalStdout, }) } finalStderr, _, _ := ReadLogs(state.StderrPath, stderrOffset) if len(finalStderr) > 0 { - _ = stream.Send(&ateenvv1.OutputChunk{ - Source: ateenvv1.OutputSource_OUTPUT_SOURCE_STDERR, + _ = stream.Send(&ateenvv1alpha.OutputChunk{ + Source: ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDERR, Data: finalStderr, }) } @@ -141,7 +141,7 @@ func (s *Service) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest } // KillProcess terminates a running process and returns its exit code. -func (s *Service) KillProcess(ctx context.Context, req *ateenvv1.KillProcessRequest) (*ateenvv1.KillProcessResponse, error) { +func (s *Service) KillProcess(ctx context.Context, req *ateenvv1alpha.KillProcessRequest) (*ateenvv1alpha.KillProcessResponse, error) { if req.GetProcessId() == "" { return nil, status.Error(codes.InvalidArgument, "process_id cannot be empty") } @@ -154,7 +154,7 @@ func (s *Service) KillProcess(ctx context.Context, req *ateenvv1.KillProcessRequ return nil, status.Errorf(codes.Internal, "killing process: %v", err) } - return &ateenvv1.KillProcessResponse{ + return &ateenvv1alpha.KillProcessResponse{ ExitCode: exitCode, }, nil } diff --git a/guest/process/service_test.go b/guest/process/service_test.go index 23eef88..5405151 100644 --- a/guest/process/service_test.go +++ b/guest/process/service_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" @@ -17,12 +17,12 @@ import ( "google.golang.org/grpc/test/bufconn" ) -func setupTestServer(t *testing.T) (ateenvv1.ProcessServiceClient, func()) { +func setupTestServer(t *testing.T) (ateenvv1alpha.ProcessServiceClient, func()) { t.Helper() return setupTestServerWithConfig(t, DefaultConfig(t.TempDir())) } -func setupTestServerWithConfig(t *testing.T, cfg TrackerConfig) (ateenvv1.ProcessServiceClient, func()) { +func setupTestServerWithConfig(t *testing.T, cfg TrackerConfig) (ateenvv1alpha.ProcessServiceClient, func()) { t.Helper() if cfg.LogDir == "" { cfg.LogDir = t.TempDir() @@ -36,7 +36,7 @@ func setupTestServerWithConfig(t *testing.T, cfg TrackerConfig) (ateenvv1.Proces lis := bufconn.Listen(1024 * 1024) server := grpc.NewServer() svc := NewService(tracker) - ateenvv1.RegisterProcessServiceServer(server, svc) + ateenvv1alpha.RegisterProcessServiceServer(server, svc) go func() { _ = server.Serve(lis) @@ -52,7 +52,7 @@ func setupTestServerWithConfig(t *testing.T, cfg TrackerConfig) (ateenvv1.Proces t.Fatalf("failed to dial bufnet: %v", err) } - client := ateenvv1.NewProcessServiceClient(conn) + client := ateenvv1alpha.NewProcessServiceClient(conn) cleanup := func() { tracker.Close() @@ -70,7 +70,7 @@ func TestStartAndGetProcess(t *testing.T) { defer cleanup() ctx := context.Background() - startRes, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "echo 'hello from substrate'"}, }) if err != nil { @@ -82,21 +82,21 @@ func TestStartAndGetProcess(t *testing.T) { } // Poll until completed - var proc *ateenvv1.Process + var proc *ateenvv1alpha.Process for i := 0; i < 20; i++ { - proc, err = client.GetProcess(ctx, &ateenvv1.GetProcessRequest{ + proc, err = client.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ ProcessId: startRes.ProcessId, }) if err != nil { t.Fatalf("GetProcess failed: %v", err) } - if proc.Status == ateenvv1.ProcessStatus_PROCESS_STATUS_COMPLETED { + if proc.Status == ateenvv1alpha.ProcessStatus_PROCESS_STATUS_COMPLETED { break } time.Sleep(50 * time.Millisecond) } - if proc.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_COMPLETED { + if proc.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_COMPLETED { t.Fatalf("expected status COMPLETED, got %v", proc.Status) } if proc.ExitCode != 0 { @@ -112,28 +112,28 @@ func TestProcessFailureExitCode(t *testing.T) { defer cleanup() ctx := context.Background() - startRes, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "exit 42"}, }) if err != nil { t.Fatalf("StartProcess failed: %v", err) } - var proc *ateenvv1.Process + var proc *ateenvv1alpha.Process for i := 0; i < 20; i++ { - proc, err = client.GetProcess(ctx, &ateenvv1.GetProcessRequest{ + proc, err = client.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ ProcessId: startRes.ProcessId, }) if err != nil { t.Fatalf("GetProcess failed: %v", err) } - if proc.Status == ateenvv1.ProcessStatus_PROCESS_STATUS_FAILED { + if proc.Status == ateenvv1alpha.ProcessStatus_PROCESS_STATUS_FAILED { break } time.Sleep(50 * time.Millisecond) } - if proc.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_FAILED { + if proc.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_FAILED { t.Fatalf("expected status FAILED, got %v", proc.Status) } if proc.ExitCode != 42 { @@ -146,14 +146,14 @@ func TestStreamProcessOutputs(t *testing.T) { defer cleanup() ctx := context.Background() - startRes, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "echo 'out1'; echo 'err1' >&2; sleep 0.1; echo 'out2'"}, }) if err != nil { t.Fatalf("StartProcess failed: %v", err) } - stream, err := client.StreamProcessOutputs(ctx, &ateenvv1.StreamProcessOutputsRequest{ + stream, err := client.StreamProcessOutputs(ctx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: startRes.ProcessId, Follow: true, }) @@ -172,9 +172,9 @@ func TestStreamProcessOutputs(t *testing.T) { if err != nil { t.Fatalf("error reading output chunk: %v", err) } - if chunk.Source == ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT { + if chunk.Source == ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT { stdoutBuilder.Write(chunk.Data) - } else if chunk.Source == ateenvv1.OutputSource_OUTPUT_SOURCE_STDERR { + } else if chunk.Source == ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDERR { stderrBuilder.Write(chunk.Data) } } @@ -195,7 +195,7 @@ func TestStreamProcessOutputsWithOffset(t *testing.T) { defer cleanup() ctx := context.Background() - startRes, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "echo 'prefix-to-skip'; echo 'streamed-line'"}, }) if err != nil { @@ -205,7 +205,7 @@ func TestStreamProcessOutputsWithOffset(t *testing.T) { time.Sleep(100 * time.Millisecond) skipLen := int64(len("prefix-to-skip\n")) - stream, err := client.StreamProcessOutputs(ctx, &ateenvv1.StreamProcessOutputsRequest{ + stream, err := client.StreamProcessOutputs(ctx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: startRes.ProcessId, StdoutOffset: skipLen, Follow: false, @@ -223,7 +223,7 @@ func TestStreamProcessOutputsWithOffset(t *testing.T) { if err != nil { t.Fatalf("error reading output chunk: %v", err) } - if chunk.Source == ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT { + if chunk.Source == ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT { stdoutBuilder.Write(chunk.Data) } } @@ -242,7 +242,7 @@ func TestStreamProcessOutputsSnapshotNoFollow(t *testing.T) { defer cleanup() ctx := context.Background() - startRes, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "echo 'instant-output'; sleep 5"}, }) if err != nil { @@ -252,7 +252,7 @@ func TestStreamProcessOutputsSnapshotNoFollow(t *testing.T) { time.Sleep(100 * time.Millisecond) start := time.Now() - stream, err := client.StreamProcessOutputs(ctx, &ateenvv1.StreamProcessOutputsRequest{ + stream, err := client.StreamProcessOutputs(ctx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: startRes.ProcessId, Follow: false, }) @@ -286,7 +286,7 @@ func TestKillProcess(t *testing.T) { defer cleanup() ctx := context.Background() - startRes, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "sleep 60"}, }) if err != nil { @@ -295,7 +295,7 @@ func TestKillProcess(t *testing.T) { time.Sleep(50 * time.Millisecond) - killRes, err := client.KillProcess(ctx, &ateenvv1.KillProcessRequest{ + killRes, err := client.KillProcess(ctx, &ateenvv1alpha.KillProcessRequest{ ProcessId: startRes.ProcessId, }) if err != nil { @@ -306,14 +306,14 @@ func TestKillProcess(t *testing.T) { t.Fatalf("expected exit code 137 after kill, got %d", killRes.ExitCode) } - proc, err := client.GetProcess(ctx, &ateenvv1.GetProcessRequest{ + proc, err := client.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ ProcessId: startRes.ProcessId, }) if err != nil { t.Fatalf("GetProcess failed: %v", err) } - if proc.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_TERMINATED { + if proc.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_TERMINATED { t.Fatalf("expected status TERMINATED, got %v", proc.Status) } if proc.ExitCode != 137 { @@ -326,28 +326,28 @@ func TestProcessSignalDeath(t *testing.T) { defer cleanup() ctx := context.Background() - startRes, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + startRes, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "kill -15 $$"}, }) if err != nil { t.Fatalf("StartProcess failed: %v", err) } - var proc *ateenvv1.Process + var proc *ateenvv1alpha.Process for i := 0; i < 20; i++ { - proc, err = client.GetProcess(ctx, &ateenvv1.GetProcessRequest{ + proc, err = client.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ ProcessId: startRes.ProcessId, }) if err != nil { t.Fatalf("GetProcess failed: %v", err) } - if proc.Status == ateenvv1.ProcessStatus_PROCESS_STATUS_TERMINATED { + if proc.Status == ateenvv1alpha.ProcessStatus_PROCESS_STATUS_TERMINATED { break } time.Sleep(50 * time.Millisecond) } - if proc.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_TERMINATED { + if proc.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_TERMINATED { t.Fatalf("expected status TERMINATED, got %v", proc.Status) } if proc.ExitCode != 143 { // 128 + 15 (SIGTERM) @@ -366,7 +366,7 @@ func TestConcurrencyLimiter(t *testing.T) { ctx := context.Background() // Launch job 1 (running for 5s) - res1, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + res1, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "sleep 5"}, }) if err != nil { @@ -374,7 +374,7 @@ func TestConcurrencyLimiter(t *testing.T) { } // Launch job 2 (running for 5s) - res2, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + res2, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "sleep 5"}, }) if err != nil { @@ -382,7 +382,7 @@ func TestConcurrencyLimiter(t *testing.T) { } // Launch job 3 -> Must be rejected with ResourceExhausted! - _, err = client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + _, err = client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "echo 'should fail'"}, }) if status.Code(err) != codes.ResourceExhausted { @@ -390,7 +390,7 @@ func TestConcurrencyLimiter(t *testing.T) { } // Kill job 1 to free up a slot - _, err = client.KillProcess(ctx, &ateenvv1.KillProcessRequest{ + _, err = client.KillProcess(ctx, &ateenvv1alpha.KillProcessRequest{ ProcessId: res1.ProcessId, }) if err != nil { @@ -398,7 +398,7 @@ func TestConcurrencyLimiter(t *testing.T) { } // Now job 3 should succeed - res3, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + res3, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "echo 'now succeeds'"}, }) if err != nil { @@ -409,7 +409,7 @@ func TestConcurrencyLimiter(t *testing.T) { } // Clean up job 2 - _, _ = client.KillProcess(ctx, &ateenvv1.KillProcessRequest{ProcessId: res2.ProcessId}) + _, _ = client.KillProcess(ctx, &ateenvv1alpha.KillProcessRequest{ProcessId: res2.ProcessId}) } func TestLogCapping(t *testing.T) { @@ -423,14 +423,14 @@ func TestLogCapping(t *testing.T) { ctx := context.Background() // Command outputs 10,000 bytes of spam - res, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + res, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "for i in $(seq 1 500); do echo 'spamming-log-line-0123456789'; done"}, }) if err != nil { t.Fatalf("StartProcess failed: %v", err) } - stream, err := client.StreamProcessOutputs(ctx, &ateenvv1.StreamProcessOutputsRequest{ + stream, err := client.StreamProcessOutputs(ctx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: res.ProcessId, Follow: true, }) @@ -447,7 +447,7 @@ func TestLogCapping(t *testing.T) { if err != nil { t.Fatalf("stream recv error: %v", err) } - if chunk.Source == ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT { + if chunk.Source == ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT { stdout.Write(chunk.Data) } } @@ -474,7 +474,7 @@ func TestWatchdogTimeout(t *testing.T) { ctx := context.Background() // Process attempts to sleep 30 seconds - res, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + res, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"sh", "-c", "sleep 30"}, }) if err != nil { @@ -484,14 +484,14 @@ func TestWatchdogTimeout(t *testing.T) { // Wait 250ms for watchdog timer to trigger time.Sleep(250 * time.Millisecond) - proc, err := client.GetProcess(ctx, &ateenvv1.GetProcessRequest{ + proc, err := client.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ ProcessId: res.ProcessId, }) if err != nil { t.Fatalf("GetProcess failed: %v", err) } - if proc.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_TERMINATED { + if proc.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_TERMINATED { t.Fatalf("expected status TERMINATED by watchdog timeout, got %v", proc.Status) } if proc.ExitCode != 137 { diff --git a/guest/process/tracker.go b/guest/process/tracker.go index 5de6648..88d236e 100644 --- a/guest/process/tracker.go +++ b/guest/process/tracker.go @@ -13,7 +13,7 @@ import ( "syscall" "time" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/timestamppb" @@ -84,7 +84,7 @@ type ProcessState struct { ProcessID string Command []string Cmd *exec.Cmd - Status ateenvv1.ProcessStatus + Status ateenvv1alpha.ProcessStatus ExitCode int32 StartedAt time.Time FinishedAt time.Time @@ -248,7 +248,7 @@ func (t *Tracker) Start(command []string, cwd string, env map[string]string) (*P ProcessID: processID, Command: command, Cmd: cmd, - Status: ateenvv1.ProcessStatus_PROCESS_STATUS_RUNNING, + Status: ateenvv1alpha.ProcessStatus_PROCESS_STATUS_RUNNING, StartedAt: startedAt, StdoutPath: stdoutPath, StderrPath: stderrPath, @@ -281,7 +281,7 @@ func (t *Tracker) Start(command []string, cwd string, env map[string]string) (*P _ = stdoutFile.Close() _ = stderrFile.Close() - if state.Status == ateenvv1.ProcessStatus_PROCESS_STATUS_TERMINATED { + if state.Status == ateenvv1alpha.ProcessStatus_PROCESS_STATUS_TERMINATED { // Already marked as terminated; preserve or refine exit code from wait status if signaled var exitErr *exec.ExitError if errors.As(waitErr, &exitErr) { @@ -290,23 +290,23 @@ func (t *Tracker) Start(command []string, cwd string, env map[string]string) (*P } } } else if waitErr == nil { - state.Status = ateenvv1.ProcessStatus_PROCESS_STATUS_COMPLETED + state.Status = ateenvv1alpha.ProcessStatus_PROCESS_STATUS_COMPLETED state.ExitCode = 0 } else { var exitErr *exec.ExitError if errors.As(waitErr, &exitErr) { if ws, ok := exitErr.Sys().(syscall.WaitStatus); ok && ws.Signaled() { - state.Status = ateenvv1.ProcessStatus_PROCESS_STATUS_TERMINATED + state.Status = ateenvv1alpha.ProcessStatus_PROCESS_STATUS_TERMINATED state.ExitCode = 128 + int32(ws.Signal()) } else if ws, ok := exitErr.Sys().(syscall.WaitStatus); ok && ws.Exited() { - state.Status = ateenvv1.ProcessStatus_PROCESS_STATUS_FAILED + state.Status = ateenvv1alpha.ProcessStatus_PROCESS_STATUS_FAILED state.ExitCode = int32(ws.ExitStatus()) } else { - state.Status = ateenvv1.ProcessStatus_PROCESS_STATUS_FAILED + state.Status = ateenvv1alpha.ProcessStatus_PROCESS_STATUS_FAILED state.ExitCode = int32(exitErr.ExitCode()) } } else { - state.Status = ateenvv1.ProcessStatus_PROCESS_STATUS_FAILED + state.Status = ateenvv1alpha.ProcessStatus_PROCESS_STATUS_FAILED state.ExitCode = -1 } } @@ -346,13 +346,13 @@ func (t *Tracker) Kill(processID string) (int32, error) { } state.mu.Lock() - if state.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_RUNNING { + if state.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_RUNNING { exitCode := state.ExitCode state.mu.Unlock() return exitCode, nil } - state.Status = ateenvv1.ProcessStatus_PROCESS_STATUS_TERMINATED + state.Status = ateenvv1alpha.ProcessStatus_PROCESS_STATUS_TERMINATED state.ExitCode = 128 + int32(syscall.SIGKILL) // 137 if state.timer != nil { state.timer.Stop() @@ -399,7 +399,7 @@ func (t *Tracker) pruneExpired() { now := time.Now() for id, state := range t.processes { state.mu.RLock() - isDone := state.Status != ateenvv1.ProcessStatus_PROCESS_STATUS_RUNNING + isDone := state.Status != ateenvv1alpha.ProcessStatus_PROCESS_STATUS_RUNNING finishedAt := state.FinishedAt state.mu.RUnlock() @@ -414,11 +414,11 @@ func (t *Tracker) pruneExpired() { } // ToProto converts a ProcessState to the protobuf Process message. -func (p *ProcessState) ToProto() *ateenvv1.Process { +func (p *ProcessState) ToProto() *ateenvv1alpha.Process { p.mu.RLock() defer p.mu.RUnlock() - proto := &ateenvv1.Process{ + proto := &ateenvv1alpha.Process{ ProcessId: p.ProcessID, Status: p.Status, ExitCode: p.ExitCode, diff --git a/guest/server.go b/guest/server.go index e589fdd..9b425f4 100644 --- a/guest/server.go +++ b/guest/server.go @@ -8,7 +8,7 @@ import ( "github.com/agent-substrate/env/guest/filesystem" "github.com/agent-substrate/env/guest/process" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) @@ -75,12 +75,12 @@ func NewServer(cfg Config) (*grpc.Server, func(), error) { cleanups = append(cleanups, func() { tracker.Close() }) - ateenvv1.RegisterProcessServiceServer(grpcServer, process.NewService(tracker)) + ateenvv1alpha.RegisterProcessServiceServer(grpcServer, process.NewService(tracker)) } if cfg.EnableFileSystem { fsSvc := filesystem.NewService(filesystem.Config{RootDirectory: cfg.Workspace}) - ateenvv1.RegisterFileSystemServiceServer(grpcServer, fsSvc) + ateenvv1alpha.RegisterFileSystemServiceServer(grpcServer, fsSvc) } cleanup := func() { diff --git a/internal/apiservice/server.go b/internal/apiservice/server.go index 37cded1..21b7b56 100644 --- a/internal/apiservice/server.go +++ b/internal/apiservice/server.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/agent-substrate/env/internal/ate" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "github.com/agent-substrate/substrate/pkg/proto/ateapipb" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -32,12 +32,12 @@ const DefaultNamespace = "ate-env" // specify one. const DefaultAtespace = "default" -// Server implements ateenvv1.EnvironmentServiceServer, ateenvv1.ProcessServiceServer, -// and ateenvv1.FileSystemServiceServer. +// Server implements ateenvv1alpha.EnvironmentServiceServer, ateenvv1alpha.ProcessServiceServer, +// and ateenvv1alpha.FileSystemServiceServer. type Server struct { - ateenvv1.UnimplementedEnvironmentServiceServer - ateenvv1.UnimplementedProcessServiceServer - ateenvv1.UnimplementedFileSystemServiceServer + ateenvv1alpha.UnimplementedEnvironmentServiceServer + ateenvv1alpha.UnimplementedProcessServiceServer + ateenvv1alpha.UnimplementedFileSystemServiceServer client *ate.Client routerAddr string @@ -66,7 +66,7 @@ func (s *Server) Close() {} // ============================================================================ // CreateEnvironment registers and starts a new environment. -func (s *Server) CreateEnvironment(ctx context.Context, req *ateenvv1.CreateEnvironmentRequest) (*ateenvv1.CreateEnvironmentResponse, error) { +func (s *Server) CreateEnvironment(ctx context.Context, req *ateenvv1alpha.CreateEnvironmentRequest) (*ateenvv1alpha.CreateEnvironmentResponse, error) { if req.GetId() == "" { return nil, status.Error(codes.InvalidArgument, "id is required") } @@ -92,21 +92,21 @@ func (s *Server) CreateEnvironment(ctx context.Context, req *ateenvv1.CreateEnvi return nil, toGRPCError(err) } - return &ateenvv1.CreateEnvironmentResponse{ - Environment: &ateenvv1.Environment{ + return &ateenvv1alpha.CreateEnvironmentResponse{ + Environment: &ateenvv1alpha.Environment{ Id: req.GetId(), Atespace: atespace, - Template: &ateenvv1.Template{ + Template: &ateenvv1alpha.Template{ Name: templateName, Atespace: atespace, }, - Status: ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED, + Status: ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED, }, }, nil } // GetEnvironment retrieves the status and configuration of an existing environment. -func (s *Server) GetEnvironment(ctx context.Context, req *ateenvv1.GetEnvironmentRequest) (*ateenvv1.GetEnvironmentResponse, error) { +func (s *Server) GetEnvironment(ctx context.Context, req *ateenvv1alpha.GetEnvironmentRequest) (*ateenvv1alpha.GetEnvironmentResponse, error) { if req.GetId() == "" { return nil, status.Error(codes.InvalidArgument, "id is required") } @@ -120,13 +120,13 @@ func (s *Server) GetEnvironment(ctx context.Context, req *ateenvv1.GetEnvironmen return nil, toGRPCError(err) } - return &ateenvv1.GetEnvironmentResponse{ + return &ateenvv1alpha.GetEnvironmentResponse{ Environment: ActorToEnvironment(actor), }, nil } // SuspendEnvironment checkpoints and stops an active environment. -func (s *Server) SuspendEnvironment(ctx context.Context, req *ateenvv1.SuspendEnvironmentRequest) (*ateenvv1.SuspendEnvironmentResponse, error) { +func (s *Server) SuspendEnvironment(ctx context.Context, req *ateenvv1alpha.SuspendEnvironmentRequest) (*ateenvv1alpha.SuspendEnvironmentResponse, error) { if req.GetId() == "" { return nil, status.Error(codes.InvalidArgument, "id is required") } @@ -139,11 +139,11 @@ func (s *Server) SuspendEnvironment(ctx context.Context, req *ateenvv1.SuspendEn return nil, toGRPCError(err) } - return &ateenvv1.SuspendEnvironmentResponse{}, nil + return &ateenvv1alpha.SuspendEnvironmentResponse{}, nil } // DeleteEnvironment permanently removes an environment and its resources. -func (s *Server) DeleteEnvironment(ctx context.Context, req *ateenvv1.DeleteEnvironmentRequest) (*ateenvv1.DeleteEnvironmentResponse, error) { +func (s *Server) DeleteEnvironment(ctx context.Context, req *ateenvv1alpha.DeleteEnvironmentRequest) (*ateenvv1alpha.DeleteEnvironmentResponse, error) { if req.GetId() == "" { return nil, status.Error(codes.InvalidArgument, "id is required") } @@ -156,7 +156,7 @@ func (s *Server) DeleteEnvironment(ctx context.Context, req *ateenvv1.DeleteEnvi return nil, toGRPCError(err) } - return &ateenvv1.DeleteEnvironmentResponse{}, nil + return &ateenvv1alpha.DeleteEnvironmentResponse{}, nil } // ============================================================================ @@ -164,7 +164,7 @@ func (s *Server) DeleteEnvironment(ctx context.Context, req *ateenvv1.DeleteEnvi // ============================================================================ // StartProcess launches a process inside the target environment container. -func (s *Server) StartProcess(ctx context.Context, req *ateenvv1.StartProcessRequest) (*ateenvv1.StartProcessResponse, error) { +func (s *Server) StartProcess(ctx context.Context, req *ateenvv1alpha.StartProcessRequest) (*ateenvv1alpha.StartProcessResponse, error) { envID, atespace, err := envFromContext(ctx) if err != nil { return nil, err @@ -176,11 +176,11 @@ func (s *Server) StartProcess(ctx context.Context, req *ateenvv1.StartProcessReq defer conn.Close() outCtx := forwardOutgoingContext(ctx) - return ateenvv1.NewProcessServiceClient(conn).StartProcess(outCtx, req) + return ateenvv1alpha.NewProcessServiceClient(conn).StartProcess(outCtx, req) } // GetProcess retrieves the status of a process running inside the environment. -func (s *Server) GetProcess(ctx context.Context, req *ateenvv1.GetProcessRequest) (*ateenvv1.Process, error) { +func (s *Server) GetProcess(ctx context.Context, req *ateenvv1alpha.GetProcessRequest) (*ateenvv1alpha.Process, error) { envID, atespace, err := envFromContext(ctx) if err != nil { return nil, err @@ -192,11 +192,11 @@ func (s *Server) GetProcess(ctx context.Context, req *ateenvv1.GetProcessRequest defer conn.Close() outCtx := forwardOutgoingContext(ctx) - return ateenvv1.NewProcessServiceClient(conn).GetProcess(outCtx, req) + return ateenvv1alpha.NewProcessServiceClient(conn).GetProcess(outCtx, req) } // StreamProcessOutputs streams real-time stdout and stderr from a process. -func (s *Server) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest, stream grpc.ServerStreamingServer[ateenvv1.OutputChunk]) error { +func (s *Server) StreamProcessOutputs(req *ateenvv1alpha.StreamProcessOutputsRequest, stream grpc.ServerStreamingServer[ateenvv1alpha.OutputChunk]) error { ctx := stream.Context() envID, atespace, err := envFromContext(ctx) if err != nil { @@ -209,7 +209,7 @@ func (s *Server) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest, defer conn.Close() outCtx := forwardOutgoingContext(ctx) - clientStream, err := ateenvv1.NewProcessServiceClient(conn).StreamProcessOutputs(outCtx, req) + clientStream, err := ateenvv1alpha.NewProcessServiceClient(conn).StreamProcessOutputs(outCtx, req) if err != nil { return err } @@ -229,7 +229,7 @@ func (s *Server) StreamProcessOutputs(req *ateenvv1.StreamProcessOutputsRequest, } // KillProcess terminates a running process inside the environment. -func (s *Server) KillProcess(ctx context.Context, req *ateenvv1.KillProcessRequest) (*ateenvv1.KillProcessResponse, error) { +func (s *Server) KillProcess(ctx context.Context, req *ateenvv1alpha.KillProcessRequest) (*ateenvv1alpha.KillProcessResponse, error) { envID, atespace, err := envFromContext(ctx) if err != nil { return nil, err @@ -241,7 +241,7 @@ func (s *Server) KillProcess(ctx context.Context, req *ateenvv1.KillProcessReque defer conn.Close() outCtx := forwardOutgoingContext(ctx) - return ateenvv1.NewProcessServiceClient(conn).KillProcess(outCtx, req) + return ateenvv1alpha.NewProcessServiceClient(conn).KillProcess(outCtx, req) } // ============================================================================ @@ -249,7 +249,7 @@ func (s *Server) KillProcess(ctx context.Context, req *ateenvv1.KillProcessReque // ============================================================================ // ReadFile streams file contents from the target environment. -func (s *Server) ReadFile(req *ateenvv1.ReadFileRequest, stream grpc.ServerStreamingServer[ateenvv1.FileChunk]) error { +func (s *Server) ReadFile(req *ateenvv1alpha.ReadFileRequest, stream grpc.ServerStreamingServer[ateenvv1alpha.FileChunk]) error { ctx := stream.Context() envID, atespace, err := envFromContext(ctx) if err != nil { @@ -262,7 +262,7 @@ func (s *Server) ReadFile(req *ateenvv1.ReadFileRequest, stream grpc.ServerStrea defer conn.Close() outCtx := forwardOutgoingContext(ctx) - clientStream, err := ateenvv1.NewFileSystemServiceClient(conn).ReadFile(outCtx, req) + clientStream, err := ateenvv1alpha.NewFileSystemServiceClient(conn).ReadFile(outCtx, req) if err != nil { return err } @@ -282,7 +282,7 @@ func (s *Server) ReadFile(req *ateenvv1.ReadFileRequest, stream grpc.ServerStrea } // WriteFile streams file contents to the target environment. -func (s *Server) WriteFile(stream grpc.ClientStreamingServer[ateenvv1.WriteFileRequest, ateenvv1.WriteFileResponse]) error { +func (s *Server) WriteFile(stream grpc.ClientStreamingServer[ateenvv1alpha.WriteFileRequest, ateenvv1alpha.WriteFileResponse]) error { ctx := stream.Context() envID, atespace, err := envFromContext(ctx) if err != nil { @@ -295,7 +295,7 @@ func (s *Server) WriteFile(stream grpc.ClientStreamingServer[ateenvv1.WriteFileR defer conn.Close() outCtx := forwardOutgoingContext(ctx) - clientStream, err := ateenvv1.NewFileSystemServiceClient(conn).WriteFile(outCtx) + clientStream, err := ateenvv1alpha.NewFileSystemServiceClient(conn).WriteFile(outCtx) if err != nil { return err } @@ -368,8 +368,8 @@ func (s *Server) guestConn(atespace, id string) (*grpc.ClientConn, error) { return conn, nil } -// ActorToEnvironment converts an ateapipb Actor to an ateenvv1 Environment. -func ActorToEnvironment(actor *ateapipb.Actor) *ateenvv1.Environment { +// ActorToEnvironment converts an ateapipb Actor to an ateenvv1alpha Environment. +func ActorToEnvironment(actor *ateapipb.Actor) *ateenvv1alpha.Environment { if actor == nil { return nil } @@ -379,10 +379,10 @@ func ActorToEnvironment(actor *ateapipb.Actor) *ateenvv1.Environment { templateName = tmpl.GetName() templateAtespace = tmpl.GetAtespace() } - return &ateenvv1.Environment{ + return &ateenvv1alpha.Environment{ Id: actor.GetMetadata().GetName(), Atespace: actor.GetMetadata().GetAtespace(), - Template: &ateenvv1.Template{ + Template: &ateenvv1alpha.Template{ Name: templateName, Atespace: templateAtespace, }, @@ -390,30 +390,30 @@ func ActorToEnvironment(actor *ateapipb.Actor) *ateenvv1.Environment { } } -// ActorStatusToEnvStatus maps an ateapipb ActorStatus to an ateenvv1 EnvironmentStatus. -func ActorStatusToEnvStatus(st *ateapipb.ActorStatus) ateenvv1.EnvironmentStatus { +// ActorStatusToEnvStatus maps an ateapipb ActorStatus to an ateenvv1alpha EnvironmentStatus. +func ActorStatusToEnvStatus(st *ateapipb.ActorStatus) ateenvv1alpha.EnvironmentStatus { if st == nil { - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED } switch st.GetState() { case ateapipb.ActorState_ACTOR_STATE_RESUMING: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_RESUMING + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_RESUMING case ateapipb.ActorState_ACTOR_STATE_RUNNING: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_RUNNING + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_RUNNING case ateapipb.ActorState_ACTOR_STATE_SUSPENDING: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDING + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDING case ateapipb.ActorState_ACTOR_STATE_SUSPENDED: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDED + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDED case ateapipb.ActorState_ACTOR_STATE_PAUSING: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSING + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSING case ateapipb.ActorState_ACTOR_STATE_PAUSED: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSED + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSED case ateapipb.ActorState_ACTOR_STATE_CRASHED: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_CRASHED + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_CRASHED case ateapipb.ActorState_ACTOR_STATE_DELETING: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_DELETING + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_DELETING default: - return ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED + return ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED } } diff --git a/internal/apiservice/server_test.go b/internal/apiservice/server_test.go index 8220382..ef42902 100644 --- a/internal/apiservice/server_test.go +++ b/internal/apiservice/server_test.go @@ -11,7 +11,7 @@ import ( "github.com/agent-substrate/env/internal/ate" "github.com/agent-substrate/env/internal/internaltest/fakecontrol" "github.com/agent-substrate/env/internal/internaltest/fakerouter" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "github.com/agent-substrate/substrate/pkg/proto/ateapipb" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -21,15 +21,15 @@ import ( ) type testEnv struct { - envClient ateenvv1.EnvironmentServiceClient - procClient ateenvv1.ProcessServiceClient - fsClient ateenvv1.FileSystemServiceClient + envClient ateenvv1alpha.EnvironmentServiceClient + procClient ateenvv1alpha.ProcessServiceClient + fsClient ateenvv1alpha.FileSystemServiceClient conn *grpc.ClientConn router *fakerouter.Router control *fakecontrol.Server } -func newTestEnv(t *testing.T) (ateenvv1.EnvironmentServiceClient, *fakecontrol.Server) { +func newTestEnv(t *testing.T) (ateenvv1alpha.EnvironmentServiceClient, *fakecontrol.Server) { t.Helper() te := newFullTestEnv(t) return te.envClient, te.control @@ -66,9 +66,9 @@ func newFullTestEnv(t *testing.T) *testEnv { t.Cleanup(srv.Close) grpcServer := grpc.NewServer() - ateenvv1.RegisterEnvironmentServiceServer(grpcServer, srv) - ateenvv1.RegisterProcessServiceServer(grpcServer, srv) - ateenvv1.RegisterFileSystemServiceServer(grpcServer, srv) + ateenvv1alpha.RegisterEnvironmentServiceServer(grpcServer, srv) + ateenvv1alpha.RegisterProcessServiceServer(grpcServer, srv) + ateenvv1alpha.RegisterFileSystemServiceServer(grpcServer, srv) lis, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { @@ -84,9 +84,9 @@ func newFullTestEnv(t *testing.T) *testEnv { t.Cleanup(func() { conn.Close() }) return &testEnv{ - envClient: ateenvv1.NewEnvironmentServiceClient(conn), - procClient: ateenvv1.NewProcessServiceClient(conn), - fsClient: ateenvv1.NewFileSystemServiceClient(conn), + envClient: ateenvv1alpha.NewEnvironmentServiceClient(conn), + procClient: ateenvv1alpha.NewProcessServiceClient(conn), + fsClient: ateenvv1alpha.NewFileSystemServiceClient(conn), conn: conn, router: router, control: control, @@ -98,7 +98,7 @@ func TestCreateAndGetEnvironment(t *testing.T) { ctx := context.Background() // Create with defaults. - createResp, err := client.CreateEnvironment(ctx, &ateenvv1.CreateEnvironmentRequest{ + createResp, err := client.CreateEnvironment(ctx, &ateenvv1alpha.CreateEnvironmentRequest{ Id: "env-1", }) if err != nil { @@ -116,12 +116,12 @@ func TestCreateAndGetEnvironment(t *testing.T) { if createResp.GetEnvironment().GetAtespace() != apiservice.DefaultAtespace { t.Errorf("got atespace %q, want %q", createResp.GetEnvironment().GetAtespace(), apiservice.DefaultAtespace) } - if createResp.GetEnvironment().GetStatus() != ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED { + if createResp.GetEnvironment().GetStatus() != ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED { t.Errorf("got status %v, want UNSPECIFIED", createResp.GetEnvironment().GetStatus()) } // Get environment. - getResp, err := client.GetEnvironment(ctx, &ateenvv1.GetEnvironmentRequest{ + getResp, err := client.GetEnvironment(ctx, &ateenvv1alpha.GetEnvironmentRequest{ Id: "env-1", }) if err != nil { @@ -136,7 +136,7 @@ func TestCreateAndGetEnvironment(t *testing.T) { if getResp.GetEnvironment().GetAtespace() != apiservice.DefaultAtespace { t.Errorf("got atespace %q, want %q", getResp.GetEnvironment().GetAtespace(), apiservice.DefaultAtespace) } - if getResp.GetEnvironment().GetStatus() != ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_RUNNING { + if getResp.GetEnvironment().GetStatus() != ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_RUNNING { t.Errorf("got status %v, want RUNNING", getResp.GetEnvironment().GetStatus()) } } @@ -145,10 +145,10 @@ func TestCustomAtespace(t *testing.T) { client, _ := newTestEnv(t) ctx := context.Background() - createResp, err := client.CreateEnvironment(ctx, &ateenvv1.CreateEnvironmentRequest{ + createResp, err := client.CreateEnvironment(ctx, &ateenvv1alpha.CreateEnvironmentRequest{ Id: "custom-env", Atespace: "my-space", - Template: &ateenvv1.Template{ + Template: &ateenvv1alpha.Template{ Name: "custom-tmpl", Atespace: "my-space", }, @@ -166,7 +166,7 @@ func TestCustomAtespace(t *testing.T) { t.Errorf("got template atespace %q, want my-space", createResp.GetEnvironment().GetTemplate().GetAtespace()) } - getResp, err := client.GetEnvironment(ctx, &ateenvv1.GetEnvironmentRequest{ + getResp, err := client.GetEnvironment(ctx, &ateenvv1alpha.GetEnvironmentRequest{ Id: "custom-env", Atespace: "my-space", }) @@ -177,7 +177,7 @@ func TestCustomAtespace(t *testing.T) { t.Errorf("got atespace %q, want my-space", getResp.GetEnvironment().GetAtespace()) } - _, err = client.SuspendEnvironment(ctx, &ateenvv1.SuspendEnvironmentRequest{ + _, err = client.SuspendEnvironment(ctx, &ateenvv1alpha.SuspendEnvironmentRequest{ Id: "custom-env", Atespace: "my-space", }) @@ -185,7 +185,7 @@ func TestCustomAtespace(t *testing.T) { t.Fatalf("SuspendEnvironment failed: %v", err) } - _, err = client.DeleteEnvironment(ctx, &ateenvv1.DeleteEnvironmentRequest{ + _, err = client.DeleteEnvironment(ctx, &ateenvv1alpha.DeleteEnvironmentRequest{ Id: "custom-env", Atespace: "my-space", }) @@ -198,7 +198,7 @@ func TestCreateValidation(t *testing.T) { client, _ := newTestEnv(t) ctx := context.Background() - _, err := client.CreateEnvironment(ctx, &ateenvv1.CreateEnvironmentRequest{}) + _, err := client.CreateEnvironment(ctx, &ateenvv1alpha.CreateEnvironmentRequest{}) if err == nil { t.Fatal("expected error for empty id") } @@ -211,7 +211,7 @@ func TestGetNotFound(t *testing.T) { client, _ := newTestEnv(t) ctx := context.Background() - _, err := client.GetEnvironment(ctx, &ateenvv1.GetEnvironmentRequest{ + _, err := client.GetEnvironment(ctx, &ateenvv1alpha.GetEnvironmentRequest{ Id: "nonexistent", }) if err == nil { @@ -226,9 +226,9 @@ func TestSuspendEnvironment(t *testing.T) { client, control := newTestEnv(t) ctx := context.Background() - _, err := client.CreateEnvironment(ctx, &ateenvv1.CreateEnvironmentRequest{ + _, err := client.CreateEnvironment(ctx, &ateenvv1alpha.CreateEnvironmentRequest{ Id: "env-susp", - Template: &ateenvv1.Template{ + Template: &ateenvv1alpha.Template{ Name: "custom-template", }, }) @@ -240,7 +240,7 @@ func TestSuspendEnvironment(t *testing.T) { t.Fatalf("status before suspend = %v, want RUNNING", got) } - suspResp, err := client.SuspendEnvironment(ctx, &ateenvv1.SuspendEnvironmentRequest{ + suspResp, err := client.SuspendEnvironment(ctx, &ateenvv1alpha.SuspendEnvironmentRequest{ Id: "env-susp", }) if err != nil { @@ -253,13 +253,13 @@ func TestSuspendEnvironment(t *testing.T) { t.Errorf("control plane status after suspend = %v, want SUSPENDED", got) } - getResp, err := client.GetEnvironment(ctx, &ateenvv1.GetEnvironmentRequest{ + getResp, err := client.GetEnvironment(ctx, &ateenvv1alpha.GetEnvironmentRequest{ Id: "env-susp", }) if err != nil { t.Fatalf("GetEnvironment after suspend failed: %v", err) } - if getResp.GetEnvironment().GetStatus() != ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDED { + if getResp.GetEnvironment().GetStatus() != ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDED { t.Errorf("got status %v, want SUSPENDED", getResp.GetEnvironment().GetStatus()) } } @@ -268,14 +268,14 @@ func TestDeleteEnvironment(t *testing.T) { client, _ := newTestEnv(t) ctx := context.Background() - _, err := client.CreateEnvironment(ctx, &ateenvv1.CreateEnvironmentRequest{ + _, err := client.CreateEnvironment(ctx, &ateenvv1alpha.CreateEnvironmentRequest{ Id: "env-del", }) if err != nil { t.Fatalf("CreateEnvironment failed: %v", err) } - delResp, err := client.DeleteEnvironment(ctx, &ateenvv1.DeleteEnvironmentRequest{ + delResp, err := client.DeleteEnvironment(ctx, &ateenvv1alpha.DeleteEnvironmentRequest{ Id: "env-del", }) if err != nil { @@ -286,7 +286,7 @@ func TestDeleteEnvironment(t *testing.T) { } // Should no longer exist. - _, err = client.GetEnvironment(ctx, &ateenvv1.GetEnvironmentRequest{ + _, err = client.GetEnvironment(ctx, &ateenvv1alpha.GetEnvironmentRequest{ Id: "env-del", }) if status.Code(err) != codes.NotFound { @@ -299,7 +299,7 @@ func TestProxyGuestServices(t *testing.T) { ctx := context.Background() // 1. Create environment - _, err := te.envClient.CreateEnvironment(ctx, &ateenvv1.CreateEnvironmentRequest{ + _, err := te.envClient.CreateEnvironment(ctx, &ateenvv1alpha.CreateEnvironmentRequest{ Id: "guest-test", }) if err != nil { @@ -327,7 +327,7 @@ func TestProxyGuestServices(t *testing.T) { if err != nil { t.Fatalf("WriteFile stream: %v", err) } - if err := writeStream.Send(&ateenvv1.WriteFileRequest{ + if err := writeStream.Send(&ateenvv1alpha.WriteFileRequest{ Path: "proxy-file.txt", Mode: 0644, Chunk: []byte("proxied content"), @@ -342,7 +342,7 @@ func TestProxyGuestServices(t *testing.T) { t.Errorf("bytes written = %d, want %d", writeResp.GetBytesWritten(), len("proxied content")) } - readStream, err := te.fsClient.ReadFile(envCtx, &ateenvv1.ReadFileRequest{ + readStream, err := te.fsClient.ReadFile(envCtx, &ateenvv1alpha.ReadFileRequest{ Path: "proxy-file.txt", }) if err != nil { @@ -364,7 +364,7 @@ func TestProxyGuestServices(t *testing.T) { } // 4. Test ProcessService proxying - startResp, err := te.procClient.StartProcess(envCtx, &ateenvv1.StartProcessRequest{ + startResp, err := te.procClient.StartProcess(envCtx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"echo", "hello-from-proxy"}, }) if err != nil { @@ -374,7 +374,7 @@ func TestProxyGuestServices(t *testing.T) { t.Fatal("empty process ID") } - logStream, err := te.procClient.StreamProcessOutputs(envCtx, &ateenvv1.StreamProcessOutputsRequest{ + logStream, err := te.procClient.StreamProcessOutputs(envCtx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: startResp.GetProcessId(), Follow: true, }) @@ -390,7 +390,7 @@ func TestProxyGuestServices(t *testing.T) { if err != nil { t.Fatalf("StreamProcessOutputs recv: %v", err) } - if chunk.GetSource() == ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT { + if chunk.GetSource() == ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT { stdout += string(chunk.GetData()) } } @@ -398,7 +398,7 @@ func TestProxyGuestServices(t *testing.T) { t.Errorf("stdout = %q, want hello-from-proxy\\n", stdout) } - getProc, err := te.procClient.GetProcess(envCtx, &ateenvv1.GetProcessRequest{ + getProc, err := te.procClient.GetProcess(envCtx, &ateenvv1alpha.GetProcessRequest{ ProcessId: startResp.GetProcessId(), }) if err != nil { @@ -409,7 +409,7 @@ func TestProxyGuestServices(t *testing.T) { } // 5. Test missing metadata error - _, err = te.procClient.StartProcess(ctx, &ateenvv1.StartProcessRequest{ + _, err = te.procClient.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: []string{"echo", "no-meta"}, }) if status.Code(err) != codes.InvalidArgument { @@ -421,17 +421,17 @@ func TestActorStatusToEnvStatus(t *testing.T) { cases := []struct { name string in *ateapipb.ActorStatus - want ateenvv1.EnvironmentStatus + want ateenvv1alpha.EnvironmentStatus }{ - {"nil status", nil, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED}, - {"resuming", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_RESUMING}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_RESUMING}, - {"running", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_RUNNING}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_RUNNING}, - {"suspending", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_SUSPENDING}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDING}, - {"suspended", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_SUSPENDED}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDED}, - {"pausing", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_PAUSING}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSING}, - {"paused", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_PAUSED}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSED}, - {"crashed", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_CRASHED}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_CRASHED}, - {"deleting", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_DELETING}, ateenvv1.EnvironmentStatus_ENVIRONMENT_STATUS_DELETING}, + {"nil status", nil, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_UNSPECIFIED}, + {"resuming", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_RESUMING}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_RESUMING}, + {"running", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_RUNNING}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_RUNNING}, + {"suspending", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_SUSPENDING}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDING}, + {"suspended", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_SUSPENDED}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_SUSPENDED}, + {"pausing", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_PAUSING}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSING}, + {"paused", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_PAUSED}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_PAUSED}, + {"crashed", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_CRASHED}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_CRASHED}, + {"deleting", &ateapipb.ActorStatus{State: ateapipb.ActorState_ACTOR_STATE_DELETING}, ateenvv1alpha.EnvironmentStatus_ENVIRONMENT_STATUS_DELETING}, } for _, tc := range cases { if got := apiservice.ActorStatusToEnvStatus(tc.in); got != tc.want { diff --git a/internal/examples/env/main.go b/internal/examples/env/main.go index a29a379..fa87fd4 100644 --- a/internal/examples/env/main.go +++ b/internal/examples/env/main.go @@ -13,7 +13,7 @@ import ( "log" "time" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "github.com/google/uuid" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -41,14 +41,14 @@ func main() { } defer conn.Close() - client := ateenvv1.NewEnvironmentServiceClient(conn) + client := ateenvv1alpha.NewEnvironmentServiceClient(conn) // 1. Create the environment. fmt.Printf("1. Creating environment %q (template: %s, atespace: %s)...\n", id, template, atespace) - createResp, err := client.CreateEnvironment(ctx, &ateenvv1.CreateEnvironmentRequest{ + createResp, err := client.CreateEnvironment(ctx, &ateenvv1alpha.CreateEnvironmentRequest{ Id: id, Atespace: atespace, - Template: &ateenvv1.Template{ + Template: &ateenvv1alpha.Template{ Name: template, Atespace: atespace, }, @@ -61,7 +61,7 @@ func main() { // 2. Get environment details. fmt.Printf("2. Getting environment %q...\n", id) - getResp, err := client.GetEnvironment(ctx, &ateenvv1.GetEnvironmentRequest{ + getResp, err := client.GetEnvironment(ctx, &ateenvv1alpha.GetEnvironmentRequest{ Id: id, Atespace: atespace, }) @@ -74,7 +74,7 @@ func main() { // 3. Suspend the environment. fmt.Printf("3. Suspending environment %q...\n", id) - if _, err := client.SuspendEnvironment(ctx, &ateenvv1.SuspendEnvironmentRequest{ + if _, err := client.SuspendEnvironment(ctx, &ateenvv1alpha.SuspendEnvironmentRequest{ Id: id, Atespace: atespace, }); err != nil { @@ -83,7 +83,7 @@ func main() { fmt.Printf(" Suspended environment %q successfully.\n\n", id) // 4. Verify status after suspension. - getResp, err = client.GetEnvironment(ctx, &ateenvv1.GetEnvironmentRequest{ + getResp, err = client.GetEnvironment(ctx, &ateenvv1alpha.GetEnvironmentRequest{ Id: id, Atespace: atespace, }) @@ -94,7 +94,7 @@ func main() { // 5. Delete the environment. fmt.Printf("5. Deleting environment %q...\n", id) - if _, err := client.DeleteEnvironment(ctx, &ateenvv1.DeleteEnvironmentRequest{ + if _, err := client.DeleteEnvironment(ctx, &ateenvv1alpha.DeleteEnvironmentRequest{ Id: id, Atespace: atespace, }); err != nil { diff --git a/internal/mcp/server.go b/internal/mcp/server.go index 11751d0..21a10c4 100644 --- a/internal/mcp/server.go +++ b/internal/mcp/server.go @@ -10,7 +10,7 @@ import ( "github.com/agent-substrate/env/internal/ate" "github.com/agent-substrate/env/internal/tool" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" "github.com/modelcontextprotocol/go-sdk/mcp" ) @@ -39,7 +39,7 @@ func NewServer(reg *tool.Registry) *Server { // NewServerForClients creates an MCP server configured with tools backed by // the provided FileSystemService and ProcessService gRPC clients. -func NewServerForClients(fsClient ateenvv1.FileSystemServiceClient, procClient ateenvv1.ProcessServiceClient) *Server { +func NewServerForClients(fsClient ateenvv1alpha.FileSystemServiceClient, procClient ateenvv1alpha.ProcessServiceClient) *Server { tools := NewTools(fsClient, procClient) reg := tool.NewRegistry() _ = reg.Register(tools...) @@ -70,8 +70,8 @@ func NewHandler(client *ate.Client) http.Handler { if err != nil { return nil, err } - fsClient := ateenvv1.NewFileSystemServiceClient(conn) - procClient := ateenvv1.NewProcessServiceClient(conn) + fsClient := ateenvv1alpha.NewFileSystemServiceClient(conn) + procClient := ateenvv1alpha.NewProcessServiceClient(conn) srv := NewServerForClients(fsClient, procClient) servers[key] = srv return srv.mcpServer, nil diff --git a/internal/mcp/tools.go b/internal/mcp/tools.go index 3f2f6e2..2e0b37f 100644 --- a/internal/mcp/tools.go +++ b/internal/mcp/tools.go @@ -11,14 +11,14 @@ import ( "strings" "github.com/agent-substrate/env/internal/tool" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" mcp "github.com/modelcontextprotocol/go-sdk/mcp" ) const defaultChunkSize = 64 * 1024 // NewFileSystemTools returns MCP tools for FileSystemService RPCs. -func NewFileSystemTools(client ateenvv1.FileSystemServiceClient) []tool.Tool { +func NewFileSystemTools(client ateenvv1alpha.FileSystemServiceClient) []tool.Tool { return []tool.Tool{ readFileTool(client), writeFileTool(client), @@ -26,14 +26,14 @@ func NewFileSystemTools(client ateenvv1.FileSystemServiceClient) []tool.Tool { } // NewProcessTools returns MCP tools for ProcessService RPCs. -func NewProcessTools(client ateenvv1.ProcessServiceClient) []tool.Tool { +func NewProcessTools(client ateenvv1alpha.ProcessServiceClient) []tool.Tool { return []tool.Tool{ shellTool(client), } } // NewTools returns all MCP tools backed by FileSystemService and ProcessService clients. -func NewTools(fsClient ateenvv1.FileSystemServiceClient, procClient ateenvv1.ProcessServiceClient) []tool.Tool { +func NewTools(fsClient ateenvv1alpha.FileSystemServiceClient, procClient ateenvv1alpha.ProcessServiceClient) []tool.Tool { var tools []tool.Tool if fsClient != nil { tools = append(tools, NewFileSystemTools(fsClient)...) @@ -50,7 +50,7 @@ type readFileParams struct { Path string `json:"path"` } -func readFileTool(client ateenvv1.FileSystemServiceClient) tool.Tool { +func readFileTool(client ateenvv1alpha.FileSystemServiceClient) tool.Tool { def := &mcp.Tool{ Name: "read_file", Description: "Read a file from the environment filesystem via FileSystemService gRPC API.", @@ -66,7 +66,7 @@ func readFileTool(client ateenvv1.FileSystemServiceClient) tool.Tool { if strings.TrimSpace(p.Path) == "" { return "", errors.New("path must not be empty") } - stream, err := client.ReadFile(ctx, &ateenvv1.ReadFileRequest{Path: p.Path}) + stream, err := client.ReadFile(ctx, &ateenvv1alpha.ReadFileRequest{Path: p.Path}) if err != nil { return "", fmt.Errorf("read_file failed: %w", err) } @@ -94,7 +94,7 @@ type writeFileParams struct { Mode uint32 `json:"mode,omitempty"` } -func writeFileTool(client ateenvv1.FileSystemServiceClient) tool.Tool { +func writeFileTool(client ateenvv1alpha.FileSystemServiceClient) tool.Tool { def := &mcp.Tool{ Name: "write_file", Description: "Write content to a file in the environment filesystem via FileSystemService gRPC API.", @@ -119,7 +119,7 @@ func writeFileTool(client ateenvv1.FileSystemServiceClient) tool.Tool { data := []byte(p.Content) if len(data) == 0 { - if err := stream.Send(&ateenvv1.WriteFileRequest{ + if err := stream.Send(&ateenvv1alpha.WriteFileRequest{ Path: p.Path, Mode: p.Mode, }); err != nil { @@ -131,7 +131,7 @@ func writeFileTool(client ateenvv1.FileSystemServiceClient) tool.Tool { if end > len(data) { end = len(data) } - req := &ateenvv1.WriteFileRequest{ + req := &ateenvv1alpha.WriteFileRequest{ Chunk: data[i:end], } if i == 0 { @@ -160,7 +160,7 @@ type shellParams struct { Env map[string]string `json:"env,omitempty"` } -func shellTool(client ateenvv1.ProcessServiceClient) tool.Tool { +func shellTool(client ateenvv1alpha.ProcessServiceClient) tool.Tool { def := &mcp.Tool{ Name: "shell", Description: "Run a shell command line inside the environment using ProcessService gRPC API and return output and exit code.", @@ -190,8 +190,8 @@ func shellTool(client ateenvv1.ProcessServiceClient) tool.Tool { }) } -func runProcessToCompletion(ctx context.Context, client ateenvv1.ProcessServiceClient, command []string, cwd string, env map[string]string) (string, error) { - startResp, err := client.StartProcess(ctx, &ateenvv1.StartProcessRequest{ +func runProcessToCompletion(ctx context.Context, client ateenvv1alpha.ProcessServiceClient, command []string, cwd string, env map[string]string) (string, error) { + startResp, err := client.StartProcess(ctx, &ateenvv1alpha.StartProcessRequest{ Command: command, Cwd: cwd, Env: env, @@ -201,7 +201,7 @@ func runProcessToCompletion(ctx context.Context, client ateenvv1.ProcessServiceC } procID := startResp.GetProcessId() - stream, err := client.StreamProcessOutputs(ctx, &ateenvv1.StreamProcessOutputsRequest{ + stream, err := client.StreamProcessOutputs(ctx, &ateenvv1alpha.StreamProcessOutputsRequest{ ProcessId: procID, Follow: true, }) @@ -219,14 +219,14 @@ func runProcessToCompletion(ctx context.Context, client ateenvv1.ProcessServiceC return "", fmt.Errorf("reading process output chunk: %w", err) } switch chunk.GetSource() { - case ateenvv1.OutputSource_OUTPUT_SOURCE_STDOUT: + case ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDOUT: stdoutBuf.Write(chunk.GetData()) - case ateenvv1.OutputSource_OUTPUT_SOURCE_STDERR: + case ateenvv1alpha.OutputSource_OUTPUT_SOURCE_STDERR: stderrBuf.Write(chunk.GetData()) } } - proc, err := client.GetProcess(ctx, &ateenvv1.GetProcessRequest{ProcessId: procID}) + proc, err := client.GetProcess(ctx, &ateenvv1alpha.GetProcessRequest{ProcessId: procID}) if err != nil { return "", fmt.Errorf("get process status failed: %w", err) } diff --git a/internal/mcp/tools_test.go b/internal/mcp/tools_test.go index ae8a09b..dcca3ed 100644 --- a/internal/mcp/tools_test.go +++ b/internal/mcp/tools_test.go @@ -12,13 +12,13 @@ import ( "github.com/agent-substrate/env/guest" internalmcp "github.com/agent-substrate/env/internal/mcp" "github.com/agent-substrate/env/internal/tool" - ateenvv1 "github.com/agent-substrate/env/proto/ateenv/v1" + ateenvv1alpha "github.com/agent-substrate/env/proto/ateenv/v1alpha" mcp "github.com/modelcontextprotocol/go-sdk/mcp" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) -func setupTestServer(t *testing.T) (ateenvv1.FileSystemServiceClient, ateenvv1.ProcessServiceClient, func()) { +func setupTestServer(t *testing.T) (ateenvv1alpha.FileSystemServiceClient, ateenvv1alpha.ProcessServiceClient, func()) { t.Helper() tempDir := t.TempDir() @@ -54,8 +54,8 @@ func setupTestServer(t *testing.T) (ateenvv1.FileSystemServiceClient, ateenvv1.P t.Fatalf("failed to dial server: %v", err) } - fsClient := ateenvv1.NewFileSystemServiceClient(conn) - procClient := ateenvv1.NewProcessServiceClient(conn) + fsClient := ateenvv1alpha.NewFileSystemServiceClient(conn) + procClient := ateenvv1alpha.NewProcessServiceClient(conn) teardown := func() { conn.Close() diff --git a/proto/ateenv/v1/env.pb.go b/proto/ateenv/v1alpha/env.pb.go similarity index 71% rename from proto/ateenv/v1/env.pb.go rename to proto/ateenv/v1alpha/env.pb.go index 131a3bd..83bfe44 100644 --- a/proto/ateenv/v1/env.pb.go +++ b/proto/ateenv/v1alpha/env.pb.go @@ -7,9 +7,9 @@ // versions: // protoc-gen-go v1.36.11 // protoc v5.28.2 -// source: proto/ateenv/v1/env.proto +// source: proto/ateenv/v1alpha/env.proto -package ateenvv1 +package ateenvv1alpha import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -86,11 +86,11 @@ func (x EnvironmentStatus) String() string { } func (EnvironmentStatus) Descriptor() protoreflect.EnumDescriptor { - return file_proto_ateenv_v1_env_proto_enumTypes[0].Descriptor() + return file_proto_ateenv_v1alpha_env_proto_enumTypes[0].Descriptor() } func (EnvironmentStatus) Type() protoreflect.EnumType { - return &file_proto_ateenv_v1_env_proto_enumTypes[0] + return &file_proto_ateenv_v1alpha_env_proto_enumTypes[0] } func (x EnvironmentStatus) Number() protoreflect.EnumNumber { @@ -99,7 +99,7 @@ func (x EnvironmentStatus) Number() protoreflect.EnumNumber { // Deprecated: Use EnvironmentStatus.Descriptor instead. func (EnvironmentStatus) EnumDescriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{0} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{0} } // Template represents an ActorTemplate used to instantiate environments. @@ -115,7 +115,7 @@ type Template struct { func (x *Template) Reset() { *x = Template{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[0] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -127,7 +127,7 @@ func (x *Template) String() string { func (*Template) ProtoMessage() {} func (x *Template) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[0] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -140,7 +140,7 @@ func (x *Template) ProtoReflect() protoreflect.Message { // Deprecated: Use Template.ProtoReflect.Descriptor instead. func (*Template) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{0} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{0} } func (x *Template) GetName() string { @@ -167,14 +167,14 @@ type Environment struct { // ActorTemplate configuration the environment is instantiated from. Template *Template `protobuf:"bytes,3,opt,name=template,proto3" json:"template,omitempty"` // Current lifecycle status of the environment. - Status EnvironmentStatus `protobuf:"varint,4,opt,name=status,proto3,enum=ateenv.v1.EnvironmentStatus" json:"status,omitempty"` + Status EnvironmentStatus `protobuf:"varint,4,opt,name=status,proto3,enum=ateenv.v1alpha.EnvironmentStatus" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Environment) Reset() { *x = Environment{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[1] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -186,7 +186,7 @@ func (x *Environment) String() string { func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[1] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -199,7 +199,7 @@ func (x *Environment) ProtoReflect() protoreflect.Message { // Deprecated: Use Environment.ProtoReflect.Descriptor instead. func (*Environment) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{1} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{1} } func (x *Environment) GetId() string { @@ -245,7 +245,7 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[2] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -257,7 +257,7 @@ func (x *CreateEnvironmentRequest) String() string { func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[2] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -270,7 +270,7 @@ func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateEnvironmentRequest.ProtoReflect.Descriptor instead. func (*CreateEnvironmentRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{2} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{2} } func (x *CreateEnvironmentRequest) GetId() string { @@ -305,7 +305,7 @@ type CreateEnvironmentResponse struct { func (x *CreateEnvironmentResponse) Reset() { *x = CreateEnvironmentResponse{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[3] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -317,7 +317,7 @@ func (x *CreateEnvironmentResponse) String() string { func (*CreateEnvironmentResponse) ProtoMessage() {} func (x *CreateEnvironmentResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[3] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -330,7 +330,7 @@ func (x *CreateEnvironmentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateEnvironmentResponse.ProtoReflect.Descriptor instead. func (*CreateEnvironmentResponse) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{3} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{3} } func (x *CreateEnvironmentResponse) GetEnvironment() *Environment { @@ -353,7 +353,7 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[4] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -365,7 +365,7 @@ func (x *GetEnvironmentRequest) String() string { func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[4] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -378,7 +378,7 @@ func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEnvironmentRequest.ProtoReflect.Descriptor instead. func (*GetEnvironmentRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{4} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{4} } func (x *GetEnvironmentRequest) GetId() string { @@ -406,7 +406,7 @@ type GetEnvironmentResponse struct { func (x *GetEnvironmentResponse) Reset() { *x = GetEnvironmentResponse{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[5] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -418,7 +418,7 @@ func (x *GetEnvironmentResponse) String() string { func (*GetEnvironmentResponse) ProtoMessage() {} func (x *GetEnvironmentResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[5] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -431,7 +431,7 @@ func (x *GetEnvironmentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEnvironmentResponse.ProtoReflect.Descriptor instead. func (*GetEnvironmentResponse) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{5} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{5} } func (x *GetEnvironmentResponse) GetEnvironment() *Environment { @@ -454,7 +454,7 @@ type SuspendEnvironmentRequest struct { func (x *SuspendEnvironmentRequest) Reset() { *x = SuspendEnvironmentRequest{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[6] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -466,7 +466,7 @@ func (x *SuspendEnvironmentRequest) String() string { func (*SuspendEnvironmentRequest) ProtoMessage() {} func (x *SuspendEnvironmentRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[6] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -479,7 +479,7 @@ func (x *SuspendEnvironmentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SuspendEnvironmentRequest.ProtoReflect.Descriptor instead. func (*SuspendEnvironmentRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{6} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{6} } func (x *SuspendEnvironmentRequest) GetId() string { @@ -505,7 +505,7 @@ type SuspendEnvironmentResponse struct { func (x *SuspendEnvironmentResponse) Reset() { *x = SuspendEnvironmentResponse{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[7] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -517,7 +517,7 @@ func (x *SuspendEnvironmentResponse) String() string { func (*SuspendEnvironmentResponse) ProtoMessage() {} func (x *SuspendEnvironmentResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[7] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -530,7 +530,7 @@ func (x *SuspendEnvironmentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SuspendEnvironmentResponse.ProtoReflect.Descriptor instead. func (*SuspendEnvironmentResponse) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{7} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{7} } // Request to delete an environment. @@ -546,7 +546,7 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[8] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -558,7 +558,7 @@ func (x *DeleteEnvironmentRequest) String() string { func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[8] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -571,7 +571,7 @@ func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteEnvironmentRequest.ProtoReflect.Descriptor instead. func (*DeleteEnvironmentRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{8} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{8} } func (x *DeleteEnvironmentRequest) GetId() string { @@ -597,7 +597,7 @@ type DeleteEnvironmentResponse struct { func (x *DeleteEnvironmentResponse) Reset() { *x = DeleteEnvironmentResponse{} - mi := &file_proto_ateenv_v1_env_proto_msgTypes[9] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -609,7 +609,7 @@ func (x *DeleteEnvironmentResponse) String() string { func (*DeleteEnvironmentResponse) ProtoMessage() {} func (x *DeleteEnvironmentResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_env_proto_msgTypes[9] + mi := &file_proto_ateenv_v1alpha_env_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -622,33 +622,33 @@ func (x *DeleteEnvironmentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteEnvironmentResponse.ProtoReflect.Descriptor instead. func (*DeleteEnvironmentResponse) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_env_proto_rawDescGZIP(), []int{9} + return file_proto_ateenv_v1alpha_env_proto_rawDescGZIP(), []int{9} } -var File_proto_ateenv_v1_env_proto protoreflect.FileDescriptor +var File_proto_ateenv_v1alpha_env_proto protoreflect.FileDescriptor -const file_proto_ateenv_v1_env_proto_rawDesc = "" + +const file_proto_ateenv_v1alpha_env_proto_rawDesc = "" + "\n" + - "\x19proto/ateenv/v1/env.proto\x12\tateenv.v1\":\n" + + "\x1eproto/ateenv/v1alpha/env.proto\x12\x0eateenv.v1alpha\":\n" + "\bTemplate\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" + - "\batespace\x18\x02 \x01(\tR\batespace\"\xa0\x01\n" + + "\batespace\x18\x02 \x01(\tR\batespace\"\xaa\x01\n" + "\vEnvironment\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + - "\batespace\x18\x02 \x01(\tR\batespace\x12/\n" + - "\btemplate\x18\x03 \x01(\v2\x13.ateenv.v1.TemplateR\btemplate\x124\n" + - "\x06status\x18\x04 \x01(\x0e2\x1c.ateenv.v1.EnvironmentStatusR\x06status\"w\n" + + "\batespace\x18\x02 \x01(\tR\batespace\x124\n" + + "\btemplate\x18\x03 \x01(\v2\x18.ateenv.v1alpha.TemplateR\btemplate\x129\n" + + "\x06status\x18\x04 \x01(\x0e2!.ateenv.v1alpha.EnvironmentStatusR\x06status\"|\n" + "\x18CreateEnvironmentRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + - "\batespace\x18\x02 \x01(\tR\batespace\x12/\n" + - "\btemplate\x18\x03 \x01(\v2\x13.ateenv.v1.TemplateR\btemplate\"U\n" + - "\x19CreateEnvironmentResponse\x128\n" + - "\venvironment\x18\x01 \x01(\v2\x16.ateenv.v1.EnvironmentR\venvironment\"C\n" + + "\batespace\x18\x02 \x01(\tR\batespace\x124\n" + + "\btemplate\x18\x03 \x01(\v2\x18.ateenv.v1alpha.TemplateR\btemplate\"Z\n" + + "\x19CreateEnvironmentResponse\x12=\n" + + "\venvironment\x18\x01 \x01(\v2\x1b.ateenv.v1alpha.EnvironmentR\venvironment\"C\n" + "\x15GetEnvironmentRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + - "\batespace\x18\x02 \x01(\tR\batespace\"R\n" + - "\x16GetEnvironmentResponse\x128\n" + - "\venvironment\x18\x01 \x01(\v2\x16.ateenv.v1.EnvironmentR\venvironment\"G\n" + + "\batespace\x18\x02 \x01(\tR\batespace\"W\n" + + "\x16GetEnvironmentResponse\x12=\n" + + "\venvironment\x18\x01 \x01(\v2\x1b.ateenv.v1alpha.EnvironmentR\venvironment\"G\n" + "\x19SuspendEnvironmentRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + "\batespace\x18\x02 \x01(\tR\batespace\"\x1c\n" + @@ -666,54 +666,54 @@ const file_proto_ateenv_v1_env_proto_rawDesc = "" + "\x1aENVIRONMENT_STATUS_PAUSING\x10\x05\x12\x1d\n" + "\x19ENVIRONMENT_STATUS_PAUSED\x10\x06\x12\x1e\n" + "\x1aENVIRONMENT_STATUS_CRASHED\x10\a\x12\x1f\n" + - "\x1bENVIRONMENT_STATUS_DELETING\x10\b2\x8e\x03\n" + - "\x12EnvironmentService\x12^\n" + - "\x11CreateEnvironment\x12#.ateenv.v1.CreateEnvironmentRequest\x1a$.ateenv.v1.CreateEnvironmentResponse\x12U\n" + - "\x0eGetEnvironment\x12 .ateenv.v1.GetEnvironmentRequest\x1a!.ateenv.v1.GetEnvironmentResponse\x12a\n" + - "\x12SuspendEnvironment\x12$.ateenv.v1.SuspendEnvironmentRequest\x1a%.ateenv.v1.SuspendEnvironmentResponse\x12^\n" + - "\x11DeleteEnvironment\x12#.ateenv.v1.DeleteEnvironmentRequest\x1a$.ateenv.v1.DeleteEnvironmentResponseB9Z7github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1b\x06proto3" + "\x1bENVIRONMENT_STATUS_DELETING\x10\b2\xb6\x03\n" + + "\x12EnvironmentService\x12h\n" + + "\x11CreateEnvironment\x12(.ateenv.v1alpha.CreateEnvironmentRequest\x1a).ateenv.v1alpha.CreateEnvironmentResponse\x12_\n" + + "\x0eGetEnvironment\x12%.ateenv.v1alpha.GetEnvironmentRequest\x1a&.ateenv.v1alpha.GetEnvironmentResponse\x12k\n" + + "\x12SuspendEnvironment\x12).ateenv.v1alpha.SuspendEnvironmentRequest\x1a*.ateenv.v1alpha.SuspendEnvironmentResponse\x12h\n" + + "\x11DeleteEnvironment\x12(.ateenv.v1alpha.DeleteEnvironmentRequest\x1a).ateenv.v1alpha.DeleteEnvironmentResponseBCZAgithub.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alphab\x06proto3" var ( - file_proto_ateenv_v1_env_proto_rawDescOnce sync.Once - file_proto_ateenv_v1_env_proto_rawDescData []byte + file_proto_ateenv_v1alpha_env_proto_rawDescOnce sync.Once + file_proto_ateenv_v1alpha_env_proto_rawDescData []byte ) -func file_proto_ateenv_v1_env_proto_rawDescGZIP() []byte { - file_proto_ateenv_v1_env_proto_rawDescOnce.Do(func() { - file_proto_ateenv_v1_env_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1_env_proto_rawDesc), len(file_proto_ateenv_v1_env_proto_rawDesc))) +func file_proto_ateenv_v1alpha_env_proto_rawDescGZIP() []byte { + file_proto_ateenv_v1alpha_env_proto_rawDescOnce.Do(func() { + file_proto_ateenv_v1alpha_env_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1alpha_env_proto_rawDesc), len(file_proto_ateenv_v1alpha_env_proto_rawDesc))) }) - return file_proto_ateenv_v1_env_proto_rawDescData -} - -var file_proto_ateenv_v1_env_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_ateenv_v1_env_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_proto_ateenv_v1_env_proto_goTypes = []any{ - (EnvironmentStatus)(0), // 0: ateenv.v1.EnvironmentStatus - (*Template)(nil), // 1: ateenv.v1.Template - (*Environment)(nil), // 2: ateenv.v1.Environment - (*CreateEnvironmentRequest)(nil), // 3: ateenv.v1.CreateEnvironmentRequest - (*CreateEnvironmentResponse)(nil), // 4: ateenv.v1.CreateEnvironmentResponse - (*GetEnvironmentRequest)(nil), // 5: ateenv.v1.GetEnvironmentRequest - (*GetEnvironmentResponse)(nil), // 6: ateenv.v1.GetEnvironmentResponse - (*SuspendEnvironmentRequest)(nil), // 7: ateenv.v1.SuspendEnvironmentRequest - (*SuspendEnvironmentResponse)(nil), // 8: ateenv.v1.SuspendEnvironmentResponse - (*DeleteEnvironmentRequest)(nil), // 9: ateenv.v1.DeleteEnvironmentRequest - (*DeleteEnvironmentResponse)(nil), // 10: ateenv.v1.DeleteEnvironmentResponse -} -var file_proto_ateenv_v1_env_proto_depIdxs = []int32{ - 1, // 0: ateenv.v1.Environment.template:type_name -> ateenv.v1.Template - 0, // 1: ateenv.v1.Environment.status:type_name -> ateenv.v1.EnvironmentStatus - 1, // 2: ateenv.v1.CreateEnvironmentRequest.template:type_name -> ateenv.v1.Template - 2, // 3: ateenv.v1.CreateEnvironmentResponse.environment:type_name -> ateenv.v1.Environment - 2, // 4: ateenv.v1.GetEnvironmentResponse.environment:type_name -> ateenv.v1.Environment - 3, // 5: ateenv.v1.EnvironmentService.CreateEnvironment:input_type -> ateenv.v1.CreateEnvironmentRequest - 5, // 6: ateenv.v1.EnvironmentService.GetEnvironment:input_type -> ateenv.v1.GetEnvironmentRequest - 7, // 7: ateenv.v1.EnvironmentService.SuspendEnvironment:input_type -> ateenv.v1.SuspendEnvironmentRequest - 9, // 8: ateenv.v1.EnvironmentService.DeleteEnvironment:input_type -> ateenv.v1.DeleteEnvironmentRequest - 4, // 9: ateenv.v1.EnvironmentService.CreateEnvironment:output_type -> ateenv.v1.CreateEnvironmentResponse - 6, // 10: ateenv.v1.EnvironmentService.GetEnvironment:output_type -> ateenv.v1.GetEnvironmentResponse - 8, // 11: ateenv.v1.EnvironmentService.SuspendEnvironment:output_type -> ateenv.v1.SuspendEnvironmentResponse - 10, // 12: ateenv.v1.EnvironmentService.DeleteEnvironment:output_type -> ateenv.v1.DeleteEnvironmentResponse + return file_proto_ateenv_v1alpha_env_proto_rawDescData +} + +var file_proto_ateenv_v1alpha_env_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proto_ateenv_v1alpha_env_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_proto_ateenv_v1alpha_env_proto_goTypes = []any{ + (EnvironmentStatus)(0), // 0: ateenv.v1alpha.EnvironmentStatus + (*Template)(nil), // 1: ateenv.v1alpha.Template + (*Environment)(nil), // 2: ateenv.v1alpha.Environment + (*CreateEnvironmentRequest)(nil), // 3: ateenv.v1alpha.CreateEnvironmentRequest + (*CreateEnvironmentResponse)(nil), // 4: ateenv.v1alpha.CreateEnvironmentResponse + (*GetEnvironmentRequest)(nil), // 5: ateenv.v1alpha.GetEnvironmentRequest + (*GetEnvironmentResponse)(nil), // 6: ateenv.v1alpha.GetEnvironmentResponse + (*SuspendEnvironmentRequest)(nil), // 7: ateenv.v1alpha.SuspendEnvironmentRequest + (*SuspendEnvironmentResponse)(nil), // 8: ateenv.v1alpha.SuspendEnvironmentResponse + (*DeleteEnvironmentRequest)(nil), // 9: ateenv.v1alpha.DeleteEnvironmentRequest + (*DeleteEnvironmentResponse)(nil), // 10: ateenv.v1alpha.DeleteEnvironmentResponse +} +var file_proto_ateenv_v1alpha_env_proto_depIdxs = []int32{ + 1, // 0: ateenv.v1alpha.Environment.template:type_name -> ateenv.v1alpha.Template + 0, // 1: ateenv.v1alpha.Environment.status:type_name -> ateenv.v1alpha.EnvironmentStatus + 1, // 2: ateenv.v1alpha.CreateEnvironmentRequest.template:type_name -> ateenv.v1alpha.Template + 2, // 3: ateenv.v1alpha.CreateEnvironmentResponse.environment:type_name -> ateenv.v1alpha.Environment + 2, // 4: ateenv.v1alpha.GetEnvironmentResponse.environment:type_name -> ateenv.v1alpha.Environment + 3, // 5: ateenv.v1alpha.EnvironmentService.CreateEnvironment:input_type -> ateenv.v1alpha.CreateEnvironmentRequest + 5, // 6: ateenv.v1alpha.EnvironmentService.GetEnvironment:input_type -> ateenv.v1alpha.GetEnvironmentRequest + 7, // 7: ateenv.v1alpha.EnvironmentService.SuspendEnvironment:input_type -> ateenv.v1alpha.SuspendEnvironmentRequest + 9, // 8: ateenv.v1alpha.EnvironmentService.DeleteEnvironment:input_type -> ateenv.v1alpha.DeleteEnvironmentRequest + 4, // 9: ateenv.v1alpha.EnvironmentService.CreateEnvironment:output_type -> ateenv.v1alpha.CreateEnvironmentResponse + 6, // 10: ateenv.v1alpha.EnvironmentService.GetEnvironment:output_type -> ateenv.v1alpha.GetEnvironmentResponse + 8, // 11: ateenv.v1alpha.EnvironmentService.SuspendEnvironment:output_type -> ateenv.v1alpha.SuspendEnvironmentResponse + 10, // 12: ateenv.v1alpha.EnvironmentService.DeleteEnvironment:output_type -> ateenv.v1alpha.DeleteEnvironmentResponse 9, // [9:13] is the sub-list for method output_type 5, // [5:9] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -721,27 +721,27 @@ var file_proto_ateenv_v1_env_proto_depIdxs = []int32{ 0, // [0:5] is the sub-list for field type_name } -func init() { file_proto_ateenv_v1_env_proto_init() } -func file_proto_ateenv_v1_env_proto_init() { - if File_proto_ateenv_v1_env_proto != nil { +func init() { file_proto_ateenv_v1alpha_env_proto_init() } +func file_proto_ateenv_v1alpha_env_proto_init() { + if File_proto_ateenv_v1alpha_env_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1_env_proto_rawDesc), len(file_proto_ateenv_v1_env_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1alpha_env_proto_rawDesc), len(file_proto_ateenv_v1alpha_env_proto_rawDesc)), NumEnums: 1, NumMessages: 10, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_proto_ateenv_v1_env_proto_goTypes, - DependencyIndexes: file_proto_ateenv_v1_env_proto_depIdxs, - EnumInfos: file_proto_ateenv_v1_env_proto_enumTypes, - MessageInfos: file_proto_ateenv_v1_env_proto_msgTypes, + GoTypes: file_proto_ateenv_v1alpha_env_proto_goTypes, + DependencyIndexes: file_proto_ateenv_v1alpha_env_proto_depIdxs, + EnumInfos: file_proto_ateenv_v1alpha_env_proto_enumTypes, + MessageInfos: file_proto_ateenv_v1alpha_env_proto_msgTypes, }.Build() - File_proto_ateenv_v1_env_proto = out.File - file_proto_ateenv_v1_env_proto_goTypes = nil - file_proto_ateenv_v1_env_proto_depIdxs = nil + File_proto_ateenv_v1alpha_env_proto = out.File + file_proto_ateenv_v1alpha_env_proto_goTypes = nil + file_proto_ateenv_v1alpha_env_proto_depIdxs = nil } diff --git a/proto/ateenv/v1/env.proto b/proto/ateenv/v1alpha/env.proto similarity index 99% rename from proto/ateenv/v1/env.proto rename to proto/ateenv/v1alpha/env.proto index 386c918..fc3aa79 100644 --- a/proto/ateenv/v1/env.proto +++ b/proto/ateenv/v1alpha/env.proto @@ -5,9 +5,9 @@ syntax = "proto3"; -package ateenv.v1; +package ateenv.v1alpha; -option go_package = "github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1"; +option go_package = "github.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alpha"; // TODO(jbd): Migrate data plane (shell/fs) to guest.proto (ProcessService/FileSystemService). diff --git a/proto/ateenv/v1/env_grpc.pb.go b/proto/ateenv/v1alpha/env_grpc.pb.go similarity index 96% rename from proto/ateenv/v1/env_grpc.pb.go rename to proto/ateenv/v1alpha/env_grpc.pb.go index f98bff0..d472ea1 100644 --- a/proto/ateenv/v1/env_grpc.pb.go +++ b/proto/ateenv/v1alpha/env_grpc.pb.go @@ -7,9 +7,9 @@ // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v5.28.2 -// source: proto/ateenv/v1/env.proto +// source: proto/ateenv/v1alpha/env.proto -package ateenvv1 +package ateenvv1alpha import ( context "context" @@ -24,10 +24,10 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - EnvironmentService_CreateEnvironment_FullMethodName = "/ateenv.v1.EnvironmentService/CreateEnvironment" - EnvironmentService_GetEnvironment_FullMethodName = "/ateenv.v1.EnvironmentService/GetEnvironment" - EnvironmentService_SuspendEnvironment_FullMethodName = "/ateenv.v1.EnvironmentService/SuspendEnvironment" - EnvironmentService_DeleteEnvironment_FullMethodName = "/ateenv.v1.EnvironmentService/DeleteEnvironment" + EnvironmentService_CreateEnvironment_FullMethodName = "/ateenv.v1alpha.EnvironmentService/CreateEnvironment" + EnvironmentService_GetEnvironment_FullMethodName = "/ateenv.v1alpha.EnvironmentService/GetEnvironment" + EnvironmentService_SuspendEnvironment_FullMethodName = "/ateenv.v1alpha.EnvironmentService/SuspendEnvironment" + EnvironmentService_DeleteEnvironment_FullMethodName = "/ateenv.v1alpha.EnvironmentService/DeleteEnvironment" ) // EnvironmentServiceClient is the client API for EnvironmentService service. @@ -227,7 +227,7 @@ func _EnvironmentService_DeleteEnvironment_Handler(srv interface{}, ctx context. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var EnvironmentService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "ateenv.v1.EnvironmentService", + ServiceName: "ateenv.v1alpha.EnvironmentService", HandlerType: (*EnvironmentServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -248,5 +248,5 @@ var EnvironmentService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "proto/ateenv/v1/env.proto", + Metadata: "proto/ateenv/v1alpha/env.proto", } diff --git a/proto/ateenv/v1/guest.pb.go b/proto/ateenv/v1alpha/guest.pb.go similarity index 72% rename from proto/ateenv/v1/guest.pb.go rename to proto/ateenv/v1alpha/guest.pb.go index 75b62bb..e60c3e2 100644 --- a/proto/ateenv/v1/guest.pb.go +++ b/proto/ateenv/v1alpha/guest.pb.go @@ -7,9 +7,9 @@ // versions: // protoc-gen-go v1.36.11 // protoc v5.28.2 -// source: proto/ateenv/v1/guest.proto +// source: proto/ateenv/v1alpha/guest.proto -package ateenvv1 +package ateenvv1alpha import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -71,11 +71,11 @@ func (x ProcessStatus) String() string { } func (ProcessStatus) Descriptor() protoreflect.EnumDescriptor { - return file_proto_ateenv_v1_guest_proto_enumTypes[0].Descriptor() + return file_proto_ateenv_v1alpha_guest_proto_enumTypes[0].Descriptor() } func (ProcessStatus) Type() protoreflect.EnumType { - return &file_proto_ateenv_v1_guest_proto_enumTypes[0] + return &file_proto_ateenv_v1alpha_guest_proto_enumTypes[0] } func (x ProcessStatus) Number() protoreflect.EnumNumber { @@ -84,7 +84,7 @@ func (x ProcessStatus) Number() protoreflect.EnumNumber { // Deprecated: Use ProcessStatus.Descriptor instead. func (ProcessStatus) EnumDescriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{0} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{0} } // Output stream source. @@ -121,11 +121,11 @@ func (x OutputSource) String() string { } func (OutputSource) Descriptor() protoreflect.EnumDescriptor { - return file_proto_ateenv_v1_guest_proto_enumTypes[1].Descriptor() + return file_proto_ateenv_v1alpha_guest_proto_enumTypes[1].Descriptor() } func (OutputSource) Type() protoreflect.EnumType { - return &file_proto_ateenv_v1_guest_proto_enumTypes[1] + return &file_proto_ateenv_v1alpha_guest_proto_enumTypes[1] } func (x OutputSource) Number() protoreflect.EnumNumber { @@ -134,7 +134,7 @@ func (x OutputSource) Number() protoreflect.EnumNumber { // Deprecated: Use OutputSource.Descriptor instead. func (OutputSource) EnumDescriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{1} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{1} } // The Process resource representing execution state and metadata. @@ -143,7 +143,7 @@ type Process struct { // Unique process identifier. ProcessId string `protobuf:"bytes,1,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` // Current execution lifecycle state. - Status ProcessStatus `protobuf:"varint,2,opt,name=status,proto3,enum=ateenv.v1.ProcessStatus" json:"status,omitempty"` + Status ProcessStatus `protobuf:"varint,2,opt,name=status,proto3,enum=ateenv.v1alpha.ProcessStatus" json:"status,omitempty"` // Process exit status code (0 for success, 1-127 for program exit code, // 128 + signal number if terminated by signal, e.g. 137 for SIGKILL, 143 for SIGTERM). // Valid once status is COMPLETED, FAILED, or TERMINATED. @@ -158,7 +158,7 @@ type Process struct { func (x *Process) Reset() { *x = Process{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[0] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +170,7 @@ func (x *Process) String() string { func (*Process) ProtoMessage() {} func (x *Process) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[0] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,7 +183,7 @@ func (x *Process) ProtoReflect() protoreflect.Message { // Deprecated: Use Process.ProtoReflect.Descriptor instead. func (*Process) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{0} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{0} } func (x *Process) GetProcessId() string { @@ -236,7 +236,7 @@ type StartProcessRequest struct { func (x *StartProcessRequest) Reset() { *x = StartProcessRequest{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[1] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -248,7 +248,7 @@ func (x *StartProcessRequest) String() string { func (*StartProcessRequest) ProtoMessage() {} func (x *StartProcessRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[1] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -261,7 +261,7 @@ func (x *StartProcessRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StartProcessRequest.ProtoReflect.Descriptor instead. func (*StartProcessRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{1} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{1} } func (x *StartProcessRequest) GetCommand() []string { @@ -296,7 +296,7 @@ type StartProcessResponse struct { func (x *StartProcessResponse) Reset() { *x = StartProcessResponse{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[2] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -308,7 +308,7 @@ func (x *StartProcessResponse) String() string { func (*StartProcessResponse) ProtoMessage() {} func (x *StartProcessResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[2] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -321,7 +321,7 @@ func (x *StartProcessResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StartProcessResponse.ProtoReflect.Descriptor instead. func (*StartProcessResponse) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{2} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{2} } func (x *StartProcessResponse) GetProcessId() string { @@ -342,7 +342,7 @@ type GetProcessRequest struct { func (x *GetProcessRequest) Reset() { *x = GetProcessRequest{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[3] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -354,7 +354,7 @@ func (x *GetProcessRequest) String() string { func (*GetProcessRequest) ProtoMessage() {} func (x *GetProcessRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[3] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -367,7 +367,7 @@ func (x *GetProcessRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProcessRequest.ProtoReflect.Descriptor instead. func (*GetProcessRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{3} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{3} } func (x *GetProcessRequest) GetProcessId() string { @@ -394,7 +394,7 @@ type StreamProcessOutputsRequest struct { func (x *StreamProcessOutputsRequest) Reset() { *x = StreamProcessOutputsRequest{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[4] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -406,7 +406,7 @@ func (x *StreamProcessOutputsRequest) String() string { func (*StreamProcessOutputsRequest) ProtoMessage() {} func (x *StreamProcessOutputsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[4] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -419,7 +419,7 @@ func (x *StreamProcessOutputsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamProcessOutputsRequest.ProtoReflect.Descriptor instead. func (*StreamProcessOutputsRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{4} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{4} } func (x *StreamProcessOutputsRequest) GetProcessId() string { @@ -454,7 +454,7 @@ func (x *StreamProcessOutputsRequest) GetFollow() bool { type OutputChunk struct { state protoimpl.MessageState `protogen:"open.v1"` // Stream source (stdout or stderr). - Source OutputSource `protobuf:"varint,1,opt,name=source,proto3,enum=ateenv.v1.OutputSource" json:"source,omitempty"` + Source OutputSource `protobuf:"varint,1,opt,name=source,proto3,enum=ateenv.v1alpha.OutputSource" json:"source,omitempty"` // Output content bytes. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields @@ -463,7 +463,7 @@ type OutputChunk struct { func (x *OutputChunk) Reset() { *x = OutputChunk{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[5] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -475,7 +475,7 @@ func (x *OutputChunk) String() string { func (*OutputChunk) ProtoMessage() {} func (x *OutputChunk) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[5] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -488,7 +488,7 @@ func (x *OutputChunk) ProtoReflect() protoreflect.Message { // Deprecated: Use OutputChunk.ProtoReflect.Descriptor instead. func (*OutputChunk) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{5} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{5} } func (x *OutputChunk) GetSource() OutputSource { @@ -516,7 +516,7 @@ type KillProcessRequest struct { func (x *KillProcessRequest) Reset() { *x = KillProcessRequest{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[6] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -528,7 +528,7 @@ func (x *KillProcessRequest) String() string { func (*KillProcessRequest) ProtoMessage() {} func (x *KillProcessRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[6] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -541,7 +541,7 @@ func (x *KillProcessRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KillProcessRequest.ProtoReflect.Descriptor instead. func (*KillProcessRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{6} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{6} } func (x *KillProcessRequest) GetProcessId() string { @@ -562,7 +562,7 @@ type KillProcessResponse struct { func (x *KillProcessResponse) Reset() { *x = KillProcessResponse{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[7] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -574,7 +574,7 @@ func (x *KillProcessResponse) String() string { func (*KillProcessResponse) ProtoMessage() {} func (x *KillProcessResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[7] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -587,7 +587,7 @@ func (x *KillProcessResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use KillProcessResponse.ProtoReflect.Descriptor instead. func (*KillProcessResponse) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{7} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{7} } func (x *KillProcessResponse) GetExitCode() int32 { @@ -608,7 +608,7 @@ type ReadFileRequest struct { func (x *ReadFileRequest) Reset() { *x = ReadFileRequest{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[8] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -620,7 +620,7 @@ func (x *ReadFileRequest) String() string { func (*ReadFileRequest) ProtoMessage() {} func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[8] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -633,7 +633,7 @@ func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadFileRequest.ProtoReflect.Descriptor instead. func (*ReadFileRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{8} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{8} } func (x *ReadFileRequest) GetPath() string { @@ -654,7 +654,7 @@ type FileChunk struct { func (x *FileChunk) Reset() { *x = FileChunk{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[9] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -666,7 +666,7 @@ func (x *FileChunk) String() string { func (*FileChunk) ProtoMessage() {} func (x *FileChunk) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[9] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -679,7 +679,7 @@ func (x *FileChunk) ProtoReflect() protoreflect.Message { // Deprecated: Use FileChunk.ProtoReflect.Descriptor instead. func (*FileChunk) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{9} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{9} } func (x *FileChunk) GetData() []byte { @@ -704,7 +704,7 @@ type WriteFileRequest struct { func (x *WriteFileRequest) Reset() { *x = WriteFileRequest{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[10] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -716,7 +716,7 @@ func (x *WriteFileRequest) String() string { func (*WriteFileRequest) ProtoMessage() {} func (x *WriteFileRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[10] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -729,7 +729,7 @@ func (x *WriteFileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteFileRequest.ProtoReflect.Descriptor instead. func (*WriteFileRequest) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{10} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{10} } func (x *WriteFileRequest) GetPath() string { @@ -764,7 +764,7 @@ type WriteFileResponse struct { func (x *WriteFileResponse) Reset() { *x = WriteFileResponse{} - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[11] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -776,7 +776,7 @@ func (x *WriteFileResponse) String() string { func (*WriteFileResponse) ProtoMessage() {} func (x *WriteFileResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ateenv_v1_guest_proto_msgTypes[11] + mi := &file_proto_ateenv_v1alpha_guest_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -789,7 +789,7 @@ func (x *WriteFileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteFileResponse.ProtoReflect.Descriptor instead. func (*WriteFileResponse) Descriptor() ([]byte, []int) { - return file_proto_ateenv_v1_guest_proto_rawDescGZIP(), []int{11} + return file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP(), []int{11} } func (x *WriteFileResponse) GetBytesWritten() int64 { @@ -799,24 +799,24 @@ func (x *WriteFileResponse) GetBytesWritten() int64 { return 0 } -var File_proto_ateenv_v1_guest_proto protoreflect.FileDescriptor +var File_proto_ateenv_v1alpha_guest_proto protoreflect.FileDescriptor -const file_proto_ateenv_v1_guest_proto_rawDesc = "" + +const file_proto_ateenv_v1alpha_guest_proto_rawDesc = "" + "\n" + - "\x1bproto/ateenv/v1/guest.proto\x12\tateenv.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xef\x01\n" + + " proto/ateenv/v1alpha/guest.proto\x12\x0eateenv.v1alpha\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf4\x01\n" + "\aProcess\x12\x1d\n" + "\n" + - "process_id\x18\x01 \x01(\tR\tprocessId\x120\n" + - "\x06status\x18\x02 \x01(\x0e2\x18.ateenv.v1.ProcessStatusR\x06status\x12\x1b\n" + + "process_id\x18\x01 \x01(\tR\tprocessId\x125\n" + + "\x06status\x18\x02 \x01(\x0e2\x1d.ateenv.v1alpha.ProcessStatusR\x06status\x12\x1b\n" + "\texit_code\x18\x03 \x01(\x05R\bexitCode\x129\n" + "\n" + "started_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12;\n" + "\vfinished_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "finishedAt\"\xb4\x01\n" + + "finishedAt\"\xb9\x01\n" + "\x13StartProcessRequest\x12\x18\n" + "\acommand\x18\x01 \x03(\tR\acommand\x12\x10\n" + - "\x03cwd\x18\x02 \x01(\tR\x03cwd\x129\n" + - "\x03env\x18\x03 \x03(\v2'.ateenv.v1.StartProcessRequest.EnvEntryR\x03env\x1a6\n" + + "\x03cwd\x18\x02 \x01(\tR\x03cwd\x12>\n" + + "\x03env\x18\x03 \x03(\v2,.ateenv.v1alpha.StartProcessRequest.EnvEntryR\x03env\x1a6\n" + "\bEnvEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"5\n" + @@ -831,9 +831,9 @@ const file_proto_ateenv_v1_guest_proto_rawDesc = "" + "process_id\x18\x01 \x01(\tR\tprocessId\x12#\n" + "\rstdout_offset\x18\x02 \x01(\x03R\fstdoutOffset\x12#\n" + "\rstderr_offset\x18\x03 \x01(\x03R\fstderrOffset\x12\x16\n" + - "\x06follow\x18\x04 \x01(\bR\x06follow\"R\n" + - "\vOutputChunk\x12/\n" + - "\x06source\x18\x01 \x01(\x0e2\x17.ateenv.v1.OutputSourceR\x06source\x12\x12\n" + + "\x06follow\x18\x04 \x01(\bR\x06follow\"W\n" + + "\vOutputChunk\x124\n" + + "\x06source\x18\x01 \x01(\x0e2\x1c.ateenv.v1alpha.OutputSourceR\x06source\x12\x12\n" + "\x04data\x18\x02 \x01(\fR\x04data\"3\n" + "\x12KillProcessRequest\x12\x1d\n" + "\n" + @@ -859,67 +859,67 @@ const file_proto_ateenv_v1_guest_proto_rawDesc = "" + "\fOutputSource\x12\x1d\n" + "\x19OUTPUT_SOURCE_UNSPECIFIED\x10\x00\x12\x18\n" + "\x14OUTPUT_SOURCE_STDOUT\x10\x01\x12\x18\n" + - "\x14OUTPUT_SOURCE_STDERR\x10\x022\xc9\x02\n" + - "\x0eProcessService\x12O\n" + - "\fStartProcess\x12\x1e.ateenv.v1.StartProcessRequest\x1a\x1f.ateenv.v1.StartProcessResponse\x12>\n" + + "\x14OUTPUT_SOURCE_STDERR\x10\x022\xf1\x02\n" + + "\x0eProcessService\x12Y\n" + + "\fStartProcess\x12#.ateenv.v1alpha.StartProcessRequest\x1a$.ateenv.v1alpha.StartProcessResponse\x12H\n" + "\n" + - "GetProcess\x12\x1c.ateenv.v1.GetProcessRequest\x1a\x12.ateenv.v1.Process\x12X\n" + - "\x14StreamProcessOutputs\x12&.ateenv.v1.StreamProcessOutputsRequest\x1a\x16.ateenv.v1.OutputChunk0\x01\x12L\n" + - "\vKillProcess\x12\x1d.ateenv.v1.KillProcessRequest\x1a\x1e.ateenv.v1.KillProcessResponse2\x9d\x01\n" + - "\x11FileSystemService\x12>\n" + - "\bReadFile\x12\x1a.ateenv.v1.ReadFileRequest\x1a\x14.ateenv.v1.FileChunk0\x01\x12H\n" + - "\tWriteFile\x12\x1b.ateenv.v1.WriteFileRequest\x1a\x1c.ateenv.v1.WriteFileResponse(\x01B9Z7github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1b\x06proto3" + "GetProcess\x12!.ateenv.v1alpha.GetProcessRequest\x1a\x17.ateenv.v1alpha.Process\x12b\n" + + "\x14StreamProcessOutputs\x12+.ateenv.v1alpha.StreamProcessOutputsRequest\x1a\x1b.ateenv.v1alpha.OutputChunk0\x01\x12V\n" + + "\vKillProcess\x12\".ateenv.v1alpha.KillProcessRequest\x1a#.ateenv.v1alpha.KillProcessResponse2\xb1\x01\n" + + "\x11FileSystemService\x12H\n" + + "\bReadFile\x12\x1f.ateenv.v1alpha.ReadFileRequest\x1a\x19.ateenv.v1alpha.FileChunk0\x01\x12R\n" + + "\tWriteFile\x12 .ateenv.v1alpha.WriteFileRequest\x1a!.ateenv.v1alpha.WriteFileResponse(\x01BCZAgithub.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alphab\x06proto3" var ( - file_proto_ateenv_v1_guest_proto_rawDescOnce sync.Once - file_proto_ateenv_v1_guest_proto_rawDescData []byte + file_proto_ateenv_v1alpha_guest_proto_rawDescOnce sync.Once + file_proto_ateenv_v1alpha_guest_proto_rawDescData []byte ) -func file_proto_ateenv_v1_guest_proto_rawDescGZIP() []byte { - file_proto_ateenv_v1_guest_proto_rawDescOnce.Do(func() { - file_proto_ateenv_v1_guest_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1_guest_proto_rawDesc), len(file_proto_ateenv_v1_guest_proto_rawDesc))) +func file_proto_ateenv_v1alpha_guest_proto_rawDescGZIP() []byte { + file_proto_ateenv_v1alpha_guest_proto_rawDescOnce.Do(func() { + file_proto_ateenv_v1alpha_guest_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1alpha_guest_proto_rawDesc), len(file_proto_ateenv_v1alpha_guest_proto_rawDesc))) }) - return file_proto_ateenv_v1_guest_proto_rawDescData -} - -var file_proto_ateenv_v1_guest_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_proto_ateenv_v1_guest_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_proto_ateenv_v1_guest_proto_goTypes = []any{ - (ProcessStatus)(0), // 0: ateenv.v1.ProcessStatus - (OutputSource)(0), // 1: ateenv.v1.OutputSource - (*Process)(nil), // 2: ateenv.v1.Process - (*StartProcessRequest)(nil), // 3: ateenv.v1.StartProcessRequest - (*StartProcessResponse)(nil), // 4: ateenv.v1.StartProcessResponse - (*GetProcessRequest)(nil), // 5: ateenv.v1.GetProcessRequest - (*StreamProcessOutputsRequest)(nil), // 6: ateenv.v1.StreamProcessOutputsRequest - (*OutputChunk)(nil), // 7: ateenv.v1.OutputChunk - (*KillProcessRequest)(nil), // 8: ateenv.v1.KillProcessRequest - (*KillProcessResponse)(nil), // 9: ateenv.v1.KillProcessResponse - (*ReadFileRequest)(nil), // 10: ateenv.v1.ReadFileRequest - (*FileChunk)(nil), // 11: ateenv.v1.FileChunk - (*WriteFileRequest)(nil), // 12: ateenv.v1.WriteFileRequest - (*WriteFileResponse)(nil), // 13: ateenv.v1.WriteFileResponse - nil, // 14: ateenv.v1.StartProcessRequest.EnvEntry + return file_proto_ateenv_v1alpha_guest_proto_rawDescData +} + +var file_proto_ateenv_v1alpha_guest_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_ateenv_v1alpha_guest_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_proto_ateenv_v1alpha_guest_proto_goTypes = []any{ + (ProcessStatus)(0), // 0: ateenv.v1alpha.ProcessStatus + (OutputSource)(0), // 1: ateenv.v1alpha.OutputSource + (*Process)(nil), // 2: ateenv.v1alpha.Process + (*StartProcessRequest)(nil), // 3: ateenv.v1alpha.StartProcessRequest + (*StartProcessResponse)(nil), // 4: ateenv.v1alpha.StartProcessResponse + (*GetProcessRequest)(nil), // 5: ateenv.v1alpha.GetProcessRequest + (*StreamProcessOutputsRequest)(nil), // 6: ateenv.v1alpha.StreamProcessOutputsRequest + (*OutputChunk)(nil), // 7: ateenv.v1alpha.OutputChunk + (*KillProcessRequest)(nil), // 8: ateenv.v1alpha.KillProcessRequest + (*KillProcessResponse)(nil), // 9: ateenv.v1alpha.KillProcessResponse + (*ReadFileRequest)(nil), // 10: ateenv.v1alpha.ReadFileRequest + (*FileChunk)(nil), // 11: ateenv.v1alpha.FileChunk + (*WriteFileRequest)(nil), // 12: ateenv.v1alpha.WriteFileRequest + (*WriteFileResponse)(nil), // 13: ateenv.v1alpha.WriteFileResponse + nil, // 14: ateenv.v1alpha.StartProcessRequest.EnvEntry (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp } -var file_proto_ateenv_v1_guest_proto_depIdxs = []int32{ - 0, // 0: ateenv.v1.Process.status:type_name -> ateenv.v1.ProcessStatus - 15, // 1: ateenv.v1.Process.started_at:type_name -> google.protobuf.Timestamp - 15, // 2: ateenv.v1.Process.finished_at:type_name -> google.protobuf.Timestamp - 14, // 3: ateenv.v1.StartProcessRequest.env:type_name -> ateenv.v1.StartProcessRequest.EnvEntry - 1, // 4: ateenv.v1.OutputChunk.source:type_name -> ateenv.v1.OutputSource - 3, // 5: ateenv.v1.ProcessService.StartProcess:input_type -> ateenv.v1.StartProcessRequest - 5, // 6: ateenv.v1.ProcessService.GetProcess:input_type -> ateenv.v1.GetProcessRequest - 6, // 7: ateenv.v1.ProcessService.StreamProcessOutputs:input_type -> ateenv.v1.StreamProcessOutputsRequest - 8, // 8: ateenv.v1.ProcessService.KillProcess:input_type -> ateenv.v1.KillProcessRequest - 10, // 9: ateenv.v1.FileSystemService.ReadFile:input_type -> ateenv.v1.ReadFileRequest - 12, // 10: ateenv.v1.FileSystemService.WriteFile:input_type -> ateenv.v1.WriteFileRequest - 4, // 11: ateenv.v1.ProcessService.StartProcess:output_type -> ateenv.v1.StartProcessResponse - 2, // 12: ateenv.v1.ProcessService.GetProcess:output_type -> ateenv.v1.Process - 7, // 13: ateenv.v1.ProcessService.StreamProcessOutputs:output_type -> ateenv.v1.OutputChunk - 9, // 14: ateenv.v1.ProcessService.KillProcess:output_type -> ateenv.v1.KillProcessResponse - 11, // 15: ateenv.v1.FileSystemService.ReadFile:output_type -> ateenv.v1.FileChunk - 13, // 16: ateenv.v1.FileSystemService.WriteFile:output_type -> ateenv.v1.WriteFileResponse +var file_proto_ateenv_v1alpha_guest_proto_depIdxs = []int32{ + 0, // 0: ateenv.v1alpha.Process.status:type_name -> ateenv.v1alpha.ProcessStatus + 15, // 1: ateenv.v1alpha.Process.started_at:type_name -> google.protobuf.Timestamp + 15, // 2: ateenv.v1alpha.Process.finished_at:type_name -> google.protobuf.Timestamp + 14, // 3: ateenv.v1alpha.StartProcessRequest.env:type_name -> ateenv.v1alpha.StartProcessRequest.EnvEntry + 1, // 4: ateenv.v1alpha.OutputChunk.source:type_name -> ateenv.v1alpha.OutputSource + 3, // 5: ateenv.v1alpha.ProcessService.StartProcess:input_type -> ateenv.v1alpha.StartProcessRequest + 5, // 6: ateenv.v1alpha.ProcessService.GetProcess:input_type -> ateenv.v1alpha.GetProcessRequest + 6, // 7: ateenv.v1alpha.ProcessService.StreamProcessOutputs:input_type -> ateenv.v1alpha.StreamProcessOutputsRequest + 8, // 8: ateenv.v1alpha.ProcessService.KillProcess:input_type -> ateenv.v1alpha.KillProcessRequest + 10, // 9: ateenv.v1alpha.FileSystemService.ReadFile:input_type -> ateenv.v1alpha.ReadFileRequest + 12, // 10: ateenv.v1alpha.FileSystemService.WriteFile:input_type -> ateenv.v1alpha.WriteFileRequest + 4, // 11: ateenv.v1alpha.ProcessService.StartProcess:output_type -> ateenv.v1alpha.StartProcessResponse + 2, // 12: ateenv.v1alpha.ProcessService.GetProcess:output_type -> ateenv.v1alpha.Process + 7, // 13: ateenv.v1alpha.ProcessService.StreamProcessOutputs:output_type -> ateenv.v1alpha.OutputChunk + 9, // 14: ateenv.v1alpha.ProcessService.KillProcess:output_type -> ateenv.v1alpha.KillProcessResponse + 11, // 15: ateenv.v1alpha.FileSystemService.ReadFile:output_type -> ateenv.v1alpha.FileChunk + 13, // 16: ateenv.v1alpha.FileSystemService.WriteFile:output_type -> ateenv.v1alpha.WriteFileResponse 11, // [11:17] is the sub-list for method output_type 5, // [5:11] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -927,27 +927,27 @@ var file_proto_ateenv_v1_guest_proto_depIdxs = []int32{ 0, // [0:5] is the sub-list for field type_name } -func init() { file_proto_ateenv_v1_guest_proto_init() } -func file_proto_ateenv_v1_guest_proto_init() { - if File_proto_ateenv_v1_guest_proto != nil { +func init() { file_proto_ateenv_v1alpha_guest_proto_init() } +func file_proto_ateenv_v1alpha_guest_proto_init() { + if File_proto_ateenv_v1alpha_guest_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1_guest_proto_rawDesc), len(file_proto_ateenv_v1_guest_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_ateenv_v1alpha_guest_proto_rawDesc), len(file_proto_ateenv_v1alpha_guest_proto_rawDesc)), NumEnums: 2, NumMessages: 13, NumExtensions: 0, NumServices: 2, }, - GoTypes: file_proto_ateenv_v1_guest_proto_goTypes, - DependencyIndexes: file_proto_ateenv_v1_guest_proto_depIdxs, - EnumInfos: file_proto_ateenv_v1_guest_proto_enumTypes, - MessageInfos: file_proto_ateenv_v1_guest_proto_msgTypes, + GoTypes: file_proto_ateenv_v1alpha_guest_proto_goTypes, + DependencyIndexes: file_proto_ateenv_v1alpha_guest_proto_depIdxs, + EnumInfos: file_proto_ateenv_v1alpha_guest_proto_enumTypes, + MessageInfos: file_proto_ateenv_v1alpha_guest_proto_msgTypes, }.Build() - File_proto_ateenv_v1_guest_proto = out.File - file_proto_ateenv_v1_guest_proto_goTypes = nil - file_proto_ateenv_v1_guest_proto_depIdxs = nil + File_proto_ateenv_v1alpha_guest_proto = out.File + file_proto_ateenv_v1alpha_guest_proto_goTypes = nil + file_proto_ateenv_v1alpha_guest_proto_depIdxs = nil } diff --git a/proto/ateenv/v1/guest.proto b/proto/ateenv/v1alpha/guest.proto similarity index 99% rename from proto/ateenv/v1/guest.proto rename to proto/ateenv/v1alpha/guest.proto index aff440b..9fca455 100644 --- a/proto/ateenv/v1/guest.proto +++ b/proto/ateenv/v1alpha/guest.proto @@ -5,9 +5,9 @@ syntax = "proto3"; -package ateenv.v1; +package ateenv.v1alpha; -option go_package = "github.com/agent-substrate/env/proto/ateenv/v1;ateenvv1"; +option go_package = "github.com/agent-substrate/env/proto/ateenv/v1alpha;ateenvv1alpha"; import "google/protobuf/timestamp.proto"; diff --git a/proto/ateenv/v1/guest_grpc.pb.go b/proto/ateenv/v1alpha/guest_grpc.pb.go similarity index 96% rename from proto/ateenv/v1/guest_grpc.pb.go rename to proto/ateenv/v1alpha/guest_grpc.pb.go index c24c041..2a41de1 100644 --- a/proto/ateenv/v1/guest_grpc.pb.go +++ b/proto/ateenv/v1alpha/guest_grpc.pb.go @@ -7,9 +7,9 @@ // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v5.28.2 -// source: proto/ateenv/v1/guest.proto +// source: proto/ateenv/v1alpha/guest.proto -package ateenvv1 +package ateenvv1alpha import ( context "context" @@ -24,10 +24,10 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - ProcessService_StartProcess_FullMethodName = "/ateenv.v1.ProcessService/StartProcess" - ProcessService_GetProcess_FullMethodName = "/ateenv.v1.ProcessService/GetProcess" - ProcessService_StreamProcessOutputs_FullMethodName = "/ateenv.v1.ProcessService/StreamProcessOutputs" - ProcessService_KillProcess_FullMethodName = "/ateenv.v1.ProcessService/KillProcess" + ProcessService_StartProcess_FullMethodName = "/ateenv.v1alpha.ProcessService/StartProcess" + ProcessService_GetProcess_FullMethodName = "/ateenv.v1alpha.ProcessService/GetProcess" + ProcessService_StreamProcessOutputs_FullMethodName = "/ateenv.v1alpha.ProcessService/StreamProcessOutputs" + ProcessService_KillProcess_FullMethodName = "/ateenv.v1alpha.ProcessService/KillProcess" ) // ProcessServiceClient is the client API for ProcessService service. @@ -233,7 +233,7 @@ func _ProcessService_KillProcess_Handler(srv interface{}, ctx context.Context, d // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ProcessService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "ateenv.v1.ProcessService", + ServiceName: "ateenv.v1alpha.ProcessService", HandlerType: (*ProcessServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -256,12 +256,12 @@ var ProcessService_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "proto/ateenv/v1/guest.proto", + Metadata: "proto/ateenv/v1alpha/guest.proto", } const ( - FileSystemService_ReadFile_FullMethodName = "/ateenv.v1.FileSystemService/ReadFile" - FileSystemService_WriteFile_FullMethodName = "/ateenv.v1.FileSystemService/WriteFile" + FileSystemService_ReadFile_FullMethodName = "/ateenv.v1alpha.FileSystemService/ReadFile" + FileSystemService_WriteFile_FullMethodName = "/ateenv.v1alpha.FileSystemService/WriteFile" ) // FileSystemServiceClient is the client API for FileSystemService service. @@ -387,7 +387,7 @@ type FileSystemService_WriteFileServer = grpc.ClientStreamingServer[WriteFileReq // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var FileSystemService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "ateenv.v1.FileSystemService", + ServiceName: "ateenv.v1alpha.FileSystemService", HandlerType: (*FileSystemServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ @@ -402,5 +402,5 @@ var FileSystemService_ServiceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "proto/ateenv/v1/guest.proto", + Metadata: "proto/ateenv/v1alpha/guest.proto", }