diff --git a/pkg/api/rpc.go b/pkg/api/rpc.go index 2ee014b2..1720392a 100644 --- a/pkg/api/rpc.go +++ b/pkg/api/rpc.go @@ -16,6 +16,7 @@ import ( "github.com/depot/cli/pkg/proto/depot/cli/v1/cliv1connect" "github.com/depot/cli/pkg/proto/depot/cli/v1beta1/cliv1beta1connect" cliCorev1connect "github.com/depot/cli/pkg/proto/depot/core/v1/corev1connect" + "github.com/depot/cli/pkg/proto/depot/sandbox/v1/sandboxv1connect" "golang.org/x/net/http2" ) @@ -55,6 +56,14 @@ func NewSandboxClient() agentv1connect.SandboxServiceClient { return agentv1connect.NewSandboxServiceClient(getHTTPClient(getBaseURL()), getBaseURL(), WithUserAgent()) } +// NewSandboxV0Client returns a connect client for the depot.sandbox.v1 +// SandboxService — the v0 customer-surface sandbox wire that the @depot/sandbox +// TS SDK consumes (M33). All `depot sandbox ` commands in M34 use this +// client (NewSandboxClient is preserved for legacy DEP-4395 callers). +func NewSandboxV0Client() sandboxv1connect.SandboxServiceClient { + return sandboxv1connect.NewSandboxServiceClient(getHTTPClient(getBaseURL()), getBaseURL(), WithUserAgent()) +} + func NewRegistryClient() buildv1connect.RegistryServiceClient { return buildv1connect.NewRegistryServiceClient(getHTTPClient(getBaseURL()), getBaseURL(), WithUserAgent()) } diff --git a/pkg/cmd/sandbox/common.go b/pkg/cmd/sandbox/common.go new file mode 100644 index 00000000..03ce9eb4 --- /dev/null +++ b/pkg/cmd/sandbox/common.go @@ -0,0 +1,95 @@ +package sandbox + +import ( + "context" + "errors" + "fmt" + "io" + + "connectrpc.com/connect" + "github.com/depot/cli/pkg/config" + "github.com/depot/cli/pkg/helpers" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + "github.com/spf13/cobra" +) + +// resolveAuthAndOrg pulls the persistent --token / --org flags off cmd and +// returns the fully-resolved DEPOT_TOKEN + organization id every sandbox +// subcommand needs. +func resolveAuthAndOrg(ctx context.Context, cmd *cobra.Command) (token, orgID string, err error) { + token, _ = cmd.Flags().GetString("token") + token, err = helpers.ResolveOrgAuth(ctx, token) + if err != nil { + return "", "", fmt.Errorf("resolve token: %w", err) + } + orgID, _ = cmd.Flags().GetString("org") + if orgID == "" { + orgID = config.GetCurrentOrganization() + } + return token, orgID, nil +} + +// sandboxRef wraps a sandbox id in the depot.sandbox.v1 selector oneof. +// Every `` positional argument that hits the v0 wire ends up in +// SandboxRef{Selector: SandboxRef_Id{Id: id}} — this is the single helper. +func sandboxRef(id string) *sandboxv1.SandboxRef { + return &sandboxv1.SandboxRef{ + Selector: &sandboxv1.SandboxRef_Id{Id: id}, + } +} + +// consumeCommandEventStream drains a depot.sandbox.v1 CommandEvent stream +// into stdout/stderr and returns the final exit code from Finished. The +// stream shape mirrors RunCommand / RunCommandPipe / AttachCommand / +// RunHook: Started -> Stdout/Stderr/Error/EvictedEarlyData* -> Finished. +// +// EvictedEarlyData is reported on stderr as a single line so log consumers +// see the gap; the stream continues afterward. Error frames abort so callers +// do not treat degraded output as a successful command. +func consumeCommandEventStream( + stream *connect.ServerStreamForClient[sandboxv1.SandboxCommandExecutionEvent], + stdout, stderr io.Writer, +) (exitCode int32, err error) { + defer func() { _ = stream.Close() }() + for stream.Receive() { + msg := stream.Msg() + switch ev := msg.Event.(type) { + case *sandboxv1.SandboxCommandExecutionEvent_Started_: + // metadata only — nothing to print + case *sandboxv1.SandboxCommandExecutionEvent_Stdout: + if ev.Stdout != nil && len(ev.Stdout.Data) > 0 { + if _, err := stdout.Write(ev.Stdout.Data); err != nil { + return 0, fmt.Errorf("write stdout: %w", err) + } + } + case *sandboxv1.SandboxCommandExecutionEvent_Stderr: + if ev.Stderr != nil && len(ev.Stderr.Data) > 0 { + if _, err := stderr.Write(ev.Stderr.Data); err != nil { + return 0, fmt.Errorf("write stderr: %w", err) + } + } + case *sandboxv1.SandboxCommandExecutionEvent_Finished_: + if ev.Finished != nil { + return ev.Finished.ExitCode, nil + } + case *sandboxv1.SandboxCommandExecutionEvent_Error_: + if ev.Error != nil { + if _, err := fmt.Fprintf(stderr, "[command-error] %s\n", ev.Error.Reason); err != nil { + return 0, fmt.Errorf("write stderr: %w", err) + } + return 0, fmt.Errorf("command error: %s", ev.Error.Reason) + } + case *sandboxv1.SandboxCommandExecutionEvent_Evicted: + if ev.Evicted != nil { + if _, err := fmt.Fprintf(stderr, "[evicted-early-data] dropped %d bytes stdout / %d bytes stderr\n", + ev.Evicted.DroppedBytesStdout, ev.Evicted.DroppedBytesStderr); err != nil { + return 0, fmt.Errorf("write stderr: %w", err) + } + } + } + } + if err := stream.Err(); err != nil && !errors.Is(err, io.EOF) { + return 0, fmt.Errorf("command stream: %w", err) + } + return 0, fmt.Errorf("command stream closed without Finished event") +} diff --git a/pkg/cmd/sandbox/common_test.go b/pkg/cmd/sandbox/common_test.go new file mode 100644 index 00000000..21e596e9 --- /dev/null +++ b/pkg/cmd/sandbox/common_test.go @@ -0,0 +1,186 @@ +package sandbox + +import ( + "bytes" + "context" + "errors" + "io" + "net/http" + "net/http/httptest" + "strings" + "testing" + + "connectrpc.com/connect" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" +) + +// Every sandbox id passed over the wire flows through sandboxRef(). This pins +// the wire shape so a future refactor cannot silently regress to a bare string +// id without the oneof envelope. +func TestSandboxRef_PinnedShape(t *testing.T) { + r := sandboxRef("cs-abc123") + if r == nil { + t.Fatal("sandboxRef returned nil") + } + sel, ok := r.Selector.(*sandboxv1.SandboxRef_Id) + if !ok { + t.Fatalf("expected SandboxRef_Id selector, got %T", r.Selector) + } + if sel.Id != "cs-abc123" { + t.Errorf("id = %q, want cs-abc123", sel.Id) + } +} + +func TestConsumeCommandEventStreamReturnsWriterErrors(t *testing.T) { + for _, tc := range []struct { + name string + events []*sandboxv1.SandboxCommandExecutionEvent + stdout io.Writer + stderr io.Writer + wantError string + }{ + { + name: "stdout", + events: []*sandboxv1.SandboxCommandExecutionEvent{{ + Event: &sandboxv1.SandboxCommandExecutionEvent_Stdout{ + Stdout: &sandboxv1.SandboxCommandExecutionEvent_StdoutBytes{Data: []byte("out")}, + }, + }}, + stdout: errWriter{}, + stderr: io.Discard, + wantError: "write stdout", + }, + { + name: "stderr", + events: []*sandboxv1.SandboxCommandExecutionEvent{{ + Event: &sandboxv1.SandboxCommandExecutionEvent_Stderr{ + Stderr: &sandboxv1.SandboxCommandExecutionEvent_StderrBytes{Data: []byte("err")}, + }, + }}, + stdout: io.Discard, + stderr: errWriter{}, + wantError: "write stderr", + }, + { + name: "command error", + events: []*sandboxv1.SandboxCommandExecutionEvent{{ + Event: &sandboxv1.SandboxCommandExecutionEvent_Error_{ + Error: &sandboxv1.SandboxCommandExecutionEvent_Error{Reason: "degraded"}, + }, + }}, + stdout: io.Discard, + stderr: errWriter{}, + wantError: "write stderr", + }, + { + name: "evicted", + events: []*sandboxv1.SandboxCommandExecutionEvent{{ + Event: &sandboxv1.SandboxCommandExecutionEvent_Evicted{ + Evicted: &sandboxv1.SandboxCommandExecutionEvent_EvictedEarlyData{ + DroppedBytesStdout: 1, + DroppedBytesStderr: 2, + }, + }, + }}, + stdout: io.Discard, + stderr: errWriter{}, + wantError: "write stderr", + }, + } { + t.Run(tc.name, func(t *testing.T) { + stream := sandboxCommandEventStream(t, tc.events) + _, err := consumeCommandEventStream(stream, tc.stdout, tc.stderr) + if err == nil { + t.Fatal("expected writer error") + } + if !strings.Contains(err.Error(), tc.wantError) { + t.Fatalf("error = %q, want %q", err, tc.wantError) + } + }) + } +} + +func TestConsumeCommandEventStreamSuccess(t *testing.T) { + stream := sandboxCommandEventStream(t, []*sandboxv1.SandboxCommandExecutionEvent{ + { + Event: &sandboxv1.SandboxCommandExecutionEvent_Stdout{ + Stdout: &sandboxv1.SandboxCommandExecutionEvent_StdoutBytes{Data: []byte("out")}, + }, + }, + { + Event: &sandboxv1.SandboxCommandExecutionEvent_Finished_{ + Finished: &sandboxv1.SandboxCommandExecutionEvent_Finished{ExitCode: 7}, + }, + }, + }) + var stdout bytes.Buffer + exit, err := consumeCommandEventStream(stream, &stdout, io.Discard) + if err != nil { + t.Fatalf("consumeCommandEventStream returned error: %v", err) + } + if exit != 7 { + t.Fatalf("exit = %d, want 7", exit) + } + if stdout.String() != "out" { + t.Fatalf("stdout = %q, want out", stdout.String()) + } +} + +func TestConsumeCommandEventStreamReturnsCommandErrorFrame(t *testing.T) { + stream := sandboxCommandEventStream(t, []*sandboxv1.SandboxCommandExecutionEvent{ + { + Event: &sandboxv1.SandboxCommandExecutionEvent_Error_{ + Error: &sandboxv1.SandboxCommandExecutionEvent_Error{Reason: "degraded"}, + }, + }, + { + Event: &sandboxv1.SandboxCommandExecutionEvent_Finished_{ + Finished: &sandboxv1.SandboxCommandExecutionEvent_Finished{ExitCode: 0}, + }, + }, + }) + var stderr bytes.Buffer + _, err := consumeCommandEventStream(stream, io.Discard, &stderr) + if err == nil { + t.Fatal("expected command error frame to fail") + } + if !strings.Contains(err.Error(), "command error: degraded") { + t.Fatalf("error = %q, want command error", err) + } + if !strings.Contains(stderr.String(), "[command-error] degraded") { + t.Fatalf("stderr = %q, want command diagnostic", stderr.String()) + } +} + +func sandboxCommandEventStream(t *testing.T, events []*sandboxv1.SandboxCommandExecutionEvent) *connect.ServerStreamForClient[sandboxv1.SandboxCommandExecutionEvent] { + t.Helper() + const procedure = "/test.Sandbox/Stream" + handler := connect.NewServerStreamHandler[sandboxv1.RunCommandRequest, sandboxv1.SandboxCommandExecutionEvent]( + procedure, + func(_ context.Context, _ *connect.Request[sandboxv1.RunCommandRequest], stream *connect.ServerStream[sandboxv1.SandboxCommandExecutionEvent]) error { + for _, event := range events { + if err := stream.Send(event); err != nil { + return err + } + } + return nil + }, + ) + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + handler.ServeHTTP(w, r) + })) + t.Cleanup(server.Close) + + client := connect.NewClient[sandboxv1.RunCommandRequest, sandboxv1.SandboxCommandExecutionEvent](server.Client(), server.URL+procedure) + stream, err := client.CallServerStream(context.Background(), connect.NewRequest(&sandboxv1.RunCommandRequest{})) + if err != nil { + t.Fatalf("CallServerStream: %v", err) + } + return stream +} + +type errWriter struct{} + +func (errWriter) Write([]byte) (int, error) { + return 0, errors.New("writer failed") +} diff --git a/pkg/cmd/sandbox/create.go b/pkg/cmd/sandbox/create.go new file mode 100644 index 00000000..8fd2b32d --- /dev/null +++ b/pkg/cmd/sandbox/create.go @@ -0,0 +1,76 @@ +package sandbox + +import ( + "fmt" + + "connectrpc.com/connect" + "github.com/depot/cli/pkg/api" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + "github.com/spf13/cobra" +) + +// newSandboxCreate builds the `create` command, which creates a new sandbox. +// Both the name and the image ref are optional; the server fills in defaults +// when they are omitted. +func newSandboxCreate() *cobra.Command { + cmd := &cobra.Command{ + Use: "create [flags]", + Short: "Create a new sandbox", + Long: `Create a new sandbox via depot.sandbox.v1.CreateSandbox. + +Names are optional but recommended for discoverability in 'depot sandbox list'. +The runtime image defaults to the server-side default when --image is omitted.`, + Example: ` + # Minimal — defaults everywhere + depot sandbox create + + # Name + custom image + depot sandbox create --name dev --image ghcr.io/myorg/dev:latest +`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + + token, orgID, err := resolveAuthAndOrg(ctx, cmd) + if err != nil { + return err + } + + name, _ := cmd.Flags().GetString("name") + image, _ := cmd.Flags().GetString("image") + + req := &sandboxv1.CreateSandboxRequest{} + if name != "" { + req.Name = &name + } + if image != "" { + req.Runtime = &sandboxv1.Runtime{ + Runtime: &sandboxv1.Runtime_ImageRef{ImageRef: image}, + } + } + + client := api.NewSandboxV0Client() + res, err := client.CreateSandbox(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + if err != nil { + return fmt.Errorf("create sandbox: %w", err) + } + + sb := res.Msg.Sandbox + if sb == nil { + return fmt.Errorf("create sandbox: server returned no sandbox") + } + label := "" + if sb.Name != nil && *sb.Name != "" { + label = fmt.Sprintf(" %q", *sb.Name) + } + fmt.Fprintf(cmd.OutOrStdout(), "Sandbox %s%s created (org %s, status %s)\n", + sb.SandboxId, label, sb.OrganizationId, sb.Status.String()) + fmt.Fprintf(cmd.OutOrStdout(), "Exec: depot sandbox exec %s -- \n", sb.SandboxId) + fmt.Fprintf(cmd.OutOrStdout(), "Kill: depot sandbox kill %s\n", sb.SandboxId) + return nil + }, + } + + cmd.Flags().String("name", "", "Human label for the sandbox (org-scoped)") + cmd.Flags().String("image", "", "OCI image ref for the sandbox runtime (default: server-side default)") + return cmd +} diff --git a/pkg/cmd/sandbox/exec.go b/pkg/cmd/sandbox/exec.go index 99666a09..0a5ebd9a 100644 --- a/pkg/cmd/sandbox/exec.go +++ b/pkg/cmd/sandbox/exec.go @@ -1,107 +1,195 @@ package sandbox import ( + "context" "fmt" "os" + "strings" "connectrpc.com/connect" "github.com/depot/cli/pkg/api" - "github.com/depot/cli/pkg/config" - "github.com/depot/cli/pkg/helpers" civ1 "github.com/depot/cli/pkg/proto/depot/ci/v1" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + "github.com/depot/cli/pkg/sandbox" "github.com/spf13/cobra" ) +// newSandboxExec builds the `exec` command, which runs a single command in an +// existing sandbox and streams the command's output events back to the caller. +// +// The command targets a sandbox by id. The --timeout flag is deprecated: it is +// hidden and ignored, since timeouts are not part of the current wire protocol. func newSandboxExec() *cobra.Command { cmd := &cobra.Command{ - Use: "exec [flags]", - Short: "Execute a command within the compute", - Long: "Execute a command within the compute", - Example: ` - # execute command within the compute - depot sandbox exec --sandbox-id 1234567890 --session-id 1234567890 -- /bin/bash -lc whoami + Use: "exec [flags] -- [args...]", + Short: "Execute a command within a running sandbox", + Long: `Run a one-off command inside a sandbox via depot.sandbox.v1.RunCommand. - # execute command with timeout (30 seconds) - depot sandbox exec --sandbox-id 1234567890 --session-id 1234567890 --timeout 30000 -- /bin/bash -lc whoami +The command and its args follow a -- separator from cobra's flag set so flag +parsing stops there.`, + Example: ` + # Run whoami + depot sandbox exec cs-abc123 -- /bin/bash -lc whoami - # execute complex command - depot sandbox exec --sandbox-id 1234567890 --session-id 1234567890 -- /bin/bash -lc 'for i in {1..10}; do echo $i; sleep 1; done' + # Streaming loop + depot sandbox exec cs-abc123 -- /bin/bash -lc 'for i in {1..10}; do echo $i; sleep 1; done' `, - Args: cobra.MinimumNArgs(1), + Args: func(cmd *cobra.Command, args []string) error { + _, _, err := sandboxExecTarget(cmd, args) + return err + }, RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() - token, err := cmd.Flags().GetString("token") - cobra.CheckErr(err) - - token, err = helpers.ResolveOrgAuth(ctx, token) + token, orgID, err := resolveAuthAndOrg(ctx, cmd) if err != nil { - return fmt.Errorf("failed to resolve token: %w", err) + return err } - orgID, err := cmd.Flags().GetString("org") - cobra.CheckErr(err) + if legacySandboxID, _ := cmd.Flags().GetString("sandbox-id"); legacySandboxID != "" { + return runLegacySandboxExec(ctx, cmd, args, token, orgID, legacySandboxID) + } - if orgID == "" { - orgID = config.GetCurrentOrganization() + sandboxID, cmdArgs, err := sandboxExecTarget(cmd, args) + if err != nil { + return err } - sandboxID, err := cmd.Flags().GetString("sandbox-id") - cobra.CheckErr(err) + client := api.NewSandboxV0Client() - if sandboxID == "" { - return fmt.Errorf("sandbox-id is required") + if err := runHookStage(ctx, cmd, client, token, orgID, sandboxID, "on.exec", + sandboxv1.HookStage_HOOK_STAGE_EXEC, + func(s *sandbox.Spec) []sandbox.HookSpec { return s.On.Exec }, os.Stdout, os.Stderr); err != nil { + return err } - sessionID, err := cmd.Flags().GetString("session-id") - cobra.CheckErr(err) + cwd, _ := cmd.Flags().GetString("cwd") + envSlice, _ := cmd.Flags().GetStringArray("env") + sudo, _ := cmd.Flags().GetBool("sudo") - if sessionID == "" { - return fmt.Errorf("session-id is required") + envMap, err := parseEnvSlice(envSlice) + if err != nil { + return err } - timeout, err := cmd.Flags().GetInt("timeout") - cobra.CheckErr(err) + req := &sandboxv1.RunCommandRequest{ + Sandbox: sandboxRef(sandboxID), + Cmd: cmdArgs[0], + Args: cmdArgs[1:], + Env: envMap, + } + if cwd != "" { + req.Cwd = &cwd + } + if sudo { + req.Sudo = &sudo + } - client := api.NewComputeClient() + // The --timeout flag is deprecated for the positional v0 path. The + // legacy --sandbox-id path still preserves timeout semantics. + if t, _ := cmd.Flags().GetInt("timeout"); t > 0 { + fmt.Fprintln(cmd.ErrOrStderr(), "warning: --timeout is deprecated and ignored on the v0 wire; remove it (will be deleted in a follow-on slice)") + } - stream, err := client.RemoteExec(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(&civ1.ExecuteCommandRequest{ - SandboxId: sandboxID, - SessionId: sessionID, - Command: &civ1.Command{ - CommandArray: args, - TimeoutMs: int32(timeout), - }, - }), token, orgID)) + stream, err := client.RunCommand(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) if err != nil { - // nolint:wrapcheck - return sandboxExecError(err, sandboxID) + return fmt.Errorf("run command: %w", err) } - for stream.Receive() { - msg := stream.Msg() - exitCode, exited, err := writeExecuteCommandResponse(msg, os.Stdout, os.Stderr) - if err != nil { - return err - } - if exited { - if exitCode != 0 { - os.Exit(int(exitCode)) - } - return nil - } + exit, err := consumeCommandEventStream(stream, os.Stdout, os.Stderr) + if err != nil { + return err } - if err := stream.Err(); err != nil { - return sandboxExecStreamError(err, sandboxID) + if exit != 0 { + os.Exit(int(exit)) } - return nil }, } + cmd.Flags().String("cwd", "", "Working directory inside the sandbox") + cmd.Flags().StringArray("env", nil, "Environment variables to set (KEY=VALUE), repeatable") + cmd.Flags().Bool("sudo", false, "Run as root") cmd.Flags().String("sandbox-id", "", "ID of the compute to execute the command against") cmd.Flags().String("session-id", "", "The session the compute belongs to") - cmd.Flags().Int("timeout", 0, "The execution timeout in milliseconds") + // Deprecated: hidden and ignored. + cmd.Flags().Int("timeout", 0, "Deprecated: timeouts are not part of the v0 wire (will be removed)") + _ = cmd.Flags().MarkHidden("timeout") + addHookFlags(cmd, "on.exec") return cmd } + +func runLegacySandboxExec(ctx context.Context, cmd *cobra.Command, args []string, token, orgID, sandboxID string) error { + if len(args) < 1 { + return fmt.Errorf("requires a command after -- when --sandbox-id is used") + } + sessionID, _ := cmd.Flags().GetString("session-id") + if sessionID == "" { + return fmt.Errorf("session-id is required") + } + timeout, _ := cmd.Flags().GetInt("timeout") + + client := api.NewComputeClient() + stream, err := client.RemoteExec(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(&civ1.ExecuteCommandRequest{ + SandboxId: sandboxID, + SessionId: sessionID, + Command: &civ1.Command{ + CommandArray: args, + TimeoutMs: int32(timeout), + }, + }), token, orgID)) + if err != nil { + return sandboxExecError(err, sandboxID) + } + + for stream.Receive() { + msg := stream.Msg() + exitCode, exited, err := writeExecuteCommandResponse(msg, os.Stdout, os.Stderr) + if err != nil { + return err + } + if exited { + if exitCode != 0 { + os.Exit(int(exitCode)) + } + return nil + } + } + if err := stream.Err(); err != nil { + return sandboxExecStreamError(err, sandboxID) + } + + return nil +} + +func sandboxExecTarget(cmd *cobra.Command, args []string) (string, []string, error) { + legacySandboxID, _ := cmd.Flags().GetString("sandbox-id") + if legacySandboxID != "" { + if len(args) < 1 { + return "", nil, fmt.Errorf("requires a command after -- when --sandbox-id is used") + } + return legacySandboxID, args, nil + } + if err := cobra.MinimumNArgs(2)(cmd, args); err != nil { + return "", nil, err + } + return args[0], args[1:], nil +} + +// parseEnvSlice converts a list of "KEY=VALUE" strings into a map, rejecting +// any entry that has no '='. +func parseEnvSlice(in []string) (map[string]string, error) { + if len(in) == 0 { + return nil, nil + } + out := make(map[string]string, len(in)) + for _, e := range in { + k, v, ok := strings.Cut(e, "=") + if !ok { + return nil, fmt.Errorf("invalid env format %q, expected KEY=VALUE", e) + } + out[k] = v + } + return out, nil +} diff --git a/pkg/cmd/sandbox/hooks.go b/pkg/cmd/sandbox/hooks.go new file mode 100644 index 00000000..c8d2bbe6 --- /dev/null +++ b/pkg/cmd/sandbox/hooks.go @@ -0,0 +1,148 @@ +package sandbox + +import ( + "context" + "fmt" + "io" + "regexp" + "strings" + + "connectrpc.com/connect" + "github.com/depot/cli/pkg/api" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + "github.com/depot/cli/pkg/proto/depot/sandbox/v1/sandboxv1connect" + "github.com/depot/cli/pkg/sandbox" + "github.com/spf13/cobra" +) + +// addHookFlags declares the --file, --set, and --no-hook flags that every +// hook-aware command shares. stageLabel (such as "on.exec" or "on.shell") is +// interpolated into the help text. +func addHookFlags(cmd *cobra.Command, stageLabel string) { + cmd.Flags().StringP("file", "f", "", fmt.Sprintf("Path to a trusted sandbox.depot.yml file for %s hooks", stageLabel)) + cmd.Flags().StringArray("set", nil, fmt.Sprintf("Inputs as KEY=VALUE for %s ${input.KEY} substitution; repeatable", stageLabel)) + cmd.Flags().Bool("no-hook", false, fmt.Sprintf("Skip %s hooks declared in the spec", stageLabel)) +} + +// runHookStage reads the --file, --set, and --no-hook flags, resolves the named +// stage from the local spec, and runs its hooks against sandboxID. The --no-hook +// flag short-circuits to a no-op. pick selects which stage's hooks to resolve. +func runHookStage( + ctx context.Context, + cmd *cobra.Command, + client sandboxv1connect.SandboxServiceClient, + token, orgID, sandboxID, label string, + stage sandboxv1.HookStage, + pick func(*sandbox.Spec) []sandbox.HookSpec, + stdout, stderr io.Writer, +) error { + noHook, _ := cmd.Flags().GetBool("no-hook") + if noHook { + return nil + } + file, _ := cmd.Flags().GetString("file") + setPairs, _ := cmd.Flags().GetStringArray("set") + if file == "" { + if len(setPairs) > 0 { + return fmt.Errorf("%s --set requires --file", label) + } + return nil + } + hooks, err := resolveStageHooks(file, label, setPairs, pick) + if err != nil { + return fmt.Errorf("resolve %s: %w", label, err) + } + return runHooks(ctx, client, token, orgID, sandboxID, label, stage, hooks, stdout, stderr) +} + +// resolveStageHooks loads an explicitly selected sandbox.depot.yml and resolves +// only the requested hook stage. +func resolveStageHooks(file, label string, setPairs []string, pick func(*sandbox.Spec) []sandbox.HookSpec) ([]sandbox.HookSpec, error) { + if file == "" { + return nil, nil + } + spec, err := sandbox.Load(file) + if err != nil { + return nil, err + } + inputs, err := sandbox.ParseInputs(setPairs) + if err != nil { + return nil, err + } + return spec.ResolveHookStage(label, pick(spec), inputs) +} + +// runHooks runs each hook in turn against the given sandbox. label identifies +// the stage in CLI output (such as "on.exec" or "on.down"). A non-zero exit from +// any foreground hook aborts and returns immediately. A detached hook fails only +// if the spawn itself fails. +func runHooks(ctx context.Context, client sandboxv1connect.SandboxServiceClient, token, orgID, sandboxID, label string, stage sandboxv1.HookStage, hooks []sandbox.HookSpec, stdout, stderr io.Writer) error { + if len(hooks) == 0 { + return nil + } + if sandboxID == "" { + return fmt.Errorf("%s: missing sandbox id", label) + } + + for i, h := range hooks { + name := hookDisplayName(h, i) + fmt.Fprintf(stdout, "[%s %s]\n", label, name) + if err := runHook(ctx, client, token, orgID, sandboxID, name, stage, h, stdout, stderr); err != nil { + return fmt.Errorf("%s[%s]: %w", label, name, err) + } + } + return nil +} + +func runHook(ctx context.Context, client sandboxv1connect.SandboxServiceClient, token, orgID, sandboxID, name string, stage sandboxv1.HookStage, h sandbox.HookSpec, stdout, stderr io.Writer) error { + hook := &sandboxv1.HookSpec{ + Command: h.Command, + } + if h.Detach { + hook.Detach = &h.Detach + } + if h.Name != "" { + hook.Name = &h.Name + } + if h.TimeoutSeconds > 0 { + timeout := int32(h.TimeoutSeconds) + hook.TimeoutSeconds = &timeout + } + + req := &sandboxv1.RunHookRequest{ + Sandbox: sandboxRef(sandboxID), + Stage: stage, + Hook: hook, + } + + stream, err := client.RunHook(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + if err != nil { + return fmt.Errorf("hook: %w", err) + } + + exit, err := consumeCommandEventStream(stream, stdout, stderr) + if err != nil { + return err + } + if exit != 0 { + return fmt.Errorf("exit %d", exit) + } + if h.Detach { + fmt.Fprintf(stdout, "[%s detached]\n", name) + } + return nil +} + +// hookNameSanitize keeps log paths predictable and safe for shell. +var hookNameSanitize = regexp.MustCompile(`[^A-Za-z0-9_.-]+`) + +func hookDisplayName(h sandbox.HookSpec, idx int) string { + if h.Name != "" { + clean := hookNameSanitize.ReplaceAllString(h.Name, "_") + clean = strings.Trim(clean, "_") + if clean != "" { + return clean + } + } + return fmt.Sprintf("%d", idx) +} diff --git a/pkg/cmd/sandbox/kill.go b/pkg/cmd/sandbox/kill.go new file mode 100644 index 00000000..ce9378a9 --- /dev/null +++ b/pkg/cmd/sandbox/kill.go @@ -0,0 +1,51 @@ +package sandbox + +import ( + "fmt" + "strings" + + "connectrpc.com/connect" + "github.com/depot/cli/pkg/api" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + "github.com/spf13/cobra" +) + +// newSandboxKill wraps depot.sandbox.v1.SandboxService.KillSandbox — the +// forced-termination verb (terminated_by=FORCED). No hooks; if you need +// hooks, use `depot sandbox stop`. +func newSandboxKill() *cobra.Command { + cmd := &cobra.Command{ + Use: "kill [...]", + Short: "Force-terminate one or more sandboxes", + Long: `Force-terminate sandboxes by id via depot.sandbox.v1.KillSandbox. + +For a graceful shutdown that fires on.down hooks first, use 'depot sandbox stop'.`, + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + token, orgID, err := resolveAuthAndOrg(ctx, cmd) + if err != nil { + return err + } + + ids := args + + client := api.NewSandboxV0Client() + var failures []string + for _, id := range ids { + req := &sandboxv1.KillSandboxRequest{Sandbox: sandboxRef(id)} + _, err := client.KillSandbox(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + if err != nil { + failures = append(failures, fmt.Sprintf("%s: %v", id, err)) + continue + } + fmt.Fprintf(cmd.OutOrStdout(), "killed %s\n", id) + } + if len(failures) > 0 { + return fmt.Errorf("kill failed:\n %s", strings.Join(failures, "\n ")) + } + return nil + }, + } + return cmd +} diff --git a/pkg/cmd/sandbox/sandbox.go b/pkg/cmd/sandbox/sandbox.go index 9bd7a468..3d46f8bf 100644 --- a/pkg/cmd/sandbox/sandbox.go +++ b/pkg/cmd/sandbox/sandbox.go @@ -4,26 +4,42 @@ import ( "github.com/spf13/cobra" ) +// NewCmdSandbox wires up the `depot sandbox` verb tree. +// +// It registers the lifecycle and command verbs (create, exec, stop, kill) +// alongside the older CI-bastion verbs (exec-pipe, pty), which target +// CI-bastion sandboxes through a separate service. func NewCmdSandbox() *cobra.Command { cmd := &cobra.Command{ - Use: "sandbox [flags] [compute args...]", - Short: "Manage Depot compute", - Long: `Compute is the building block of Depot CI. + Use: "sandbox [flags]", + Short: "Manage Depot sandboxes", + Long: `Manage Depot sandboxes — declaratively configured VMs. -The command enables user to start, stop and interact with compute instances. +Lifecycle (depot.sandbox.v1): + create Create a new sandbox. + stop Gracefully stop a sandbox. + kill Force-terminate one or more sandboxes. -Subcommands: - exec Execute arbitrary commands within the compute. Streams stdout, stderr and exit code. - exec-pipe Execute a command, then stream bytes to the command's stdin. - pty Open a pseudo-terminal within the compute.`, +Command surface: + exec Execute a command within a running sandbox. + exec-pipe Execute a command and pipe local stdin (legacy CI-bastion). + pty Open a pseudo-terminal (legacy CI-bastion).`, } cmd.PersistentFlags().String("token", "", "Depot API token") cmd.PersistentFlags().String("org", "", "Organization ID (required when user is a member of multiple organizations)") + // Lifecycle verbs. + cmd.AddCommand(newSandboxCreate()) + cmd.AddCommand(newSandboxStop()) + cmd.AddCommand(newSandboxKill()) + + // Command verbs. cmd.AddCommand(newSandboxExec()) - cmd.AddCommand(newSandboxPty()) + + // Legacy CI-bastion verbs. cmd.AddCommand(newSandboxExecPipe()) + cmd.AddCommand(newSandboxPty()) return cmd } diff --git a/pkg/cmd/sandbox/sandbox_test.go b/pkg/cmd/sandbox/sandbox_test.go new file mode 100644 index 00000000..23af0ee9 --- /dev/null +++ b/pkg/cmd/sandbox/sandbox_test.go @@ -0,0 +1,144 @@ +package sandbox + +import ( + "context" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/depot/cli/pkg/sandbox" +) + +// Confirms every verb is registered on the root command. This catches the +// wiring mistake where a verb file exists but sandbox.go forgets to call +// AddCommand for it. +func TestSandboxVerbTree(t *testing.T) { + root := NewCmdSandbox() + + want := []string{"create", "exec", "stop", "kill"} + got := map[string]bool{} + for _, c := range root.Commands() { + // A cobra Use string can include a "[flags] " suffix; the + // first whitespace-separated token is the verb name. + name := c.Use + if idx := strings.IndexAny(name, " \t"); idx > 0 { + name = name[:idx] + } + got[name] = true + } + for _, w := range want { + if !got[w] { + t.Errorf("missing verb %q on `depot sandbox`", w) + } + } +} + +func TestSandboxStopRequiresExplicitID(t *testing.T) { + cmd := newSandboxStop() + if err := cmd.Args(cmd, nil); err == nil { + t.Fatal("expected stop without ids to fail argument validation") + } +} + +func TestSandboxKillRequiresExplicitID(t *testing.T) { + cmd := newSandboxKill() + if err := cmd.Args(cmd, nil); err == nil { + t.Fatal("expected kill without ids to fail argument validation") + } +} + +func TestRunHookStageDoesNotDiscoverSpecImplicitly(t *testing.T) { + cmd := newSandboxExec() + if err := runHookStage(context.Background(), cmd, nil, "", "", "cs-123", "on.exec", 0, nil, nil, nil); err != nil { + t.Fatalf("runHookStage without --file returned error: %v", err) + } +} + +func TestRunHookStageSetRequiresFile(t *testing.T) { + cmd := newSandboxExec() + if err := cmd.Flags().Set("set", "name=value"); err != nil { + t.Fatalf("set flag: %v", err) + } + + err := runHookStage(context.Background(), cmd, nil, "", "", "cs-123", "on.exec", 0, nil, nil, nil) + if err == nil { + t.Fatal("expected --set without --file to fail") + } + if !strings.Contains(err.Error(), "--set requires --file") { + t.Fatalf("error = %q, want --set requires --file", err) + } +} + +func TestResolveStageHooksOnlyValidatesSelectedStage(t *testing.T) { + dir := t.TempDir() + specPath := filepath.Join(dir, "sandbox.depot.yml") + if err := os.WriteFile(specPath, []byte(` +on: + exec: + - echo ${input.name} + down: + - "" +`), 0644); err != nil { + t.Fatalf("write spec: %v", err) + } + + hooks, err := resolveStageHooks(specPath, "on.exec", []string{"name=value"}, func(s *sandbox.Spec) []sandbox.HookSpec { + return s.On.Exec + }) + if err != nil { + t.Fatalf("resolveStageHooks returned error: %v", err) + } + if len(hooks) != 1 || hooks[0].Command != "echo 'value'" { + t.Fatalf("hooks = %#v, want resolved on.exec only", hooks) + } +} + +func TestSandboxStopSetRequiresFile(t *testing.T) { + cmd := newSandboxStop() + cmd.SetArgs([]string{"cs-123", "--set", "name=value"}) + + err := cmd.Execute() + if err == nil { + t.Fatal("expected stop --set without --file to fail") + } + if !strings.Contains(err.Error(), "--set requires --file") { + t.Fatalf("error = %q, want --set requires --file", err) + } +} + +func TestSandboxExecAcceptsLegacySandboxIDFlag(t *testing.T) { + cmd := newSandboxExec() + if err := cmd.Flags().Set("sandbox-id", "cs-legacy"); err != nil { + t.Fatalf("set sandbox-id: %v", err) + } + if err := cmd.Flags().Set("session-id", "session-legacy"); err != nil { + t.Fatalf("set session-id: %v", err) + } + + sandboxID, cmdArgs, err := sandboxExecTarget(cmd, []string{"/bin/echo", "hello"}) + if err != nil { + t.Fatalf("sandboxExecTarget returned error: %v", err) + } + if sandboxID != "cs-legacy" { + t.Fatalf("sandboxID = %q, want cs-legacy", sandboxID) + } + if strings.Join(cmdArgs, " ") != "/bin/echo hello" { + t.Fatalf("cmdArgs = %q, want /bin/echo hello", cmdArgs) + } +} + +func TestSandboxExecAcceptsPositionalSandboxID(t *testing.T) { + cmd := newSandboxExec() + + sandboxID, cmdArgs, err := sandboxExecTarget(cmd, []string{"cs-positional", "/bin/echo", "hello"}) + if err != nil { + t.Fatalf("sandboxExecTarget returned error: %v", err) + } + if sandboxID != "cs-positional" { + t.Fatalf("sandboxID = %q, want cs-positional", sandboxID) + } + if strings.Join(cmdArgs, " ") != "/bin/echo hello" { + t.Fatalf("cmdArgs = %q, want /bin/echo hello", cmdArgs) + } +} diff --git a/pkg/cmd/sandbox/stop.go b/pkg/cmd/sandbox/stop.go new file mode 100644 index 00000000..9c9dad04 --- /dev/null +++ b/pkg/cmd/sandbox/stop.go @@ -0,0 +1,89 @@ +package sandbox + +import ( + "fmt" + "os" + "strings" + + "connectrpc.com/connect" + "github.com/depot/cli/pkg/api" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + "github.com/depot/cli/pkg/sandbox" + "github.com/spf13/cobra" +) + +// newSandboxStop builds the `stop` command, which gracefully shuts down a +// sandbox. `down` is kept as an alias for backward compatibility. +// +// When --file is provided, the CLI runs that spec's on.down hooks against the +// sandbox before requesting the stop. Pass --no-hook to skip hooks. +func newSandboxStop() *cobra.Command { + cmd := &cobra.Command{ + Use: "stop [...]", + Aliases: []string{"down"}, + Short: "Gracefully stop a sandbox", + Long: `Stop a sandbox via depot.sandbox.v1.StopSandbox (terminated_by=GRACEFUL). + +With --file, runs that spec's on.down hooks against each sandbox before +requesting a stop. Pass --no-hook to skip hooks.`, + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + + file, _ := cmd.Flags().GetString("file") + setPairs, _ := cmd.Flags().GetStringArray("set") + noHook, _ := cmd.Flags().GetBool("no-hook") + blocking, _ := cmd.Flags().GetBool("blocking") + + ids := args + + var downHooks []sandbox.HookSpec + if !noHook && file != "" { + hooks, err := resolveStageHooks(file, "on.down", setPairs, func(s *sandbox.Spec) []sandbox.HookSpec { + return s.On.Down + }) + if err != nil { + return fmt.Errorf("resolve on.down: %w", err) + } + downHooks = hooks + } + if !noHook && file == "" && len(setPairs) > 0 { + return fmt.Errorf("on.down --set requires --file") + } + + token, orgID, err := resolveAuthAndOrg(ctx, cmd) + if err != nil { + return err + } + + client := api.NewSandboxV0Client() + var failures []string + for _, id := range ids { + if len(downHooks) > 0 { + if err := runHooks(ctx, client, token, orgID, id, "on.down", sandboxv1.HookStage_HOOK_STAGE_DOWN, downHooks, os.Stdout, os.Stderr); err != nil { + failures = append(failures, fmt.Sprintf("%s: on.down: %v", id, err)) + continue + } + } + req := &sandboxv1.StopSandboxRequest{Sandbox: sandboxRef(id)} + if blocking { + b := true + req.Blocking = &b + } + _, err := client.StopSandbox(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + if err != nil { + failures = append(failures, fmt.Sprintf("%s: stop: %v", id, err)) + continue + } + fmt.Fprintf(cmd.OutOrStdout(), "stopped %s\n", id) + } + if len(failures) > 0 { + return fmt.Errorf("stop failed:\n %s", strings.Join(failures, "\n ")) + } + return nil + }, + } + cmd.Flags().Bool("blocking", false, "Block until the sandbox reaches terminal state (subject to server-side cap)") + addHookFlags(cmd, "on.down") + return cmd +} diff --git a/pkg/proto/depot/ci/v1/api.pb.go b/pkg/proto/depot/ci/v1/api.pb.go index 07886bea..8c5ea0de 100644 --- a/pkg/proto/depot/ci/v1/api.pb.go +++ b/pkg/proto/depot/ci/v1/api.pb.go @@ -545,6 +545,10 @@ func (x *Command) GetTimeoutMs() int32 { } // ExecuteCommandResponse returns the command execution results. +// +// Legacy line-framed rail (oneof) and binary-safe raw rail (flat fields) +// are populated on the same message when applicable. Old clients switch +// on the oneof variant; new clients concatenate the raw fields. type ExecuteCommandResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/pkg/proto/depot/sandbox/v1/command.pb.go b/pkg/proto/depot/sandbox/v1/command.pb.go new file mode 100644 index 00000000..2fd1a246 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/command.pb.go @@ -0,0 +1,1939 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/command.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Lifecycle stages a command moves through. The status reflects where the +// command is in its lifecycle and is independent of the process exit code. +// +// PENDING: accepted but not yet started inside the sandbox. +// RUNNING: started and may be producing output. +// FINISHED: the process exited; exit_code is populated. +// FAILED: the process never started, or the sandbox reported an error. +// KILLED: the command was signaled to stop while running. +type SandboxCommandExecutionStatus int32 + +const ( + SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_UNSPECIFIED SandboxCommandExecutionStatus = 0 + SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_PENDING SandboxCommandExecutionStatus = 1 + SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_RUNNING SandboxCommandExecutionStatus = 2 + SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_FINISHED SandboxCommandExecutionStatus = 3 + SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_FAILED SandboxCommandExecutionStatus = 4 + SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_KILLED SandboxCommandExecutionStatus = 5 +) + +// Enum value maps for SandboxCommandExecutionStatus. +var ( + SandboxCommandExecutionStatus_name = map[int32]string{ + 0: "SANDBOX_COMMAND_EXECUTION_STATUS_UNSPECIFIED", + 1: "SANDBOX_COMMAND_EXECUTION_STATUS_PENDING", + 2: "SANDBOX_COMMAND_EXECUTION_STATUS_RUNNING", + 3: "SANDBOX_COMMAND_EXECUTION_STATUS_FINISHED", + 4: "SANDBOX_COMMAND_EXECUTION_STATUS_FAILED", + 5: "SANDBOX_COMMAND_EXECUTION_STATUS_KILLED", + } + SandboxCommandExecutionStatus_value = map[string]int32{ + "SANDBOX_COMMAND_EXECUTION_STATUS_UNSPECIFIED": 0, + "SANDBOX_COMMAND_EXECUTION_STATUS_PENDING": 1, + "SANDBOX_COMMAND_EXECUTION_STATUS_RUNNING": 2, + "SANDBOX_COMMAND_EXECUTION_STATUS_FINISHED": 3, + "SANDBOX_COMMAND_EXECUTION_STATUS_FAILED": 4, + "SANDBOX_COMMAND_EXECUTION_STATUS_KILLED": 5, + } +) + +func (x SandboxCommandExecutionStatus) Enum() *SandboxCommandExecutionStatus { + p := new(SandboxCommandExecutionStatus) + *p = x + return p +} + +func (x SandboxCommandExecutionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SandboxCommandExecutionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_command_proto_enumTypes[0].Descriptor() +} + +func (SandboxCommandExecutionStatus) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_command_proto_enumTypes[0] +} + +func (x SandboxCommandExecutionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SandboxCommandExecutionStatus.Descriptor instead. +func (SandboxCommandExecutionStatus) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{0} +} + +// Metadata describing a single command that was run in a sandbox. Returned by +// the lookup, list, and attach calls. +type SandboxCommandExecution struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique command identifier assigned by the server. + CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + // Identifier of the sandbox the command ran in. + SandboxId string `protobuf:"bytes,2,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + // The program that was executed. + Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` + // Arguments passed to the program. + Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` + // Working directory the command ran in, if one was specified. + Cwd *string `protobuf:"bytes,5,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` + // Environment variables that were set for the command. + Env map[string]string `protobuf:"bytes,6,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Whether the command ran with elevated privileges. + Sudo bool `protobuf:"varint,7,opt,name=sudo,proto3" json:"sudo,omitempty"` + // Whether the command was requested to run detached from the output stream. + Detached bool `protobuf:"varint,8,opt,name=detached,proto3" json:"detached,omitempty"` + // Current lifecycle stage of the command. + Status SandboxCommandExecutionStatus `protobuf:"varint,9,opt,name=status,proto3,enum=depot.sandbox.v1.SandboxCommandExecutionStatus" json:"status,omitempty"` + // When the command started running. + StartedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + // When the command finished, once it has exited. + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=finished_at,json=finishedAt,proto3,oneof" json:"finished_at,omitempty"` + // Exit code of the process, once it has exited. + ExitCode *int32 `protobuf:"varint,12,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` + // Total number of bytes emitted on stdout so far. + StdoutBytesEmitted int64 `protobuf:"varint,13,opt,name=stdout_bytes_emitted,json=stdoutBytesEmitted,proto3" json:"stdout_bytes_emitted,omitempty"` + // Total number of bytes emitted on stderr so far. + StderrBytesEmitted int64 `protobuf:"varint,14,opt,name=stderr_bytes_emitted,json=stderrBytesEmitted,proto3" json:"stderr_bytes_emitted,omitempty"` +} + +func (x *SandboxCommandExecution) Reset() { + *x = SandboxCommandExecution{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecution) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecution) ProtoMessage() {} + +func (x *SandboxCommandExecution) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecution.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecution) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{0} +} + +func (x *SandboxCommandExecution) GetCmdId() string { + if x != nil { + return x.CmdId + } + return "" +} + +func (x *SandboxCommandExecution) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +func (x *SandboxCommandExecution) GetCmd() string { + if x != nil { + return x.Cmd + } + return "" +} + +func (x *SandboxCommandExecution) GetArgs() []string { + if x != nil { + return x.Args + } + return nil +} + +func (x *SandboxCommandExecution) GetCwd() string { + if x != nil && x.Cwd != nil { + return *x.Cwd + } + return "" +} + +func (x *SandboxCommandExecution) GetEnv() map[string]string { + if x != nil { + return x.Env + } + return nil +} + +func (x *SandboxCommandExecution) GetSudo() bool { + if x != nil { + return x.Sudo + } + return false +} + +func (x *SandboxCommandExecution) GetDetached() bool { + if x != nil { + return x.Detached + } + return false +} + +func (x *SandboxCommandExecution) GetStatus() SandboxCommandExecutionStatus { + if x != nil { + return x.Status + } + return SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_UNSPECIFIED +} + +func (x *SandboxCommandExecution) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *SandboxCommandExecution) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +func (x *SandboxCommandExecution) GetExitCode() int32 { + if x != nil && x.ExitCode != nil { + return *x.ExitCode + } + return 0 +} + +func (x *SandboxCommandExecution) GetStdoutBytesEmitted() int64 { + if x != nil { + return x.StdoutBytesEmitted + } + return 0 +} + +func (x *SandboxCommandExecution) GetStderrBytesEmitted() int64 { + if x != nil { + return x.StderrBytesEmitted + } + return 0 +} + +// A single event in a command's output stream. Output data is carried as raw +// bytes, which clients decode themselves. The stream normally begins with a +// Started event, carries interleaved stdout and stderr chunks, and ends with a +// Finished event. +type SandboxCommandExecutionEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Event: + // + // *SandboxCommandExecutionEvent_Started_ + // *SandboxCommandExecutionEvent_Stdout + // *SandboxCommandExecutionEvent_Stderr + // *SandboxCommandExecutionEvent_Finished_ + // *SandboxCommandExecutionEvent_Error_ + // *SandboxCommandExecutionEvent_Evicted + Event isSandboxCommandExecutionEvent_Event `protobuf_oneof:"event"` +} + +func (x *SandboxCommandExecutionEvent) Reset() { + *x = SandboxCommandExecutionEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionEvent) ProtoMessage() {} + +func (x *SandboxCommandExecutionEvent) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionEvent.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1} +} + +func (m *SandboxCommandExecutionEvent) GetEvent() isSandboxCommandExecutionEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *SandboxCommandExecutionEvent) GetStarted() *SandboxCommandExecutionEvent_Started { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Started_); ok { + return x.Started + } + return nil +} + +func (x *SandboxCommandExecutionEvent) GetStdout() *SandboxCommandExecutionEvent_StdoutBytes { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Stdout); ok { + return x.Stdout + } + return nil +} + +func (x *SandboxCommandExecutionEvent) GetStderr() *SandboxCommandExecutionEvent_StderrBytes { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Stderr); ok { + return x.Stderr + } + return nil +} + +func (x *SandboxCommandExecutionEvent) GetFinished() *SandboxCommandExecutionEvent_Finished { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Finished_); ok { + return x.Finished + } + return nil +} + +func (x *SandboxCommandExecutionEvent) GetError() *SandboxCommandExecutionEvent_Error { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Error_); ok { + return x.Error + } + return nil +} + +func (x *SandboxCommandExecutionEvent) GetEvicted() *SandboxCommandExecutionEvent_EvictedEarlyData { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Evicted); ok { + return x.Evicted + } + return nil +} + +type isSandboxCommandExecutionEvent_Event interface { + isSandboxCommandExecutionEvent_Event() +} + +type SandboxCommandExecutionEvent_Started_ struct { + Started *SandboxCommandExecutionEvent_Started `protobuf:"bytes,1,opt,name=started,proto3,oneof"` +} + +type SandboxCommandExecutionEvent_Stdout struct { + Stdout *SandboxCommandExecutionEvent_StdoutBytes `protobuf:"bytes,2,opt,name=stdout,proto3,oneof"` +} + +type SandboxCommandExecutionEvent_Stderr struct { + Stderr *SandboxCommandExecutionEvent_StderrBytes `protobuf:"bytes,3,opt,name=stderr,proto3,oneof"` +} + +type SandboxCommandExecutionEvent_Finished_ struct { + Finished *SandboxCommandExecutionEvent_Finished `protobuf:"bytes,4,opt,name=finished,proto3,oneof"` +} + +type SandboxCommandExecutionEvent_Error_ struct { + Error *SandboxCommandExecutionEvent_Error `protobuf:"bytes,5,opt,name=error,proto3,oneof"` +} + +type SandboxCommandExecutionEvent_Evicted struct { + Evicted *SandboxCommandExecutionEvent_EvictedEarlyData `protobuf:"bytes,6,opt,name=evicted,proto3,oneof"` +} + +func (*SandboxCommandExecutionEvent_Started_) isSandboxCommandExecutionEvent_Event() {} + +func (*SandboxCommandExecutionEvent_Stdout) isSandboxCommandExecutionEvent_Event() {} + +func (*SandboxCommandExecutionEvent_Stderr) isSandboxCommandExecutionEvent_Event() {} + +func (*SandboxCommandExecutionEvent_Finished_) isSandboxCommandExecutionEvent_Event() {} + +func (*SandboxCommandExecutionEvent_Error_) isSandboxCommandExecutionEvent_Event() {} + +func (*SandboxCommandExecutionEvent_Evicted) isSandboxCommandExecutionEvent_Event() {} + +// Request to run a command in a sandbox. The response is a stream of output +// events that begins with Started and ends with Finished, or terminates with a +// transport-level error. +type RunCommandRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sandbox to run the command in. + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // The program to execute. + Cmd string `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"` + // Arguments to pass to the program. + Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` + // Working directory to run the command in. Defaults to the sandbox default. + Cwd *string `protobuf:"bytes,4,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` + // Environment variables for the command. These are merged on top of the + // sandbox environment, and values given here take precedence on conflict. + Env map[string]string `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Run the command with elevated privileges. + Sudo *bool `protobuf:"varint,6,opt,name=sudo,proto3,oneof" json:"sudo,omitempty"` + // Reserved for running a command detached from the output stream. Detached + // mode is not yet supported and requests that set it are rejected. + Detached *bool `protobuf:"varint,7,opt,name=detached,proto3,oneof" json:"detached,omitempty"` +} + +func (x *RunCommandRequest) Reset() { + *x = RunCommandRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunCommandRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunCommandRequest) ProtoMessage() {} + +func (x *RunCommandRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunCommandRequest.ProtoReflect.Descriptor instead. +func (*RunCommandRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{2} +} + +func (x *RunCommandRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *RunCommandRequest) GetCmd() string { + if x != nil { + return x.Cmd + } + return "" +} + +func (x *RunCommandRequest) GetArgs() []string { + if x != nil { + return x.Args + } + return nil +} + +func (x *RunCommandRequest) GetCwd() string { + if x != nil && x.Cwd != nil { + return *x.Cwd + } + return "" +} + +func (x *RunCommandRequest) GetEnv() map[string]string { + if x != nil { + return x.Env + } + return nil +} + +func (x *RunCommandRequest) GetSudo() bool { + if x != nil && x.Sudo != nil { + return *x.Sudo + } + return false +} + +func (x *RunCommandRequest) GetDetached() bool { + if x != nil && x.Detached != nil { + return *x.Detached + } + return false +} + +// A message on the bidirectional pipe stream used to run a command while +// feeding it standard input. The first message on the stream must carry init, +// which describes the command to run, using the same fields as RunCommand. +// Every later message carries a chunk of stdin bytes, and closing the request +// stream signals end of input. The response is the same output event stream +// that RunCommand produces. Input bytes are not retained, so reattaching to a +// command shows only its output, not the input it was given. +type RunCommandPipeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Input: + // + // *RunCommandPipeRequest_Init + // *RunCommandPipeRequest_Stdin + Input isRunCommandPipeRequest_Input `protobuf_oneof:"input"` +} + +func (x *RunCommandPipeRequest) Reset() { + *x = RunCommandPipeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunCommandPipeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunCommandPipeRequest) ProtoMessage() {} + +func (x *RunCommandPipeRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunCommandPipeRequest.ProtoReflect.Descriptor instead. +func (*RunCommandPipeRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{3} +} + +func (m *RunCommandPipeRequest) GetInput() isRunCommandPipeRequest_Input { + if m != nil { + return m.Input + } + return nil +} + +func (x *RunCommandPipeRequest) GetInit() *RunCommandRequest { + if x, ok := x.GetInput().(*RunCommandPipeRequest_Init); ok { + return x.Init + } + return nil +} + +func (x *RunCommandPipeRequest) GetStdin() []byte { + if x, ok := x.GetInput().(*RunCommandPipeRequest_Stdin); ok { + return x.Stdin + } + return nil +} + +type isRunCommandPipeRequest_Input interface { + isRunCommandPipeRequest_Input() +} + +type RunCommandPipeRequest_Init struct { + // Describes the command to run. Required as the first message. + Init *RunCommandRequest `protobuf:"bytes,1,opt,name=init,proto3,oneof"` +} + +type RunCommandPipeRequest_Stdin struct { + // A chunk of bytes to write to the command's standard input. + Stdin []byte `protobuf:"bytes,2,opt,name=stdin,proto3,oneof"` +} + +func (*RunCommandPipeRequest_Init) isRunCommandPipeRequest_Input() {} + +func (*RunCommandPipeRequest_Stdin) isRunCommandPipeRequest_Input() {} + +// Response containing the metadata for a single command looked up by its id. +type GetCommandResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The command's metadata. + Command *SandboxCommandExecution `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` +} + +func (x *GetCommandResponse) Reset() { + *x = GetCommandResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCommandResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCommandResponse) ProtoMessage() {} + +func (x *GetCommandResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCommandResponse.ProtoReflect.Descriptor instead. +func (*GetCommandResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{4} +} + +func (x *GetCommandResponse) GetCommand() *SandboxCommandExecution { + if x != nil { + return x.Command + } + return nil +} + +// Request to list the commands run in a sandbox, ordered newest first and +// returned a page at a time. +type ListCommandsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sandbox whose commands to list. + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // Maximum number of commands to return in one page. + PageSize *int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Opaque token from a previous response used to fetch the next page. Pass it + // back unchanged. + PageToken *string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` + // If non-empty, only commands whose status appears in this set are returned. + // Unspecified entries are ignored. + StatusFilter []SandboxCommandExecutionStatus `protobuf:"varint,4,rep,packed,name=status_filter,json=statusFilter,proto3,enum=depot.sandbox.v1.SandboxCommandExecutionStatus" json:"status_filter,omitempty"` +} + +func (x *ListCommandsRequest) Reset() { + *x = ListCommandsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCommandsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCommandsRequest) ProtoMessage() {} + +func (x *ListCommandsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCommandsRequest.ProtoReflect.Descriptor instead. +func (*ListCommandsRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{5} +} + +func (x *ListCommandsRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *ListCommandsRequest) GetPageSize() int32 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListCommandsRequest) GetPageToken() string { + if x != nil && x.PageToken != nil { + return *x.PageToken + } + return "" +} + +func (x *ListCommandsRequest) GetStatusFilter() []SandboxCommandExecutionStatus { + if x != nil { + return x.StatusFilter + } + return nil +} + +// A page of command metadata. +type ListCommandsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The commands in this page. + Commands []*SandboxCommandExecution `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` + // Token to pass on a later request to fetch the next page, absent when there + // are no more results. + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` +} + +func (x *ListCommandsResponse) Reset() { + *x = ListCommandsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCommandsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCommandsResponse) ProtoMessage() {} + +func (x *ListCommandsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCommandsResponse.ProtoReflect.Descriptor instead. +func (*ListCommandsResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{6} +} + +func (x *ListCommandsResponse) GetCommands() []*SandboxCommandExecution { + if x != nil { + return x.Commands + } + return nil +} + +func (x *ListCommandsResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +// Request to reattach to the output of a command that was already started. The +// response is the same output event stream the run calls produce: a replay of +// the command's stored output, followed by live output if the command is still +// running. +type AttachCommandRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The command to reattach to. + Command *SandboxCommandExecutionRef `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` + // Optional starting point for the replay. When set, only output past the + // given offsets is replayed, which lets a caller resume without seeing output + // it already received. + SinceOffset *AttachOffset `protobuf:"bytes,2,opt,name=since_offset,json=sinceOffset,proto3,oneof" json:"since_offset,omitempty"` +} + +func (x *AttachCommandRequest) Reset() { + *x = AttachCommandRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachCommandRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachCommandRequest) ProtoMessage() {} + +func (x *AttachCommandRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachCommandRequest.ProtoReflect.Descriptor instead. +func (*AttachCommandRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{7} +} + +func (x *AttachCommandRequest) GetCommand() *SandboxCommandExecutionRef { + if x != nil { + return x.Command + } + return nil +} + +func (x *AttachCommandRequest) GetSinceOffset() *AttachOffset { + if x != nil { + return x.SinceOffset + } + return nil +} + +// Per-stream starting offsets for an attach replay. Each offset is compared +// against the cumulative end-of-chunk byte count, so only events strictly past +// the given offset are replayed. An unset offset defaults to zero, replaying +// that stream from the beginning. +type AttachOffset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Replay only stdout past this cumulative byte offset. + StdoutOffset *int64 `protobuf:"varint,1,opt,name=stdout_offset,json=stdoutOffset,proto3,oneof" json:"stdout_offset,omitempty"` + // Replay only stderr past this cumulative byte offset. + StderrOffset *int64 `protobuf:"varint,2,opt,name=stderr_offset,json=stderrOffset,proto3,oneof" json:"stderr_offset,omitempty"` +} + +func (x *AttachOffset) Reset() { + *x = AttachOffset{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachOffset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachOffset) ProtoMessage() {} + +func (x *AttachOffset) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachOffset.ProtoReflect.Descriptor instead. +func (*AttachOffset) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{8} +} + +func (x *AttachOffset) GetStdoutOffset() int64 { + if x != nil && x.StdoutOffset != nil { + return *x.StdoutOffset + } + return 0 +} + +func (x *AttachOffset) GetStderrOffset() int64 { + if x != nil && x.StderrOffset != nil { + return *x.StderrOffset + } + return 0 +} + +// Request to signal a running command identified by its id. An unknown signal +// name is rejected with an invalid-argument error, and a command that is no +// longer running (already finished or never registered) is reported as not +// found. +type KillCommandRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of the command to signal. + CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + // Signal to send, such as "SIGTERM" or "SIGINT". Defaults to SIGTERM when + // omitted. SIGKILL is not supported and is rejected with an invalid-argument + // error. + Signal *string `protobuf:"bytes,2,opt,name=signal,proto3,oneof" json:"signal,omitempty"` +} + +func (x *KillCommandRequest) Reset() { + *x = KillCommandRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KillCommandRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KillCommandRequest) ProtoMessage() {} + +func (x *KillCommandRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KillCommandRequest.ProtoReflect.Descriptor instead. +func (*KillCommandRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{9} +} + +func (x *KillCommandRequest) GetCmdId() string { + if x != nil { + return x.CmdId + } + return "" +} + +func (x *KillCommandRequest) GetSignal() string { + if x != nil && x.Signal != nil { + return *x.Signal + } + return "" +} + +// Empty response returned when a command is successfully signaled. +type KillCommandResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *KillCommandResponse) Reset() { + *x = KillCommandResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KillCommandResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KillCommandResponse) ProtoMessage() {} + +func (x *KillCommandResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KillCommandResponse.ProtoReflect.Descriptor instead. +func (*KillCommandResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{10} +} + +// Emitted once when the command begins running. +type SandboxCommandExecutionEvent_Started struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of the command that started. + CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + // When the command started running. + StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` +} + +func (x *SandboxCommandExecutionEvent_Started) Reset() { + *x = SandboxCommandExecutionEvent_Started{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionEvent_Started) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionEvent_Started) ProtoMessage() {} + +func (x *SandboxCommandExecutionEvent_Started) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionEvent_Started.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent_Started) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *SandboxCommandExecutionEvent_Started) GetCmdId() string { + if x != nil { + return x.CmdId + } + return "" +} + +func (x *SandboxCommandExecutionEvent_Started) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +// A chunk of standard output. +type SandboxCommandExecutionEvent_StdoutBytes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The raw output bytes in this chunk. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Cumulative number of stdout bytes through the end of this chunk. + ByteOffset int64 `protobuf:"varint,2,opt,name=byte_offset,json=byteOffset,proto3" json:"byte_offset,omitempty"` + // When this chunk was produced. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *SandboxCommandExecutionEvent_StdoutBytes) Reset() { + *x = SandboxCommandExecutionEvent_StdoutBytes{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionEvent_StdoutBytes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionEvent_StdoutBytes) ProtoMessage() {} + +func (x *SandboxCommandExecutionEvent_StdoutBytes) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionEvent_StdoutBytes.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent_StdoutBytes) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *SandboxCommandExecutionEvent_StdoutBytes) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *SandboxCommandExecutionEvent_StdoutBytes) GetByteOffset() int64 { + if x != nil { + return x.ByteOffset + } + return 0 +} + +func (x *SandboxCommandExecutionEvent_StdoutBytes) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// A chunk of standard error. +type SandboxCommandExecutionEvent_StderrBytes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The raw output bytes in this chunk. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Cumulative number of stderr bytes through the end of this chunk. + ByteOffset int64 `protobuf:"varint,2,opt,name=byte_offset,json=byteOffset,proto3" json:"byte_offset,omitempty"` + // When this chunk was produced. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *SandboxCommandExecutionEvent_StderrBytes) Reset() { + *x = SandboxCommandExecutionEvent_StderrBytes{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionEvent_StderrBytes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionEvent_StderrBytes) ProtoMessage() {} + +func (x *SandboxCommandExecutionEvent_StderrBytes) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionEvent_StderrBytes.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent_StderrBytes) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *SandboxCommandExecutionEvent_StderrBytes) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *SandboxCommandExecutionEvent_StderrBytes) GetByteOffset() int64 { + if x != nil { + return x.ByteOffset + } + return 0 +} + +func (x *SandboxCommandExecutionEvent_StderrBytes) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Emitted once when the command exits. +type SandboxCommandExecutionEvent_Finished struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The process exit code. + ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + // When the command finished. + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` +} + +func (x *SandboxCommandExecutionEvent_Finished) Reset() { + *x = SandboxCommandExecutionEvent_Finished{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionEvent_Finished) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionEvent_Finished) ProtoMessage() {} + +func (x *SandboxCommandExecutionEvent_Finished) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionEvent_Finished.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent_Finished) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 3} +} + +func (x *SandboxCommandExecutionEvent_Finished) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *SandboxCommandExecutionEvent_Finished) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +// Reports a problem with the output stream while it remains open, for example +// a dropped chunk when more output is still expected. Most failures are +// surfaced as transport-level errors instead; this event is for partial +// problems where the stream continues. +type SandboxCommandExecutionEvent_Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A human-readable description of the problem. + Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *SandboxCommandExecutionEvent_Error) Reset() { + *x = SandboxCommandExecutionEvent_Error{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionEvent_Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionEvent_Error) ProtoMessage() {} + +func (x *SandboxCommandExecutionEvent_Error) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionEvent_Error.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent_Error) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 4} +} + +func (x *SandboxCommandExecutionEvent_Error) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +// Reports that some early output was discarded before this consumer began +// reading, which can happen when reattaching to a command whose buffered +// output had already rolled over. The counts let the consumer understand how +// much output is missing. +type SandboxCommandExecutionEvent_EvictedEarlyData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Number of stdout bytes that were dropped. + DroppedBytesStdout int64 `protobuf:"varint,1,opt,name=dropped_bytes_stdout,json=droppedBytesStdout,proto3" json:"dropped_bytes_stdout,omitempty"` + // Number of stderr bytes that were dropped. + DroppedBytesStderr int64 `protobuf:"varint,2,opt,name=dropped_bytes_stderr,json=droppedBytesStderr,proto3" json:"dropped_bytes_stderr,omitempty"` +} + +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) Reset() { + *x = SandboxCommandExecutionEvent_EvictedEarlyData{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionEvent_EvictedEarlyData) ProtoMessage() {} + +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionEvent_EvictedEarlyData.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent_EvictedEarlyData) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 5} +} + +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) GetDroppedBytesStdout() int64 { + if x != nil { + return x.DroppedBytesStdout + } + return 0 +} + +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) GetDroppedBytesStderr() int64 { + if x != nil { + return x.DroppedBytesStderr + } + return 0 +} + +var File_depot_sandbox_v1_command_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_command_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x1a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xac, 0x05, 0x0a, 0x17, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, + 0x63, 0x6d, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6d, + 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x63, 0x6d, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x63, 0x77, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x63, 0x77, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x44, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x64, 0x6f, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x75, 0x64, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x65, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x66, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0a, 0x66, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x65, + 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, + 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, + 0x14, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x65, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x74, 0x64, + 0x6f, 0x75, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x12, + 0x30, 0x0a, 0x14, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x65, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, + 0x74, 0x64, 0x65, 0x72, 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x64, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x63, 0x77, + 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x22, + 0x81, 0x09, 0x0a, 0x1c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x52, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x07, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, + 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x64, 0x65, 0x72, + 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, + 0x12, 0x55, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x48, 0x00, 0x52, 0x08, 0x66, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x4c, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x07, 0x65, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, 0x45, 0x61, + 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x07, 0x65, 0x76, 0x69, 0x63, 0x74, + 0x65, 0x64, 0x1a, 0x5b, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x15, 0x0a, + 0x06, 0x63, 0x6d, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, + 0x6d, 0x64, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x1a, + 0x7c, 0x0a, 0x0b, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x4f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x7c, 0x0a, + 0x0b, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x64, 0x0a, 0x08, 0x46, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, + 0x74, 0x1a, 0x1f, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x1a, 0x76, 0x0a, 0x10, 0x45, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, 0x45, 0x61, 0x72, + 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, + 0x70, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x22, 0xd8, 0x02, 0x0a, 0x11, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x63, 0x6d, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x63, 0x77, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x63, 0x77, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3e, + 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x17, + 0x0a, 0x04, 0x73, 0x75, 0x64, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x04, + 0x73, 0x75, 0x64, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, 0x63, + 0x68, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x64, 0x65, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x63, 0x77, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x75, 0x64, + 0x6f, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x22, 0x73, + 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x69, 0x70, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, + 0x69, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x22, 0x59, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x86, + 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x20, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x45, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x14, 0x41, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x46, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x46, 0x0a, 0x0c, 0x73, 0x69, 0x6e, + 0x63, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, + 0x64, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, + 0x0d, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x4f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74, 0x64, 0x6f, + 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74, + 0x64, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x53, 0x0a, 0x12, 0x4b, + 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x6d, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x63, 0x6d, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x22, 0x15, 0x0a, 0x13, 0x4b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0xb6, 0x02, 0x0a, 0x1d, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x2c, 0x53, 0x41, 0x4e, + 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, + 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x53, + 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x45, + 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x2c, 0x0a, 0x28, 0x53, 0x41, 0x4e, + 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, + 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, + 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x53, 0x41, 0x4e, 0x44, 0x42, + 0x4f, 0x58, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, + 0x53, 0x48, 0x45, 0x44, 0x10, 0x03, 0x12, 0x2b, 0x0a, 0x27, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, + 0x58, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x2b, 0x0a, 0x27, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x43, + 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4b, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, + 0x42, 0xc1, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_command_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_command_proto_rawDescData = file_depot_sandbox_v1_command_proto_rawDesc +) + +func file_depot_sandbox_v1_command_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_command_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_command_proto_rawDescData) + }) + return file_depot_sandbox_v1_command_proto_rawDescData +} + +var file_depot_sandbox_v1_command_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_depot_sandbox_v1_command_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_depot_sandbox_v1_command_proto_goTypes = []interface{}{ + (SandboxCommandExecutionStatus)(0), // 0: depot.sandbox.v1.SandboxCommandExecutionStatus + (*SandboxCommandExecution)(nil), // 1: depot.sandbox.v1.SandboxCommandExecution + (*SandboxCommandExecutionEvent)(nil), // 2: depot.sandbox.v1.SandboxCommandExecutionEvent + (*RunCommandRequest)(nil), // 3: depot.sandbox.v1.RunCommandRequest + (*RunCommandPipeRequest)(nil), // 4: depot.sandbox.v1.RunCommandPipeRequest + (*GetCommandResponse)(nil), // 5: depot.sandbox.v1.GetCommandResponse + (*ListCommandsRequest)(nil), // 6: depot.sandbox.v1.ListCommandsRequest + (*ListCommandsResponse)(nil), // 7: depot.sandbox.v1.ListCommandsResponse + (*AttachCommandRequest)(nil), // 8: depot.sandbox.v1.AttachCommandRequest + (*AttachOffset)(nil), // 9: depot.sandbox.v1.AttachOffset + (*KillCommandRequest)(nil), // 10: depot.sandbox.v1.KillCommandRequest + (*KillCommandResponse)(nil), // 11: depot.sandbox.v1.KillCommandResponse + nil, // 12: depot.sandbox.v1.SandboxCommandExecution.EnvEntry + (*SandboxCommandExecutionEvent_Started)(nil), // 13: depot.sandbox.v1.SandboxCommandExecutionEvent.Started + (*SandboxCommandExecutionEvent_StdoutBytes)(nil), // 14: depot.sandbox.v1.SandboxCommandExecutionEvent.StdoutBytes + (*SandboxCommandExecutionEvent_StderrBytes)(nil), // 15: depot.sandbox.v1.SandboxCommandExecutionEvent.StderrBytes + (*SandboxCommandExecutionEvent_Finished)(nil), // 16: depot.sandbox.v1.SandboxCommandExecutionEvent.Finished + (*SandboxCommandExecutionEvent_Error)(nil), // 17: depot.sandbox.v1.SandboxCommandExecutionEvent.Error + (*SandboxCommandExecutionEvent_EvictedEarlyData)(nil), // 18: depot.sandbox.v1.SandboxCommandExecutionEvent.EvictedEarlyData + nil, // 19: depot.sandbox.v1.RunCommandRequest.EnvEntry + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*SandboxRef)(nil), // 21: depot.sandbox.v1.SandboxRef + (*SandboxCommandExecutionRef)(nil), // 22: depot.sandbox.v1.SandboxCommandExecutionRef +} +var file_depot_sandbox_v1_command_proto_depIdxs = []int32{ + 12, // 0: depot.sandbox.v1.SandboxCommandExecution.env:type_name -> depot.sandbox.v1.SandboxCommandExecution.EnvEntry + 0, // 1: depot.sandbox.v1.SandboxCommandExecution.status:type_name -> depot.sandbox.v1.SandboxCommandExecutionStatus + 20, // 2: depot.sandbox.v1.SandboxCommandExecution.started_at:type_name -> google.protobuf.Timestamp + 20, // 3: depot.sandbox.v1.SandboxCommandExecution.finished_at:type_name -> google.protobuf.Timestamp + 13, // 4: depot.sandbox.v1.SandboxCommandExecutionEvent.started:type_name -> depot.sandbox.v1.SandboxCommandExecutionEvent.Started + 14, // 5: depot.sandbox.v1.SandboxCommandExecutionEvent.stdout:type_name -> depot.sandbox.v1.SandboxCommandExecutionEvent.StdoutBytes + 15, // 6: depot.sandbox.v1.SandboxCommandExecutionEvent.stderr:type_name -> depot.sandbox.v1.SandboxCommandExecutionEvent.StderrBytes + 16, // 7: depot.sandbox.v1.SandboxCommandExecutionEvent.finished:type_name -> depot.sandbox.v1.SandboxCommandExecutionEvent.Finished + 17, // 8: depot.sandbox.v1.SandboxCommandExecutionEvent.error:type_name -> depot.sandbox.v1.SandboxCommandExecutionEvent.Error + 18, // 9: depot.sandbox.v1.SandboxCommandExecutionEvent.evicted:type_name -> depot.sandbox.v1.SandboxCommandExecutionEvent.EvictedEarlyData + 21, // 10: depot.sandbox.v1.RunCommandRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 19, // 11: depot.sandbox.v1.RunCommandRequest.env:type_name -> depot.sandbox.v1.RunCommandRequest.EnvEntry + 3, // 12: depot.sandbox.v1.RunCommandPipeRequest.init:type_name -> depot.sandbox.v1.RunCommandRequest + 1, // 13: depot.sandbox.v1.GetCommandResponse.command:type_name -> depot.sandbox.v1.SandboxCommandExecution + 21, // 14: depot.sandbox.v1.ListCommandsRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 0, // 15: depot.sandbox.v1.ListCommandsRequest.status_filter:type_name -> depot.sandbox.v1.SandboxCommandExecutionStatus + 1, // 16: depot.sandbox.v1.ListCommandsResponse.commands:type_name -> depot.sandbox.v1.SandboxCommandExecution + 22, // 17: depot.sandbox.v1.AttachCommandRequest.command:type_name -> depot.sandbox.v1.SandboxCommandExecutionRef + 9, // 18: depot.sandbox.v1.AttachCommandRequest.since_offset:type_name -> depot.sandbox.v1.AttachOffset + 20, // 19: depot.sandbox.v1.SandboxCommandExecutionEvent.Started.started_at:type_name -> google.protobuf.Timestamp + 20, // 20: depot.sandbox.v1.SandboxCommandExecutionEvent.StdoutBytes.timestamp:type_name -> google.protobuf.Timestamp + 20, // 21: depot.sandbox.v1.SandboxCommandExecutionEvent.StderrBytes.timestamp:type_name -> google.protobuf.Timestamp + 20, // 22: depot.sandbox.v1.SandboxCommandExecutionEvent.Finished.finished_at:type_name -> google.protobuf.Timestamp + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_command_proto_init() } +func file_depot_sandbox_v1_command_proto_init() { + if File_depot_sandbox_v1_command_proto != nil { + return + } + file_depot_sandbox_v1_refs_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecution); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunCommandRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunCommandPipeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCommandResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCommandsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCommandsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttachCommandRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttachOffset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KillCommandRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KillCommandResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionEvent_Started); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionEvent_StdoutBytes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionEvent_StderrBytes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionEvent_Finished); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionEvent_Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_command_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionEvent_EvictedEarlyData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_command_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_command_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*SandboxCommandExecutionEvent_Started_)(nil), + (*SandboxCommandExecutionEvent_Stdout)(nil), + (*SandboxCommandExecutionEvent_Stderr)(nil), + (*SandboxCommandExecutionEvent_Finished_)(nil), + (*SandboxCommandExecutionEvent_Error_)(nil), + (*SandboxCommandExecutionEvent_Evicted)(nil), + } + file_depot_sandbox_v1_command_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_command_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*RunCommandPipeRequest_Init)(nil), + (*RunCommandPipeRequest_Stdin)(nil), + } + file_depot_sandbox_v1_command_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_command_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_command_proto_msgTypes[7].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_command_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_command_proto_msgTypes[9].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_command_proto_rawDesc, + NumEnums: 1, + NumMessages: 19, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_command_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_command_proto_depIdxs, + EnumInfos: file_depot_sandbox_v1_command_proto_enumTypes, + MessageInfos: file_depot_sandbox_v1_command_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_command_proto = out.File + file_depot_sandbox_v1_command_proto_rawDesc = nil + file_depot_sandbox_v1_command_proto_goTypes = nil + file_depot_sandbox_v1_command_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/filesystem.pb.go b/pkg/proto/depot/sandbox/v1/filesystem.pb.go new file mode 100644 index 00000000..9d75ac15 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/filesystem.pb.go @@ -0,0 +1,2722 @@ +// File system operations against a sandbox. +// +// The server may back these operations with different implementations, but the +// message surface is the same regardless of which one is active. +// +// Errors are returned as Connect errors with a FileSystemErrorDetail attached. +// The SDK converts that detail into a Node-style Error carrying code, syscall, +// path, and errno, so callers can keep writing code against the shape of +// node:fs/promises. +// +// The RPCs themselves are declared on the sandbox service; this file only +// defines the messages and enums they use. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/filesystem.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Mirrors the Node fs error codes the SDK exposes. The server attaches one of +// these to a Connect error, and the client maps it to Error.code. +// +// OTHER is the catch-all used when the server cannot classify the failure into +// a specific Node code. Callers still receive a FileSystemError with the +// syscall and path context, just with a generic code. +type FileSystemErrorCode int32 + +const ( + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_UNSPECIFIED FileSystemErrorCode = 0 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_ENOENT FileSystemErrorCode = 1 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_EEXIST FileSystemErrorCode = 2 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_EACCES FileSystemErrorCode = 3 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_EISDIR FileSystemErrorCode = 4 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_ENOTDIR FileSystemErrorCode = 5 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_ENOTEMPTY FileSystemErrorCode = 6 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_EROFS FileSystemErrorCode = 7 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_EBADF FileSystemErrorCode = 8 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_EIO FileSystemErrorCode = 9 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_EINVAL FileSystemErrorCode = 10 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_ENAMETOOLONG FileSystemErrorCode = 11 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_ELOOP FileSystemErrorCode = 12 + FileSystemErrorCode_FILESYSTEM_ERROR_CODE_OTHER FileSystemErrorCode = 99 +) + +// Enum value maps for FileSystemErrorCode. +var ( + FileSystemErrorCode_name = map[int32]string{ + 0: "FILESYSTEM_ERROR_CODE_UNSPECIFIED", + 1: "FILESYSTEM_ERROR_CODE_ENOENT", + 2: "FILESYSTEM_ERROR_CODE_EEXIST", + 3: "FILESYSTEM_ERROR_CODE_EACCES", + 4: "FILESYSTEM_ERROR_CODE_EISDIR", + 5: "FILESYSTEM_ERROR_CODE_ENOTDIR", + 6: "FILESYSTEM_ERROR_CODE_ENOTEMPTY", + 7: "FILESYSTEM_ERROR_CODE_EROFS", + 8: "FILESYSTEM_ERROR_CODE_EBADF", + 9: "FILESYSTEM_ERROR_CODE_EIO", + 10: "FILESYSTEM_ERROR_CODE_EINVAL", + 11: "FILESYSTEM_ERROR_CODE_ENAMETOOLONG", + 12: "FILESYSTEM_ERROR_CODE_ELOOP", + 99: "FILESYSTEM_ERROR_CODE_OTHER", + } + FileSystemErrorCode_value = map[string]int32{ + "FILESYSTEM_ERROR_CODE_UNSPECIFIED": 0, + "FILESYSTEM_ERROR_CODE_ENOENT": 1, + "FILESYSTEM_ERROR_CODE_EEXIST": 2, + "FILESYSTEM_ERROR_CODE_EACCES": 3, + "FILESYSTEM_ERROR_CODE_EISDIR": 4, + "FILESYSTEM_ERROR_CODE_ENOTDIR": 5, + "FILESYSTEM_ERROR_CODE_ENOTEMPTY": 6, + "FILESYSTEM_ERROR_CODE_EROFS": 7, + "FILESYSTEM_ERROR_CODE_EBADF": 8, + "FILESYSTEM_ERROR_CODE_EIO": 9, + "FILESYSTEM_ERROR_CODE_EINVAL": 10, + "FILESYSTEM_ERROR_CODE_ENAMETOOLONG": 11, + "FILESYSTEM_ERROR_CODE_ELOOP": 12, + "FILESYSTEM_ERROR_CODE_OTHER": 99, + } +) + +func (x FileSystemErrorCode) Enum() *FileSystemErrorCode { + p := new(FileSystemErrorCode) + *p = x + return p +} + +func (x FileSystemErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FileSystemErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_filesystem_proto_enumTypes[0].Descriptor() +} + +func (FileSystemErrorCode) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_filesystem_proto_enumTypes[0] +} + +func (x FileSystemErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FileSystemErrorCode.Descriptor instead. +func (FileSystemErrorCode) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{0} +} + +// The kind of file returned by Stat. The SDK uses it to back the isDirectory, +// isFile, and similar checks on a node:fs/promises-style Stats object. +type FileType int32 + +const ( + FileType_FILE_TYPE_UNSPECIFIED FileType = 0 + FileType_FILE_TYPE_FILE FileType = 1 + FileType_FILE_TYPE_DIRECTORY FileType = 2 + FileType_FILE_TYPE_SYMLINK FileType = 3 + FileType_FILE_TYPE_BLOCK_DEVICE FileType = 4 + FileType_FILE_TYPE_CHARACTER_DEVICE FileType = 5 + FileType_FILE_TYPE_FIFO FileType = 6 + FileType_FILE_TYPE_SOCKET FileType = 7 +) + +// Enum value maps for FileType. +var ( + FileType_name = map[int32]string{ + 0: "FILE_TYPE_UNSPECIFIED", + 1: "FILE_TYPE_FILE", + 2: "FILE_TYPE_DIRECTORY", + 3: "FILE_TYPE_SYMLINK", + 4: "FILE_TYPE_BLOCK_DEVICE", + 5: "FILE_TYPE_CHARACTER_DEVICE", + 6: "FILE_TYPE_FIFO", + 7: "FILE_TYPE_SOCKET", + } + FileType_value = map[string]int32{ + "FILE_TYPE_UNSPECIFIED": 0, + "FILE_TYPE_FILE": 1, + "FILE_TYPE_DIRECTORY": 2, + "FILE_TYPE_SYMLINK": 3, + "FILE_TYPE_BLOCK_DEVICE": 4, + "FILE_TYPE_CHARACTER_DEVICE": 5, + "FILE_TYPE_FIFO": 6, + "FILE_TYPE_SOCKET": 7, + } +) + +func (x FileType) Enum() *FileType { + p := new(FileType) + *p = x + return p +} + +func (x FileType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FileType) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_filesystem_proto_enumTypes[1].Descriptor() +} + +func (FileType) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_filesystem_proto_enumTypes[1] +} + +func (x FileType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FileType.Descriptor instead. +func (FileType) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{1} +} + +// The error detail the server attaches to a Connect error's details. The SDK +// reads it back and uses it to build a Node-style FileSystemError. +type FileSystemErrorDetail struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code FileSystemErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=depot.sandbox.v1.FileSystemErrorCode" json:"code,omitempty"` + Syscall string `protobuf:"bytes,2,opt,name=syscall,proto3" json:"syscall,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"` +} + +func (x *FileSystemErrorDetail) Reset() { + *x = FileSystemErrorDetail{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileSystemErrorDetail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileSystemErrorDetail) ProtoMessage() {} + +func (x *FileSystemErrorDetail) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileSystemErrorDetail.ProtoReflect.Descriptor instead. +func (*FileSystemErrorDetail) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{0} +} + +func (x *FileSystemErrorDetail) GetCode() FileSystemErrorCode { + if x != nil { + return x.Code + } + return FileSystemErrorCode_FILESYSTEM_ERROR_CODE_UNSPECIFIED +} + +func (x *FileSystemErrorDetail) GetSyscall() string { + if x != nil { + return x.Syscall + } + return "" +} + +func (x *FileSystemErrorDetail) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *FileSystemErrorDetail) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +type MkdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // When true, create parent directories as needed (mkdir -p). When false (the + // default), a missing parent directory fails with ENOENT. + Recursive *bool `protobuf:"varint,3,opt,name=recursive,proto3,oneof" json:"recursive,omitempty"` + // Octal permission mode for the new directory. When unset, the server applies + // its umask. + Mode *uint32 `protobuf:"varint,4,opt,name=mode,proto3,oneof" json:"mode,omitempty"` +} + +func (x *MkdirRequest) Reset() { + *x = MkdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirRequest) ProtoMessage() {} + +func (x *MkdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirRequest.ProtoReflect.Descriptor instead. +func (*MkdirRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{1} +} + +func (x *MkdirRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *MkdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *MkdirRequest) GetRecursive() bool { + if x != nil && x.Recursive != nil { + return *x.Recursive + } + return false +} + +func (x *MkdirRequest) GetMode() uint32 { + if x != nil && x.Mode != nil { + return *x.Mode + } + return 0 +} + +type MkdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MkdirResponse) Reset() { + *x = MkdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirResponse) ProtoMessage() {} + +func (x *MkdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirResponse.ProtoReflect.Descriptor instead. +func (*MkdirResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{2} +} + +type StatRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // When true (the default), follow symlinks like stat. When false, report on + // the link itself like lstat. + FollowSymlinks *bool `protobuf:"varint,3,opt,name=follow_symlinks,json=followSymlinks,proto3,oneof" json:"follow_symlinks,omitempty"` +} + +func (x *StatRequest) Reset() { + *x = StatRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatRequest) ProtoMessage() {} + +func (x *StatRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatRequest.ProtoReflect.Descriptor instead. +func (*StatRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{3} +} + +func (x *StatRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *StatRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *StatRequest) GetFollowSymlinks() bool { + if x != nil && x.FollowSymlinks != nil { + return *x.FollowSymlinks + } + return false +} + +type StatResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"` + Type FileType `protobuf:"varint,4,opt,name=type,proto3,enum=depot.sandbox.v1.FileType" json:"type,omitempty"` + Uname string `protobuf:"bytes,5,opt,name=uname,proto3" json:"uname,omitempty"` + Gname string `protobuf:"bytes,6,opt,name=gname,proto3" json:"gname,omitempty"` + MtimeUnixSeconds int64 `protobuf:"varint,7,opt,name=mtime_unix_seconds,json=mtimeUnixSeconds,proto3" json:"mtime_unix_seconds,omitempty"` +} + +func (x *StatResponse) Reset() { + *x = StatResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatResponse) ProtoMessage() {} + +func (x *StatResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatResponse.ProtoReflect.Descriptor instead. +func (*StatResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{4} +} + +func (x *StatResponse) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *StatResponse) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *StatResponse) GetMode() uint32 { + if x != nil { + return x.Mode + } + return 0 +} + +func (x *StatResponse) GetType() FileType { + if x != nil { + return x.Type + } + return FileType_FILE_TYPE_UNSPECIFIED +} + +func (x *StatResponse) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *StatResponse) GetGname() string { + if x != nil { + return x.Gname + } + return "" +} + +func (x *StatResponse) GetMtimeUnixSeconds() int64 { + if x != nil { + return x.MtimeUnixSeconds + } + return 0 +} + +type ReadDirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Matches the withFileTypes option of node:fs/promises readdir. The response + // entries always carry name and type; when this is false the SDK exposes them + // as a plain array of names instead. + WithFileTypes *bool `protobuf:"varint,3,opt,name=with_file_types,json=withFileTypes,proto3,oneof" json:"with_file_types,omitempty"` +} + +func (x *ReadDirRequest) Reset() { + *x = ReadDirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadDirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadDirRequest) ProtoMessage() {} + +func (x *ReadDirRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadDirRequest.ProtoReflect.Descriptor instead. +func (*ReadDirRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{5} +} + +func (x *ReadDirRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *ReadDirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ReadDirRequest) GetWithFileTypes() bool { + if x != nil && x.WithFileTypes != nil { + return *x.WithFileTypes + } + return false +} + +type ReadDirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*DirEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (x *ReadDirResponse) Reset() { + *x = ReadDirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadDirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadDirResponse) ProtoMessage() {} + +func (x *ReadDirResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadDirResponse.ProtoReflect.Descriptor instead. +func (*ReadDirResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{6} +} + +func (x *ReadDirResponse) GetEntries() []*DirEntry { + if x != nil { + return x.Entries + } + return nil +} + +type DirEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type FileType `protobuf:"varint,2,opt,name=type,proto3,enum=depot.sandbox.v1.FileType" json:"type,omitempty"` +} + +func (x *DirEntry) Reset() { + *x = DirEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirEntry) ProtoMessage() {} + +func (x *DirEntry) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirEntry.ProtoReflect.Descriptor instead. +func (*DirEntry) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{7} +} + +func (x *DirEntry) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DirEntry) GetType() FileType { + if x != nil { + return x.Type + } + return FileType_FILE_TYPE_UNSPECIFIED +} + +type RemoveRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // When true, remove directories and their contents recursively (rm -rf). + Recursive *bool `protobuf:"varint,3,opt,name=recursive,proto3,oneof" json:"recursive,omitempty"` + // When true, removing a path that does not exist succeeds instead of failing + // with ENOENT, matching the force option of node fs.rm. + IgnoreMissing *bool `protobuf:"varint,4,opt,name=ignore_missing,json=ignoreMissing,proto3,oneof" json:"ignore_missing,omitempty"` +} + +func (x *RemoveRequest) Reset() { + *x = RemoveRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveRequest) ProtoMessage() {} + +func (x *RemoveRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveRequest.ProtoReflect.Descriptor instead. +func (*RemoveRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{8} +} + +func (x *RemoveRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *RemoveRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *RemoveRequest) GetRecursive() bool { + if x != nil && x.Recursive != nil { + return *x.Recursive + } + return false +} + +func (x *RemoveRequest) GetIgnoreMissing() bool { + if x != nil && x.IgnoreMissing != nil { + return *x.IgnoreMissing + } + return false +} + +type RemoveResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveResponse) Reset() { + *x = RemoveResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveResponse) ProtoMessage() {} + +func (x *RemoveResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveResponse.ProtoReflect.Descriptor instead. +func (*RemoveResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{9} +} + +type RenameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + FromPath string `protobuf:"bytes,2,opt,name=from_path,json=fromPath,proto3" json:"from_path,omitempty"` + ToPath string `protobuf:"bytes,3,opt,name=to_path,json=toPath,proto3" json:"to_path,omitempty"` +} + +func (x *RenameRequest) Reset() { + *x = RenameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameRequest) ProtoMessage() {} + +func (x *RenameRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameRequest.ProtoReflect.Descriptor instead. +func (*RenameRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{10} +} + +func (x *RenameRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *RenameRequest) GetFromPath() string { + if x != nil { + return x.FromPath + } + return "" +} + +func (x *RenameRequest) GetToPath() string { + if x != nil { + return x.ToPath + } + return "" +} + +type RenameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RenameResponse) Reset() { + *x = RenameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameResponse) ProtoMessage() {} + +func (x *RenameResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameResponse.ProtoReflect.Descriptor instead. +func (*RenameResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{11} +} + +type CopyFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + FromPath string `protobuf:"bytes,2,opt,name=from_path,json=fromPath,proto3" json:"from_path,omitempty"` + ToPath string `protobuf:"bytes,3,opt,name=to_path,json=toPath,proto3" json:"to_path,omitempty"` + // When true, preserve the file's mode, owner, and timestamps where the server + // can (cp -p). + PreserveMetadata *bool `protobuf:"varint,4,opt,name=preserve_metadata,json=preserveMetadata,proto3,oneof" json:"preserve_metadata,omitempty"` +} + +func (x *CopyFileRequest) Reset() { + *x = CopyFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CopyFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyFileRequest) ProtoMessage() {} + +func (x *CopyFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyFileRequest.ProtoReflect.Descriptor instead. +func (*CopyFileRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{12} +} + +func (x *CopyFileRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *CopyFileRequest) GetFromPath() string { + if x != nil { + return x.FromPath + } + return "" +} + +func (x *CopyFileRequest) GetToPath() string { + if x != nil { + return x.ToPath + } + return "" +} + +func (x *CopyFileRequest) GetPreserveMetadata() bool { + if x != nil && x.PreserveMetadata != nil { + return *x.PreserveMetadata + } + return false +} + +type CopyFileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CopyFileResponse) Reset() { + *x = CopyFileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CopyFileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyFileResponse) ProtoMessage() {} + +func (x *CopyFileResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyFileResponse.ProtoReflect.Descriptor instead. +func (*CopyFileResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{13} +} + +type TruncateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *TruncateRequest) Reset() { + *x = TruncateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TruncateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TruncateRequest) ProtoMessage() {} + +func (x *TruncateRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TruncateRequest.ProtoReflect.Descriptor instead. +func (*TruncateRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{14} +} + +func (x *TruncateRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *TruncateRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *TruncateRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type TruncateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TruncateResponse) Reset() { + *x = TruncateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TruncateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TruncateResponse) ProtoMessage() {} + +func (x *TruncateResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TruncateResponse.ProtoReflect.Descriptor instead. +func (*TruncateResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{15} +} + +type ChmodRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // The new permission mode as an octal integer. The SDK accepts either a + // string ("755") or a number (0o755) and converts it. + Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"` +} + +func (x *ChmodRequest) Reset() { + *x = ChmodRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChmodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChmodRequest) ProtoMessage() {} + +func (x *ChmodRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChmodRequest.ProtoReflect.Descriptor instead. +func (*ChmodRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{16} +} + +func (x *ChmodRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *ChmodRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ChmodRequest) GetMode() uint32 { + if x != nil { + return x.Mode + } + return 0 +} + +type ChmodResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ChmodResponse) Reset() { + *x = ChmodResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChmodResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChmodResponse) ProtoMessage() {} + +func (x *ChmodResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChmodResponse.ProtoReflect.Descriptor instead. +func (*ChmodResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{17} +} + +type ChownRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Uid *uint32 `protobuf:"varint,3,opt,name=uid,proto3,oneof" json:"uid,omitempty"` + Gid *uint32 `protobuf:"varint,4,opt,name=gid,proto3,oneof" json:"gid,omitempty"` +} + +func (x *ChownRequest) Reset() { + *x = ChownRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChownRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChownRequest) ProtoMessage() {} + +func (x *ChownRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChownRequest.ProtoReflect.Descriptor instead. +func (*ChownRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{18} +} + +func (x *ChownRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *ChownRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ChownRequest) GetUid() uint32 { + if x != nil && x.Uid != nil { + return *x.Uid + } + return 0 +} + +func (x *ChownRequest) GetGid() uint32 { + if x != nil && x.Gid != nil { + return *x.Gid + } + return 0 +} + +type ChownResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ChownResponse) Reset() { + *x = ChownResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChownResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChownResponse) ProtoMessage() {} + +func (x *ChownResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChownResponse.ProtoReflect.Descriptor instead. +func (*ChownResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{19} +} + +type SymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // Create link_path as a symlink pointing at target (ln -s target link_path). + Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + LinkPath string `protobuf:"bytes,3,opt,name=link_path,json=linkPath,proto3" json:"link_path,omitempty"` +} + +func (x *SymlinkRequest) Reset() { + *x = SymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SymlinkRequest) ProtoMessage() {} + +func (x *SymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SymlinkRequest.ProtoReflect.Descriptor instead. +func (*SymlinkRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{20} +} + +func (x *SymlinkRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *SymlinkRequest) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *SymlinkRequest) GetLinkPath() string { + if x != nil { + return x.LinkPath + } + return "" +} + +type SymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SymlinkResponse) Reset() { + *x = SymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SymlinkResponse) ProtoMessage() {} + +func (x *SymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SymlinkResponse.ProtoReflect.Descriptor instead. +func (*SymlinkResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{21} +} + +type ReadlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *ReadlinkRequest) Reset() { + *x = ReadlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadlinkRequest) ProtoMessage() {} + +func (x *ReadlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadlinkRequest.ProtoReflect.Descriptor instead. +func (*ReadlinkRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{22} +} + +func (x *ReadlinkRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *ReadlinkRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type ReadlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` +} + +func (x *ReadlinkResponse) Reset() { + *x = ReadlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadlinkResponse) ProtoMessage() {} + +func (x *ReadlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadlinkResponse.ProtoReflect.Descriptor instead. +func (*ReadlinkResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{23} +} + +func (x *ReadlinkResponse) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +type AccessRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Bitmask of access checks to perform (F_OK, R_OK, W_OK, X_OK). When unset, + // the server checks for existence (F_OK). + Mode *uint32 `protobuf:"varint,3,opt,name=mode,proto3,oneof" json:"mode,omitempty"` +} + +func (x *AccessRequest) Reset() { + *x = AccessRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessRequest) ProtoMessage() {} + +func (x *AccessRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessRequest.ProtoReflect.Descriptor instead. +func (*AccessRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{24} +} + +func (x *AccessRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *AccessRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *AccessRequest) GetMode() uint32 { + if x != nil && x.Mode != nil { + return *x.Mode + } + return 0 +} + +type AccessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AccessResponse) Reset() { + *x = AccessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessResponse) ProtoMessage() {} + +func (x *AccessResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessResponse.ProtoReflect.Descriptor instead. +func (*AccessResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{25} +} + +type ReadFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *ReadFileRequest) Reset() { + *x = ReadFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadFileRequest) ProtoMessage() {} + +func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadFileRequest.ProtoReflect.Descriptor instead. +func (*ReadFileRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{26} +} + +func (x *ReadFileRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *ReadFileRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// One chunk of a file streamed by ReadFile. Chunks arrive in order. The final +// chunk may carry eof = true; the stream closing also signals the end of file. +type FileChunk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Eof *bool `protobuf:"varint,2,opt,name=eof,proto3,oneof" json:"eof,omitempty"` +} + +func (x *FileChunk) Reset() { + *x = FileChunk{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileChunk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileChunk) ProtoMessage() {} + +func (x *FileChunk) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileChunk.ProtoReflect.Descriptor instead. +func (*FileChunk) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{27} +} + +func (x *FileChunk) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *FileChunk) GetEof() bool { + if x != nil && x.Eof != nil { + return *x.Eof + } + return false +} + +// A message in the WriteFile request stream. The first message must carry init; +// every message after it carries data bytes. In init, append selects append +// semantics, and mode is applied if the file is created. +type WriteFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Input: + // + // *WriteFileRequest_Init_ + // *WriteFileRequest_Data + Input isWriteFileRequest_Input `protobuf_oneof:"input"` +} + +func (x *WriteFileRequest) Reset() { + *x = WriteFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteFileRequest) ProtoMessage() {} + +func (x *WriteFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteFileRequest.ProtoReflect.Descriptor instead. +func (*WriteFileRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{28} +} + +func (m *WriteFileRequest) GetInput() isWriteFileRequest_Input { + if m != nil { + return m.Input + } + return nil +} + +func (x *WriteFileRequest) GetInit() *WriteFileRequest_Init { + if x, ok := x.GetInput().(*WriteFileRequest_Init_); ok { + return x.Init + } + return nil +} + +func (x *WriteFileRequest) GetData() []byte { + if x, ok := x.GetInput().(*WriteFileRequest_Data); ok { + return x.Data + } + return nil +} + +type isWriteFileRequest_Input interface { + isWriteFileRequest_Input() +} + +type WriteFileRequest_Init_ struct { + Init *WriteFileRequest_Init `protobuf:"bytes,1,opt,name=init,proto3,oneof"` +} + +type WriteFileRequest_Data struct { + Data []byte `protobuf:"bytes,2,opt,name=data,proto3,oneof"` +} + +func (*WriteFileRequest_Init_) isWriteFileRequest_Input() {} + +func (*WriteFileRequest_Data) isWriteFileRequest_Input() {} + +type WriteFileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BytesWritten int64 `protobuf:"varint,1,opt,name=bytes_written,json=bytesWritten,proto3" json:"bytes_written,omitempty"` +} + +func (x *WriteFileResponse) Reset() { + *x = WriteFileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteFileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteFileResponse) ProtoMessage() {} + +func (x *WriteFileResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteFileResponse.ProtoReflect.Descriptor instead. +func (*WriteFileResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{29} +} + +func (x *WriteFileResponse) GetBytesWritten() int64 { + if x != nil { + return x.BytesWritten + } + return 0 +} + +type WriteFileRequest_Init struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Mode *uint32 `protobuf:"varint,3,opt,name=mode,proto3,oneof" json:"mode,omitempty"` + Append *bool `protobuf:"varint,4,opt,name=append,proto3,oneof" json:"append,omitempty"` + // When true, create the parent directories before opening the file. + CreateDirectories *bool `protobuf:"varint,5,opt,name=create_directories,json=createDirectories,proto3,oneof" json:"create_directories,omitempty"` +} + +func (x *WriteFileRequest_Init) Reset() { + *x = WriteFileRequest_Init{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteFileRequest_Init) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteFileRequest_Init) ProtoMessage() {} + +func (x *WriteFileRequest_Init) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_filesystem_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteFileRequest_Init.ProtoReflect.Descriptor instead. +func (*WriteFileRequest_Init) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{28, 0} +} + +func (x *WriteFileRequest_Init) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *WriteFileRequest_Init) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *WriteFileRequest_Init) GetMode() uint32 { + if x != nil && x.Mode != nil { + return *x.Mode + } + return 0 +} + +func (x *WriteFileRequest_Init) GetAppend() bool { + if x != nil && x.Append != nil { + return *x.Append + } + return false +} + +func (x *WriteFileRequest_Init) GetCreateDirectories() bool { + if x != nil && x.CreateDirectories != nil { + return *x.CreateDirectories + } + return false +} + +var File_depot_sandbox_v1_filesystem_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_filesystem_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x15, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x39, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x73, 0x63, 0x61, + 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x79, 0x73, 0x63, 0x61, 0x6c, + 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0xad, 0x01, 0x0a, 0x0c, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, + 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, + 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, + 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, + 0x0f, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, + 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, + 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22, + 0xd4, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x67, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x53, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x44, + 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x0d, 0x77, 0x69, 0x74, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x88, + 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x47, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, + 0x4e, 0x0a, 0x08, 0x44, 0x69, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, + 0xcb, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, + 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x2a, 0x0a, 0x0e, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0d, 0x69, 0x67, 0x6e, 0x6f, + 0x72, 0x65, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x22, 0x10, 0x0a, + 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x7d, 0x0a, 0x0d, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, + 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, + 0x6d, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x50, 0x61, 0x74, 0x68, 0x22, 0x10, + 0x0a, 0x0e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xc7, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x70, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x1b, 0x0a, 0x09, + 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x30, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x10, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x6f, + 0x70, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, + 0x0a, 0x0f, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, + 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6e, 0x0a, 0x0c, 0x43, 0x68, 0x6d, 0x6f, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x43, 0x68, 0x6d, 0x6f, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x6f, 0x77, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x67, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x67, 0x69, 0x64, 0x88, 0x01, + 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x75, 0x69, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x69, + 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x43, 0x68, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x7d, 0x0a, 0x0e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x61, 0x74, + 0x68, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, + 0x7d, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, + 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x04, + 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, + 0x64, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x10, + 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x5d, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, + 0x3e, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x15, 0x0a, 0x03, 0x65, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x03, 0x65, 0x6f, 0x66, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6f, 0x66, 0x22, + 0xda, 0x02, 0x0a, 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, + 0x6e, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xe7, 0x01, 0x0a, 0x04, 0x49, 0x6e, + 0x69, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, + 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x17, + 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, + 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x02, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x42, 0x15, 0x0a, 0x13, + 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x38, 0x0a, 0x11, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x62, 0x79, 0x74, 0x65, 0x73, 0x57, + 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x2a, 0xf9, 0x03, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x25, + 0x0a, 0x21, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, + 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, + 0x4e, 0x4f, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x49, 0x4c, 0x45, 0x53, + 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, + 0x5f, 0x45, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x49, 0x4c, + 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x45, 0x41, 0x43, 0x43, 0x45, 0x53, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x46, + 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x49, 0x53, 0x44, 0x49, 0x52, 0x10, 0x04, 0x12, 0x21, 0x0a, + 0x1d, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4e, 0x4f, 0x54, 0x44, 0x49, 0x52, 0x10, 0x05, + 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4e, 0x4f, 0x54, 0x45, 0x4d, + 0x50, 0x54, 0x59, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, + 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, + 0x52, 0x4f, 0x46, 0x53, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, + 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, + 0x45, 0x42, 0x41, 0x44, 0x46, 0x10, 0x08, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x49, 0x4c, 0x45, 0x53, + 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, + 0x5f, 0x45, 0x49, 0x4f, 0x10, 0x09, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, + 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, + 0x45, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x26, 0x0a, 0x22, 0x46, 0x49, 0x4c, 0x45, + 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, + 0x45, 0x5f, 0x45, 0x4e, 0x41, 0x4d, 0x45, 0x54, 0x4f, 0x4f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0x0b, + 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4c, 0x4f, 0x4f, 0x50, 0x10, + 0x0c, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, + 0x10, 0x63, 0x2a, 0xcf, 0x01, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x15, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x49, + 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, + 0x0a, 0x13, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, + 0x43, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x49, 0x4c, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x4d, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x03, 0x12, 0x1a, + 0x0a, 0x16, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, + 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, + 0x52, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x49, + 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x46, 0x4f, 0x10, 0x06, 0x12, 0x14, + 0x0a, 0x10, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x43, 0x4b, + 0x45, 0x54, 0x10, 0x07, 0x42, 0xc4, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, + 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_filesystem_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_filesystem_proto_rawDescData = file_depot_sandbox_v1_filesystem_proto_rawDesc +) + +func file_depot_sandbox_v1_filesystem_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_filesystem_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_filesystem_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_filesystem_proto_rawDescData) + }) + return file_depot_sandbox_v1_filesystem_proto_rawDescData +} + +var file_depot_sandbox_v1_filesystem_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_depot_sandbox_v1_filesystem_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_depot_sandbox_v1_filesystem_proto_goTypes = []interface{}{ + (FileSystemErrorCode)(0), // 0: depot.sandbox.v1.FileSystemErrorCode + (FileType)(0), // 1: depot.sandbox.v1.FileType + (*FileSystemErrorDetail)(nil), // 2: depot.sandbox.v1.FileSystemErrorDetail + (*MkdirRequest)(nil), // 3: depot.sandbox.v1.MkdirRequest + (*MkdirResponse)(nil), // 4: depot.sandbox.v1.MkdirResponse + (*StatRequest)(nil), // 5: depot.sandbox.v1.StatRequest + (*StatResponse)(nil), // 6: depot.sandbox.v1.StatResponse + (*ReadDirRequest)(nil), // 7: depot.sandbox.v1.ReadDirRequest + (*ReadDirResponse)(nil), // 8: depot.sandbox.v1.ReadDirResponse + (*DirEntry)(nil), // 9: depot.sandbox.v1.DirEntry + (*RemoveRequest)(nil), // 10: depot.sandbox.v1.RemoveRequest + (*RemoveResponse)(nil), // 11: depot.sandbox.v1.RemoveResponse + (*RenameRequest)(nil), // 12: depot.sandbox.v1.RenameRequest + (*RenameResponse)(nil), // 13: depot.sandbox.v1.RenameResponse + (*CopyFileRequest)(nil), // 14: depot.sandbox.v1.CopyFileRequest + (*CopyFileResponse)(nil), // 15: depot.sandbox.v1.CopyFileResponse + (*TruncateRequest)(nil), // 16: depot.sandbox.v1.TruncateRequest + (*TruncateResponse)(nil), // 17: depot.sandbox.v1.TruncateResponse + (*ChmodRequest)(nil), // 18: depot.sandbox.v1.ChmodRequest + (*ChmodResponse)(nil), // 19: depot.sandbox.v1.ChmodResponse + (*ChownRequest)(nil), // 20: depot.sandbox.v1.ChownRequest + (*ChownResponse)(nil), // 21: depot.sandbox.v1.ChownResponse + (*SymlinkRequest)(nil), // 22: depot.sandbox.v1.SymlinkRequest + (*SymlinkResponse)(nil), // 23: depot.sandbox.v1.SymlinkResponse + (*ReadlinkRequest)(nil), // 24: depot.sandbox.v1.ReadlinkRequest + (*ReadlinkResponse)(nil), // 25: depot.sandbox.v1.ReadlinkResponse + (*AccessRequest)(nil), // 26: depot.sandbox.v1.AccessRequest + (*AccessResponse)(nil), // 27: depot.sandbox.v1.AccessResponse + (*ReadFileRequest)(nil), // 28: depot.sandbox.v1.ReadFileRequest + (*FileChunk)(nil), // 29: depot.sandbox.v1.FileChunk + (*WriteFileRequest)(nil), // 30: depot.sandbox.v1.WriteFileRequest + (*WriteFileResponse)(nil), // 31: depot.sandbox.v1.WriteFileResponse + (*WriteFileRequest_Init)(nil), // 32: depot.sandbox.v1.WriteFileRequest.Init + (*SandboxRef)(nil), // 33: depot.sandbox.v1.SandboxRef +} +var file_depot_sandbox_v1_filesystem_proto_depIdxs = []int32{ + 0, // 0: depot.sandbox.v1.FileSystemErrorDetail.code:type_name -> depot.sandbox.v1.FileSystemErrorCode + 33, // 1: depot.sandbox.v1.MkdirRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 2: depot.sandbox.v1.StatRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 1, // 3: depot.sandbox.v1.StatResponse.type:type_name -> depot.sandbox.v1.FileType + 33, // 4: depot.sandbox.v1.ReadDirRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 9, // 5: depot.sandbox.v1.ReadDirResponse.entries:type_name -> depot.sandbox.v1.DirEntry + 1, // 6: depot.sandbox.v1.DirEntry.type:type_name -> depot.sandbox.v1.FileType + 33, // 7: depot.sandbox.v1.RemoveRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 8: depot.sandbox.v1.RenameRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 9: depot.sandbox.v1.CopyFileRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 10: depot.sandbox.v1.TruncateRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 11: depot.sandbox.v1.ChmodRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 12: depot.sandbox.v1.ChownRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 13: depot.sandbox.v1.SymlinkRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 14: depot.sandbox.v1.ReadlinkRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 15: depot.sandbox.v1.AccessRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 33, // 16: depot.sandbox.v1.ReadFileRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 32, // 17: depot.sandbox.v1.WriteFileRequest.init:type_name -> depot.sandbox.v1.WriteFileRequest.Init + 33, // 18: depot.sandbox.v1.WriteFileRequest.Init.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_filesystem_proto_init() } +func file_depot_sandbox_v1_filesystem_proto_init() { + if File_depot_sandbox_v1_filesystem_proto != nil { + return + } + file_depot_sandbox_v1_refs_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_filesystem_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileSystemErrorDetail); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadDirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadDirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DirEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CopyFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CopyFileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TruncateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TruncateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChmodRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChmodResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChownRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChownResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileChunk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteFileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteFileRequest_Init); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[12].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[18].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[24].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[27].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_filesystem_proto_msgTypes[28].OneofWrappers = []interface{}{ + (*WriteFileRequest_Init_)(nil), + (*WriteFileRequest_Data)(nil), + } + file_depot_sandbox_v1_filesystem_proto_msgTypes[30].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_filesystem_proto_rawDesc, + NumEnums: 2, + NumMessages: 31, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_filesystem_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_filesystem_proto_depIdxs, + EnumInfos: file_depot_sandbox_v1_filesystem_proto_enumTypes, + MessageInfos: file_depot_sandbox_v1_filesystem_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_filesystem_proto = out.File + file_depot_sandbox_v1_filesystem_proto_rawDesc = nil + file_depot_sandbox_v1_filesystem_proto_goTypes = nil + file_depot_sandbox_v1_filesystem_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/hook.pb.go b/pkg/proto/depot/sandbox/v1/hook.pb.go new file mode 100644 index 00000000..d8f4e074 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/hook.pb.go @@ -0,0 +1,383 @@ +// Hook definitions and the request envelope for the RunHook RPC. +// +// This file holds the messages a hook needs: the value shapes (HookSpec and +// HookStage) that a sandbox spec uses to declare hooks, plus RunHookRequest, +// which the RunHook RPC takes. +// +// These messages live here rather than alongside the spec messages so that the +// service definition can import them without creating an import cycle. The +// service's proto imports this file for RunHookRequest, and the spec proto +// imports the service's proto for shared types, so the hook messages must sit +// in a file that does not depend on either of those. +// +// RunHook is reachable on the wire but is not exposed on the public SDK +// surface; it is invoked internally when a sandbox is created from a spec. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/hook.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Names a sandbox lifecycle stage that a hook can run in. The stage is +// metadata: a hook runs the same way regardless of which stage it belongs to, +// and the caller decides which stages it fires. +type HookStage int32 + +const ( + HookStage_HOOK_STAGE_UNSPECIFIED HookStage = 0 + HookStage_HOOK_STAGE_CREATE HookStage = 1 + HookStage_HOOK_STAGE_START HookStage = 2 + HookStage_HOOK_STAGE_EXEC HookStage = 3 + HookStage_HOOK_STAGE_SHELL HookStage = 4 + HookStage_HOOK_STAGE_SNAPSHOT HookStage = 5 + HookStage_HOOK_STAGE_DOWN HookStage = 6 +) + +// Enum value maps for HookStage. +var ( + HookStage_name = map[int32]string{ + 0: "HOOK_STAGE_UNSPECIFIED", + 1: "HOOK_STAGE_CREATE", + 2: "HOOK_STAGE_START", + 3: "HOOK_STAGE_EXEC", + 4: "HOOK_STAGE_SHELL", + 5: "HOOK_STAGE_SNAPSHOT", + 6: "HOOK_STAGE_DOWN", + } + HookStage_value = map[string]int32{ + "HOOK_STAGE_UNSPECIFIED": 0, + "HOOK_STAGE_CREATE": 1, + "HOOK_STAGE_START": 2, + "HOOK_STAGE_EXEC": 3, + "HOOK_STAGE_SHELL": 4, + "HOOK_STAGE_SNAPSHOT": 5, + "HOOK_STAGE_DOWN": 6, + } +) + +func (x HookStage) Enum() *HookStage { + p := new(HookStage) + *p = x + return p +} + +func (x HookStage) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HookStage) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_hook_proto_enumTypes[0].Descriptor() +} + +func (HookStage) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_hook_proto_enumTypes[0] +} + +func (x HookStage) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HookStage.Descriptor instead. +func (HookStage) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_hook_proto_rawDescGZIP(), []int{0} +} + +// A single hook command that runs during one lifecycle stage. A spec may +// declare a hook as a bare string ("echo hi"), which is normalized into a +// HookSpec with that string as its command. +type HookSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` + Detach *bool `protobuf:"varint,2,opt,name=detach,proto3,oneof" json:"detach,omitempty"` + Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` + TimeoutSeconds *int32 `protobuf:"varint,4,opt,name=timeout_seconds,json=timeoutSeconds,proto3,oneof" json:"timeout_seconds,omitempty"` +} + +func (x *HookSpec) Reset() { + *x = HookSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_hook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HookSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HookSpec) ProtoMessage() {} + +func (x *HookSpec) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_hook_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HookSpec.ProtoReflect.Descriptor instead. +func (*HookSpec) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_hook_proto_rawDescGZIP(), []int{0} +} + +func (x *HookSpec) GetCommand() string { + if x != nil { + return x.Command + } + return "" +} + +func (x *HookSpec) GetDetach() bool { + if x != nil && x.Detach != nil { + return *x.Detach + } + return false +} + +func (x *HookSpec) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *HookSpec) GetTimeoutSeconds() int32 { + if x != nil && x.TimeoutSeconds != nil { + return *x.TimeoutSeconds + } + return 0 +} + +// Request to run a single hook. RunHook is server-streaming and emits the same +// event shape as RunCommand: a Started event, then stdout/stderr byte chunks, +// then a Finished event. A detached hook (detach = true) only emits Started and +// a Finished event with exit code 0; its output is written to a log file under +// /var/log/depot inside the sandbox instead of streaming back. +type RunHookRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Stage HookStage `protobuf:"varint,2,opt,name=stage,proto3,enum=depot.sandbox.v1.HookStage" json:"stage,omitempty"` + Hook *HookSpec `protobuf:"bytes,3,opt,name=hook,proto3" json:"hook,omitempty"` +} + +func (x *RunHookRequest) Reset() { + *x = RunHookRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_hook_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunHookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunHookRequest) ProtoMessage() {} + +func (x *RunHookRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_hook_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunHookRequest.ProtoReflect.Descriptor instead. +func (*RunHookRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_hook_proto_rawDescGZIP(), []int{1} +} + +func (x *RunHookRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *RunHookRequest) GetStage() HookStage { + if x != nil { + return x.Stage + } + return HookStage_HOOK_STAGE_UNSPECIFIED +} + +func (x *RunHookRequest) GetHook() *HookSpec { + if x != nil { + return x.Hook + } + return nil +} + +var File_depot_sandbox_v1_hook_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_hook_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x01, 0x0a, + 0x08, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x02, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x65, 0x74, 0x61, + 0x63, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, + 0xab, 0x01, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, + 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x31, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x6f, + 0x6b, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, + 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x2a, 0xad, 0x01, + 0x0a, 0x09, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x48, + 0x4f, 0x4f, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x4f, 0x4f, 0x4b, 0x5f, + 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x48, 0x4f, 0x4f, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, + 0x52, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x48, 0x4f, 0x4f, 0x4b, 0x5f, 0x53, 0x54, 0x41, + 0x47, 0x45, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x48, 0x4f, 0x4f, + 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x48, 0x45, 0x4c, 0x4c, 0x10, 0x04, 0x12, + 0x17, 0x0a, 0x13, 0x48, 0x4f, 0x4f, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x4e, + 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x48, 0x4f, 0x4f, 0x4b, + 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x06, 0x42, 0xbe, 0x01, + 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x44, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, + 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, + 0x74, 0x3a, 0x3a, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_hook_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_hook_proto_rawDescData = file_depot_sandbox_v1_hook_proto_rawDesc +) + +func file_depot_sandbox_v1_hook_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_hook_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_hook_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_hook_proto_rawDescData) + }) + return file_depot_sandbox_v1_hook_proto_rawDescData +} + +var file_depot_sandbox_v1_hook_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_depot_sandbox_v1_hook_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_depot_sandbox_v1_hook_proto_goTypes = []interface{}{ + (HookStage)(0), // 0: depot.sandbox.v1.HookStage + (*HookSpec)(nil), // 1: depot.sandbox.v1.HookSpec + (*RunHookRequest)(nil), // 2: depot.sandbox.v1.RunHookRequest + (*SandboxRef)(nil), // 3: depot.sandbox.v1.SandboxRef +} +var file_depot_sandbox_v1_hook_proto_depIdxs = []int32{ + 3, // 0: depot.sandbox.v1.RunHookRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 0, // 1: depot.sandbox.v1.RunHookRequest.stage:type_name -> depot.sandbox.v1.HookStage + 1, // 2: depot.sandbox.v1.RunHookRequest.hook:type_name -> depot.sandbox.v1.HookSpec + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_hook_proto_init() } +func file_depot_sandbox_v1_hook_proto_init() { + if File_depot_sandbox_v1_hook_proto != nil { + return + } + file_depot_sandbox_v1_refs_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_hook_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HookSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_hook_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunHookRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_hook_proto_msgTypes[0].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_hook_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_hook_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_hook_proto_depIdxs, + EnumInfos: file_depot_sandbox_v1_hook_proto_enumTypes, + MessageInfos: file_depot_sandbox_v1_hook_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_hook_proto = out.File + file_depot_sandbox_v1_hook_proto_rawDesc = nil + file_depot_sandbox_v1_hook_proto_goTypes = nil + file_depot_sandbox_v1_hook_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/logs.pb.go b/pkg/proto/depot/sandbox/v1/logs.pb.go new file mode 100644 index 00000000..b3a322a0 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/logs.pb.go @@ -0,0 +1,673 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/logs.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A single event emitted by the StreamSandboxLogs RPC. +// +// Output data is carried as raw bytes; callers decode text (such as UTF-8) as +// needed. Exactly one of the event fields is set per message. +// +// EvictedEarlyData is sent when the log buffer had to drop the oldest output +// before this subscriber connected. Its byte count covers both stdout and +// stderr combined, since the buffer orders entries by arrival rather than by +// stream. +type SandboxLogEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Event: + // + // *SandboxLogEvent_BootStdout_ + // *SandboxLogEvent_BootStderr_ + // *SandboxLogEvent_BootFinished_ + // *SandboxLogEvent_EvictedEarlyData_ + Event isSandboxLogEvent_Event `protobuf_oneof:"event"` +} + +func (x *SandboxLogEvent) Reset() { + *x = SandboxLogEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxLogEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxLogEvent) ProtoMessage() {} + +func (x *SandboxLogEvent) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxLogEvent.ProtoReflect.Descriptor instead. +func (*SandboxLogEvent) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_logs_proto_rawDescGZIP(), []int{0} +} + +func (m *SandboxLogEvent) GetEvent() isSandboxLogEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *SandboxLogEvent) GetBootStdout() *SandboxLogEvent_BootStdout { + if x, ok := x.GetEvent().(*SandboxLogEvent_BootStdout_); ok { + return x.BootStdout + } + return nil +} + +func (x *SandboxLogEvent) GetBootStderr() *SandboxLogEvent_BootStderr { + if x, ok := x.GetEvent().(*SandboxLogEvent_BootStderr_); ok { + return x.BootStderr + } + return nil +} + +func (x *SandboxLogEvent) GetBootFinished() *SandboxLogEvent_BootFinished { + if x, ok := x.GetEvent().(*SandboxLogEvent_BootFinished_); ok { + return x.BootFinished + } + return nil +} + +func (x *SandboxLogEvent) GetEvictedEarlyData() *SandboxLogEvent_EvictedEarlyData { + if x, ok := x.GetEvent().(*SandboxLogEvent_EvictedEarlyData_); ok { + return x.EvictedEarlyData + } + return nil +} + +type isSandboxLogEvent_Event interface { + isSandboxLogEvent_Event() +} + +type SandboxLogEvent_BootStdout_ struct { + BootStdout *SandboxLogEvent_BootStdout `protobuf:"bytes,1,opt,name=boot_stdout,json=bootStdout,proto3,oneof"` +} + +type SandboxLogEvent_BootStderr_ struct { + BootStderr *SandboxLogEvent_BootStderr `protobuf:"bytes,2,opt,name=boot_stderr,json=bootStderr,proto3,oneof"` +} + +type SandboxLogEvent_BootFinished_ struct { + BootFinished *SandboxLogEvent_BootFinished `protobuf:"bytes,3,opt,name=boot_finished,json=bootFinished,proto3,oneof"` +} + +type SandboxLogEvent_EvictedEarlyData_ struct { + EvictedEarlyData *SandboxLogEvent_EvictedEarlyData `protobuf:"bytes,4,opt,name=evicted_early_data,json=evictedEarlyData,proto3,oneof"` +} + +func (*SandboxLogEvent_BootStdout_) isSandboxLogEvent_Event() {} + +func (*SandboxLogEvent_BootStderr_) isSandboxLogEvent_Event() {} + +func (*SandboxLogEvent_BootFinished_) isSandboxLogEvent_Event() {} + +func (*SandboxLogEvent_EvictedEarlyData_) isSandboxLogEvent_Event() {} + +// Request for the StreamSandboxLogs server-streaming RPC. The response is a +// sequence of SandboxLogEvent messages read from the sandbox's log buffer. The +// stream ends when the sandbox finishes, or with an error. +// +// since_offset selects where in the buffer to begin. The server replays events +// at or after that position. If the requested position is older than the oldest +// entry still held in the buffer, the stream begins with a single +// EvictedEarlyData event before the replayed events. +type StreamSandboxLogsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // Buffer position to start streaming from. The server replays events at or + // after this position. Leave unset (or 0) to start from the oldest entry + // still held in the buffer. + SinceOffset *int64 `protobuf:"varint,2,opt,name=since_offset,json=sinceOffset,proto3,oneof" json:"since_offset,omitempty"` +} + +func (x *StreamSandboxLogsRequest) Reset() { + *x = StreamSandboxLogsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamSandboxLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamSandboxLogsRequest) ProtoMessage() {} + +func (x *StreamSandboxLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamSandboxLogsRequest.ProtoReflect.Descriptor instead. +func (*StreamSandboxLogsRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_logs_proto_rawDescGZIP(), []int{1} +} + +func (x *StreamSandboxLogsRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *StreamSandboxLogsRequest) GetSinceOffset() int64 { + if x != nil && x.SinceOffset != nil { + return *x.SinceOffset + } + return 0 +} + +type SandboxLogEvent_BootStdout struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Total number of stdout bytes emitted up to and including the end of + // this chunk. Clients can use it to deduplicate output across their own + // resubscriptions. Note that this is a per-stream byte count and is + // distinct from the request's since_offset, which is a buffer position. + ByteOffset int64 `protobuf:"varint,2,opt,name=byte_offset,json=byteOffset,proto3" json:"byte_offset,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *SandboxLogEvent_BootStdout) Reset() { + *x = SandboxLogEvent_BootStdout{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxLogEvent_BootStdout) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxLogEvent_BootStdout) ProtoMessage() {} + +func (x *SandboxLogEvent_BootStdout) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxLogEvent_BootStdout.ProtoReflect.Descriptor instead. +func (*SandboxLogEvent_BootStdout) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_logs_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *SandboxLogEvent_BootStdout) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *SandboxLogEvent_BootStdout) GetByteOffset() int64 { + if x != nil { + return x.ByteOffset + } + return 0 +} + +func (x *SandboxLogEvent_BootStdout) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type SandboxLogEvent_BootStderr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Total number of stderr bytes emitted up to and including the end of + // this chunk; see BootStdout.byte_offset. + ByteOffset int64 `protobuf:"varint,2,opt,name=byte_offset,json=byteOffset,proto3" json:"byte_offset,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *SandboxLogEvent_BootStderr) Reset() { + *x = SandboxLogEvent_BootStderr{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxLogEvent_BootStderr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxLogEvent_BootStderr) ProtoMessage() {} + +func (x *SandboxLogEvent_BootStderr) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxLogEvent_BootStderr.ProtoReflect.Descriptor instead. +func (*SandboxLogEvent_BootStderr) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_logs_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *SandboxLogEvent_BootStderr) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *SandboxLogEvent_BootStderr) GetByteOffset() int64 { + if x != nil { + return x.ByteOffset + } + return 0 +} + +func (x *SandboxLogEvent_BootStderr) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type SandboxLogEvent_BootFinished struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` +} + +func (x *SandboxLogEvent_BootFinished) Reset() { + *x = SandboxLogEvent_BootFinished{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxLogEvent_BootFinished) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxLogEvent_BootFinished) ProtoMessage() {} + +func (x *SandboxLogEvent_BootFinished) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxLogEvent_BootFinished.ProtoReflect.Descriptor instead. +func (*SandboxLogEvent_BootFinished) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_logs_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *SandboxLogEvent_BootFinished) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *SandboxLogEvent_BootFinished) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +// Sent when the buffer dropped the oldest output before this subscriber +// connected. Carries the number of bytes that were dropped so the +// subscriber knows there is a gap in the output it receives. +type SandboxLogEvent_EvictedEarlyData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DroppedBytes int64 `protobuf:"varint,1,opt,name=dropped_bytes,json=droppedBytes,proto3" json:"dropped_bytes,omitempty"` +} + +func (x *SandboxLogEvent_EvictedEarlyData) Reset() { + *x = SandboxLogEvent_EvictedEarlyData{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxLogEvent_EvictedEarlyData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxLogEvent_EvictedEarlyData) ProtoMessage() {} + +func (x *SandboxLogEvent_EvictedEarlyData) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_logs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxLogEvent_EvictedEarlyData.ProtoReflect.Descriptor instead. +func (*SandboxLogEvent_EvictedEarlyData) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_logs_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *SandboxLogEvent_EvictedEarlyData) GetDroppedBytes() int64 { + if x != nil { + return x.DroppedBytes + } + return 0 +} + +var File_depot_sandbox_v1_logs_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_logs_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x06, + 0x0a, 0x0f, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x74, + 0x64, 0x6f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x74, 0x53, 0x74, 0x64, 0x6f, + 0x75, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x64, 0x65, 0x72, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, + 0x74, 0x64, 0x65, 0x72, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x74, 0x53, 0x74, 0x64, + 0x65, 0x72, 0x72, 0x12, 0x55, 0x0a, 0x0d, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x6f, + 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6f, + 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x12, 0x65, 0x76, + 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x69, 0x63, 0x74, 0x65, + 0x64, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x10, 0x65, 0x76, + 0x69, 0x63, 0x74, 0x65, 0x64, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x7b, + 0x0a, 0x0a, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x7b, 0x0a, 0x0a, 0x42, + 0x6f, 0x6f, 0x74, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, + 0x0b, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x68, 0x0a, 0x0c, 0x42, 0x6f, 0x6f, 0x74, + 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, + 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x41, 0x74, 0x1a, 0x37, 0x0a, 0x10, 0x45, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, 0x45, 0x61, 0x72, + 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, + 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x10, 0x22, 0x8b, 0x01, 0x0a, 0x18, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, + 0x26, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x4f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x69, 0x6e, 0x63, + 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0xbe, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x42, 0x09, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, 0x58, 0xaa, + 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_depot_sandbox_v1_logs_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_logs_proto_rawDescData = file_depot_sandbox_v1_logs_proto_rawDesc +) + +func file_depot_sandbox_v1_logs_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_logs_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_logs_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_logs_proto_rawDescData) + }) + return file_depot_sandbox_v1_logs_proto_rawDescData +} + +var file_depot_sandbox_v1_logs_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_depot_sandbox_v1_logs_proto_goTypes = []interface{}{ + (*SandboxLogEvent)(nil), // 0: depot.sandbox.v1.SandboxLogEvent + (*StreamSandboxLogsRequest)(nil), // 1: depot.sandbox.v1.StreamSandboxLogsRequest + (*SandboxLogEvent_BootStdout)(nil), // 2: depot.sandbox.v1.SandboxLogEvent.BootStdout + (*SandboxLogEvent_BootStderr)(nil), // 3: depot.sandbox.v1.SandboxLogEvent.BootStderr + (*SandboxLogEvent_BootFinished)(nil), // 4: depot.sandbox.v1.SandboxLogEvent.BootFinished + (*SandboxLogEvent_EvictedEarlyData)(nil), // 5: depot.sandbox.v1.SandboxLogEvent.EvictedEarlyData + (*SandboxRef)(nil), // 6: depot.sandbox.v1.SandboxRef + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp +} +var file_depot_sandbox_v1_logs_proto_depIdxs = []int32{ + 2, // 0: depot.sandbox.v1.SandboxLogEvent.boot_stdout:type_name -> depot.sandbox.v1.SandboxLogEvent.BootStdout + 3, // 1: depot.sandbox.v1.SandboxLogEvent.boot_stderr:type_name -> depot.sandbox.v1.SandboxLogEvent.BootStderr + 4, // 2: depot.sandbox.v1.SandboxLogEvent.boot_finished:type_name -> depot.sandbox.v1.SandboxLogEvent.BootFinished + 5, // 3: depot.sandbox.v1.SandboxLogEvent.evicted_early_data:type_name -> depot.sandbox.v1.SandboxLogEvent.EvictedEarlyData + 6, // 4: depot.sandbox.v1.StreamSandboxLogsRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 7, // 5: depot.sandbox.v1.SandboxLogEvent.BootStdout.timestamp:type_name -> google.protobuf.Timestamp + 7, // 6: depot.sandbox.v1.SandboxLogEvent.BootStderr.timestamp:type_name -> google.protobuf.Timestamp + 7, // 7: depot.sandbox.v1.SandboxLogEvent.BootFinished.finished_at:type_name -> google.protobuf.Timestamp + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_logs_proto_init() } +func file_depot_sandbox_v1_logs_proto_init() { + if File_depot_sandbox_v1_logs_proto != nil { + return + } + file_depot_sandbox_v1_refs_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_logs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxLogEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_logs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamSandboxLogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_logs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxLogEvent_BootStdout); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_logs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxLogEvent_BootStderr); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_logs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxLogEvent_BootFinished); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_logs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxLogEvent_EvictedEarlyData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_logs_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*SandboxLogEvent_BootStdout_)(nil), + (*SandboxLogEvent_BootStderr_)(nil), + (*SandboxLogEvent_BootFinished_)(nil), + (*SandboxLogEvent_EvictedEarlyData_)(nil), + } + file_depot_sandbox_v1_logs_proto_msgTypes[1].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_logs_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_logs_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_logs_proto_depIdxs, + MessageInfos: file_depot_sandbox_v1_logs_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_logs_proto = out.File + file_depot_sandbox_v1_logs_proto_rawDesc = nil + file_depot_sandbox_v1_logs_proto_goTypes = nil + file_depot_sandbox_v1_logs_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/pty.pb.go b/pkg/proto/depot/sandbox/v1/pty.pb.go new file mode 100644 index 00000000..6354887b --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/pty.pb.go @@ -0,0 +1,581 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/pty.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OpenPtyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Input: + // + // *OpenPtyRequest_Start_ + // *OpenPtyRequest_Stdin + // *OpenPtyRequest_Resize_ + Input isOpenPtyRequest_Input `protobuf_oneof:"input"` +} + +func (x *OpenPtyRequest) Reset() { + *x = OpenPtyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPtyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPtyRequest) ProtoMessage() {} + +func (x *OpenPtyRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPtyRequest.ProtoReflect.Descriptor instead. +func (*OpenPtyRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_pty_proto_rawDescGZIP(), []int{0} +} + +func (m *OpenPtyRequest) GetInput() isOpenPtyRequest_Input { + if m != nil { + return m.Input + } + return nil +} + +func (x *OpenPtyRequest) GetStart() *OpenPtyRequest_Start { + if x, ok := x.GetInput().(*OpenPtyRequest_Start_); ok { + return x.Start + } + return nil +} + +func (x *OpenPtyRequest) GetStdin() []byte { + if x, ok := x.GetInput().(*OpenPtyRequest_Stdin); ok { + return x.Stdin + } + return nil +} + +func (x *OpenPtyRequest) GetResize() *OpenPtyRequest_Resize { + if x, ok := x.GetInput().(*OpenPtyRequest_Resize_); ok { + return x.Resize + } + return nil +} + +type isOpenPtyRequest_Input interface { + isOpenPtyRequest_Input() +} + +type OpenPtyRequest_Start_ struct { + Start *OpenPtyRequest_Start `protobuf:"bytes,1,opt,name=start,proto3,oneof"` +} + +type OpenPtyRequest_Stdin struct { + Stdin []byte `protobuf:"bytes,2,opt,name=stdin,proto3,oneof"` +} + +type OpenPtyRequest_Resize_ struct { + Resize *OpenPtyRequest_Resize `protobuf:"bytes,3,opt,name=resize,proto3,oneof"` +} + +func (*OpenPtyRequest_Start_) isOpenPtyRequest_Input() {} + +func (*OpenPtyRequest_Stdin) isOpenPtyRequest_Input() {} + +func (*OpenPtyRequest_Resize_) isOpenPtyRequest_Input() {} + +type OpenPtyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Output: + // + // *OpenPtyResponse_Data + // *OpenPtyResponse_Exit_ + Output isOpenPtyResponse_Output `protobuf_oneof:"output"` +} + +func (x *OpenPtyResponse) Reset() { + *x = OpenPtyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPtyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPtyResponse) ProtoMessage() {} + +func (x *OpenPtyResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPtyResponse.ProtoReflect.Descriptor instead. +func (*OpenPtyResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_pty_proto_rawDescGZIP(), []int{1} +} + +func (m *OpenPtyResponse) GetOutput() isOpenPtyResponse_Output { + if m != nil { + return m.Output + } + return nil +} + +func (x *OpenPtyResponse) GetData() []byte { + if x, ok := x.GetOutput().(*OpenPtyResponse_Data); ok { + return x.Data + } + return nil +} + +func (x *OpenPtyResponse) GetExit() *OpenPtyResponse_Exit { + if x, ok := x.GetOutput().(*OpenPtyResponse_Exit_); ok { + return x.Exit + } + return nil +} + +type isOpenPtyResponse_Output interface { + isOpenPtyResponse_Output() +} + +type OpenPtyResponse_Data struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3,oneof"` +} + +type OpenPtyResponse_Exit_ struct { + Exit *OpenPtyResponse_Exit `protobuf:"bytes,2,opt,name=exit,proto3,oneof"` +} + +func (*OpenPtyResponse_Data) isOpenPtyResponse_Output() {} + +func (*OpenPtyResponse_Exit_) isOpenPtyResponse_Output() {} + +// Carries the parameters that open the session. It must be the first message +// on the stream. Any later start message on the same stream is invalid and is +// ignored by the handler. +type OpenPtyRequest_Start struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Env map[string]string `protobuf:"bytes,2,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Rows *uint32 `protobuf:"varint,3,opt,name=rows,proto3,oneof" json:"rows,omitempty"` + Cols *uint32 `protobuf:"varint,4,opt,name=cols,proto3,oneof" json:"cols,omitempty"` + Cwd *string `protobuf:"bytes,5,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` +} + +func (x *OpenPtyRequest_Start) Reset() { + *x = OpenPtyRequest_Start{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPtyRequest_Start) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPtyRequest_Start) ProtoMessage() {} + +func (x *OpenPtyRequest_Start) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPtyRequest_Start.ProtoReflect.Descriptor instead. +func (*OpenPtyRequest_Start) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_pty_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *OpenPtyRequest_Start) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *OpenPtyRequest_Start) GetEnv() map[string]string { + if x != nil { + return x.Env + } + return nil +} + +func (x *OpenPtyRequest_Start) GetRows() uint32 { + if x != nil && x.Rows != nil { + return *x.Rows + } + return 0 +} + +func (x *OpenPtyRequest_Start) GetCols() uint32 { + if x != nil && x.Cols != nil { + return *x.Cols + } + return 0 +} + +func (x *OpenPtyRequest_Start) GetCwd() string { + if x != nil && x.Cwd != nil { + return *x.Cwd + } + return "" +} + +// Changes the terminal window size. Values are passed through to the +// operating system, which clamps any that are out of range. +type OpenPtyRequest_Resize struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rows uint32 `protobuf:"varint,1,opt,name=rows,proto3" json:"rows,omitempty"` + Cols uint32 `protobuf:"varint,2,opt,name=cols,proto3" json:"cols,omitempty"` +} + +func (x *OpenPtyRequest_Resize) Reset() { + *x = OpenPtyRequest_Resize{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPtyRequest_Resize) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPtyRequest_Resize) ProtoMessage() {} + +func (x *OpenPtyRequest_Resize) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPtyRequest_Resize.ProtoReflect.Descriptor instead. +func (*OpenPtyRequest_Resize) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_pty_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *OpenPtyRequest_Resize) GetRows() uint32 { + if x != nil { + return x.Rows + } + return 0 +} + +func (x *OpenPtyRequest_Resize) GetCols() uint32 { + if x != nil { + return x.Cols + } + return 0 +} + +type OpenPtyResponse_Exit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` +} + +func (x *OpenPtyResponse_Exit) Reset() { + *x = OpenPtyResponse_Exit{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPtyResponse_Exit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPtyResponse_Exit) ProtoMessage() {} + +func (x *OpenPtyResponse_Exit) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_pty_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPtyResponse_Exit.ProtoReflect.Descriptor instead. +func (*OpenPtyResponse_Exit) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_pty_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *OpenPtyResponse_Exit) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +var File_depot_sandbox_v1_pty_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_pty_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x1a, 0x1b, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, + 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x04, 0x0a, 0x0e, + 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x16, + 0x0a, 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, + 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x48, + 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x1a, 0x9d, 0x02, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x41, 0x0a, 0x03, 0x65, + 0x6e, 0x76, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x50, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x17, + 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, + 0x72, 0x6f, 0x77, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x15, 0x0a, 0x03, 0x63, 0x77, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, + 0x03, 0x63, 0x77, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x6c, + 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x63, 0x77, 0x64, 0x1a, 0x30, 0x0a, 0x06, 0x52, 0x65, 0x73, + 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x74, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3c, + 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x45, 0x78, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x69, 0x74, 0x1a, 0x23, 0x0a, 0x04, + 0x45, 0x78, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0xbd, 0x01, 0x0a, 0x14, + 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x50, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, + 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_pty_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_pty_proto_rawDescData = file_depot_sandbox_v1_pty_proto_rawDesc +) + +func file_depot_sandbox_v1_pty_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_pty_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_pty_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_pty_proto_rawDescData) + }) + return file_depot_sandbox_v1_pty_proto_rawDescData +} + +var file_depot_sandbox_v1_pty_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_depot_sandbox_v1_pty_proto_goTypes = []interface{}{ + (*OpenPtyRequest)(nil), // 0: depot.sandbox.v1.OpenPtyRequest + (*OpenPtyResponse)(nil), // 1: depot.sandbox.v1.OpenPtyResponse + (*OpenPtyRequest_Start)(nil), // 2: depot.sandbox.v1.OpenPtyRequest.Start + (*OpenPtyRequest_Resize)(nil), // 3: depot.sandbox.v1.OpenPtyRequest.Resize + nil, // 4: depot.sandbox.v1.OpenPtyRequest.Start.EnvEntry + (*OpenPtyResponse_Exit)(nil), // 5: depot.sandbox.v1.OpenPtyResponse.Exit + (*SandboxRef)(nil), // 6: depot.sandbox.v1.SandboxRef +} +var file_depot_sandbox_v1_pty_proto_depIdxs = []int32{ + 2, // 0: depot.sandbox.v1.OpenPtyRequest.start:type_name -> depot.sandbox.v1.OpenPtyRequest.Start + 3, // 1: depot.sandbox.v1.OpenPtyRequest.resize:type_name -> depot.sandbox.v1.OpenPtyRequest.Resize + 5, // 2: depot.sandbox.v1.OpenPtyResponse.exit:type_name -> depot.sandbox.v1.OpenPtyResponse.Exit + 6, // 3: depot.sandbox.v1.OpenPtyRequest.Start.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 4, // 4: depot.sandbox.v1.OpenPtyRequest.Start.env:type_name -> depot.sandbox.v1.OpenPtyRequest.Start.EnvEntry + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_pty_proto_init() } +func file_depot_sandbox_v1_pty_proto_init() { + if File_depot_sandbox_v1_pty_proto != nil { + return + } + file_depot_sandbox_v1_refs_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_pty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPtyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_pty_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPtyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_pty_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPtyRequest_Start); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_pty_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPtyRequest_Resize); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_pty_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPtyResponse_Exit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_pty_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*OpenPtyRequest_Start_)(nil), + (*OpenPtyRequest_Stdin)(nil), + (*OpenPtyRequest_Resize_)(nil), + } + file_depot_sandbox_v1_pty_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*OpenPtyResponse_Data)(nil), + (*OpenPtyResponse_Exit_)(nil), + } + file_depot_sandbox_v1_pty_proto_msgTypes[2].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_pty_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_pty_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_pty_proto_depIdxs, + MessageInfos: file_depot_sandbox_v1_pty_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_pty_proto = out.File + file_depot_sandbox_v1_pty_proto_rawDesc = nil + file_depot_sandbox_v1_pty_proto_goTypes = nil + file_depot_sandbox_v1_pty_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/refs.pb.go b/pkg/proto/depot/sandbox/v1/refs.pb.go new file mode 100644 index 00000000..2777c9d2 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/refs.pb.go @@ -0,0 +1,350 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/refs.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SandboxRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Selector: + // + // *SandboxRef_Id + Selector isSandboxRef_Selector `protobuf_oneof:"selector"` +} + +func (x *SandboxRef) Reset() { + *x = SandboxRef{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_refs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxRef) ProtoMessage() {} + +func (x *SandboxRef) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_refs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxRef.ProtoReflect.Descriptor instead. +func (*SandboxRef) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_refs_proto_rawDescGZIP(), []int{0} +} + +func (m *SandboxRef) GetSelector() isSandboxRef_Selector { + if m != nil { + return m.Selector + } + return nil +} + +func (x *SandboxRef) GetId() string { + if x, ok := x.GetSelector().(*SandboxRef_Id); ok { + return x.Id + } + return "" +} + +type isSandboxRef_Selector interface { + isSandboxRef_Selector() +} + +type SandboxRef_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +func (*SandboxRef_Id) isSandboxRef_Selector() {} + +type SandboxCommandExecutionRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Selector: + // + // *SandboxCommandExecutionRef_Id + Selector isSandboxCommandExecutionRef_Selector `protobuf_oneof:"selector"` +} + +func (x *SandboxCommandExecutionRef) Reset() { + *x = SandboxCommandExecutionRef{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_refs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxCommandExecutionRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxCommandExecutionRef) ProtoMessage() {} + +func (x *SandboxCommandExecutionRef) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_refs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxCommandExecutionRef.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionRef) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_refs_proto_rawDescGZIP(), []int{1} +} + +func (m *SandboxCommandExecutionRef) GetSelector() isSandboxCommandExecutionRef_Selector { + if m != nil { + return m.Selector + } + return nil +} + +func (x *SandboxCommandExecutionRef) GetId() string { + if x, ok := x.GetSelector().(*SandboxCommandExecutionRef_Id); ok { + return x.Id + } + return "" +} + +type isSandboxCommandExecutionRef_Selector interface { + isSandboxCommandExecutionRef_Selector() +} + +type SandboxCommandExecutionRef_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +func (*SandboxCommandExecutionRef_Id) isSandboxCommandExecutionRef_Selector() {} + +type SnapshotRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Selector: + // + // *SnapshotRef_Id + Selector isSnapshotRef_Selector `protobuf_oneof:"selector"` +} + +func (x *SnapshotRef) Reset() { + *x = SnapshotRef{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_refs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SnapshotRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnapshotRef) ProtoMessage() {} + +func (x *SnapshotRef) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_refs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotRef.ProtoReflect.Descriptor instead. +func (*SnapshotRef) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_refs_proto_rawDescGZIP(), []int{2} +} + +func (m *SnapshotRef) GetSelector() isSnapshotRef_Selector { + if m != nil { + return m.Selector + } + return nil +} + +func (x *SnapshotRef) GetId() string { + if x, ok := x.GetSelector().(*SnapshotRef_Id); ok { + return x.Id + } + return "" +} + +type isSnapshotRef_Selector interface { + isSnapshotRef_Selector() +} + +type SnapshotRef_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +func (*SnapshotRef_Id) isSnapshotRef_Selector() {} + +var File_depot_sandbox_v1_refs_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_refs_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x22, + 0x2a, 0x0a, 0x0a, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x12, 0x10, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x42, + 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x3a, 0x0a, 0x1a, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x2b, 0x0a, 0x0b, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x42, 0xbe, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x52, + 0x65, 0x66, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_refs_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_refs_proto_rawDescData = file_depot_sandbox_v1_refs_proto_rawDesc +) + +func file_depot_sandbox_v1_refs_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_refs_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_refs_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_refs_proto_rawDescData) + }) + return file_depot_sandbox_v1_refs_proto_rawDescData +} + +var file_depot_sandbox_v1_refs_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_depot_sandbox_v1_refs_proto_goTypes = []interface{}{ + (*SandboxRef)(nil), // 0: depot.sandbox.v1.SandboxRef + (*SandboxCommandExecutionRef)(nil), // 1: depot.sandbox.v1.SandboxCommandExecutionRef + (*SnapshotRef)(nil), // 2: depot.sandbox.v1.SnapshotRef +} +var file_depot_sandbox_v1_refs_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_refs_proto_init() } +func file_depot_sandbox_v1_refs_proto_init() { + if File_depot_sandbox_v1_refs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_refs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_refs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxCommandExecutionRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_refs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_refs_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*SandboxRef_Id)(nil), + } + file_depot_sandbox_v1_refs_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*SandboxCommandExecutionRef_Id)(nil), + } + file_depot_sandbox_v1_refs_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*SnapshotRef_Id)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_refs_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_refs_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_refs_proto_depIdxs, + MessageInfos: file_depot_sandbox_v1_refs_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_refs_proto = out.File + file_depot_sandbox_v1_refs_proto_rawDesc = nil + file_depot_sandbox_v1_refs_proto_goTypes = nil + file_depot_sandbox_v1_refs_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/runtime.pb.go b/pkg/proto/depot/sandbox/v1/runtime.pb.go new file mode 100644 index 00000000..84ddc580 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/runtime.pb.go @@ -0,0 +1,291 @@ +// Value types describing the compute resources and runtime environment +// requested for a sandbox. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/runtime.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Compute resources a caller can request for a sandbox. Every field is +// optional; any field left unset falls back to a server-chosen default. +type Resources struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vcpus *int32 `protobuf:"varint,1,opt,name=vcpus,proto3,oneof" json:"vcpus,omitempty"` + MemoryMb *int32 `protobuf:"varint,2,opt,name=memory_mb,json=memoryMb,proto3,oneof" json:"memory_mb,omitempty"` + DiskGb *int32 `protobuf:"varint,3,opt,name=disk_gb,json=diskGb,proto3,oneof" json:"disk_gb,omitempty"` +} + +func (x *Resources) Reset() { + *x = Resources{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_runtime_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resources) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resources) ProtoMessage() {} + +func (x *Resources) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_runtime_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Resources.ProtoReflect.Descriptor instead. +func (*Resources) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_runtime_proto_rawDescGZIP(), []int{0} +} + +func (x *Resources) GetVcpus() int32 { + if x != nil && x.Vcpus != nil { + return *x.Vcpus + } + return 0 +} + +func (x *Resources) GetMemoryMb() int32 { + if x != nil && x.MemoryMb != nil { + return *x.MemoryMb + } + return 0 +} + +func (x *Resources) GetDiskGb() int32 { + if x != nil && x.DiskGb != nil { + return *x.DiskGb + } + return 0 +} + +// Selects the runtime environment for a sandbox. Choose exactly one option. +type Runtime struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Runtime: + // + // *Runtime_Named + // *Runtime_ImageRef + Runtime isRuntime_Runtime `protobuf_oneof:"runtime"` +} + +func (x *Runtime) Reset() { + *x = Runtime{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_runtime_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Runtime) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Runtime) ProtoMessage() {} + +func (x *Runtime) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_runtime_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Runtime.ProtoReflect.Descriptor instead. +func (*Runtime) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_runtime_proto_rawDescGZIP(), []int{1} +} + +func (m *Runtime) GetRuntime() isRuntime_Runtime { + if m != nil { + return m.Runtime + } + return nil +} + +func (x *Runtime) GetNamed() string { + if x, ok := x.GetRuntime().(*Runtime_Named); ok { + return x.Named + } + return "" +} + +func (x *Runtime) GetImageRef() string { + if x, ok := x.GetRuntime().(*Runtime_ImageRef); ok { + return x.ImageRef + } + return "" +} + +type isRuntime_Runtime interface { + isRuntime_Runtime() +} + +type Runtime_Named struct { + // A named, curated runtime resolved by the server, such as "node24". + // Any string is accepted on the wire; the server may reject names it + // does not recognize. + Named string `protobuf:"bytes,1,opt,name=named,proto3,oneof"` +} + +type Runtime_ImageRef struct { + // An OCI image reference to use directly as the runtime. + ImageRef string `protobuf:"bytes,2,opt,name=image_ref,json=imageRef,proto3,oneof"` +} + +func (*Runtime_Named) isRuntime_Runtime() {} + +func (*Runtime_ImageRef) isRuntime_Runtime() {} + +var File_depot_sandbox_v1_runtime_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_runtime_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x22, 0x8a, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x63, 0x70, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, + 0x00, 0x52, 0x05, 0x76, 0x63, 0x70, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, + 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x62, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, + 0x07, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x67, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, + 0x52, 0x06, 0x64, 0x69, 0x73, 0x6b, 0x47, 0x62, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x63, 0x70, 0x75, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x5f, 0x6d, 0x62, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x67, 0x62, 0x22, + 0x4b, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x6e, 0x61, + 0x6d, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x66, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0xc1, 0x01, 0x0a, + 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x44, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, + 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, + 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, + 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_runtime_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_runtime_proto_rawDescData = file_depot_sandbox_v1_runtime_proto_rawDesc +) + +func file_depot_sandbox_v1_runtime_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_runtime_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_runtime_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_runtime_proto_rawDescData) + }) + return file_depot_sandbox_v1_runtime_proto_rawDescData +} + +var file_depot_sandbox_v1_runtime_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_depot_sandbox_v1_runtime_proto_goTypes = []interface{}{ + (*Resources)(nil), // 0: depot.sandbox.v1.Resources + (*Runtime)(nil), // 1: depot.sandbox.v1.Runtime +} +var file_depot_sandbox_v1_runtime_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_runtime_proto_init() } +func file_depot_sandbox_v1_runtime_proto_init() { + if File_depot_sandbox_v1_runtime_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_runtime_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_runtime_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Runtime); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_runtime_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_runtime_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Runtime_Named)(nil), + (*Runtime_ImageRef)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_runtime_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_runtime_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_runtime_proto_depIdxs, + MessageInfos: file_depot_sandbox_v1_runtime_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_runtime_proto = out.File + file_depot_sandbox_v1_runtime_proto_rawDesc = nil + file_depot_sandbox_v1_runtime_proto_goTypes = nil + file_depot_sandbox_v1_runtime_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/sandbox.pb.go b/pkg/proto/depot/sandbox/v1/sandbox.pb.go new file mode 100644 index 00000000..cad26a8b --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/sandbox.pb.go @@ -0,0 +1,1752 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/sandbox.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// SandboxStatus describes where a sandbox is in its lifecycle. +// +// CREATED: the sandbox record exists, but no compute has been assigned yet. +// ASSIGNED: compute has been assigned, but the VM has not started. +// STARTING: the VM is booting. +// RUNNING: the VM has booted and is ready to accept commands. +// FINISHED: the sandbox terminated cleanly (graceful stop or normal exit). +// CANCELLED: the sandbox was forcibly terminated (killed). +// FAILED: the sandbox ended with an error (such as an image pull failure, +// +// out-of-memory, or a crash). +type SandboxStatus int32 + +const ( + SandboxStatus_SANDBOX_STATUS_UNSPECIFIED SandboxStatus = 0 + SandboxStatus_SANDBOX_STATUS_CREATED SandboxStatus = 1 + SandboxStatus_SANDBOX_STATUS_ASSIGNED SandboxStatus = 2 + SandboxStatus_SANDBOX_STATUS_STARTING SandboxStatus = 3 + SandboxStatus_SANDBOX_STATUS_RUNNING SandboxStatus = 4 + SandboxStatus_SANDBOX_STATUS_FINISHED SandboxStatus = 5 + SandboxStatus_SANDBOX_STATUS_CANCELLED SandboxStatus = 6 + SandboxStatus_SANDBOX_STATUS_FAILED SandboxStatus = 7 +) + +// Enum value maps for SandboxStatus. +var ( + SandboxStatus_name = map[int32]string{ + 0: "SANDBOX_STATUS_UNSPECIFIED", + 1: "SANDBOX_STATUS_CREATED", + 2: "SANDBOX_STATUS_ASSIGNED", + 3: "SANDBOX_STATUS_STARTING", + 4: "SANDBOX_STATUS_RUNNING", + 5: "SANDBOX_STATUS_FINISHED", + 6: "SANDBOX_STATUS_CANCELLED", + 7: "SANDBOX_STATUS_FAILED", + } + SandboxStatus_value = map[string]int32{ + "SANDBOX_STATUS_UNSPECIFIED": 0, + "SANDBOX_STATUS_CREATED": 1, + "SANDBOX_STATUS_ASSIGNED": 2, + "SANDBOX_STATUS_STARTING": 3, + "SANDBOX_STATUS_RUNNING": 4, + "SANDBOX_STATUS_FINISHED": 5, + "SANDBOX_STATUS_CANCELLED": 6, + "SANDBOX_STATUS_FAILED": 7, + } +) + +func (x SandboxStatus) Enum() *SandboxStatus { + p := new(SandboxStatus) + *p = x + return p +} + +func (x SandboxStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SandboxStatus) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_sandbox_proto_enumTypes[0].Descriptor() +} + +func (SandboxStatus) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_sandbox_proto_enumTypes[0] +} + +func (x SandboxStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SandboxStatus.Descriptor instead. +func (SandboxStatus) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{0} +} + +// TerminationReason classifies why a sandbox ended. It is populated only on a +// terminal status (FINISHED, CANCELLED, or FAILED). UNSPECIFIED is never +// written by the server; callers should treat it as "unknown". +// +// GRACEFUL: a clean shutdown the caller requested via StopSandbox. +// FORCED: an immediate termination the caller requested via KillSandbox. +// TIMED_OUT: the sandbox's time-to-live expired and the server ended it. +// SYSTEM_FAULT: host failure, out-of-memory, a crash, or another +// server-side error. +type TerminationReason int32 + +const ( + TerminationReason_TERMINATION_REASON_UNSPECIFIED TerminationReason = 0 + TerminationReason_TERMINATION_REASON_GRACEFUL TerminationReason = 1 + TerminationReason_TERMINATION_REASON_FORCED TerminationReason = 2 + TerminationReason_TERMINATION_REASON_TIMED_OUT TerminationReason = 3 + TerminationReason_TERMINATION_REASON_SYSTEM_FAULT TerminationReason = 4 +) + +// Enum value maps for TerminationReason. +var ( + TerminationReason_name = map[int32]string{ + 0: "TERMINATION_REASON_UNSPECIFIED", + 1: "TERMINATION_REASON_GRACEFUL", + 2: "TERMINATION_REASON_FORCED", + 3: "TERMINATION_REASON_TIMED_OUT", + 4: "TERMINATION_REASON_SYSTEM_FAULT", + } + TerminationReason_value = map[string]int32{ + "TERMINATION_REASON_UNSPECIFIED": 0, + "TERMINATION_REASON_GRACEFUL": 1, + "TERMINATION_REASON_FORCED": 2, + "TERMINATION_REASON_TIMED_OUT": 3, + "TERMINATION_REASON_SYSTEM_FAULT": 4, + } +) + +func (x TerminationReason) Enum() *TerminationReason { + p := new(TerminationReason) + *p = x + return p +} + +func (x TerminationReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TerminationReason) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_sandbox_proto_enumTypes[1].Descriptor() +} + +func (TerminationReason) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_sandbox_proto_enumTypes[1] +} + +func (x TerminationReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TerminationReason.Descriptor instead. +func (TerminationReason) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{1} +} + +// Sandbox is the message returned by the lifecycle RPCs and describes a single +// sandbox and its current state. +type Sandbox struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + Status SandboxStatus `protobuf:"varint,3,opt,name=status,proto3,enum=depot.sandbox.v1.SandboxStatus" json:"status,omitempty"` + // Lifecycle timestamps. created_at is always set; started_at and stopped_at + // are set once the sandbox reaches the corresponding state. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=started_at,json=startedAt,proto3,oneof" json:"started_at,omitempty"` + StoppedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=stopped_at,json=stoppedAt,proto3,oneof" json:"stopped_at,omitempty"` + // Time-to-live. expires_at is the stored expiry when known; + // timeout_ms_remaining is recomputed on each read against the current time. + // Both are unset when the sandbox has no timeout policy. + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"` + TimeoutMsRemaining *int64 `protobuf:"varint,8,opt,name=timeout_ms_remaining,json=timeoutMsRemaining,proto3,oneof" json:"timeout_ms_remaining,omitempty"` + // Usage metering. Populated only after the sandbox reaches a terminal state, + // and only when usage data is available; otherwise both fields are unset. + ActiveCpuUsageMs *int64 `protobuf:"varint,9,opt,name=active_cpu_usage_ms,json=activeCpuUsageMs,proto3,oneof" json:"active_cpu_usage_ms,omitempty"` + NetworkUsage *NetworkUsage `protobuf:"bytes,10,opt,name=network_usage,json=networkUsage,proto3,oneof" json:"network_usage,omitempty"` + // The resources and runtime the server actually resolved, echoed back from + // the request so callers can see what was applied. + Resources *Resources `protobuf:"bytes,11,opt,name=resources,proto3" json:"resources,omitempty"` + Runtime *Runtime `protobuf:"bytes,12,opt,name=runtime,proto3" json:"runtime,omitempty"` + // Terminal-state metadata, populated only on a terminal status (FINISHED, + // CANCELLED, or FAILED). exit_code is a Unix exit code in the range 0..255; + // negative values are reserved for future signal-coded use. + TerminatedBy *TerminationReason `protobuf:"varint,13,opt,name=terminated_by,json=terminatedBy,proto3,enum=depot.sandbox.v1.TerminationReason,oneof" json:"terminated_by,omitempty"` + ExitCode *int32 `protobuf:"varint,14,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` + ErrorMessage *string `protobuf:"bytes,15,opt,name=error_message,json=errorMessage,proto3,oneof" json:"error_message,omitempty"` + // The human-readable label set when the sandbox was created. Empty when the + // sandbox was created without one. Returned by GetSandbox and ListSandboxes + // so callers can show or filter on the label they chose. + Name *string `protobuf:"bytes,17,opt,name=name,proto3,oneof" json:"name,omitempty"` +} + +func (x *Sandbox) Reset() { + *x = Sandbox{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sandbox) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sandbox) ProtoMessage() {} + +func (x *Sandbox) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sandbox.ProtoReflect.Descriptor instead. +func (*Sandbox) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{0} +} + +func (x *Sandbox) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +func (x *Sandbox) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Sandbox) GetStatus() SandboxStatus { + if x != nil { + return x.Status + } + return SandboxStatus_SANDBOX_STATUS_UNSPECIFIED +} + +func (x *Sandbox) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Sandbox) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *Sandbox) GetStoppedAt() *timestamppb.Timestamp { + if x != nil { + return x.StoppedAt + } + return nil +} + +func (x *Sandbox) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *Sandbox) GetTimeoutMsRemaining() int64 { + if x != nil && x.TimeoutMsRemaining != nil { + return *x.TimeoutMsRemaining + } + return 0 +} + +func (x *Sandbox) GetActiveCpuUsageMs() int64 { + if x != nil && x.ActiveCpuUsageMs != nil { + return *x.ActiveCpuUsageMs + } + return 0 +} + +func (x *Sandbox) GetNetworkUsage() *NetworkUsage { + if x != nil { + return x.NetworkUsage + } + return nil +} + +func (x *Sandbox) GetResources() *Resources { + if x != nil { + return x.Resources + } + return nil +} + +func (x *Sandbox) GetRuntime() *Runtime { + if x != nil { + return x.Runtime + } + return nil +} + +func (x *Sandbox) GetTerminatedBy() TerminationReason { + if x != nil && x.TerminatedBy != nil { + return *x.TerminatedBy + } + return TerminationReason_TERMINATION_REASON_UNSPECIFIED +} + +func (x *Sandbox) GetExitCode() int32 { + if x != nil && x.ExitCode != nil { + return *x.ExitCode + } + return 0 +} + +func (x *Sandbox) GetErrorMessage() string { + if x != nil && x.ErrorMessage != nil { + return *x.ErrorMessage + } + return "" +} + +func (x *Sandbox) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +// NetworkUsage records bytes transferred over the sandbox's primary network +// interface, with ingress and egress tracked separately. +type NetworkUsage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IngressBytes int64 `protobuf:"varint,1,opt,name=ingress_bytes,json=ingressBytes,proto3" json:"ingress_bytes,omitempty"` + EgressBytes int64 `protobuf:"varint,2,opt,name=egress_bytes,json=egressBytes,proto3" json:"egress_bytes,omitempty"` +} + +func (x *NetworkUsage) Reset() { + *x = NetworkUsage{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkUsage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkUsage) ProtoMessage() {} + +func (x *NetworkUsage) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkUsage.ProtoReflect.Descriptor instead. +func (*NetworkUsage) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{1} +} + +func (x *NetworkUsage) GetIngressBytes() int64 { + if x != nil { + return x.IngressBytes + } + return 0 +} + +func (x *NetworkUsage) GetEgressBytes() int64 { + if x != nil { + return x.EgressBytes + } + return 0 +} + +type CreateSandboxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional human-readable label for the sandbox, scoped to the organization. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Requested resources. The server applies defaults for any unset fields. + Resources *Resources `protobuf:"bytes,2,opt,name=resources,proto3,oneof" json:"resources,omitempty"` + // Requested runtime. The server resolves a `named` runtime against its + // catalog or pulls an `image_ref` directly. + Runtime *Runtime `protobuf:"bytes,3,opt,name=runtime,proto3,oneof" json:"runtime,omitempty"` + // Where the sandbox's initial content comes from (git, snapshot, image, or + // template). When unset, the sandbox starts with the default content. + Source *Source `protobuf:"bytes,4,opt,name=source,proto3,oneof" json:"source,omitempty"` +} + +func (x *CreateSandboxRequest) Reset() { + *x = CreateSandboxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxRequest) ProtoMessage() {} + +func (x *CreateSandboxRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxRequest.ProtoReflect.Descriptor instead. +func (*CreateSandboxRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateSandboxRequest) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *CreateSandboxRequest) GetResources() *Resources { + if x != nil { + return x.Resources + } + return nil +} + +func (x *CreateSandboxRequest) GetRuntime() *Runtime { + if x != nil { + return x.Runtime + } + return nil +} + +func (x *CreateSandboxRequest) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +type CreateSandboxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` +} + +func (x *CreateSandboxResponse) Reset() { + *x = CreateSandboxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxResponse) ProtoMessage() {} + +func (x *CreateSandboxResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxResponse.ProtoReflect.Descriptor instead. +func (*CreateSandboxResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateSandboxResponse) GetSandbox() *Sandbox { + if x != nil { + return x.Sandbox + } + return nil +} + +type GetSandboxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` +} + +func (x *GetSandboxResponse) Reset() { + *x = GetSandboxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSandboxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSandboxResponse) ProtoMessage() {} + +func (x *GetSandboxResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSandboxResponse.ProtoReflect.Descriptor instead. +func (*GetSandboxResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{4} +} + +func (x *GetSandboxResponse) GetSandbox() *Sandbox { + if x != nil { + return x.Sandbox + } + return nil +} + +// ListSandboxesRequest lists sandboxes, optionally filtered by status and +// creation time, with cursor-based pagination. page_token is the cursor +// returned by a previous response. +type ListSandboxesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageSize *int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + PageToken *string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` + Filter *ListSandboxesRequest_Filter `protobuf:"bytes,3,opt,name=filter,proto3,oneof" json:"filter,omitempty"` +} + +func (x *ListSandboxesRequest) Reset() { + *x = ListSandboxesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSandboxesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSandboxesRequest) ProtoMessage() {} + +func (x *ListSandboxesRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSandboxesRequest.ProtoReflect.Descriptor instead. +func (*ListSandboxesRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{5} +} + +func (x *ListSandboxesRequest) GetPageSize() int32 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListSandboxesRequest) GetPageToken() string { + if x != nil && x.PageToken != nil { + return *x.PageToken + } + return "" +} + +func (x *ListSandboxesRequest) GetFilter() *ListSandboxesRequest_Filter { + if x != nil { + return x.Filter + } + return nil +} + +type ListSandboxesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandboxes []*Sandbox `protobuf:"bytes,1,rep,name=sandboxes,proto3" json:"sandboxes,omitempty"` + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` +} + +func (x *ListSandboxesResponse) Reset() { + *x = ListSandboxesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSandboxesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSandboxesResponse) ProtoMessage() {} + +func (x *ListSandboxesResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSandboxesResponse.ProtoReflect.Descriptor instead. +func (*ListSandboxesResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{6} +} + +func (x *ListSandboxesResponse) GetSandboxes() []*Sandbox { + if x != nil { + return x.Sandboxes + } + return nil +} + +func (x *ListSandboxesResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +// StopSandboxRequest gracefully shuts a sandbox down. The server records the +// termination request immediately; when `blocking` is true the RPC waits, up to +// a server-side limit, for the sandbox to reach a terminal state before +// returning. To control the signal used, use KillSandbox instead. +type StopSandboxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // If true, the server waits until the sandbox reaches a terminal state (or a + // server-side limit is hit) before responding. If false (the default), the + // RPC returns as soon as the termination request is recorded. + Blocking *bool `protobuf:"varint,2,opt,name=blocking,proto3,oneof" json:"blocking,omitempty"` +} + +func (x *StopSandboxRequest) Reset() { + *x = StopSandboxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopSandboxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopSandboxRequest) ProtoMessage() {} + +func (x *StopSandboxRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopSandboxRequest.ProtoReflect.Descriptor instead. +func (*StopSandboxRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{7} +} + +func (x *StopSandboxRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *StopSandboxRequest) GetBlocking() bool { + if x != nil && x.Blocking != nil { + return *x.Blocking + } + return false +} + +type StopSandboxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sandbox after the termination request was recorded. Its status is + // either RUNNING (with termination requested) or a terminal status if it + // transitioned before the read. + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` +} + +func (x *StopSandboxResponse) Reset() { + *x = StopSandboxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopSandboxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopSandboxResponse) ProtoMessage() {} + +func (x *StopSandboxResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopSandboxResponse.ProtoReflect.Descriptor instead. +func (*StopSandboxResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{8} +} + +func (x *StopSandboxResponse) GetSandbox() *Sandbox { + if x != nil { + return x.Sandbox + } + return nil +} + +// KillSandboxRequest forcibly terminates a sandbox. It is fire-and-forget with +// no blocking option. The `signal` field is accepted but currently ignored; the +// server always issues a hard cancel. +type KillSandboxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // Signal name (for example "SIGKILL"). Reserved for forward compatibility; + // it is currently ignored and a hard cancel is always issued. + Signal *string `protobuf:"bytes,2,opt,name=signal,proto3,oneof" json:"signal,omitempty"` +} + +func (x *KillSandboxRequest) Reset() { + *x = KillSandboxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KillSandboxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KillSandboxRequest) ProtoMessage() {} + +func (x *KillSandboxRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KillSandboxRequest.ProtoReflect.Descriptor instead. +func (*KillSandboxRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{9} +} + +func (x *KillSandboxRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *KillSandboxRequest) GetSignal() string { + if x != nil && x.Signal != nil { + return *x.Signal + } + return "" +} + +type KillSandboxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` +} + +func (x *KillSandboxResponse) Reset() { + *x = KillSandboxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KillSandboxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KillSandboxResponse) ProtoMessage() {} + +func (x *KillSandboxResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KillSandboxResponse.ProtoReflect.Descriptor instead. +func (*KillSandboxResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{10} +} + +func (x *KillSandboxResponse) GetSandbox() *Sandbox { + if x != nil { + return x.Sandbox + } + return nil +} + +type ListSandboxesRequest_Filter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If non-empty, only sandboxes whose status is in this set are returned. + States []SandboxStatus `protobuf:"varint,1,rep,packed,name=states,proto3,enum=depot.sandbox.v1.SandboxStatus" json:"states,omitempty"` + CreatedAfter *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_after,json=createdAfter,proto3,oneof" json:"created_after,omitempty"` + CreatedBefore *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_before,json=createdBefore,proto3,oneof" json:"created_before,omitempty"` +} + +func (x *ListSandboxesRequest_Filter) Reset() { + *x = ListSandboxesRequest_Filter{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSandboxesRequest_Filter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSandboxesRequest_Filter) ProtoMessage() {} + +func (x *ListSandboxesRequest_Filter) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_sandbox_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSandboxesRequest_Filter.ProtoReflect.Descriptor instead. +func (*ListSandboxesRequest_Filter) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *ListSandboxesRequest_Filter) GetStates() []SandboxStatus { + if x != nil { + return x.States + } + return nil +} + +func (x *ListSandboxesRequest_Filter) GetCreatedAfter() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAfter + } + return nil +} + +func (x *ListSandboxesRequest_Filter) GetCreatedBefore() *timestamppb.Timestamp { + if x != nil { + return x.CreatedBefore + } + return nil +} + +var File_depot_sandbox_v1_sandbox_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_sandbox_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x1a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1a, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x08, 0x0a, 0x07, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x48, 0x01, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x48, 0x02, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x35, 0x0a, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x73, 0x5f, + 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x03, 0x52, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x73, 0x52, 0x65, 0x6d, 0x61, + 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, + 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x73, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x0d, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x73, + 0x61, 0x67, 0x65, 0x48, 0x05, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x73, + 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x07, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x48, 0x06, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, + 0x42, 0x79, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x48, 0x07, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, + 0x43, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x48, 0x08, + 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x74, + 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x70, 0x75, 0x5f, + 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x56, 0x0a, 0x0c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x6e, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x8e, 0x02, + 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x48, + 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x38, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x02, 0x52, 0x07, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x48, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x4c, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x22, 0x49, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x07, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x22, 0xc7, 0x03, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x02, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x88, + 0x01, 0x01, 0x1a, 0xf4, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x37, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1f, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x66, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x48, 0x01, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x22, 0x91, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, + 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7a, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x12, 0x1f, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x22, 0x4a, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x22, 0x74, 0x0a, + 0x12, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x66, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x1b, 0x0a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x22, 0x4a, 0x0a, 0x13, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2a, + 0xf7, 0x01, 0x0a, 0x0d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, + 0x17, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x41, + 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, + 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x41, 0x4e, 0x44, 0x42, + 0x4f, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x05, + 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x12, 0x19, + 0x0a, 0x15, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x2a, 0xbe, 0x01, 0x0a, 0x11, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x22, 0x0a, 0x1e, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x47, 0x52, 0x41, 0x43, 0x45, 0x46, + 0x55, 0x4c, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x44, 0x5f, + 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x59, 0x53, 0x54, + 0x45, 0x4d, 0x5f, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x04, 0x32, 0xa6, 0x16, 0x0a, 0x0e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, + 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x26, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x50, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x1c, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x1a, 0x24, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x65, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x12, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5a, 0x0a, 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x24, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x52, + 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, + 0x12, 0x6d, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x69, + 0x70, 0x65, 0x12, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x50, 0x69, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x5d, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x20, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, + 0x6e, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x60, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x2c, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5d, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x12, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x69, 0x0a, 0x0d, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x12, 0x26, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x64, 0x0a, 0x11, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x12, + 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, + 0x12, 0x5a, 0x0a, 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, + 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x07, + 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x50, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x50, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x48, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x12, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6b, 0x64, + 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6b, 0x64, + 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x04, 0x53, 0x74, + 0x61, 0x74, 0x12, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4e, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, 0x72, 0x12, 0x20, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x1f, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, + 0x0a, 0x06, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x08, 0x43, + 0x6f, 0x70, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x70, 0x79, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x70, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, + 0x0a, 0x08, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x48, 0x0a, 0x05, 0x43, 0x68, 0x6d, 0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x6d, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x6d, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x43, + 0x68, 0x6f, 0x77, 0x6e, 0x12, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x07, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, + 0x12, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, + 0x65, 0x12, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x6e, + 0x6b, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, + 0x12, 0x22, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x63, 0x0a, 0x0e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x27, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, + 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x26, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, + 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x12, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xc1, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, + 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, 0x58, 0xaa, 0x02, 0x10, + 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_sandbox_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_sandbox_proto_rawDescData = file_depot_sandbox_v1_sandbox_proto_rawDesc +) + +func file_depot_sandbox_v1_sandbox_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_sandbox_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_sandbox_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_sandbox_proto_rawDescData) + }) + return file_depot_sandbox_v1_sandbox_proto_rawDescData +} + +var file_depot_sandbox_v1_sandbox_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_depot_sandbox_v1_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_depot_sandbox_v1_sandbox_proto_goTypes = []interface{}{ + (SandboxStatus)(0), // 0: depot.sandbox.v1.SandboxStatus + (TerminationReason)(0), // 1: depot.sandbox.v1.TerminationReason + (*Sandbox)(nil), // 2: depot.sandbox.v1.Sandbox + (*NetworkUsage)(nil), // 3: depot.sandbox.v1.NetworkUsage + (*CreateSandboxRequest)(nil), // 4: depot.sandbox.v1.CreateSandboxRequest + (*CreateSandboxResponse)(nil), // 5: depot.sandbox.v1.CreateSandboxResponse + (*GetSandboxResponse)(nil), // 6: depot.sandbox.v1.GetSandboxResponse + (*ListSandboxesRequest)(nil), // 7: depot.sandbox.v1.ListSandboxesRequest + (*ListSandboxesResponse)(nil), // 8: depot.sandbox.v1.ListSandboxesResponse + (*StopSandboxRequest)(nil), // 9: depot.sandbox.v1.StopSandboxRequest + (*StopSandboxResponse)(nil), // 10: depot.sandbox.v1.StopSandboxResponse + (*KillSandboxRequest)(nil), // 11: depot.sandbox.v1.KillSandboxRequest + (*KillSandboxResponse)(nil), // 12: depot.sandbox.v1.KillSandboxResponse + (*ListSandboxesRequest_Filter)(nil), // 13: depot.sandbox.v1.ListSandboxesRequest.Filter + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (*Resources)(nil), // 15: depot.sandbox.v1.Resources + (*Runtime)(nil), // 16: depot.sandbox.v1.Runtime + (*Source)(nil), // 17: depot.sandbox.v1.Source + (*SandboxRef)(nil), // 18: depot.sandbox.v1.SandboxRef + (*RunCommandRequest)(nil), // 19: depot.sandbox.v1.RunCommandRequest + (*RunCommandPipeRequest)(nil), // 20: depot.sandbox.v1.RunCommandPipeRequest + (*RunHookRequest)(nil), // 21: depot.sandbox.v1.RunHookRequest + (*SandboxCommandExecutionRef)(nil), // 22: depot.sandbox.v1.SandboxCommandExecutionRef + (*ListCommandsRequest)(nil), // 23: depot.sandbox.v1.ListCommandsRequest + (*AttachCommandRequest)(nil), // 24: depot.sandbox.v1.AttachCommandRequest + (*StreamSandboxLogsRequest)(nil), // 25: depot.sandbox.v1.StreamSandboxLogsRequest + (*KillCommandRequest)(nil), // 26: depot.sandbox.v1.KillCommandRequest + (*OpenPtyRequest)(nil), // 27: depot.sandbox.v1.OpenPtyRequest + (*MkdirRequest)(nil), // 28: depot.sandbox.v1.MkdirRequest + (*StatRequest)(nil), // 29: depot.sandbox.v1.StatRequest + (*ReadDirRequest)(nil), // 30: depot.sandbox.v1.ReadDirRequest + (*RemoveRequest)(nil), // 31: depot.sandbox.v1.RemoveRequest + (*RenameRequest)(nil), // 32: depot.sandbox.v1.RenameRequest + (*CopyFileRequest)(nil), // 33: depot.sandbox.v1.CopyFileRequest + (*TruncateRequest)(nil), // 34: depot.sandbox.v1.TruncateRequest + (*ChmodRequest)(nil), // 35: depot.sandbox.v1.ChmodRequest + (*ChownRequest)(nil), // 36: depot.sandbox.v1.ChownRequest + (*SymlinkRequest)(nil), // 37: depot.sandbox.v1.SymlinkRequest + (*ReadlinkRequest)(nil), // 38: depot.sandbox.v1.ReadlinkRequest + (*AccessRequest)(nil), // 39: depot.sandbox.v1.AccessRequest + (*ReadFileRequest)(nil), // 40: depot.sandbox.v1.ReadFileRequest + (*WriteFileRequest)(nil), // 41: depot.sandbox.v1.WriteFileRequest + (*CreateSnapshotRequest)(nil), // 42: depot.sandbox.v1.CreateSnapshotRequest + (*GetSnapshotRequest)(nil), // 43: depot.sandbox.v1.GetSnapshotRequest + (*ListSnapshotsRequest)(nil), // 44: depot.sandbox.v1.ListSnapshotsRequest + (*DeleteSnapshotRequest)(nil), // 45: depot.sandbox.v1.DeleteSnapshotRequest + (*SandboxCommandExecutionEvent)(nil), // 46: depot.sandbox.v1.SandboxCommandExecutionEvent + (*GetCommandResponse)(nil), // 47: depot.sandbox.v1.GetCommandResponse + (*ListCommandsResponse)(nil), // 48: depot.sandbox.v1.ListCommandsResponse + (*SandboxLogEvent)(nil), // 49: depot.sandbox.v1.SandboxLogEvent + (*KillCommandResponse)(nil), // 50: depot.sandbox.v1.KillCommandResponse + (*OpenPtyResponse)(nil), // 51: depot.sandbox.v1.OpenPtyResponse + (*MkdirResponse)(nil), // 52: depot.sandbox.v1.MkdirResponse + (*StatResponse)(nil), // 53: depot.sandbox.v1.StatResponse + (*ReadDirResponse)(nil), // 54: depot.sandbox.v1.ReadDirResponse + (*RemoveResponse)(nil), // 55: depot.sandbox.v1.RemoveResponse + (*RenameResponse)(nil), // 56: depot.sandbox.v1.RenameResponse + (*CopyFileResponse)(nil), // 57: depot.sandbox.v1.CopyFileResponse + (*TruncateResponse)(nil), // 58: depot.sandbox.v1.TruncateResponse + (*ChmodResponse)(nil), // 59: depot.sandbox.v1.ChmodResponse + (*ChownResponse)(nil), // 60: depot.sandbox.v1.ChownResponse + (*SymlinkResponse)(nil), // 61: depot.sandbox.v1.SymlinkResponse + (*ReadlinkResponse)(nil), // 62: depot.sandbox.v1.ReadlinkResponse + (*AccessResponse)(nil), // 63: depot.sandbox.v1.AccessResponse + (*FileChunk)(nil), // 64: depot.sandbox.v1.FileChunk + (*WriteFileResponse)(nil), // 65: depot.sandbox.v1.WriteFileResponse + (*CreateSnapshotResponse)(nil), // 66: depot.sandbox.v1.CreateSnapshotResponse + (*GetSnapshotResponse)(nil), // 67: depot.sandbox.v1.GetSnapshotResponse + (*ListSnapshotsResponse)(nil), // 68: depot.sandbox.v1.ListSnapshotsResponse + (*DeleteSnapshotResponse)(nil), // 69: depot.sandbox.v1.DeleteSnapshotResponse +} +var file_depot_sandbox_v1_sandbox_proto_depIdxs = []int32{ + 0, // 0: depot.sandbox.v1.Sandbox.status:type_name -> depot.sandbox.v1.SandboxStatus + 14, // 1: depot.sandbox.v1.Sandbox.created_at:type_name -> google.protobuf.Timestamp + 14, // 2: depot.sandbox.v1.Sandbox.started_at:type_name -> google.protobuf.Timestamp + 14, // 3: depot.sandbox.v1.Sandbox.stopped_at:type_name -> google.protobuf.Timestamp + 14, // 4: depot.sandbox.v1.Sandbox.expires_at:type_name -> google.protobuf.Timestamp + 3, // 5: depot.sandbox.v1.Sandbox.network_usage:type_name -> depot.sandbox.v1.NetworkUsage + 15, // 6: depot.sandbox.v1.Sandbox.resources:type_name -> depot.sandbox.v1.Resources + 16, // 7: depot.sandbox.v1.Sandbox.runtime:type_name -> depot.sandbox.v1.Runtime + 1, // 8: depot.sandbox.v1.Sandbox.terminated_by:type_name -> depot.sandbox.v1.TerminationReason + 15, // 9: depot.sandbox.v1.CreateSandboxRequest.resources:type_name -> depot.sandbox.v1.Resources + 16, // 10: depot.sandbox.v1.CreateSandboxRequest.runtime:type_name -> depot.sandbox.v1.Runtime + 17, // 11: depot.sandbox.v1.CreateSandboxRequest.source:type_name -> depot.sandbox.v1.Source + 2, // 12: depot.sandbox.v1.CreateSandboxResponse.sandbox:type_name -> depot.sandbox.v1.Sandbox + 2, // 13: depot.sandbox.v1.GetSandboxResponse.sandbox:type_name -> depot.sandbox.v1.Sandbox + 13, // 14: depot.sandbox.v1.ListSandboxesRequest.filter:type_name -> depot.sandbox.v1.ListSandboxesRequest.Filter + 2, // 15: depot.sandbox.v1.ListSandboxesResponse.sandboxes:type_name -> depot.sandbox.v1.Sandbox + 18, // 16: depot.sandbox.v1.StopSandboxRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 2, // 17: depot.sandbox.v1.StopSandboxResponse.sandbox:type_name -> depot.sandbox.v1.Sandbox + 18, // 18: depot.sandbox.v1.KillSandboxRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 2, // 19: depot.sandbox.v1.KillSandboxResponse.sandbox:type_name -> depot.sandbox.v1.Sandbox + 0, // 20: depot.sandbox.v1.ListSandboxesRequest.Filter.states:type_name -> depot.sandbox.v1.SandboxStatus + 14, // 21: depot.sandbox.v1.ListSandboxesRequest.Filter.created_after:type_name -> google.protobuf.Timestamp + 14, // 22: depot.sandbox.v1.ListSandboxesRequest.Filter.created_before:type_name -> google.protobuf.Timestamp + 4, // 23: depot.sandbox.v1.SandboxService.CreateSandbox:input_type -> depot.sandbox.v1.CreateSandboxRequest + 18, // 24: depot.sandbox.v1.SandboxService.GetSandbox:input_type -> depot.sandbox.v1.SandboxRef + 7, // 25: depot.sandbox.v1.SandboxService.ListSandboxes:input_type -> depot.sandbox.v1.ListSandboxesRequest + 9, // 26: depot.sandbox.v1.SandboxService.StopSandbox:input_type -> depot.sandbox.v1.StopSandboxRequest + 11, // 27: depot.sandbox.v1.SandboxService.KillSandbox:input_type -> depot.sandbox.v1.KillSandboxRequest + 19, // 28: depot.sandbox.v1.SandboxService.RunCommand:input_type -> depot.sandbox.v1.RunCommandRequest + 20, // 29: depot.sandbox.v1.SandboxService.RunCommandPipe:input_type -> depot.sandbox.v1.RunCommandPipeRequest + 21, // 30: depot.sandbox.v1.SandboxService.RunHook:input_type -> depot.sandbox.v1.RunHookRequest + 22, // 31: depot.sandbox.v1.SandboxService.GetCommand:input_type -> depot.sandbox.v1.SandboxCommandExecutionRef + 23, // 32: depot.sandbox.v1.SandboxService.ListCommands:input_type -> depot.sandbox.v1.ListCommandsRequest + 24, // 33: depot.sandbox.v1.SandboxService.AttachCommand:input_type -> depot.sandbox.v1.AttachCommandRequest + 25, // 34: depot.sandbox.v1.SandboxService.StreamSandboxLogs:input_type -> depot.sandbox.v1.StreamSandboxLogsRequest + 26, // 35: depot.sandbox.v1.SandboxService.KillCommand:input_type -> depot.sandbox.v1.KillCommandRequest + 27, // 36: depot.sandbox.v1.SandboxService.OpenPty:input_type -> depot.sandbox.v1.OpenPtyRequest + 28, // 37: depot.sandbox.v1.SandboxService.Mkdir:input_type -> depot.sandbox.v1.MkdirRequest + 29, // 38: depot.sandbox.v1.SandboxService.Stat:input_type -> depot.sandbox.v1.StatRequest + 30, // 39: depot.sandbox.v1.SandboxService.ReadDir:input_type -> depot.sandbox.v1.ReadDirRequest + 31, // 40: depot.sandbox.v1.SandboxService.Remove:input_type -> depot.sandbox.v1.RemoveRequest + 32, // 41: depot.sandbox.v1.SandboxService.Rename:input_type -> depot.sandbox.v1.RenameRequest + 33, // 42: depot.sandbox.v1.SandboxService.CopyFile:input_type -> depot.sandbox.v1.CopyFileRequest + 34, // 43: depot.sandbox.v1.SandboxService.Truncate:input_type -> depot.sandbox.v1.TruncateRequest + 35, // 44: depot.sandbox.v1.SandboxService.Chmod:input_type -> depot.sandbox.v1.ChmodRequest + 36, // 45: depot.sandbox.v1.SandboxService.Chown:input_type -> depot.sandbox.v1.ChownRequest + 37, // 46: depot.sandbox.v1.SandboxService.Symlink:input_type -> depot.sandbox.v1.SymlinkRequest + 38, // 47: depot.sandbox.v1.SandboxService.Readlink:input_type -> depot.sandbox.v1.ReadlinkRequest + 39, // 48: depot.sandbox.v1.SandboxService.Access:input_type -> depot.sandbox.v1.AccessRequest + 40, // 49: depot.sandbox.v1.SandboxService.ReadFile:input_type -> depot.sandbox.v1.ReadFileRequest + 41, // 50: depot.sandbox.v1.SandboxService.WriteFile:input_type -> depot.sandbox.v1.WriteFileRequest + 42, // 51: depot.sandbox.v1.SandboxService.CreateSnapshot:input_type -> depot.sandbox.v1.CreateSnapshotRequest + 43, // 52: depot.sandbox.v1.SandboxService.GetSnapshot:input_type -> depot.sandbox.v1.GetSnapshotRequest + 44, // 53: depot.sandbox.v1.SandboxService.ListSnapshots:input_type -> depot.sandbox.v1.ListSnapshotsRequest + 45, // 54: depot.sandbox.v1.SandboxService.DeleteSnapshot:input_type -> depot.sandbox.v1.DeleteSnapshotRequest + 5, // 55: depot.sandbox.v1.SandboxService.CreateSandbox:output_type -> depot.sandbox.v1.CreateSandboxResponse + 6, // 56: depot.sandbox.v1.SandboxService.GetSandbox:output_type -> depot.sandbox.v1.GetSandboxResponse + 8, // 57: depot.sandbox.v1.SandboxService.ListSandboxes:output_type -> depot.sandbox.v1.ListSandboxesResponse + 10, // 58: depot.sandbox.v1.SandboxService.StopSandbox:output_type -> depot.sandbox.v1.StopSandboxResponse + 12, // 59: depot.sandbox.v1.SandboxService.KillSandbox:output_type -> depot.sandbox.v1.KillSandboxResponse + 46, // 60: depot.sandbox.v1.SandboxService.RunCommand:output_type -> depot.sandbox.v1.SandboxCommandExecutionEvent + 46, // 61: depot.sandbox.v1.SandboxService.RunCommandPipe:output_type -> depot.sandbox.v1.SandboxCommandExecutionEvent + 46, // 62: depot.sandbox.v1.SandboxService.RunHook:output_type -> depot.sandbox.v1.SandboxCommandExecutionEvent + 47, // 63: depot.sandbox.v1.SandboxService.GetCommand:output_type -> depot.sandbox.v1.GetCommandResponse + 48, // 64: depot.sandbox.v1.SandboxService.ListCommands:output_type -> depot.sandbox.v1.ListCommandsResponse + 46, // 65: depot.sandbox.v1.SandboxService.AttachCommand:output_type -> depot.sandbox.v1.SandboxCommandExecutionEvent + 49, // 66: depot.sandbox.v1.SandboxService.StreamSandboxLogs:output_type -> depot.sandbox.v1.SandboxLogEvent + 50, // 67: depot.sandbox.v1.SandboxService.KillCommand:output_type -> depot.sandbox.v1.KillCommandResponse + 51, // 68: depot.sandbox.v1.SandboxService.OpenPty:output_type -> depot.sandbox.v1.OpenPtyResponse + 52, // 69: depot.sandbox.v1.SandboxService.Mkdir:output_type -> depot.sandbox.v1.MkdirResponse + 53, // 70: depot.sandbox.v1.SandboxService.Stat:output_type -> depot.sandbox.v1.StatResponse + 54, // 71: depot.sandbox.v1.SandboxService.ReadDir:output_type -> depot.sandbox.v1.ReadDirResponse + 55, // 72: depot.sandbox.v1.SandboxService.Remove:output_type -> depot.sandbox.v1.RemoveResponse + 56, // 73: depot.sandbox.v1.SandboxService.Rename:output_type -> depot.sandbox.v1.RenameResponse + 57, // 74: depot.sandbox.v1.SandboxService.CopyFile:output_type -> depot.sandbox.v1.CopyFileResponse + 58, // 75: depot.sandbox.v1.SandboxService.Truncate:output_type -> depot.sandbox.v1.TruncateResponse + 59, // 76: depot.sandbox.v1.SandboxService.Chmod:output_type -> depot.sandbox.v1.ChmodResponse + 60, // 77: depot.sandbox.v1.SandboxService.Chown:output_type -> depot.sandbox.v1.ChownResponse + 61, // 78: depot.sandbox.v1.SandboxService.Symlink:output_type -> depot.sandbox.v1.SymlinkResponse + 62, // 79: depot.sandbox.v1.SandboxService.Readlink:output_type -> depot.sandbox.v1.ReadlinkResponse + 63, // 80: depot.sandbox.v1.SandboxService.Access:output_type -> depot.sandbox.v1.AccessResponse + 64, // 81: depot.sandbox.v1.SandboxService.ReadFile:output_type -> depot.sandbox.v1.FileChunk + 65, // 82: depot.sandbox.v1.SandboxService.WriteFile:output_type -> depot.sandbox.v1.WriteFileResponse + 66, // 83: depot.sandbox.v1.SandboxService.CreateSnapshot:output_type -> depot.sandbox.v1.CreateSnapshotResponse + 67, // 84: depot.sandbox.v1.SandboxService.GetSnapshot:output_type -> depot.sandbox.v1.GetSnapshotResponse + 68, // 85: depot.sandbox.v1.SandboxService.ListSnapshots:output_type -> depot.sandbox.v1.ListSnapshotsResponse + 69, // 86: depot.sandbox.v1.SandboxService.DeleteSnapshot:output_type -> depot.sandbox.v1.DeleteSnapshotResponse + 55, // [55:87] is the sub-list for method output_type + 23, // [23:55] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_sandbox_proto_init() } +func file_depot_sandbox_v1_sandbox_proto_init() { + if File_depot_sandbox_v1_sandbox_proto != nil { + return + } + file_depot_sandbox_v1_command_proto_init() + file_depot_sandbox_v1_filesystem_proto_init() + file_depot_sandbox_v1_hook_proto_init() + file_depot_sandbox_v1_logs_proto_init() + file_depot_sandbox_v1_pty_proto_init() + file_depot_sandbox_v1_refs_proto_init() + file_depot_sandbox_v1_runtime_proto_init() + file_depot_sandbox_v1_snapshot_proto_init() + file_depot_sandbox_v1_source_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_sandbox_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sandbox); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkUsage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSandboxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSandboxesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSandboxesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopSandboxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopSandboxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KillSandboxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KillSandboxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSandboxesRequest_Filter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_sandbox_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_sandbox_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_sandbox_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_sandbox_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_sandbox_proto_msgTypes[7].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_sandbox_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_sandbox_proto_msgTypes[11].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_sandbox_proto_rawDesc, + NumEnums: 2, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_depot_sandbox_v1_sandbox_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_sandbox_proto_depIdxs, + EnumInfos: file_depot_sandbox_v1_sandbox_proto_enumTypes, + MessageInfos: file_depot_sandbox_v1_sandbox_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_sandbox_proto = out.File + file_depot_sandbox_v1_sandbox_proto_rawDesc = nil + file_depot_sandbox_v1_sandbox_proto_goTypes = nil + file_depot_sandbox_v1_sandbox_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go b/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go new file mode 100644 index 00000000..48bf082b --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go @@ -0,0 +1,1005 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: depot/sandbox/v1/sandbox.proto + +package sandboxv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // SandboxServiceName is the fully-qualified name of the SandboxService service. + SandboxServiceName = "depot.sandbox.v1.SandboxService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // SandboxServiceCreateSandboxProcedure is the fully-qualified name of the SandboxService's + // CreateSandbox RPC. + SandboxServiceCreateSandboxProcedure = "/depot.sandbox.v1.SandboxService/CreateSandbox" + // SandboxServiceGetSandboxProcedure is the fully-qualified name of the SandboxService's GetSandbox + // RPC. + SandboxServiceGetSandboxProcedure = "/depot.sandbox.v1.SandboxService/GetSandbox" + // SandboxServiceListSandboxesProcedure is the fully-qualified name of the SandboxService's + // ListSandboxes RPC. + SandboxServiceListSandboxesProcedure = "/depot.sandbox.v1.SandboxService/ListSandboxes" + // SandboxServiceStopSandboxProcedure is the fully-qualified name of the SandboxService's + // StopSandbox RPC. + SandboxServiceStopSandboxProcedure = "/depot.sandbox.v1.SandboxService/StopSandbox" + // SandboxServiceKillSandboxProcedure is the fully-qualified name of the SandboxService's + // KillSandbox RPC. + SandboxServiceKillSandboxProcedure = "/depot.sandbox.v1.SandboxService/KillSandbox" + // SandboxServiceRunCommandProcedure is the fully-qualified name of the SandboxService's RunCommand + // RPC. + SandboxServiceRunCommandProcedure = "/depot.sandbox.v1.SandboxService/RunCommand" + // SandboxServiceRunCommandPipeProcedure is the fully-qualified name of the SandboxService's + // RunCommandPipe RPC. + SandboxServiceRunCommandPipeProcedure = "/depot.sandbox.v1.SandboxService/RunCommandPipe" + // SandboxServiceRunHookProcedure is the fully-qualified name of the SandboxService's RunHook RPC. + SandboxServiceRunHookProcedure = "/depot.sandbox.v1.SandboxService/RunHook" + // SandboxServiceGetCommandProcedure is the fully-qualified name of the SandboxService's GetCommand + // RPC. + SandboxServiceGetCommandProcedure = "/depot.sandbox.v1.SandboxService/GetCommand" + // SandboxServiceListCommandsProcedure is the fully-qualified name of the SandboxService's + // ListCommands RPC. + SandboxServiceListCommandsProcedure = "/depot.sandbox.v1.SandboxService/ListCommands" + // SandboxServiceAttachCommandProcedure is the fully-qualified name of the SandboxService's + // AttachCommand RPC. + SandboxServiceAttachCommandProcedure = "/depot.sandbox.v1.SandboxService/AttachCommand" + // SandboxServiceStreamSandboxLogsProcedure is the fully-qualified name of the SandboxService's + // StreamSandboxLogs RPC. + SandboxServiceStreamSandboxLogsProcedure = "/depot.sandbox.v1.SandboxService/StreamSandboxLogs" + // SandboxServiceKillCommandProcedure is the fully-qualified name of the SandboxService's + // KillCommand RPC. + SandboxServiceKillCommandProcedure = "/depot.sandbox.v1.SandboxService/KillCommand" + // SandboxServiceOpenPtyProcedure is the fully-qualified name of the SandboxService's OpenPty RPC. + SandboxServiceOpenPtyProcedure = "/depot.sandbox.v1.SandboxService/OpenPty" + // SandboxServiceMkdirProcedure is the fully-qualified name of the SandboxService's Mkdir RPC. + SandboxServiceMkdirProcedure = "/depot.sandbox.v1.SandboxService/Mkdir" + // SandboxServiceStatProcedure is the fully-qualified name of the SandboxService's Stat RPC. + SandboxServiceStatProcedure = "/depot.sandbox.v1.SandboxService/Stat" + // SandboxServiceReadDirProcedure is the fully-qualified name of the SandboxService's ReadDir RPC. + SandboxServiceReadDirProcedure = "/depot.sandbox.v1.SandboxService/ReadDir" + // SandboxServiceRemoveProcedure is the fully-qualified name of the SandboxService's Remove RPC. + SandboxServiceRemoveProcedure = "/depot.sandbox.v1.SandboxService/Remove" + // SandboxServiceRenameProcedure is the fully-qualified name of the SandboxService's Rename RPC. + SandboxServiceRenameProcedure = "/depot.sandbox.v1.SandboxService/Rename" + // SandboxServiceCopyFileProcedure is the fully-qualified name of the SandboxService's CopyFile RPC. + SandboxServiceCopyFileProcedure = "/depot.sandbox.v1.SandboxService/CopyFile" + // SandboxServiceTruncateProcedure is the fully-qualified name of the SandboxService's Truncate RPC. + SandboxServiceTruncateProcedure = "/depot.sandbox.v1.SandboxService/Truncate" + // SandboxServiceChmodProcedure is the fully-qualified name of the SandboxService's Chmod RPC. + SandboxServiceChmodProcedure = "/depot.sandbox.v1.SandboxService/Chmod" + // SandboxServiceChownProcedure is the fully-qualified name of the SandboxService's Chown RPC. + SandboxServiceChownProcedure = "/depot.sandbox.v1.SandboxService/Chown" + // SandboxServiceSymlinkProcedure is the fully-qualified name of the SandboxService's Symlink RPC. + SandboxServiceSymlinkProcedure = "/depot.sandbox.v1.SandboxService/Symlink" + // SandboxServiceReadlinkProcedure is the fully-qualified name of the SandboxService's Readlink RPC. + SandboxServiceReadlinkProcedure = "/depot.sandbox.v1.SandboxService/Readlink" + // SandboxServiceAccessProcedure is the fully-qualified name of the SandboxService's Access RPC. + SandboxServiceAccessProcedure = "/depot.sandbox.v1.SandboxService/Access" + // SandboxServiceReadFileProcedure is the fully-qualified name of the SandboxService's ReadFile RPC. + SandboxServiceReadFileProcedure = "/depot.sandbox.v1.SandboxService/ReadFile" + // SandboxServiceWriteFileProcedure is the fully-qualified name of the SandboxService's WriteFile + // RPC. + SandboxServiceWriteFileProcedure = "/depot.sandbox.v1.SandboxService/WriteFile" + // SandboxServiceCreateSnapshotProcedure is the fully-qualified name of the SandboxService's + // CreateSnapshot RPC. + SandboxServiceCreateSnapshotProcedure = "/depot.sandbox.v1.SandboxService/CreateSnapshot" + // SandboxServiceGetSnapshotProcedure is the fully-qualified name of the SandboxService's + // GetSnapshot RPC. + SandboxServiceGetSnapshotProcedure = "/depot.sandbox.v1.SandboxService/GetSnapshot" + // SandboxServiceListSnapshotsProcedure is the fully-qualified name of the SandboxService's + // ListSnapshots RPC. + SandboxServiceListSnapshotsProcedure = "/depot.sandbox.v1.SandboxService/ListSnapshots" + // SandboxServiceDeleteSnapshotProcedure is the fully-qualified name of the SandboxService's + // DeleteSnapshot RPC. + SandboxServiceDeleteSnapshotProcedure = "/depot.sandbox.v1.SandboxService/DeleteSnapshot" +) + +// SandboxServiceClient is a client for the depot.sandbox.v1.SandboxService service. +type SandboxServiceClient interface { + CreateSandbox(context.Context, *connect.Request[v1.CreateSandboxRequest]) (*connect.Response[v1.CreateSandboxResponse], error) + GetSandbox(context.Context, *connect.Request[v1.SandboxRef]) (*connect.Response[v1.GetSandboxResponse], error) + ListSandboxes(context.Context, *connect.Request[v1.ListSandboxesRequest]) (*connect.Response[v1.ListSandboxesResponse], error) + // StopSandbox shuts a sandbox down gracefully (terminated_by=GRACEFUL); + // KillSandbox forces it to stop (terminated_by=FORCED). Calling either on a + // sandbox that is already in a terminal state returns FailedPrecondition + // rather than acting again. + StopSandbox(context.Context, *connect.Request[v1.StopSandboxRequest]) (*connect.Response[v1.StopSandboxResponse], error) + KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) + // RunCommand runs a command in the sandbox and streams its output. The + // response stream begins with a Started event and ends with a Finished + // event, or terminates with an error. + RunCommand(context.Context, *connect.Request[v1.RunCommandRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) + // RunCommandPipe runs a command and lets you stream input to it while it + // runs. The first request on the stream must carry `init`; later requests + // carry `stdin` bytes. The response stream has the same shape as RunCommand. + // stdin bytes are delivered to the process but are not persisted. + RunCommandPipe(context.Context) *connect.BidiStreamForClient[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent] + // RunHook runs a lifecycle hook command inside the sandbox. The hook runs + // through /bin/sh, with the merged environment exported and the working + // directory set to the workspace. It either streams command output in the + // foreground or runs detached with output written to a log file. The hook's + // stage is a label only and does not change how the command runs. + RunHook(context.Context, *connect.Request[v1.RunHookRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) + // GetCommand and ListCommands return persisted metadata about commands that + // have run in the sandbox. AttachCommand replays a command's stored + // stdout/stderr and, when the command is still running, tails its live + // output. + GetCommand(context.Context, *connect.Request[v1.SandboxCommandExecutionRef]) (*connect.Response[v1.GetCommandResponse], error) + ListCommands(context.Context, *connect.Request[v1.ListCommandsRequest]) (*connect.Response[v1.ListCommandsResponse], error) + AttachCommand(context.Context, *connect.Request[v1.AttachCommandRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) + // StreamSandboxLogs streams a sandbox's logs to the caller. Today it emits + // the four boot-output event kinds (boot_stdout, boot_stderr, + // boot_finished, evicted_early_data). There is no replay of past output: + // terminal sandboxes return FailedPrecondition. See logs.proto. + StreamSandboxLogs(context.Context, *connect.Request[v1.StreamSandboxLogsRequest]) (*connect.ServerStreamForClient[v1.SandboxLogEvent], error) + // KillCommand delivers a signal to a running command. The default signal is + // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with + // InvalidArgument. If the command has already finished or was never + // registered, this returns NotFound. + KillCommand(context.Context, *connect.Request[v1.KillCommandRequest]) (*connect.Response[v1.KillCommandResponse], error) + // OpenPty opens an interactive pseudo-terminal in the sandbox. The first + // request carries `start`; later requests carry stdin bytes or window + // resize messages. The response stream emits `data` byte chunks until the + // shell exits, followed by a single `exit` event carrying the exit code. + // The shell is always /bin/sh and is not selectable. Closing the stream + // ends the pty; there is no reattach. + OpenPty(context.Context) *connect.BidiStreamForClient[v1.OpenPtyRequest, v1.OpenPtyResponse] + // Filesystem operations on the sandbox (see filesystem.proto). Errors are + // returned as Connect errors with a FileSystemErrorDetail attached. + Mkdir(context.Context, *connect.Request[v1.MkdirRequest]) (*connect.Response[v1.MkdirResponse], error) + Stat(context.Context, *connect.Request[v1.StatRequest]) (*connect.Response[v1.StatResponse], error) + ReadDir(context.Context, *connect.Request[v1.ReadDirRequest]) (*connect.Response[v1.ReadDirResponse], error) + Remove(context.Context, *connect.Request[v1.RemoveRequest]) (*connect.Response[v1.RemoveResponse], error) + Rename(context.Context, *connect.Request[v1.RenameRequest]) (*connect.Response[v1.RenameResponse], error) + CopyFile(context.Context, *connect.Request[v1.CopyFileRequest]) (*connect.Response[v1.CopyFileResponse], error) + Truncate(context.Context, *connect.Request[v1.TruncateRequest]) (*connect.Response[v1.TruncateResponse], error) + Chmod(context.Context, *connect.Request[v1.ChmodRequest]) (*connect.Response[v1.ChmodResponse], error) + Chown(context.Context, *connect.Request[v1.ChownRequest]) (*connect.Response[v1.ChownResponse], error) + Symlink(context.Context, *connect.Request[v1.SymlinkRequest]) (*connect.Response[v1.SymlinkResponse], error) + Readlink(context.Context, *connect.Request[v1.ReadlinkRequest]) (*connect.Response[v1.ReadlinkResponse], error) + Access(context.Context, *connect.Request[v1.AccessRequest]) (*connect.Response[v1.AccessResponse], error) + ReadFile(context.Context, *connect.Request[v1.ReadFileRequest]) (*connect.ServerStreamForClient[v1.FileChunk], error) + WriteFile(context.Context) *connect.ClientStreamForClient[v1.WriteFileRequest, v1.WriteFileResponse] + // Durable filesystem snapshots of a sandbox (see snapshot.proto). Once a + // snapshot is durable, CreateSnapshot also gracefully stops the source + // sandbox. + CreateSnapshot(context.Context, *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error) + GetSnapshot(context.Context, *connect.Request[v1.GetSnapshotRequest]) (*connect.Response[v1.GetSnapshotResponse], error) + ListSnapshots(context.Context, *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error) + DeleteSnapshot(context.Context, *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error) +} + +// NewSandboxServiceClient constructs a client for the depot.sandbox.v1.SandboxService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewSandboxServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SandboxServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &sandboxServiceClient{ + createSandbox: connect.NewClient[v1.CreateSandboxRequest, v1.CreateSandboxResponse]( + httpClient, + baseURL+SandboxServiceCreateSandboxProcedure, + opts..., + ), + getSandbox: connect.NewClient[v1.SandboxRef, v1.GetSandboxResponse]( + httpClient, + baseURL+SandboxServiceGetSandboxProcedure, + opts..., + ), + listSandboxes: connect.NewClient[v1.ListSandboxesRequest, v1.ListSandboxesResponse]( + httpClient, + baseURL+SandboxServiceListSandboxesProcedure, + opts..., + ), + stopSandbox: connect.NewClient[v1.StopSandboxRequest, v1.StopSandboxResponse]( + httpClient, + baseURL+SandboxServiceStopSandboxProcedure, + opts..., + ), + killSandbox: connect.NewClient[v1.KillSandboxRequest, v1.KillSandboxResponse]( + httpClient, + baseURL+SandboxServiceKillSandboxProcedure, + opts..., + ), + runCommand: connect.NewClient[v1.RunCommandRequest, v1.SandboxCommandExecutionEvent]( + httpClient, + baseURL+SandboxServiceRunCommandProcedure, + opts..., + ), + runCommandPipe: connect.NewClient[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent]( + httpClient, + baseURL+SandboxServiceRunCommandPipeProcedure, + opts..., + ), + runHook: connect.NewClient[v1.RunHookRequest, v1.SandboxCommandExecutionEvent]( + httpClient, + baseURL+SandboxServiceRunHookProcedure, + opts..., + ), + getCommand: connect.NewClient[v1.SandboxCommandExecutionRef, v1.GetCommandResponse]( + httpClient, + baseURL+SandboxServiceGetCommandProcedure, + opts..., + ), + listCommands: connect.NewClient[v1.ListCommandsRequest, v1.ListCommandsResponse]( + httpClient, + baseURL+SandboxServiceListCommandsProcedure, + opts..., + ), + attachCommand: connect.NewClient[v1.AttachCommandRequest, v1.SandboxCommandExecutionEvent]( + httpClient, + baseURL+SandboxServiceAttachCommandProcedure, + opts..., + ), + streamSandboxLogs: connect.NewClient[v1.StreamSandboxLogsRequest, v1.SandboxLogEvent]( + httpClient, + baseURL+SandboxServiceStreamSandboxLogsProcedure, + opts..., + ), + killCommand: connect.NewClient[v1.KillCommandRequest, v1.KillCommandResponse]( + httpClient, + baseURL+SandboxServiceKillCommandProcedure, + opts..., + ), + openPty: connect.NewClient[v1.OpenPtyRequest, v1.OpenPtyResponse]( + httpClient, + baseURL+SandboxServiceOpenPtyProcedure, + opts..., + ), + mkdir: connect.NewClient[v1.MkdirRequest, v1.MkdirResponse]( + httpClient, + baseURL+SandboxServiceMkdirProcedure, + opts..., + ), + stat: connect.NewClient[v1.StatRequest, v1.StatResponse]( + httpClient, + baseURL+SandboxServiceStatProcedure, + opts..., + ), + readDir: connect.NewClient[v1.ReadDirRequest, v1.ReadDirResponse]( + httpClient, + baseURL+SandboxServiceReadDirProcedure, + opts..., + ), + remove: connect.NewClient[v1.RemoveRequest, v1.RemoveResponse]( + httpClient, + baseURL+SandboxServiceRemoveProcedure, + opts..., + ), + rename: connect.NewClient[v1.RenameRequest, v1.RenameResponse]( + httpClient, + baseURL+SandboxServiceRenameProcedure, + opts..., + ), + copyFile: connect.NewClient[v1.CopyFileRequest, v1.CopyFileResponse]( + httpClient, + baseURL+SandboxServiceCopyFileProcedure, + opts..., + ), + truncate: connect.NewClient[v1.TruncateRequest, v1.TruncateResponse]( + httpClient, + baseURL+SandboxServiceTruncateProcedure, + opts..., + ), + chmod: connect.NewClient[v1.ChmodRequest, v1.ChmodResponse]( + httpClient, + baseURL+SandboxServiceChmodProcedure, + opts..., + ), + chown: connect.NewClient[v1.ChownRequest, v1.ChownResponse]( + httpClient, + baseURL+SandboxServiceChownProcedure, + opts..., + ), + symlink: connect.NewClient[v1.SymlinkRequest, v1.SymlinkResponse]( + httpClient, + baseURL+SandboxServiceSymlinkProcedure, + opts..., + ), + readlink: connect.NewClient[v1.ReadlinkRequest, v1.ReadlinkResponse]( + httpClient, + baseURL+SandboxServiceReadlinkProcedure, + opts..., + ), + access: connect.NewClient[v1.AccessRequest, v1.AccessResponse]( + httpClient, + baseURL+SandboxServiceAccessProcedure, + opts..., + ), + readFile: connect.NewClient[v1.ReadFileRequest, v1.FileChunk]( + httpClient, + baseURL+SandboxServiceReadFileProcedure, + opts..., + ), + writeFile: connect.NewClient[v1.WriteFileRequest, v1.WriteFileResponse]( + httpClient, + baseURL+SandboxServiceWriteFileProcedure, + opts..., + ), + createSnapshot: connect.NewClient[v1.CreateSnapshotRequest, v1.CreateSnapshotResponse]( + httpClient, + baseURL+SandboxServiceCreateSnapshotProcedure, + opts..., + ), + getSnapshot: connect.NewClient[v1.GetSnapshotRequest, v1.GetSnapshotResponse]( + httpClient, + baseURL+SandboxServiceGetSnapshotProcedure, + opts..., + ), + listSnapshots: connect.NewClient[v1.ListSnapshotsRequest, v1.ListSnapshotsResponse]( + httpClient, + baseURL+SandboxServiceListSnapshotsProcedure, + opts..., + ), + deleteSnapshot: connect.NewClient[v1.DeleteSnapshotRequest, v1.DeleteSnapshotResponse]( + httpClient, + baseURL+SandboxServiceDeleteSnapshotProcedure, + opts..., + ), + } +} + +// sandboxServiceClient implements SandboxServiceClient. +type sandboxServiceClient struct { + createSandbox *connect.Client[v1.CreateSandboxRequest, v1.CreateSandboxResponse] + getSandbox *connect.Client[v1.SandboxRef, v1.GetSandboxResponse] + listSandboxes *connect.Client[v1.ListSandboxesRequest, v1.ListSandboxesResponse] + stopSandbox *connect.Client[v1.StopSandboxRequest, v1.StopSandboxResponse] + killSandbox *connect.Client[v1.KillSandboxRequest, v1.KillSandboxResponse] + runCommand *connect.Client[v1.RunCommandRequest, v1.SandboxCommandExecutionEvent] + runCommandPipe *connect.Client[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent] + runHook *connect.Client[v1.RunHookRequest, v1.SandboxCommandExecutionEvent] + getCommand *connect.Client[v1.SandboxCommandExecutionRef, v1.GetCommandResponse] + listCommands *connect.Client[v1.ListCommandsRequest, v1.ListCommandsResponse] + attachCommand *connect.Client[v1.AttachCommandRequest, v1.SandboxCommandExecutionEvent] + streamSandboxLogs *connect.Client[v1.StreamSandboxLogsRequest, v1.SandboxLogEvent] + killCommand *connect.Client[v1.KillCommandRequest, v1.KillCommandResponse] + openPty *connect.Client[v1.OpenPtyRequest, v1.OpenPtyResponse] + mkdir *connect.Client[v1.MkdirRequest, v1.MkdirResponse] + stat *connect.Client[v1.StatRequest, v1.StatResponse] + readDir *connect.Client[v1.ReadDirRequest, v1.ReadDirResponse] + remove *connect.Client[v1.RemoveRequest, v1.RemoveResponse] + rename *connect.Client[v1.RenameRequest, v1.RenameResponse] + copyFile *connect.Client[v1.CopyFileRequest, v1.CopyFileResponse] + truncate *connect.Client[v1.TruncateRequest, v1.TruncateResponse] + chmod *connect.Client[v1.ChmodRequest, v1.ChmodResponse] + chown *connect.Client[v1.ChownRequest, v1.ChownResponse] + symlink *connect.Client[v1.SymlinkRequest, v1.SymlinkResponse] + readlink *connect.Client[v1.ReadlinkRequest, v1.ReadlinkResponse] + access *connect.Client[v1.AccessRequest, v1.AccessResponse] + readFile *connect.Client[v1.ReadFileRequest, v1.FileChunk] + writeFile *connect.Client[v1.WriteFileRequest, v1.WriteFileResponse] + createSnapshot *connect.Client[v1.CreateSnapshotRequest, v1.CreateSnapshotResponse] + getSnapshot *connect.Client[v1.GetSnapshotRequest, v1.GetSnapshotResponse] + listSnapshots *connect.Client[v1.ListSnapshotsRequest, v1.ListSnapshotsResponse] + deleteSnapshot *connect.Client[v1.DeleteSnapshotRequest, v1.DeleteSnapshotResponse] +} + +// CreateSandbox calls depot.sandbox.v1.SandboxService.CreateSandbox. +func (c *sandboxServiceClient) CreateSandbox(ctx context.Context, req *connect.Request[v1.CreateSandboxRequest]) (*connect.Response[v1.CreateSandboxResponse], error) { + return c.createSandbox.CallUnary(ctx, req) +} + +// GetSandbox calls depot.sandbox.v1.SandboxService.GetSandbox. +func (c *sandboxServiceClient) GetSandbox(ctx context.Context, req *connect.Request[v1.SandboxRef]) (*connect.Response[v1.GetSandboxResponse], error) { + return c.getSandbox.CallUnary(ctx, req) +} + +// ListSandboxes calls depot.sandbox.v1.SandboxService.ListSandboxes. +func (c *sandboxServiceClient) ListSandboxes(ctx context.Context, req *connect.Request[v1.ListSandboxesRequest]) (*connect.Response[v1.ListSandboxesResponse], error) { + return c.listSandboxes.CallUnary(ctx, req) +} + +// StopSandbox calls depot.sandbox.v1.SandboxService.StopSandbox. +func (c *sandboxServiceClient) StopSandbox(ctx context.Context, req *connect.Request[v1.StopSandboxRequest]) (*connect.Response[v1.StopSandboxResponse], error) { + return c.stopSandbox.CallUnary(ctx, req) +} + +// KillSandbox calls depot.sandbox.v1.SandboxService.KillSandbox. +func (c *sandboxServiceClient) KillSandbox(ctx context.Context, req *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) { + return c.killSandbox.CallUnary(ctx, req) +} + +// RunCommand calls depot.sandbox.v1.SandboxService.RunCommand. +func (c *sandboxServiceClient) RunCommand(ctx context.Context, req *connect.Request[v1.RunCommandRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) { + return c.runCommand.CallServerStream(ctx, req) +} + +// RunCommandPipe calls depot.sandbox.v1.SandboxService.RunCommandPipe. +func (c *sandboxServiceClient) RunCommandPipe(ctx context.Context) *connect.BidiStreamForClient[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent] { + return c.runCommandPipe.CallBidiStream(ctx) +} + +// RunHook calls depot.sandbox.v1.SandboxService.RunHook. +func (c *sandboxServiceClient) RunHook(ctx context.Context, req *connect.Request[v1.RunHookRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) { + return c.runHook.CallServerStream(ctx, req) +} + +// GetCommand calls depot.sandbox.v1.SandboxService.GetCommand. +func (c *sandboxServiceClient) GetCommand(ctx context.Context, req *connect.Request[v1.SandboxCommandExecutionRef]) (*connect.Response[v1.GetCommandResponse], error) { + return c.getCommand.CallUnary(ctx, req) +} + +// ListCommands calls depot.sandbox.v1.SandboxService.ListCommands. +func (c *sandboxServiceClient) ListCommands(ctx context.Context, req *connect.Request[v1.ListCommandsRequest]) (*connect.Response[v1.ListCommandsResponse], error) { + return c.listCommands.CallUnary(ctx, req) +} + +// AttachCommand calls depot.sandbox.v1.SandboxService.AttachCommand. +func (c *sandboxServiceClient) AttachCommand(ctx context.Context, req *connect.Request[v1.AttachCommandRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) { + return c.attachCommand.CallServerStream(ctx, req) +} + +// StreamSandboxLogs calls depot.sandbox.v1.SandboxService.StreamSandboxLogs. +func (c *sandboxServiceClient) StreamSandboxLogs(ctx context.Context, req *connect.Request[v1.StreamSandboxLogsRequest]) (*connect.ServerStreamForClient[v1.SandboxLogEvent], error) { + return c.streamSandboxLogs.CallServerStream(ctx, req) +} + +// KillCommand calls depot.sandbox.v1.SandboxService.KillCommand. +func (c *sandboxServiceClient) KillCommand(ctx context.Context, req *connect.Request[v1.KillCommandRequest]) (*connect.Response[v1.KillCommandResponse], error) { + return c.killCommand.CallUnary(ctx, req) +} + +// OpenPty calls depot.sandbox.v1.SandboxService.OpenPty. +func (c *sandboxServiceClient) OpenPty(ctx context.Context) *connect.BidiStreamForClient[v1.OpenPtyRequest, v1.OpenPtyResponse] { + return c.openPty.CallBidiStream(ctx) +} + +// Mkdir calls depot.sandbox.v1.SandboxService.Mkdir. +func (c *sandboxServiceClient) Mkdir(ctx context.Context, req *connect.Request[v1.MkdirRequest]) (*connect.Response[v1.MkdirResponse], error) { + return c.mkdir.CallUnary(ctx, req) +} + +// Stat calls depot.sandbox.v1.SandboxService.Stat. +func (c *sandboxServiceClient) Stat(ctx context.Context, req *connect.Request[v1.StatRequest]) (*connect.Response[v1.StatResponse], error) { + return c.stat.CallUnary(ctx, req) +} + +// ReadDir calls depot.sandbox.v1.SandboxService.ReadDir. +func (c *sandboxServiceClient) ReadDir(ctx context.Context, req *connect.Request[v1.ReadDirRequest]) (*connect.Response[v1.ReadDirResponse], error) { + return c.readDir.CallUnary(ctx, req) +} + +// Remove calls depot.sandbox.v1.SandboxService.Remove. +func (c *sandboxServiceClient) Remove(ctx context.Context, req *connect.Request[v1.RemoveRequest]) (*connect.Response[v1.RemoveResponse], error) { + return c.remove.CallUnary(ctx, req) +} + +// Rename calls depot.sandbox.v1.SandboxService.Rename. +func (c *sandboxServiceClient) Rename(ctx context.Context, req *connect.Request[v1.RenameRequest]) (*connect.Response[v1.RenameResponse], error) { + return c.rename.CallUnary(ctx, req) +} + +// CopyFile calls depot.sandbox.v1.SandboxService.CopyFile. +func (c *sandboxServiceClient) CopyFile(ctx context.Context, req *connect.Request[v1.CopyFileRequest]) (*connect.Response[v1.CopyFileResponse], error) { + return c.copyFile.CallUnary(ctx, req) +} + +// Truncate calls depot.sandbox.v1.SandboxService.Truncate. +func (c *sandboxServiceClient) Truncate(ctx context.Context, req *connect.Request[v1.TruncateRequest]) (*connect.Response[v1.TruncateResponse], error) { + return c.truncate.CallUnary(ctx, req) +} + +// Chmod calls depot.sandbox.v1.SandboxService.Chmod. +func (c *sandboxServiceClient) Chmod(ctx context.Context, req *connect.Request[v1.ChmodRequest]) (*connect.Response[v1.ChmodResponse], error) { + return c.chmod.CallUnary(ctx, req) +} + +// Chown calls depot.sandbox.v1.SandboxService.Chown. +func (c *sandboxServiceClient) Chown(ctx context.Context, req *connect.Request[v1.ChownRequest]) (*connect.Response[v1.ChownResponse], error) { + return c.chown.CallUnary(ctx, req) +} + +// Symlink calls depot.sandbox.v1.SandboxService.Symlink. +func (c *sandboxServiceClient) Symlink(ctx context.Context, req *connect.Request[v1.SymlinkRequest]) (*connect.Response[v1.SymlinkResponse], error) { + return c.symlink.CallUnary(ctx, req) +} + +// Readlink calls depot.sandbox.v1.SandboxService.Readlink. +func (c *sandboxServiceClient) Readlink(ctx context.Context, req *connect.Request[v1.ReadlinkRequest]) (*connect.Response[v1.ReadlinkResponse], error) { + return c.readlink.CallUnary(ctx, req) +} + +// Access calls depot.sandbox.v1.SandboxService.Access. +func (c *sandboxServiceClient) Access(ctx context.Context, req *connect.Request[v1.AccessRequest]) (*connect.Response[v1.AccessResponse], error) { + return c.access.CallUnary(ctx, req) +} + +// ReadFile calls depot.sandbox.v1.SandboxService.ReadFile. +func (c *sandboxServiceClient) ReadFile(ctx context.Context, req *connect.Request[v1.ReadFileRequest]) (*connect.ServerStreamForClient[v1.FileChunk], error) { + return c.readFile.CallServerStream(ctx, req) +} + +// WriteFile calls depot.sandbox.v1.SandboxService.WriteFile. +func (c *sandboxServiceClient) WriteFile(ctx context.Context) *connect.ClientStreamForClient[v1.WriteFileRequest, v1.WriteFileResponse] { + return c.writeFile.CallClientStream(ctx) +} + +// CreateSnapshot calls depot.sandbox.v1.SandboxService.CreateSnapshot. +func (c *sandboxServiceClient) CreateSnapshot(ctx context.Context, req *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error) { + return c.createSnapshot.CallUnary(ctx, req) +} + +// GetSnapshot calls depot.sandbox.v1.SandboxService.GetSnapshot. +func (c *sandboxServiceClient) GetSnapshot(ctx context.Context, req *connect.Request[v1.GetSnapshotRequest]) (*connect.Response[v1.GetSnapshotResponse], error) { + return c.getSnapshot.CallUnary(ctx, req) +} + +// ListSnapshots calls depot.sandbox.v1.SandboxService.ListSnapshots. +func (c *sandboxServiceClient) ListSnapshots(ctx context.Context, req *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error) { + return c.listSnapshots.CallUnary(ctx, req) +} + +// DeleteSnapshot calls depot.sandbox.v1.SandboxService.DeleteSnapshot. +func (c *sandboxServiceClient) DeleteSnapshot(ctx context.Context, req *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error) { + return c.deleteSnapshot.CallUnary(ctx, req) +} + +// SandboxServiceHandler is an implementation of the depot.sandbox.v1.SandboxService service. +type SandboxServiceHandler interface { + CreateSandbox(context.Context, *connect.Request[v1.CreateSandboxRequest]) (*connect.Response[v1.CreateSandboxResponse], error) + GetSandbox(context.Context, *connect.Request[v1.SandboxRef]) (*connect.Response[v1.GetSandboxResponse], error) + ListSandboxes(context.Context, *connect.Request[v1.ListSandboxesRequest]) (*connect.Response[v1.ListSandboxesResponse], error) + // StopSandbox shuts a sandbox down gracefully (terminated_by=GRACEFUL); + // KillSandbox forces it to stop (terminated_by=FORCED). Calling either on a + // sandbox that is already in a terminal state returns FailedPrecondition + // rather than acting again. + StopSandbox(context.Context, *connect.Request[v1.StopSandboxRequest]) (*connect.Response[v1.StopSandboxResponse], error) + KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) + // RunCommand runs a command in the sandbox and streams its output. The + // response stream begins with a Started event and ends with a Finished + // event, or terminates with an error. + RunCommand(context.Context, *connect.Request[v1.RunCommandRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error + // RunCommandPipe runs a command and lets you stream input to it while it + // runs. The first request on the stream must carry `init`; later requests + // carry `stdin` bytes. The response stream has the same shape as RunCommand. + // stdin bytes are delivered to the process but are not persisted. + RunCommandPipe(context.Context, *connect.BidiStream[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent]) error + // RunHook runs a lifecycle hook command inside the sandbox. The hook runs + // through /bin/sh, with the merged environment exported and the working + // directory set to the workspace. It either streams command output in the + // foreground or runs detached with output written to a log file. The hook's + // stage is a label only and does not change how the command runs. + RunHook(context.Context, *connect.Request[v1.RunHookRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error + // GetCommand and ListCommands return persisted metadata about commands that + // have run in the sandbox. AttachCommand replays a command's stored + // stdout/stderr and, when the command is still running, tails its live + // output. + GetCommand(context.Context, *connect.Request[v1.SandboxCommandExecutionRef]) (*connect.Response[v1.GetCommandResponse], error) + ListCommands(context.Context, *connect.Request[v1.ListCommandsRequest]) (*connect.Response[v1.ListCommandsResponse], error) + AttachCommand(context.Context, *connect.Request[v1.AttachCommandRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error + // StreamSandboxLogs streams a sandbox's logs to the caller. Today it emits + // the four boot-output event kinds (boot_stdout, boot_stderr, + // boot_finished, evicted_early_data). There is no replay of past output: + // terminal sandboxes return FailedPrecondition. See logs.proto. + StreamSandboxLogs(context.Context, *connect.Request[v1.StreamSandboxLogsRequest], *connect.ServerStream[v1.SandboxLogEvent]) error + // KillCommand delivers a signal to a running command. The default signal is + // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with + // InvalidArgument. If the command has already finished or was never + // registered, this returns NotFound. + KillCommand(context.Context, *connect.Request[v1.KillCommandRequest]) (*connect.Response[v1.KillCommandResponse], error) + // OpenPty opens an interactive pseudo-terminal in the sandbox. The first + // request carries `start`; later requests carry stdin bytes or window + // resize messages. The response stream emits `data` byte chunks until the + // shell exits, followed by a single `exit` event carrying the exit code. + // The shell is always /bin/sh and is not selectable. Closing the stream + // ends the pty; there is no reattach. + OpenPty(context.Context, *connect.BidiStream[v1.OpenPtyRequest, v1.OpenPtyResponse]) error + // Filesystem operations on the sandbox (see filesystem.proto). Errors are + // returned as Connect errors with a FileSystemErrorDetail attached. + Mkdir(context.Context, *connect.Request[v1.MkdirRequest]) (*connect.Response[v1.MkdirResponse], error) + Stat(context.Context, *connect.Request[v1.StatRequest]) (*connect.Response[v1.StatResponse], error) + ReadDir(context.Context, *connect.Request[v1.ReadDirRequest]) (*connect.Response[v1.ReadDirResponse], error) + Remove(context.Context, *connect.Request[v1.RemoveRequest]) (*connect.Response[v1.RemoveResponse], error) + Rename(context.Context, *connect.Request[v1.RenameRequest]) (*connect.Response[v1.RenameResponse], error) + CopyFile(context.Context, *connect.Request[v1.CopyFileRequest]) (*connect.Response[v1.CopyFileResponse], error) + Truncate(context.Context, *connect.Request[v1.TruncateRequest]) (*connect.Response[v1.TruncateResponse], error) + Chmod(context.Context, *connect.Request[v1.ChmodRequest]) (*connect.Response[v1.ChmodResponse], error) + Chown(context.Context, *connect.Request[v1.ChownRequest]) (*connect.Response[v1.ChownResponse], error) + Symlink(context.Context, *connect.Request[v1.SymlinkRequest]) (*connect.Response[v1.SymlinkResponse], error) + Readlink(context.Context, *connect.Request[v1.ReadlinkRequest]) (*connect.Response[v1.ReadlinkResponse], error) + Access(context.Context, *connect.Request[v1.AccessRequest]) (*connect.Response[v1.AccessResponse], error) + ReadFile(context.Context, *connect.Request[v1.ReadFileRequest], *connect.ServerStream[v1.FileChunk]) error + WriteFile(context.Context, *connect.ClientStream[v1.WriteFileRequest]) (*connect.Response[v1.WriteFileResponse], error) + // Durable filesystem snapshots of a sandbox (see snapshot.proto). Once a + // snapshot is durable, CreateSnapshot also gracefully stops the source + // sandbox. + CreateSnapshot(context.Context, *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error) + GetSnapshot(context.Context, *connect.Request[v1.GetSnapshotRequest]) (*connect.Response[v1.GetSnapshotResponse], error) + ListSnapshots(context.Context, *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error) + DeleteSnapshot(context.Context, *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error) +} + +// NewSandboxServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewSandboxServiceHandler(svc SandboxServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + sandboxServiceCreateSandboxHandler := connect.NewUnaryHandler( + SandboxServiceCreateSandboxProcedure, + svc.CreateSandbox, + opts..., + ) + sandboxServiceGetSandboxHandler := connect.NewUnaryHandler( + SandboxServiceGetSandboxProcedure, + svc.GetSandbox, + opts..., + ) + sandboxServiceListSandboxesHandler := connect.NewUnaryHandler( + SandboxServiceListSandboxesProcedure, + svc.ListSandboxes, + opts..., + ) + sandboxServiceStopSandboxHandler := connect.NewUnaryHandler( + SandboxServiceStopSandboxProcedure, + svc.StopSandbox, + opts..., + ) + sandboxServiceKillSandboxHandler := connect.NewUnaryHandler( + SandboxServiceKillSandboxProcedure, + svc.KillSandbox, + opts..., + ) + sandboxServiceRunCommandHandler := connect.NewServerStreamHandler( + SandboxServiceRunCommandProcedure, + svc.RunCommand, + opts..., + ) + sandboxServiceRunCommandPipeHandler := connect.NewBidiStreamHandler( + SandboxServiceRunCommandPipeProcedure, + svc.RunCommandPipe, + opts..., + ) + sandboxServiceRunHookHandler := connect.NewServerStreamHandler( + SandboxServiceRunHookProcedure, + svc.RunHook, + opts..., + ) + sandboxServiceGetCommandHandler := connect.NewUnaryHandler( + SandboxServiceGetCommandProcedure, + svc.GetCommand, + opts..., + ) + sandboxServiceListCommandsHandler := connect.NewUnaryHandler( + SandboxServiceListCommandsProcedure, + svc.ListCommands, + opts..., + ) + sandboxServiceAttachCommandHandler := connect.NewServerStreamHandler( + SandboxServiceAttachCommandProcedure, + svc.AttachCommand, + opts..., + ) + sandboxServiceStreamSandboxLogsHandler := connect.NewServerStreamHandler( + SandboxServiceStreamSandboxLogsProcedure, + svc.StreamSandboxLogs, + opts..., + ) + sandboxServiceKillCommandHandler := connect.NewUnaryHandler( + SandboxServiceKillCommandProcedure, + svc.KillCommand, + opts..., + ) + sandboxServiceOpenPtyHandler := connect.NewBidiStreamHandler( + SandboxServiceOpenPtyProcedure, + svc.OpenPty, + opts..., + ) + sandboxServiceMkdirHandler := connect.NewUnaryHandler( + SandboxServiceMkdirProcedure, + svc.Mkdir, + opts..., + ) + sandboxServiceStatHandler := connect.NewUnaryHandler( + SandboxServiceStatProcedure, + svc.Stat, + opts..., + ) + sandboxServiceReadDirHandler := connect.NewUnaryHandler( + SandboxServiceReadDirProcedure, + svc.ReadDir, + opts..., + ) + sandboxServiceRemoveHandler := connect.NewUnaryHandler( + SandboxServiceRemoveProcedure, + svc.Remove, + opts..., + ) + sandboxServiceRenameHandler := connect.NewUnaryHandler( + SandboxServiceRenameProcedure, + svc.Rename, + opts..., + ) + sandboxServiceCopyFileHandler := connect.NewUnaryHandler( + SandboxServiceCopyFileProcedure, + svc.CopyFile, + opts..., + ) + sandboxServiceTruncateHandler := connect.NewUnaryHandler( + SandboxServiceTruncateProcedure, + svc.Truncate, + opts..., + ) + sandboxServiceChmodHandler := connect.NewUnaryHandler( + SandboxServiceChmodProcedure, + svc.Chmod, + opts..., + ) + sandboxServiceChownHandler := connect.NewUnaryHandler( + SandboxServiceChownProcedure, + svc.Chown, + opts..., + ) + sandboxServiceSymlinkHandler := connect.NewUnaryHandler( + SandboxServiceSymlinkProcedure, + svc.Symlink, + opts..., + ) + sandboxServiceReadlinkHandler := connect.NewUnaryHandler( + SandboxServiceReadlinkProcedure, + svc.Readlink, + opts..., + ) + sandboxServiceAccessHandler := connect.NewUnaryHandler( + SandboxServiceAccessProcedure, + svc.Access, + opts..., + ) + sandboxServiceReadFileHandler := connect.NewServerStreamHandler( + SandboxServiceReadFileProcedure, + svc.ReadFile, + opts..., + ) + sandboxServiceWriteFileHandler := connect.NewClientStreamHandler( + SandboxServiceWriteFileProcedure, + svc.WriteFile, + opts..., + ) + sandboxServiceCreateSnapshotHandler := connect.NewUnaryHandler( + SandboxServiceCreateSnapshotProcedure, + svc.CreateSnapshot, + opts..., + ) + sandboxServiceGetSnapshotHandler := connect.NewUnaryHandler( + SandboxServiceGetSnapshotProcedure, + svc.GetSnapshot, + opts..., + ) + sandboxServiceListSnapshotsHandler := connect.NewUnaryHandler( + SandboxServiceListSnapshotsProcedure, + svc.ListSnapshots, + opts..., + ) + sandboxServiceDeleteSnapshotHandler := connect.NewUnaryHandler( + SandboxServiceDeleteSnapshotProcedure, + svc.DeleteSnapshot, + opts..., + ) + return "/depot.sandbox.v1.SandboxService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case SandboxServiceCreateSandboxProcedure: + sandboxServiceCreateSandboxHandler.ServeHTTP(w, r) + case SandboxServiceGetSandboxProcedure: + sandboxServiceGetSandboxHandler.ServeHTTP(w, r) + case SandboxServiceListSandboxesProcedure: + sandboxServiceListSandboxesHandler.ServeHTTP(w, r) + case SandboxServiceStopSandboxProcedure: + sandboxServiceStopSandboxHandler.ServeHTTP(w, r) + case SandboxServiceKillSandboxProcedure: + sandboxServiceKillSandboxHandler.ServeHTTP(w, r) + case SandboxServiceRunCommandProcedure: + sandboxServiceRunCommandHandler.ServeHTTP(w, r) + case SandboxServiceRunCommandPipeProcedure: + sandboxServiceRunCommandPipeHandler.ServeHTTP(w, r) + case SandboxServiceRunHookProcedure: + sandboxServiceRunHookHandler.ServeHTTP(w, r) + case SandboxServiceGetCommandProcedure: + sandboxServiceGetCommandHandler.ServeHTTP(w, r) + case SandboxServiceListCommandsProcedure: + sandboxServiceListCommandsHandler.ServeHTTP(w, r) + case SandboxServiceAttachCommandProcedure: + sandboxServiceAttachCommandHandler.ServeHTTP(w, r) + case SandboxServiceStreamSandboxLogsProcedure: + sandboxServiceStreamSandboxLogsHandler.ServeHTTP(w, r) + case SandboxServiceKillCommandProcedure: + sandboxServiceKillCommandHandler.ServeHTTP(w, r) + case SandboxServiceOpenPtyProcedure: + sandboxServiceOpenPtyHandler.ServeHTTP(w, r) + case SandboxServiceMkdirProcedure: + sandboxServiceMkdirHandler.ServeHTTP(w, r) + case SandboxServiceStatProcedure: + sandboxServiceStatHandler.ServeHTTP(w, r) + case SandboxServiceReadDirProcedure: + sandboxServiceReadDirHandler.ServeHTTP(w, r) + case SandboxServiceRemoveProcedure: + sandboxServiceRemoveHandler.ServeHTTP(w, r) + case SandboxServiceRenameProcedure: + sandboxServiceRenameHandler.ServeHTTP(w, r) + case SandboxServiceCopyFileProcedure: + sandboxServiceCopyFileHandler.ServeHTTP(w, r) + case SandboxServiceTruncateProcedure: + sandboxServiceTruncateHandler.ServeHTTP(w, r) + case SandboxServiceChmodProcedure: + sandboxServiceChmodHandler.ServeHTTP(w, r) + case SandboxServiceChownProcedure: + sandboxServiceChownHandler.ServeHTTP(w, r) + case SandboxServiceSymlinkProcedure: + sandboxServiceSymlinkHandler.ServeHTTP(w, r) + case SandboxServiceReadlinkProcedure: + sandboxServiceReadlinkHandler.ServeHTTP(w, r) + case SandboxServiceAccessProcedure: + sandboxServiceAccessHandler.ServeHTTP(w, r) + case SandboxServiceReadFileProcedure: + sandboxServiceReadFileHandler.ServeHTTP(w, r) + case SandboxServiceWriteFileProcedure: + sandboxServiceWriteFileHandler.ServeHTTP(w, r) + case SandboxServiceCreateSnapshotProcedure: + sandboxServiceCreateSnapshotHandler.ServeHTTP(w, r) + case SandboxServiceGetSnapshotProcedure: + sandboxServiceGetSnapshotHandler.ServeHTTP(w, r) + case SandboxServiceListSnapshotsProcedure: + sandboxServiceListSnapshotsHandler.ServeHTTP(w, r) + case SandboxServiceDeleteSnapshotProcedure: + sandboxServiceDeleteSnapshotHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedSandboxServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedSandboxServiceHandler struct{} + +func (UnimplementedSandboxServiceHandler) CreateSandbox(context.Context, *connect.Request[v1.CreateSandboxRequest]) (*connect.Response[v1.CreateSandboxResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.CreateSandbox is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) GetSandbox(context.Context, *connect.Request[v1.SandboxRef]) (*connect.Response[v1.GetSandboxResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.GetSandbox is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) ListSandboxes(context.Context, *connect.Request[v1.ListSandboxesRequest]) (*connect.Response[v1.ListSandboxesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.ListSandboxes is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) StopSandbox(context.Context, *connect.Request[v1.StopSandboxRequest]) (*connect.Response[v1.StopSandboxResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.StopSandbox is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.KillSandbox is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) RunCommand(context.Context, *connect.Request[v1.RunCommandRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.RunCommand is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) RunCommandPipe(context.Context, *connect.BidiStream[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.RunCommandPipe is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) RunHook(context.Context, *connect.Request[v1.RunHookRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.RunHook is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) GetCommand(context.Context, *connect.Request[v1.SandboxCommandExecutionRef]) (*connect.Response[v1.GetCommandResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.GetCommand is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) ListCommands(context.Context, *connect.Request[v1.ListCommandsRequest]) (*connect.Response[v1.ListCommandsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.ListCommands is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) AttachCommand(context.Context, *connect.Request[v1.AttachCommandRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.AttachCommand is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) StreamSandboxLogs(context.Context, *connect.Request[v1.StreamSandboxLogsRequest], *connect.ServerStream[v1.SandboxLogEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.StreamSandboxLogs is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) KillCommand(context.Context, *connect.Request[v1.KillCommandRequest]) (*connect.Response[v1.KillCommandResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.KillCommand is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) OpenPty(context.Context, *connect.BidiStream[v1.OpenPtyRequest, v1.OpenPtyResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.OpenPty is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Mkdir(context.Context, *connect.Request[v1.MkdirRequest]) (*connect.Response[v1.MkdirResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Mkdir is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Stat(context.Context, *connect.Request[v1.StatRequest]) (*connect.Response[v1.StatResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Stat is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) ReadDir(context.Context, *connect.Request[v1.ReadDirRequest]) (*connect.Response[v1.ReadDirResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.ReadDir is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Remove(context.Context, *connect.Request[v1.RemoveRequest]) (*connect.Response[v1.RemoveResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Remove is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Rename(context.Context, *connect.Request[v1.RenameRequest]) (*connect.Response[v1.RenameResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Rename is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) CopyFile(context.Context, *connect.Request[v1.CopyFileRequest]) (*connect.Response[v1.CopyFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.CopyFile is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Truncate(context.Context, *connect.Request[v1.TruncateRequest]) (*connect.Response[v1.TruncateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Truncate is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Chmod(context.Context, *connect.Request[v1.ChmodRequest]) (*connect.Response[v1.ChmodResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Chmod is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Chown(context.Context, *connect.Request[v1.ChownRequest]) (*connect.Response[v1.ChownResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Chown is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Symlink(context.Context, *connect.Request[v1.SymlinkRequest]) (*connect.Response[v1.SymlinkResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Symlink is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Readlink(context.Context, *connect.Request[v1.ReadlinkRequest]) (*connect.Response[v1.ReadlinkResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Readlink is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) Access(context.Context, *connect.Request[v1.AccessRequest]) (*connect.Response[v1.AccessResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.Access is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) ReadFile(context.Context, *connect.Request[v1.ReadFileRequest], *connect.ServerStream[v1.FileChunk]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.ReadFile is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) WriteFile(context.Context, *connect.ClientStream[v1.WriteFileRequest]) (*connect.Response[v1.WriteFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.WriteFile is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) CreateSnapshot(context.Context, *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.CreateSnapshot is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) GetSnapshot(context.Context, *connect.Request[v1.GetSnapshotRequest]) (*connect.Response[v1.GetSnapshotResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.GetSnapshot is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) ListSnapshots(context.Context, *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.ListSnapshots is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) DeleteSnapshot(context.Context, *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.DeleteSnapshot is not implemented")) +} diff --git a/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go b/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go new file mode 100644 index 00000000..e49fabae --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go @@ -0,0 +1,118 @@ +// The CreateSandboxFromSpec RPC, its request and event types, and the service +// that hosts it. +// +// This RPC creates a sandbox declaratively from a SandboxSpec. It lives in its +// own service, SandboxSpecService, rather than on SandboxService because its +// request and event types reference both the Sandbox type from sandbox.proto and +// SandboxSpec from spec.proto. Keeping the RPC and its types in a separate file +// and service avoids an import cycle between those proto files. +// +// The SDK consumes SandboxSpecService alongside SandboxService over the same +// transport and auth surface. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: depot/sandbox/v1/spec_rpc.proto + +package sandboxv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // SandboxSpecServiceName is the fully-qualified name of the SandboxSpecService service. + SandboxSpecServiceName = "depot.sandbox.v1.SandboxSpecService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // SandboxSpecServiceCreateSandboxFromSpecProcedure is the fully-qualified name of the + // SandboxSpecService's CreateSandboxFromSpec RPC. + SandboxSpecServiceCreateSandboxFromSpecProcedure = "/depot.sandbox.v1.SandboxSpecService/CreateSandboxFromSpec" +) + +// SandboxSpecServiceClient is a client for the depot.sandbox.v1.SandboxSpecService service. +type SandboxSpecServiceClient interface { + CreateSandboxFromSpec(context.Context, *connect.Request[v1.CreateSandboxFromSpecRequest]) (*connect.ServerStreamForClient[v1.CreateSandboxFromSpecEvent], error) +} + +// NewSandboxSpecServiceClient constructs a client for the depot.sandbox.v1.SandboxSpecService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewSandboxSpecServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SandboxSpecServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &sandboxSpecServiceClient{ + createSandboxFromSpec: connect.NewClient[v1.CreateSandboxFromSpecRequest, v1.CreateSandboxFromSpecEvent]( + httpClient, + baseURL+SandboxSpecServiceCreateSandboxFromSpecProcedure, + opts..., + ), + } +} + +// sandboxSpecServiceClient implements SandboxSpecServiceClient. +type sandboxSpecServiceClient struct { + createSandboxFromSpec *connect.Client[v1.CreateSandboxFromSpecRequest, v1.CreateSandboxFromSpecEvent] +} + +// CreateSandboxFromSpec calls depot.sandbox.v1.SandboxSpecService.CreateSandboxFromSpec. +func (c *sandboxSpecServiceClient) CreateSandboxFromSpec(ctx context.Context, req *connect.Request[v1.CreateSandboxFromSpecRequest]) (*connect.ServerStreamForClient[v1.CreateSandboxFromSpecEvent], error) { + return c.createSandboxFromSpec.CallServerStream(ctx, req) +} + +// SandboxSpecServiceHandler is an implementation of the depot.sandbox.v1.SandboxSpecService +// service. +type SandboxSpecServiceHandler interface { + CreateSandboxFromSpec(context.Context, *connect.Request[v1.CreateSandboxFromSpecRequest], *connect.ServerStream[v1.CreateSandboxFromSpecEvent]) error +} + +// NewSandboxSpecServiceHandler builds an HTTP handler from the service implementation. It returns +// the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewSandboxSpecServiceHandler(svc SandboxSpecServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + sandboxSpecServiceCreateSandboxFromSpecHandler := connect.NewServerStreamHandler( + SandboxSpecServiceCreateSandboxFromSpecProcedure, + svc.CreateSandboxFromSpec, + opts..., + ) + return "/depot.sandbox.v1.SandboxSpecService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case SandboxSpecServiceCreateSandboxFromSpecProcedure: + sandboxSpecServiceCreateSandboxFromSpecHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedSandboxSpecServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedSandboxSpecServiceHandler struct{} + +func (UnimplementedSandboxSpecServiceHandler) CreateSandboxFromSpec(context.Context, *connect.Request[v1.CreateSandboxFromSpecRequest], *connect.ServerStream[v1.CreateSandboxFromSpecEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxSpecService.CreateSandboxFromSpec is not implemented")) +} diff --git a/pkg/proto/depot/sandbox/v1/snapshot.pb.go b/pkg/proto/depot/sandbox/v1/snapshot.pb.go new file mode 100644 index 00000000..814c4bf2 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/snapshot.pb.go @@ -0,0 +1,778 @@ +// A durable filesystem snapshot of a sandbox, with the RPCs to create, get, +// list, and delete one. +// +// This file defines the wire surface and the SDK ergonomics for snapshots. The +// underlying snapshot and restore pipeline is not yet implemented, so the +// handlers currently return Unimplemented. +// +// The selector used to reference a snapshot, SnapshotRef, is defined in +// refs.proto. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/snapshot.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A snapshot, as returned by the snapshot RPCs. +// +// expires_at is reserved for a future time-to-live feature and is currently +// left unset. +type Snapshot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + SourceSandboxId string `protobuf:"bytes,2,opt,name=source_sandbox_id,json=sourceSandboxId,proto3" json:"source_sandbox_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"` +} + +func (x *Snapshot) Reset() { + *x = Snapshot{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Snapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Snapshot) ProtoMessage() {} + +func (x *Snapshot) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Snapshot.ProtoReflect.Descriptor instead. +func (*Snapshot) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{0} +} + +func (x *Snapshot) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +func (x *Snapshot) GetSourceSandboxId() string { + if x != nil { + return x.SourceSandboxId + } + return "" +} + +func (x *Snapshot) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Snapshot) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type CreateSnapshotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // Requested time-to-live for the snapshot. The server currently ignores this + // value; the field exists so the SDK option is available now and a future + // version can honor it without a wire break. + Expiration *durationpb.Duration `protobuf:"bytes,2,opt,name=expiration,proto3,oneof" json:"expiration,omitempty"` +} + +func (x *CreateSnapshotRequest) Reset() { + *x = CreateSnapshotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSnapshotRequest) ProtoMessage() {} + +func (x *CreateSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSnapshotRequest.ProtoReflect.Descriptor instead. +func (*CreateSnapshotRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateSnapshotRequest) GetSandbox() *SandboxRef { + if x != nil { + return x.Sandbox + } + return nil +} + +func (x *CreateSnapshotRequest) GetExpiration() *durationpb.Duration { + if x != nil { + return x.Expiration + } + return nil +} + +type CreateSnapshotResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (x *CreateSnapshotResponse) Reset() { + *x = CreateSnapshotResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSnapshotResponse) ProtoMessage() {} + +func (x *CreateSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSnapshotResponse.ProtoReflect.Descriptor instead. +func (*CreateSnapshotResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateSnapshotResponse) GetSnapshot() *Snapshot { + if x != nil { + return x.Snapshot + } + return nil +} + +type GetSnapshotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshot *SnapshotRef `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (x *GetSnapshotRequest) Reset() { + *x = GetSnapshotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshotRequest) ProtoMessage() {} + +func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshotRequest.ProtoReflect.Descriptor instead. +func (*GetSnapshotRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSnapshotRequest) GetSnapshot() *SnapshotRef { + if x != nil { + return x.Snapshot + } + return nil +} + +type GetSnapshotResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (x *GetSnapshotResponse) Reset() { + *x = GetSnapshotResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshotResponse) ProtoMessage() {} + +func (x *GetSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshotResponse.ProtoReflect.Descriptor instead. +func (*GetSnapshotResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{4} +} + +func (x *GetSnapshotResponse) GetSnapshot() *Snapshot { + if x != nil { + return x.Snapshot + } + return nil +} + +type ListSnapshotsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageSize *int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + PageToken *string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` +} + +func (x *ListSnapshotsRequest) Reset() { + *x = ListSnapshotsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSnapshotsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSnapshotsRequest) ProtoMessage() {} + +func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSnapshotsRequest.ProtoReflect.Descriptor instead. +func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{5} +} + +func (x *ListSnapshotsRequest) GetPageSize() int32 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListSnapshotsRequest) GetPageToken() string { + if x != nil && x.PageToken != nil { + return *x.PageToken + } + return "" +} + +type ListSnapshotsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` +} + +func (x *ListSnapshotsResponse) Reset() { + *x = ListSnapshotsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSnapshotsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSnapshotsResponse) ProtoMessage() {} + +func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSnapshotsResponse.ProtoReflect.Descriptor instead. +func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{6} +} + +func (x *ListSnapshotsResponse) GetSnapshots() []*Snapshot { + if x != nil { + return x.Snapshots + } + return nil +} + +func (x *ListSnapshotsResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +type DeleteSnapshotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snapshot *SnapshotRef `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (x *DeleteSnapshotRequest) Reset() { + *x = DeleteSnapshotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSnapshotRequest) ProtoMessage() {} + +func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSnapshotRequest.ProtoReflect.Descriptor instead. +func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteSnapshotRequest) GetSnapshot() *SnapshotRef { + if x != nil { + return x.Snapshot + } + return nil +} + +type DeleteSnapshotResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteSnapshotResponse) Reset() { + *x = DeleteSnapshotResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSnapshotResponse) ProtoMessage() {} + +func (x *DeleteSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_snapshot_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSnapshotResponse.ProtoReflect.Descriptor instead. +func (*DeleteSnapshotResponse) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_snapshot_proto_rawDescGZIP(), []int{8} +} + +var File_depot_sandbox_v1_snapshot_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_snapshot_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xe1, 0x01, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, + 0x2a, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x36, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x66, 0x52, 0x07, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x4f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, + 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x52, + 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x4d, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x79, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x39, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x66, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x18, 0x0a, 0x16, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, + 0x0d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, + 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_snapshot_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_snapshot_proto_rawDescData = file_depot_sandbox_v1_snapshot_proto_rawDesc +) + +func file_depot_sandbox_v1_snapshot_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_snapshot_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_snapshot_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_snapshot_proto_rawDescData) + }) + return file_depot_sandbox_v1_snapshot_proto_rawDescData +} + +var file_depot_sandbox_v1_snapshot_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_depot_sandbox_v1_snapshot_proto_goTypes = []interface{}{ + (*Snapshot)(nil), // 0: depot.sandbox.v1.Snapshot + (*CreateSnapshotRequest)(nil), // 1: depot.sandbox.v1.CreateSnapshotRequest + (*CreateSnapshotResponse)(nil), // 2: depot.sandbox.v1.CreateSnapshotResponse + (*GetSnapshotRequest)(nil), // 3: depot.sandbox.v1.GetSnapshotRequest + (*GetSnapshotResponse)(nil), // 4: depot.sandbox.v1.GetSnapshotResponse + (*ListSnapshotsRequest)(nil), // 5: depot.sandbox.v1.ListSnapshotsRequest + (*ListSnapshotsResponse)(nil), // 6: depot.sandbox.v1.ListSnapshotsResponse + (*DeleteSnapshotRequest)(nil), // 7: depot.sandbox.v1.DeleteSnapshotRequest + (*DeleteSnapshotResponse)(nil), // 8: depot.sandbox.v1.DeleteSnapshotResponse + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*SandboxRef)(nil), // 10: depot.sandbox.v1.SandboxRef + (*durationpb.Duration)(nil), // 11: google.protobuf.Duration + (*SnapshotRef)(nil), // 12: depot.sandbox.v1.SnapshotRef +} +var file_depot_sandbox_v1_snapshot_proto_depIdxs = []int32{ + 9, // 0: depot.sandbox.v1.Snapshot.created_at:type_name -> google.protobuf.Timestamp + 9, // 1: depot.sandbox.v1.Snapshot.expires_at:type_name -> google.protobuf.Timestamp + 10, // 2: depot.sandbox.v1.CreateSnapshotRequest.sandbox:type_name -> depot.sandbox.v1.SandboxRef + 11, // 3: depot.sandbox.v1.CreateSnapshotRequest.expiration:type_name -> google.protobuf.Duration + 0, // 4: depot.sandbox.v1.CreateSnapshotResponse.snapshot:type_name -> depot.sandbox.v1.Snapshot + 12, // 5: depot.sandbox.v1.GetSnapshotRequest.snapshot:type_name -> depot.sandbox.v1.SnapshotRef + 0, // 6: depot.sandbox.v1.GetSnapshotResponse.snapshot:type_name -> depot.sandbox.v1.Snapshot + 0, // 7: depot.sandbox.v1.ListSnapshotsResponse.snapshots:type_name -> depot.sandbox.v1.Snapshot + 12, // 8: depot.sandbox.v1.DeleteSnapshotRequest.snapshot:type_name -> depot.sandbox.v1.SnapshotRef + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_snapshot_proto_init() } +func file_depot_sandbox_v1_snapshot_proto_init() { + if File_depot_sandbox_v1_snapshot_proto != nil { + return + } + file_depot_sandbox_v1_refs_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_snapshot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Snapshot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSnapshotResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSnapshotsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSnapshotsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSnapshotResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_snapshot_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_snapshot_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_snapshot_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_snapshot_proto_msgTypes[6].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_snapshot_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_snapshot_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_snapshot_proto_depIdxs, + MessageInfos: file_depot_sandbox_v1_snapshot_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_snapshot_proto = out.File + file_depot_sandbox_v1_snapshot_proto_rawDesc = nil + file_depot_sandbox_v1_snapshot_proto_goTypes = nil + file_depot_sandbox_v1_snapshot_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/source.pb.go b/pkg/proto/depot/sandbox/v1/source.pb.go new file mode 100644 index 00000000..587ac2e6 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/source.pb.go @@ -0,0 +1,531 @@ +// Describes where a new sandbox's initial filesystem comes from. A sandbox +// can be created from a Git repository, a snapshot, an OCI image, or a +// template, and this descriptor carries exactly one of those choices. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/source.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Source struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Variant: + // + // *Source_Git + // *Source_Snapshot + // *Source_Image + // *Source_Template + Variant isSource_Variant `protobuf_oneof:"variant"` +} + +func (x *Source) Reset() { + *x = Source{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Source) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Source) ProtoMessage() {} + +func (x *Source) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Source.ProtoReflect.Descriptor instead. +func (*Source) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_source_proto_rawDescGZIP(), []int{0} +} + +func (m *Source) GetVariant() isSource_Variant { + if m != nil { + return m.Variant + } + return nil +} + +func (x *Source) GetGit() *GitSource { + if x, ok := x.GetVariant().(*Source_Git); ok { + return x.Git + } + return nil +} + +func (x *Source) GetSnapshot() *SnapshotSource { + if x, ok := x.GetVariant().(*Source_Snapshot); ok { + return x.Snapshot + } + return nil +} + +func (x *Source) GetImage() *ImageSource { + if x, ok := x.GetVariant().(*Source_Image); ok { + return x.Image + } + return nil +} + +func (x *Source) GetTemplate() *TemplateSource { + if x, ok := x.GetVariant().(*Source_Template); ok { + return x.Template + } + return nil +} + +type isSource_Variant interface { + isSource_Variant() +} + +type Source_Git struct { + Git *GitSource `protobuf:"bytes,1,opt,name=git,proto3,oneof"` // Clone a Git repository into the sandbox. +} + +type Source_Snapshot struct { + Snapshot *SnapshotSource `protobuf:"bytes,2,opt,name=snapshot,proto3,oneof"` // Restore from a previously taken snapshot. +} + +type Source_Image struct { + Image *ImageSource `protobuf:"bytes,3,opt,name=image,proto3,oneof"` // Start from an OCI image. +} + +type Source_Template struct { + Template *TemplateSource `protobuf:"bytes,4,opt,name=template,proto3,oneof"` // Start from a named template. +} + +func (*Source_Git) isSource_Variant() {} + +func (*Source_Snapshot) isSource_Variant() {} + +func (*Source_Image) isSource_Variant() {} + +func (*Source_Template) isSource_Variant() {} + +type GitSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Branch *string `protobuf:"bytes,2,opt,name=branch,proto3,oneof" json:"branch,omitempty"` + Commit *string `protobuf:"bytes,3,opt,name=commit,proto3,oneof" json:"commit,omitempty"` + // Name of an organization secret holding the credentials used to clone + // the repository. Leave unset for public repositories that need no + // authentication; when set, the named secret is resolved at clone time. + Secret *string `protobuf:"bytes,4,opt,name=secret,proto3,oneof" json:"secret,omitempty"` +} + +func (x *GitSource) Reset() { + *x = GitSource{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GitSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitSource) ProtoMessage() {} + +func (x *GitSource) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitSource.ProtoReflect.Descriptor instead. +func (*GitSource) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_source_proto_rawDescGZIP(), []int{1} +} + +func (x *GitSource) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *GitSource) GetBranch() string { + if x != nil && x.Branch != nil { + return *x.Branch + } + return "" +} + +func (x *GitSource) GetCommit() string { + if x != nil && x.Commit != nil { + return *x.Commit + } + return "" +} + +func (x *GitSource) GetSecret() string { + if x != nil && x.Secret != nil { + return *x.Secret + } + return "" +} + +type SnapshotSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` +} + +func (x *SnapshotSource) Reset() { + *x = SnapshotSource{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SnapshotSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnapshotSource) ProtoMessage() {} + +func (x *SnapshotSource) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotSource.ProtoReflect.Descriptor instead. +func (*SnapshotSource) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_source_proto_rawDescGZIP(), []int{2} +} + +func (x *SnapshotSource) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +type ImageSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ImageRef string `protobuf:"bytes,1,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"` +} + +func (x *ImageSource) Reset() { + *x = ImageSource{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageSource) ProtoMessage() {} + +func (x *ImageSource) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageSource.ProtoReflect.Descriptor instead. +func (*ImageSource) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_source_proto_rawDescGZIP(), []int{3} +} + +func (x *ImageSource) GetImageRef() string { + if x != nil { + return x.ImageRef + } + return "" +} + +type TemplateSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"` +} + +func (x *TemplateSource) Reset() { + *x = TemplateSource{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TemplateSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemplateSource) ProtoMessage() {} + +func (x *TemplateSource) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_source_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemplateSource.ProtoReflect.Descriptor instead. +func (*TemplateSource) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_source_proto_rawDescGZIP(), []int{4} +} + +func (x *TemplateSource) GetTemplateId() string { + if x != nil { + return x.TemplateId + } + return "" +} + +var File_depot_sandbox_v1_source_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_source_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x22, 0xfb, 0x01, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x03, + 0x67, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x03, 0x67, 0x69, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x35, 0x0a, + 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x05, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, + 0x95, 0x01, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, + 0x1b, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x31, 0x0a, 0x0e, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0b, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, 0x22, 0x31, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x42, 0xc0, 0x01, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x42, 0x0b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, + 0x53, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, + 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, + 0x3a, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_source_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_source_proto_rawDescData = file_depot_sandbox_v1_source_proto_rawDesc +) + +func file_depot_sandbox_v1_source_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_source_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_source_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_source_proto_rawDescData) + }) + return file_depot_sandbox_v1_source_proto_rawDescData +} + +var file_depot_sandbox_v1_source_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_depot_sandbox_v1_source_proto_goTypes = []interface{}{ + (*Source)(nil), // 0: depot.sandbox.v1.Source + (*GitSource)(nil), // 1: depot.sandbox.v1.GitSource + (*SnapshotSource)(nil), // 2: depot.sandbox.v1.SnapshotSource + (*ImageSource)(nil), // 3: depot.sandbox.v1.ImageSource + (*TemplateSource)(nil), // 4: depot.sandbox.v1.TemplateSource +} +var file_depot_sandbox_v1_source_proto_depIdxs = []int32{ + 1, // 0: depot.sandbox.v1.Source.git:type_name -> depot.sandbox.v1.GitSource + 2, // 1: depot.sandbox.v1.Source.snapshot:type_name -> depot.sandbox.v1.SnapshotSource + 3, // 2: depot.sandbox.v1.Source.image:type_name -> depot.sandbox.v1.ImageSource + 4, // 3: depot.sandbox.v1.Source.template:type_name -> depot.sandbox.v1.TemplateSource + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_source_proto_init() } +func file_depot_sandbox_v1_source_proto_init() { + if File_depot_sandbox_v1_source_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Source); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_source_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GitSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_source_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_source_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_source_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TemplateSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_source_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Source_Git)(nil), + (*Source_Snapshot)(nil), + (*Source_Image)(nil), + (*Source_Template)(nil), + } + file_depot_sandbox_v1_source_proto_msgTypes[1].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_source_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_source_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_source_proto_depIdxs, + MessageInfos: file_depot_sandbox_v1_source_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_source_proto = out.File + file_depot_sandbox_v1_source_proto_rawDesc = nil + file_depot_sandbox_v1_source_proto_goTypes = nil + file_depot_sandbox_v1_source_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/spec.pb.go b/pkg/proto/depot/sandbox/v1/spec.pb.go new file mode 100644 index 00000000..77ba16a2 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/spec.pb.go @@ -0,0 +1,745 @@ +// Declarative spec messages for a sandbox. +// +// This file defines the message types that describe a sandbox spec: SandboxSpec +// and its nested SSHSpec, ContainerSpec, BuildSpec, and Hooks. The HookSpec and +// HookStage types live in hook.proto, and the CreateSandboxFromSpec RPC with its +// request and event types lives in spec_rpc.proto. Splitting those out keeps +// spec.proto free of an import cycle with sandbox.proto. +// +// SandboxSpec mirrors the YAML spec schema field for field, so the shapes used +// in the CLI carry over directly and the SDK adapter handles any cosmetic +// renaming on the way out. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/spec.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A declarative description of a sandbox to create. SandboxSpec mirrors the YAML +// spec schema field for field, so the shapes used in the CLI carry over directly +// and the SDK adapter handles any cosmetic renaming on the way out. +type SandboxSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identity and lifecycle settings for the sandbox. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + Argv *string `protobuf:"bytes,2,opt,name=argv,proto3,oneof" json:"argv,omitempty"` + Command *string `protobuf:"bytes,3,opt,name=command,proto3,oneof" json:"command,omitempty"` + Detach *bool `protobuf:"varint,4,opt,name=detach,proto3,oneof" json:"detach,omitempty"` + Template *string `protobuf:"bytes,5,opt,name=template,proto3,oneof" json:"template,omitempty"` + // Where the sandbox filesystem comes from. Either `source` or + // `container.build` may be set, but not both; the parser rejects specs that + // set both. + Source *Source `protobuf:"bytes,6,opt,name=source,proto3,oneof" json:"source,omitempty"` + Container *ContainerSpec `protobuf:"bytes,7,opt,name=container,proto3,oneof" json:"container,omitempty"` + // A pre-built image reference to use directly, bypassing `container.build`. + Image *string `protobuf:"bytes,8,opt,name=image,proto3,oneof" json:"image,omitempty"` + // Resources and runtime configuration for the sandbox. + Resources *Resources `protobuf:"bytes,9,opt,name=resources,proto3,oneof" json:"resources,omitempty"` + Runtime *Runtime `protobuf:"bytes,10,opt,name=runtime,proto3,oneof" json:"runtime,omitempty"` + // Environment variables to set inside the sandbox. + Env map[string]string `protobuf:"bytes,11,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // SSH configuration. Retained for parity with the CLI even though the SDK does + // not surface SSH details directly. + Ssh *SSHSpec `protobuf:"bytes,12,opt,name=ssh,proto3,oneof" json:"ssh,omitempty"` + // Commands to run at each sandbox lifecycle stage, such as on create or on + // start. + On *Hooks `protobuf:"bytes,14,opt,name=on,proto3,oneof" json:"on,omitempty"` +} + +func (x *SandboxSpec) Reset() { + *x = SandboxSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxSpec) ProtoMessage() {} + +func (x *SandboxSpec) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxSpec.ProtoReflect.Descriptor instead. +func (*SandboxSpec) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_proto_rawDescGZIP(), []int{0} +} + +func (x *SandboxSpec) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *SandboxSpec) GetArgv() string { + if x != nil && x.Argv != nil { + return *x.Argv + } + return "" +} + +func (x *SandboxSpec) GetCommand() string { + if x != nil && x.Command != nil { + return *x.Command + } + return "" +} + +func (x *SandboxSpec) GetDetach() bool { + if x != nil && x.Detach != nil { + return *x.Detach + } + return false +} + +func (x *SandboxSpec) GetTemplate() string { + if x != nil && x.Template != nil { + return *x.Template + } + return "" +} + +func (x *SandboxSpec) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +func (x *SandboxSpec) GetContainer() *ContainerSpec { + if x != nil { + return x.Container + } + return nil +} + +func (x *SandboxSpec) GetImage() string { + if x != nil && x.Image != nil { + return *x.Image + } + return "" +} + +func (x *SandboxSpec) GetResources() *Resources { + if x != nil { + return x.Resources + } + return nil +} + +func (x *SandboxSpec) GetRuntime() *Runtime { + if x != nil { + return x.Runtime + } + return nil +} + +func (x *SandboxSpec) GetEnv() map[string]string { + if x != nil { + return x.Env + } + return nil +} + +func (x *SandboxSpec) GetSsh() *SSHSpec { + if x != nil { + return x.Ssh + } + return nil +} + +func (x *SandboxSpec) GetOn() *Hooks { + if x != nil { + return x.On + } + return nil +} + +// SSH access configuration for a sandbox. +type SSHSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + TimeoutMinutes *int32 `protobuf:"varint,2,opt,name=timeout_minutes,json=timeoutMinutes,proto3,oneof" json:"timeout_minutes,omitempty"` +} + +func (x *SSHSpec) Reset() { + *x = SSHSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SSHSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SSHSpec) ProtoMessage() {} + +func (x *SSHSpec) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SSHSpec.ProtoReflect.Descriptor instead. +func (*SSHSpec) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_proto_rawDescGZIP(), []int{1} +} + +func (x *SSHSpec) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *SSHSpec) GetTimeoutMinutes() int32 { + if x != nil && x.TimeoutMinutes != nil { + return *x.TimeoutMinutes + } + return 0 +} + +// How to obtain the sandbox image when building from a container definition. +type ContainerSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Build *BuildSpec `protobuf:"bytes,1,opt,name=build,proto3,oneof" json:"build,omitempty"` +} + +func (x *ContainerSpec) Reset() { + *x = ContainerSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerSpec) ProtoMessage() {} + +func (x *ContainerSpec) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerSpec.ProtoReflect.Descriptor instead. +func (*ContainerSpec) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_proto_rawDescGZIP(), []int{2} +} + +func (x *ContainerSpec) GetBuild() *BuildSpec { + if x != nil { + return x.Build + } + return nil +} + +// Instructions for building a container image for the sandbox. +type BuildSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Path or URL to the build context. + Context *string `protobuf:"bytes,1,opt,name=context,proto3,oneof" json:"context,omitempty"` + Dockerfile *string `protobuf:"bytes,2,opt,name=dockerfile,proto3,oneof" json:"dockerfile,omitempty"` + Target *string `protobuf:"bytes,3,opt,name=target,proto3,oneof" json:"target,omitempty"` + BuildArgs map[string]string `protobuf:"bytes,4,rep,name=build_args,json=buildArgs,proto3" json:"build_args,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Push *bool `protobuf:"varint,5,opt,name=push,proto3,oneof" json:"push,omitempty"` + NoCache *bool `protobuf:"varint,6,opt,name=no_cache,json=noCache,proto3,oneof" json:"no_cache,omitempty"` +} + +func (x *BuildSpec) Reset() { + *x = BuildSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildSpec) ProtoMessage() {} + +func (x *BuildSpec) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildSpec.ProtoReflect.Descriptor instead. +func (*BuildSpec) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_proto_rawDescGZIP(), []int{3} +} + +func (x *BuildSpec) GetContext() string { + if x != nil && x.Context != nil { + return *x.Context + } + return "" +} + +func (x *BuildSpec) GetDockerfile() string { + if x != nil && x.Dockerfile != nil { + return *x.Dockerfile + } + return "" +} + +func (x *BuildSpec) GetTarget() string { + if x != nil && x.Target != nil { + return *x.Target + } + return "" +} + +func (x *BuildSpec) GetBuildArgs() map[string]string { + if x != nil { + return x.BuildArgs + } + return nil +} + +func (x *BuildSpec) GetPush() bool { + if x != nil && x.Push != nil { + return *x.Push + } + return false +} + +func (x *BuildSpec) GetNoCache() bool { + if x != nil && x.NoCache != nil { + return *x.NoCache + } + return false +} + +// Hooks to run at each sandbox lifecycle stage. Each stage holds an ordered list +// of HookSpec entries that run in sequence. +type Hooks struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Create []*HookSpec `protobuf:"bytes,1,rep,name=create,proto3" json:"create,omitempty"` + Start []*HookSpec `protobuf:"bytes,2,rep,name=start,proto3" json:"start,omitempty"` + Exec []*HookSpec `protobuf:"bytes,3,rep,name=exec,proto3" json:"exec,omitempty"` + Shell []*HookSpec `protobuf:"bytes,4,rep,name=shell,proto3" json:"shell,omitempty"` + Snapshot []*HookSpec `protobuf:"bytes,5,rep,name=snapshot,proto3" json:"snapshot,omitempty"` + Down []*HookSpec `protobuf:"bytes,6,rep,name=down,proto3" json:"down,omitempty"` +} + +func (x *Hooks) Reset() { + *x = Hooks{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hooks) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hooks) ProtoMessage() {} + +func (x *Hooks) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hooks.ProtoReflect.Descriptor instead. +func (*Hooks) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_proto_rawDescGZIP(), []int{4} +} + +func (x *Hooks) GetCreate() []*HookSpec { + if x != nil { + return x.Create + } + return nil +} + +func (x *Hooks) GetStart() []*HookSpec { + if x != nil { + return x.Start + } + return nil +} + +func (x *Hooks) GetExec() []*HookSpec { + if x != nil { + return x.Exec + } + return nil +} + +func (x *Hooks) GetShell() []*HookSpec { + if x != nil { + return x.Shell + } + return nil +} + +func (x *Hooks) GetSnapshot() []*HookSpec { + if x != nil { + return x.Snapshot + } + return nil +} + +func (x *Hooks) GetDown() []*HookSpec { + if x != nil { + return x.Down + } + return nil +} + +var File_depot_sandbox_v1_spec_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_spec_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x2f, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x06, 0x0a, 0x0b, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x70, 0x65, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x76, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x72, 0x67, 0x76, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, + 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x08, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x48, 0x05, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x42, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x53, 0x70, 0x65, 0x63, 0x48, 0x06, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x48, 0x08, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x38, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x09, 0x52, 0x07, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x03, 0x65, 0x6e, + 0x76, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x03, 0x65, 0x6e, 0x76, 0x12, 0x30, 0x0a, 0x03, 0x73, 0x73, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x53, 0x48, 0x53, 0x70, 0x65, 0x63, 0x48, 0x0a, 0x52, 0x03, + 0x73, 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x02, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x48, 0x0b, 0x52, 0x02, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x72, 0x67, 0x76, 0x42, 0x0a, + 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x73, 0x73, 0x68, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x6f, 0x6e, 0x4a, 0x04, + 0x08, 0x0d, 0x10, 0x0e, 0x52, 0x03, 0x6d, 0x63, 0x70, 0x22, 0x65, 0x0a, 0x07, 0x53, 0x53, 0x48, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2c, + 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, + 0x22, 0x51, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x36, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, + 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x22, 0xea, 0x02, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x23, 0x0a, 0x0a, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, + 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x49, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x61, 0x72, 0x67, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, + 0x70, 0x65, 0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x72, 0x67, 0x73, 0x12, 0x17, 0x0a, + 0x04, 0x70, 0x75, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x04, 0x70, + 0x75, 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41, + 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x70, + 0x75, 0x73, 0x68, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6e, 0x6f, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x22, 0xb7, 0x02, 0x0a, 0x05, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, + 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x30, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x65, 0x78, 0x65, 0x63, + 0x12, 0x30, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x73, 0x68, 0x65, + 0x6c, 0x6c, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x6f, + 0x77, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x42, 0xbe, 0x01, 0x0a, 0x14, 0x63, + 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x42, 0x09, 0x53, 0x70, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, + 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_spec_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_spec_proto_rawDescData = file_depot_sandbox_v1_spec_proto_rawDesc +) + +func file_depot_sandbox_v1_spec_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_spec_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_spec_proto_rawDescData) + }) + return file_depot_sandbox_v1_spec_proto_rawDescData +} + +var file_depot_sandbox_v1_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_depot_sandbox_v1_spec_proto_goTypes = []interface{}{ + (*SandboxSpec)(nil), // 0: depot.sandbox.v1.SandboxSpec + (*SSHSpec)(nil), // 1: depot.sandbox.v1.SSHSpec + (*ContainerSpec)(nil), // 2: depot.sandbox.v1.ContainerSpec + (*BuildSpec)(nil), // 3: depot.sandbox.v1.BuildSpec + (*Hooks)(nil), // 4: depot.sandbox.v1.Hooks + nil, // 5: depot.sandbox.v1.SandboxSpec.EnvEntry + nil, // 6: depot.sandbox.v1.BuildSpec.BuildArgsEntry + (*Source)(nil), // 7: depot.sandbox.v1.Source + (*Resources)(nil), // 8: depot.sandbox.v1.Resources + (*Runtime)(nil), // 9: depot.sandbox.v1.Runtime + (*HookSpec)(nil), // 10: depot.sandbox.v1.HookSpec +} +var file_depot_sandbox_v1_spec_proto_depIdxs = []int32{ + 7, // 0: depot.sandbox.v1.SandboxSpec.source:type_name -> depot.sandbox.v1.Source + 2, // 1: depot.sandbox.v1.SandboxSpec.container:type_name -> depot.sandbox.v1.ContainerSpec + 8, // 2: depot.sandbox.v1.SandboxSpec.resources:type_name -> depot.sandbox.v1.Resources + 9, // 3: depot.sandbox.v1.SandboxSpec.runtime:type_name -> depot.sandbox.v1.Runtime + 5, // 4: depot.sandbox.v1.SandboxSpec.env:type_name -> depot.sandbox.v1.SandboxSpec.EnvEntry + 1, // 5: depot.sandbox.v1.SandboxSpec.ssh:type_name -> depot.sandbox.v1.SSHSpec + 4, // 6: depot.sandbox.v1.SandboxSpec.on:type_name -> depot.sandbox.v1.Hooks + 3, // 7: depot.sandbox.v1.ContainerSpec.build:type_name -> depot.sandbox.v1.BuildSpec + 6, // 8: depot.sandbox.v1.BuildSpec.build_args:type_name -> depot.sandbox.v1.BuildSpec.BuildArgsEntry + 10, // 9: depot.sandbox.v1.Hooks.create:type_name -> depot.sandbox.v1.HookSpec + 10, // 10: depot.sandbox.v1.Hooks.start:type_name -> depot.sandbox.v1.HookSpec + 10, // 11: depot.sandbox.v1.Hooks.exec:type_name -> depot.sandbox.v1.HookSpec + 10, // 12: depot.sandbox.v1.Hooks.shell:type_name -> depot.sandbox.v1.HookSpec + 10, // 13: depot.sandbox.v1.Hooks.snapshot:type_name -> depot.sandbox.v1.HookSpec + 10, // 14: depot.sandbox.v1.Hooks.down:type_name -> depot.sandbox.v1.HookSpec + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_spec_proto_init() } +func file_depot_sandbox_v1_spec_proto_init() { + if File_depot_sandbox_v1_spec_proto != nil { + return + } + file_depot_sandbox_v1_hook_proto_init() + file_depot_sandbox_v1_runtime_proto_init() + file_depot_sandbox_v1_source_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SSHSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BuildSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hooks); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_spec_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_spec_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_spec_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_depot_sandbox_v1_spec_proto_msgTypes[3].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_spec_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_sandbox_v1_spec_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_spec_proto_depIdxs, + MessageInfos: file_depot_sandbox_v1_spec_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_spec_proto = out.File + file_depot_sandbox_v1_spec_proto_rawDesc = nil + file_depot_sandbox_v1_spec_proto_goTypes = nil + file_depot_sandbox_v1_spec_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go b/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go new file mode 100644 index 00000000..e32a2d5f --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go @@ -0,0 +1,784 @@ +// The CreateSandboxFromSpec RPC, its request and event types, and the service +// that hosts it. +// +// This RPC creates a sandbox declaratively from a SandboxSpec. It lives in its +// own service, SandboxSpecService, rather than on SandboxService because its +// request and event types reference both the Sandbox type from sandbox.proto and +// SandboxSpec from spec.proto. Keeping the RPC and its types in a separate file +// and service avoids an import cycle between those proto files. +// +// The SDK consumes SandboxSpecService alongside SandboxService over the same +// transport and auth surface. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/sandbox/v1/spec_rpc.proto + +package sandboxv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateSandboxFromSpecEvent_Error_Stage int32 + +const ( + CreateSandboxFromSpecEvent_Error_STAGE_UNSPECIFIED CreateSandboxFromSpecEvent_Error_Stage = 0 + CreateSandboxFromSpecEvent_Error_STAGE_PARSE CreateSandboxFromSpecEvent_Error_Stage = 1 + CreateSandboxFromSpecEvent_Error_STAGE_BUILD CreateSandboxFromSpecEvent_Error_Stage = 2 + CreateSandboxFromSpecEvent_Error_STAGE_CONVERT CreateSandboxFromSpecEvent_Error_Stage = 3 + CreateSandboxFromSpecEvent_Error_STAGE_CREATE CreateSandboxFromSpecEvent_Error_Stage = 4 + CreateSandboxFromSpecEvent_Error_STAGE_HOOKS_CREATE CreateSandboxFromSpecEvent_Error_Stage = 5 +) + +// Enum value maps for CreateSandboxFromSpecEvent_Error_Stage. +var ( + CreateSandboxFromSpecEvent_Error_Stage_name = map[int32]string{ + 0: "STAGE_UNSPECIFIED", + 1: "STAGE_PARSE", + 2: "STAGE_BUILD", + 3: "STAGE_CONVERT", + 4: "STAGE_CREATE", + 5: "STAGE_HOOKS_CREATE", + } + CreateSandboxFromSpecEvent_Error_Stage_value = map[string]int32{ + "STAGE_UNSPECIFIED": 0, + "STAGE_PARSE": 1, + "STAGE_BUILD": 2, + "STAGE_CONVERT": 3, + "STAGE_CREATE": 4, + "STAGE_HOOKS_CREATE": 5, + } +) + +func (x CreateSandboxFromSpecEvent_Error_Stage) Enum() *CreateSandboxFromSpecEvent_Error_Stage { + p := new(CreateSandboxFromSpecEvent_Error_Stage) + *p = x + return p +} + +func (x CreateSandboxFromSpecEvent_Error_Stage) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CreateSandboxFromSpecEvent_Error_Stage) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_spec_rpc_proto_enumTypes[0].Descriptor() +} + +func (CreateSandboxFromSpecEvent_Error_Stage) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_spec_rpc_proto_enumTypes[0] +} + +func (x CreateSandboxFromSpecEvent_Error_Stage) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CreateSandboxFromSpecEvent_Error_Stage.Descriptor instead. +func (CreateSandboxFromSpecEvent_Error_Stage) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{1, 3, 0} +} + +// Request to create a sandbox from a spec. Carries the spec, either as a parsed +// SandboxSpec message or as a YAML string, plus a map of inputs to substitute +// into the spec before it is validated and run. +type CreateSandboxFromSpecRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Spec: + // + // *CreateSandboxFromSpecRequest_SpecYaml + // *CreateSandboxFromSpecRequest_SandboxSpec + Spec isCreateSandboxFromSpecRequest_Spec `protobuf_oneof:"spec"` + Inputs map[string]string `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *CreateSandboxFromSpecRequest) Reset() { + *x = CreateSandboxFromSpecRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxFromSpecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxFromSpecRequest) ProtoMessage() {} + +func (x *CreateSandboxFromSpecRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxFromSpecRequest.ProtoReflect.Descriptor instead. +func (*CreateSandboxFromSpecRequest) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{0} +} + +func (m *CreateSandboxFromSpecRequest) GetSpec() isCreateSandboxFromSpecRequest_Spec { + if m != nil { + return m.Spec + } + return nil +} + +func (x *CreateSandboxFromSpecRequest) GetSpecYaml() string { + if x, ok := x.GetSpec().(*CreateSandboxFromSpecRequest_SpecYaml); ok { + return x.SpecYaml + } + return "" +} + +func (x *CreateSandboxFromSpecRequest) GetSandboxSpec() *SandboxSpec { + if x, ok := x.GetSpec().(*CreateSandboxFromSpecRequest_SandboxSpec); ok { + return x.SandboxSpec + } + return nil +} + +func (x *CreateSandboxFromSpecRequest) GetInputs() map[string]string { + if x != nil { + return x.Inputs + } + return nil +} + +type isCreateSandboxFromSpecRequest_Spec interface { + isCreateSandboxFromSpecRequest_Spec() +} + +type CreateSandboxFromSpecRequest_SpecYaml struct { + SpecYaml string `protobuf:"bytes,1,opt,name=spec_yaml,json=specYaml,proto3,oneof"` +} + +type CreateSandboxFromSpecRequest_SandboxSpec struct { + SandboxSpec *SandboxSpec `protobuf:"bytes,2,opt,name=sandbox_spec,json=sandboxSpec,proto3,oneof"` +} + +func (*CreateSandboxFromSpecRequest_SpecYaml) isCreateSandboxFromSpecRequest_Spec() {} + +func (*CreateSandboxFromSpecRequest_SandboxSpec) isCreateSandboxFromSpecRequest_Spec() {} + +// An event in the server stream returned by CreateSandboxFromSpec. A +// SandboxStarted event is sent once the sandbox is running and source delivery +// has completed, followed by a HookEvent for each create-stage hook. The stream +// ends with exactly one terminal event, either Done or Error. +type CreateSandboxFromSpecEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Event: + // + // *CreateSandboxFromSpecEvent_SandboxStarted_ + // *CreateSandboxFromSpecEvent_HookEvent_ + // *CreateSandboxFromSpecEvent_Done_ + // *CreateSandboxFromSpecEvent_Error_ + Event isCreateSandboxFromSpecEvent_Event `protobuf_oneof:"event"` +} + +func (x *CreateSandboxFromSpecEvent) Reset() { + *x = CreateSandboxFromSpecEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxFromSpecEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxFromSpecEvent) ProtoMessage() {} + +func (x *CreateSandboxFromSpecEvent) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxFromSpecEvent.ProtoReflect.Descriptor instead. +func (*CreateSandboxFromSpecEvent) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{1} +} + +func (m *CreateSandboxFromSpecEvent) GetEvent() isCreateSandboxFromSpecEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *CreateSandboxFromSpecEvent) GetSandboxStarted() *CreateSandboxFromSpecEvent_SandboxStarted { + if x, ok := x.GetEvent().(*CreateSandboxFromSpecEvent_SandboxStarted_); ok { + return x.SandboxStarted + } + return nil +} + +func (x *CreateSandboxFromSpecEvent) GetHookEvent() *CreateSandboxFromSpecEvent_HookEvent { + if x, ok := x.GetEvent().(*CreateSandboxFromSpecEvent_HookEvent_); ok { + return x.HookEvent + } + return nil +} + +func (x *CreateSandboxFromSpecEvent) GetDone() *CreateSandboxFromSpecEvent_Done { + if x, ok := x.GetEvent().(*CreateSandboxFromSpecEvent_Done_); ok { + return x.Done + } + return nil +} + +func (x *CreateSandboxFromSpecEvent) GetError() *CreateSandboxFromSpecEvent_Error { + if x, ok := x.GetEvent().(*CreateSandboxFromSpecEvent_Error_); ok { + return x.Error + } + return nil +} + +type isCreateSandboxFromSpecEvent_Event interface { + isCreateSandboxFromSpecEvent_Event() +} + +type CreateSandboxFromSpecEvent_SandboxStarted_ struct { + SandboxStarted *CreateSandboxFromSpecEvent_SandboxStarted `protobuf:"bytes,1,opt,name=sandbox_started,json=sandboxStarted,proto3,oneof"` +} + +type CreateSandboxFromSpecEvent_HookEvent_ struct { + HookEvent *CreateSandboxFromSpecEvent_HookEvent `protobuf:"bytes,2,opt,name=hook_event,json=hookEvent,proto3,oneof"` +} + +type CreateSandboxFromSpecEvent_Done_ struct { + Done *CreateSandboxFromSpecEvent_Done `protobuf:"bytes,3,opt,name=done,proto3,oneof"` +} + +type CreateSandboxFromSpecEvent_Error_ struct { + Error *CreateSandboxFromSpecEvent_Error `protobuf:"bytes,4,opt,name=error,proto3,oneof"` +} + +func (*CreateSandboxFromSpecEvent_SandboxStarted_) isCreateSandboxFromSpecEvent_Event() {} + +func (*CreateSandboxFromSpecEvent_HookEvent_) isCreateSandboxFromSpecEvent_Event() {} + +func (*CreateSandboxFromSpecEvent_Done_) isCreateSandboxFromSpecEvent_Event() {} + +func (*CreateSandboxFromSpecEvent_Error_) isCreateSandboxFromSpecEvent_Event() {} + +type CreateSandboxFromSpecEvent_SandboxStarted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` +} + +func (x *CreateSandboxFromSpecEvent_SandboxStarted) Reset() { + *x = CreateSandboxFromSpecEvent_SandboxStarted{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxFromSpecEvent_SandboxStarted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxFromSpecEvent_SandboxStarted) ProtoMessage() {} + +func (x *CreateSandboxFromSpecEvent_SandboxStarted) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxFromSpecEvent_SandboxStarted.ProtoReflect.Descriptor instead. +func (*CreateSandboxFromSpecEvent_SandboxStarted) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *CreateSandboxFromSpecEvent_SandboxStarted) GetSandbox() *Sandbox { + if x != nil { + return x.Sandbox + } + return nil +} + +type CreateSandboxFromSpecEvent_HookEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stage HookStage `protobuf:"varint,1,opt,name=stage,proto3,enum=depot.sandbox.v1.HookStage" json:"stage,omitempty"` + HookName string `protobuf:"bytes,2,opt,name=hook_name,json=hookName,proto3" json:"hook_name,omitempty"` + Inner *SandboxCommandExecutionEvent `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` +} + +func (x *CreateSandboxFromSpecEvent_HookEvent) Reset() { + *x = CreateSandboxFromSpecEvent_HookEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxFromSpecEvent_HookEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxFromSpecEvent_HookEvent) ProtoMessage() {} + +func (x *CreateSandboxFromSpecEvent_HookEvent) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxFromSpecEvent_HookEvent.ProtoReflect.Descriptor instead. +func (*CreateSandboxFromSpecEvent_HookEvent) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *CreateSandboxFromSpecEvent_HookEvent) GetStage() HookStage { + if x != nil { + return x.Stage + } + return HookStage_HOOK_STAGE_UNSPECIFIED +} + +func (x *CreateSandboxFromSpecEvent_HookEvent) GetHookName() string { + if x != nil { + return x.HookName + } + return "" +} + +func (x *CreateSandboxFromSpecEvent_HookEvent) GetInner() *SandboxCommandExecutionEvent { + if x != nil { + return x.Inner + } + return nil +} + +type CreateSandboxFromSpecEvent_Done struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` +} + +func (x *CreateSandboxFromSpecEvent_Done) Reset() { + *x = CreateSandboxFromSpecEvent_Done{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxFromSpecEvent_Done) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxFromSpecEvent_Done) ProtoMessage() {} + +func (x *CreateSandboxFromSpecEvent_Done) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxFromSpecEvent_Done.ProtoReflect.Descriptor instead. +func (*CreateSandboxFromSpecEvent_Done) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *CreateSandboxFromSpecEvent_Done) GetSandbox() *Sandbox { + if x != nil { + return x.Sandbox + } + return nil +} + +type CreateSandboxFromSpecEvent_Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` + Stage CreateSandboxFromSpecEvent_Error_Stage `protobuf:"varint,2,opt,name=stage,proto3,enum=depot.sandbox.v1.CreateSandboxFromSpecEvent_Error_Stage" json:"stage,omitempty"` +} + +func (x *CreateSandboxFromSpecEvent_Error) Reset() { + *x = CreateSandboxFromSpecEvent_Error{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSandboxFromSpecEvent_Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSandboxFromSpecEvent_Error) ProtoMessage() {} + +func (x *CreateSandboxFromSpecEvent_Error) ProtoReflect() protoreflect.Message { + mi := &file_depot_sandbox_v1_spec_rpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSandboxFromSpecEvent_Error.ProtoReflect.Descriptor instead. +func (*CreateSandboxFromSpecEvent_Error) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{1, 3} +} + +func (x *CreateSandboxFromSpecEvent_Error) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *CreateSandboxFromSpecEvent_Error) GetStage() CreateSandboxFromSpecEvent_Error_Stage { + if x != nil { + return x.Stage + } + return CreateSandboxFromSpecEvent_Error_STAGE_UNSPECIFIED +} + +var File_depot_sandbox_v1_spec_rpc_proto protoreflect.FileDescriptor + +var file_depot_sandbox_v1_spec_rpc_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x02, + 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x46, + 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x08, 0x73, 0x70, 0x65, 0x63, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x42, 0x0a, + 0x0c, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x70, + 0x65, 0x63, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x52, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x94, 0x07, 0x0a, 0x1a, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, + 0x65, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x0f, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x0e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, + 0x57, 0x0a, 0x0a, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x68, + 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x6f, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x04, 0x64, 0x6f, 0x6e, + 0x65, 0x12, 0x4a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x45, 0x0a, + 0x0e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, + 0x33, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x1a, 0xa1, 0x01, 0x0a, 0x09, 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x04, 0x44, 0x6f, 0x6e, 0x65, + 0x12, 0x33, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x1a, 0xee, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x22, 0x7d, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x47, 0x45, + 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x47, + 0x45, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, + 0x47, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, + 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x04, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x48, 0x4f, 0x4f, 0x4b, 0x53, 0x5f, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x45, 0x10, 0x05, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x32, + 0x8d, 0x01, 0x0a, 0x12, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x70, 0x65, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x2e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x42, + 0xc1, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x70, 0x65, 0x63, 0x52, 0x70, + 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x44, + 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_sandbox_v1_spec_rpc_proto_rawDescOnce sync.Once + file_depot_sandbox_v1_spec_rpc_proto_rawDescData = file_depot_sandbox_v1_spec_rpc_proto_rawDesc +) + +func file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP() []byte { + file_depot_sandbox_v1_spec_rpc_proto_rawDescOnce.Do(func() { + file_depot_sandbox_v1_spec_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_sandbox_v1_spec_rpc_proto_rawDescData) + }) + return file_depot_sandbox_v1_spec_rpc_proto_rawDescData +} + +var file_depot_sandbox_v1_spec_rpc_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_depot_sandbox_v1_spec_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_depot_sandbox_v1_spec_rpc_proto_goTypes = []interface{}{ + (CreateSandboxFromSpecEvent_Error_Stage)(0), // 0: depot.sandbox.v1.CreateSandboxFromSpecEvent.Error.Stage + (*CreateSandboxFromSpecRequest)(nil), // 1: depot.sandbox.v1.CreateSandboxFromSpecRequest + (*CreateSandboxFromSpecEvent)(nil), // 2: depot.sandbox.v1.CreateSandboxFromSpecEvent + nil, // 3: depot.sandbox.v1.CreateSandboxFromSpecRequest.InputsEntry + (*CreateSandboxFromSpecEvent_SandboxStarted)(nil), // 4: depot.sandbox.v1.CreateSandboxFromSpecEvent.SandboxStarted + (*CreateSandboxFromSpecEvent_HookEvent)(nil), // 5: depot.sandbox.v1.CreateSandboxFromSpecEvent.HookEvent + (*CreateSandboxFromSpecEvent_Done)(nil), // 6: depot.sandbox.v1.CreateSandboxFromSpecEvent.Done + (*CreateSandboxFromSpecEvent_Error)(nil), // 7: depot.sandbox.v1.CreateSandboxFromSpecEvent.Error + (*SandboxSpec)(nil), // 8: depot.sandbox.v1.SandboxSpec + (*Sandbox)(nil), // 9: depot.sandbox.v1.Sandbox + (HookStage)(0), // 10: depot.sandbox.v1.HookStage + (*SandboxCommandExecutionEvent)(nil), // 11: depot.sandbox.v1.SandboxCommandExecutionEvent +} +var file_depot_sandbox_v1_spec_rpc_proto_depIdxs = []int32{ + 8, // 0: depot.sandbox.v1.CreateSandboxFromSpecRequest.sandbox_spec:type_name -> depot.sandbox.v1.SandboxSpec + 3, // 1: depot.sandbox.v1.CreateSandboxFromSpecRequest.inputs:type_name -> depot.sandbox.v1.CreateSandboxFromSpecRequest.InputsEntry + 4, // 2: depot.sandbox.v1.CreateSandboxFromSpecEvent.sandbox_started:type_name -> depot.sandbox.v1.CreateSandboxFromSpecEvent.SandboxStarted + 5, // 3: depot.sandbox.v1.CreateSandboxFromSpecEvent.hook_event:type_name -> depot.sandbox.v1.CreateSandboxFromSpecEvent.HookEvent + 6, // 4: depot.sandbox.v1.CreateSandboxFromSpecEvent.done:type_name -> depot.sandbox.v1.CreateSandboxFromSpecEvent.Done + 7, // 5: depot.sandbox.v1.CreateSandboxFromSpecEvent.error:type_name -> depot.sandbox.v1.CreateSandboxFromSpecEvent.Error + 9, // 6: depot.sandbox.v1.CreateSandboxFromSpecEvent.SandboxStarted.sandbox:type_name -> depot.sandbox.v1.Sandbox + 10, // 7: depot.sandbox.v1.CreateSandboxFromSpecEvent.HookEvent.stage:type_name -> depot.sandbox.v1.HookStage + 11, // 8: depot.sandbox.v1.CreateSandboxFromSpecEvent.HookEvent.inner:type_name -> depot.sandbox.v1.SandboxCommandExecutionEvent + 9, // 9: depot.sandbox.v1.CreateSandboxFromSpecEvent.Done.sandbox:type_name -> depot.sandbox.v1.Sandbox + 0, // 10: depot.sandbox.v1.CreateSandboxFromSpecEvent.Error.stage:type_name -> depot.sandbox.v1.CreateSandboxFromSpecEvent.Error.Stage + 1, // 11: depot.sandbox.v1.SandboxSpecService.CreateSandboxFromSpec:input_type -> depot.sandbox.v1.CreateSandboxFromSpecRequest + 2, // 12: depot.sandbox.v1.SandboxSpecService.CreateSandboxFromSpec:output_type -> depot.sandbox.v1.CreateSandboxFromSpecEvent + 12, // [12:13] is the sub-list for method output_type + 11, // [11:12] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_depot_sandbox_v1_spec_rpc_proto_init() } +func file_depot_sandbox_v1_spec_rpc_proto_init() { + if File_depot_sandbox_v1_spec_rpc_proto != nil { + return + } + file_depot_sandbox_v1_command_proto_init() + file_depot_sandbox_v1_hook_proto_init() + file_depot_sandbox_v1_sandbox_proto_init() + file_depot_sandbox_v1_spec_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxFromSpecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxFromSpecEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxFromSpecEvent_SandboxStarted); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxFromSpecEvent_HookEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxFromSpecEvent_Done); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxFromSpecEvent_Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*CreateSandboxFromSpecRequest_SpecYaml)(nil), + (*CreateSandboxFromSpecRequest_SandboxSpec)(nil), + } + file_depot_sandbox_v1_spec_rpc_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*CreateSandboxFromSpecEvent_SandboxStarted_)(nil), + (*CreateSandboxFromSpecEvent_HookEvent_)(nil), + (*CreateSandboxFromSpecEvent_Done_)(nil), + (*CreateSandboxFromSpecEvent_Error_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_sandbox_v1_spec_rpc_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_depot_sandbox_v1_spec_rpc_proto_goTypes, + DependencyIndexes: file_depot_sandbox_v1_spec_rpc_proto_depIdxs, + EnumInfos: file_depot_sandbox_v1_spec_rpc_proto_enumTypes, + MessageInfos: file_depot_sandbox_v1_spec_rpc_proto_msgTypes, + }.Build() + File_depot_sandbox_v1_spec_rpc_proto = out.File + file_depot_sandbox_v1_spec_rpc_proto_rawDesc = nil + file_depot_sandbox_v1_spec_rpc_proto_goTypes = nil + file_depot_sandbox_v1_spec_rpc_proto_depIdxs = nil +} diff --git a/pkg/pty/resize_unix.go b/pkg/pty/resize_unix.go index 40acc92b..67d26f07 100644 --- a/pkg/pty/resize_unix.go +++ b/pkg/pty/resize_unix.go @@ -12,8 +12,8 @@ import ( "golang.org/x/term" ) -// watchTerminalResize listens for SIGWINCH and sends resize messages via sendCh. -// Stops when ctx is cancelled. Returns a cleanup function to stop watching. +// watchTerminalResize listens for SIGWINCH and sends civ1 resize messages +// via sendCh (legacy CI bastion PTY path). func watchTerminalResize( ctx context.Context, fd int, diff --git a/pkg/pty/session.go b/pkg/pty/session.go index 553d77ab..8a5e683f 100644 --- a/pkg/pty/session.go +++ b/pkg/pty/session.go @@ -15,6 +15,11 @@ import ( ) // SessionOptions configures an interactive PTY session. +// +// Two wires share this struct: +// - pty.Run (legacy): civ1.DepotComputeService.OpenPtySession — the CI +// bastion path used by `depot run --ssh` / `depot ssh`. Carries +// SessionID + SandboxID. type SessionOptions struct { Token string OrgID string // sent as x-depot-org header for multi-org users @@ -24,9 +29,9 @@ type SessionOptions struct { Env map[string]string } -// Run opens an interactive PTY session to the given sandbox. -// It puts the terminal in raw mode, forwards stdin/stdout, handles resize, -// and blocks until the session exits or ctx is cancelled. +// Run opens an interactive PTY session against the legacy CI bastion wire +// (civ1.DepotComputeService.OpenPtySession). Consumed by `depot run --ssh` +// and `depot ssh`. func Run(ctx context.Context, opts SessionOptions) error { fd := int(os.Stdin.Fd()) rows, cols := 24, 80 //nolint:mnd @@ -91,7 +96,6 @@ func Run(ctx context.Context, opts SessionOptions) error { stopResize := watchTerminalResize(ctx, fd, sendCh) defer stopResize() - // Forward stdin to the stream. go func() { buf := make([]byte, 4096) //nolint:mnd for { @@ -113,7 +117,6 @@ func Run(ctx context.Context, opts SessionOptions) error { } }() - // Read stdout and exit code from the stream. for { resp, err := stream.Receive() if err != nil { @@ -124,7 +127,7 @@ func Run(ctx context.Context, opts SessionOptions) error { } switch m := resp.GetMessage().(type) { case *civ1.OpenPtySessionResponse_Stdout: - os.Stdout.Write(m.Stdout) //nolint:errcheck + _, _ = os.Stdout.Write(m.Stdout) case *civ1.OpenPtySessionResponse_ExitCode: fmt.Fprintf(os.Stderr, "\r\n[exit %d]\r\n", m.ExitCode) if m.ExitCode != 0 { diff --git a/pkg/sandbox/spec.go b/pkg/sandbox/spec.go new file mode 100644 index 00000000..ca1c65e9 --- /dev/null +++ b/pkg/sandbox/spec.go @@ -0,0 +1,245 @@ +// Package sandbox parses the trusted sandbox.depot.yml hook subset consumed by +// sandbox CLI commands. +package sandbox + +import ( + "fmt" + "os" + "regexp" + "strings" + + "gopkg.in/yaml.v3" +) + +const maxHookTimeoutSeconds = 1<<31 - 1 + +// Spec is the supported local hook subset of sandbox.depot.yml. +type Spec struct { + On HooksSpec `yaml:"on,omitempty"` +} + +// HooksSpec groups the currently supported lifecycle hook stages. +type HooksSpec struct { + Exec []HookSpec `yaml:"exec,omitempty"` + Down []HookSpec `yaml:"down,omitempty"` +} + +// HookSpec is one entry in any On.* list. Command is the shell string sent to +// the sandbox RunHook RPC. +// +// HookSpec accepts either object form (`{command: "...", detach: true}`) or +// bare-string shorthand (`- "echo hi"`); the latter is sugar for +// `{command: "echo hi"}`. See UnmarshalYAML. +type HookSpec struct { + // Command is the shell line to execute. Required. + Command string `yaml:"command"` + // Detach=true asks RunHook to spawn the hook in the background. + Detach bool `yaml:"detach,omitempty"` + // Name is an optional label used for log filenames and CLI output. If + // omitted, the CLI substitutes the hook's index. + Name string `yaml:"name,omitempty"` + // TimeoutSeconds bounds foreground hook execution. Zero means no timeout. + TimeoutSeconds int `yaml:"timeout_seconds,omitempty"` +} + +// UnmarshalYAML lets HookSpec accept either: +// +// - echo hello # bare string +// - command: echo hello # object +// detach: true +func (h *HookSpec) UnmarshalYAML(node *yaml.Node) error { + if node.Kind == yaml.ScalarNode { + h.Command = node.Value + return nil + } + type rawHook HookSpec + var raw rawHook + if err := node.Decode(&raw); err != nil { + return err + } + *h = HookSpec(raw) + return nil +} + +// Load reads a spec from an explicit path. +func Load(path string) (*Spec, error) { + data, err := os.ReadFile(path) + if err != nil { + return nil, fmt.Errorf("read %s: %w", path, err) + } + var s Spec + if err := yaml.Unmarshal(data, &s); err != nil { + return nil, fmt.Errorf("parse %s: %w", path, err) + } + return &s, nil +} + +// inputRefRe matches ${input.foo} (required) or ${input.foo?} +// (optional — substitutes "" if the input is missing). +var inputRefRe = regexp.MustCompile(`\$\{input\.([A-Za-z_][A-Za-z0-9_]*)(\?)?\}`) + +// substitute replaces ${input.foo} occurrences with shell-quoted values from +// inputs. An unknown reference returns an error unless the trailing `?` makes +// it optional (then the substitution is the empty string). +func substitute(s string, inputs map[string]string) (string, error) { + var missing []string + var quoted []string + var out strings.Builder + last := 0 + for _, loc := range inputRefRe.FindAllStringIndex(s, -1) { + start, end := loc[0], loc[1] + out.WriteString(s[last:start]) + match := s[start:end] + groups := inputRefRe.FindStringSubmatch(match) + key := groups[1] + optional := groups[2] == "?" + if context := shellQuoteContext(s[:start]); context != "" { + quoted = append(quoted, fmt.Sprintf("%s in %s quotes", match, context)) + out.WriteString(match) + last = end + continue + } + v, ok := inputs[key] + if !ok { + if optional { + last = end + continue + } + missing = append(missing, key) + out.WriteString(match) + last = end + continue + } + out.WriteString(shellQuote(v)) + last = end + } + out.WriteString(s[last:]) + if len(quoted) > 0 { + return "", fmt.Errorf("input placeholder(s) cannot be used inside shell quotes: %s", strings.Join(quoted, ", ")) + } + if len(missing) > 0 { + return "", fmt.Errorf("missing input(s): %s", strings.Join(missing, ", ")) + } + return out.String(), nil +} + +func shellQuote(s string) string { + if s == "" { + return "''" + } + return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'" +} + +func shellQuoteContext(prefix string) string { + var quote rune + escaped := false + for _, r := range prefix { + if escaped { + escaped = false + continue + } + switch quote { + case 0: + switch r { + case '\\': + escaped = true + case '\'': + quote = '\'' + case '"': + quote = '"' + } + case '\'': + if r == '\'' { + quote = 0 + } + case '"': + switch r { + case '\\': + escaped = true + case '"': + quote = 0 + } + } + } + switch quote { + case '\'': + return "single" + case '"': + return "double" + default: + return "" + } +} + +// ResolveHooks returns the spec's hook stages with ${input.KEY} substitution +// applied to each command. The lifecycle is the caller's responsibility — +// see hooks.go in the cmd/sandbox package for how each stage is fired. +func (s *Spec) ResolveHooks(inputs map[string]string) (HooksSpec, error) { + if inputs == nil { + inputs = map[string]string{} + } + out := HooksSpec{} + type stage struct { + label string + src []HookSpec + dst *[]HookSpec + } + for _, st := range []stage{ + {"on.exec", s.On.Exec, &out.Exec}, + {"on.down", s.On.Down, &out.Down}, + } { + resolved, err := resolveHookList(st.src, st.label, inputs) + if err != nil { + return HooksSpec{}, err + } + *st.dst = resolved + } + return out, nil +} + +// ResolveHookStage returns one hook stage with ${input.KEY} substitution +// applied to each command. +func (s *Spec) ResolveHookStage(label string, hooks []HookSpec, inputs map[string]string) ([]HookSpec, error) { + if inputs == nil { + inputs = map[string]string{} + } + return resolveHookList(hooks, label, inputs) +} + +func resolveHookList(hooks []HookSpec, label string, inputs map[string]string) ([]HookSpec, error) { + if len(hooks) == 0 { + return nil, nil + } + out := make([]HookSpec, len(hooks)) + for i, h := range hooks { + if strings.TrimSpace(h.Command) == "" { + return nil, fmt.Errorf("%s[%d]: command is required", label, i) + } + if h.TimeoutSeconds < 0 { + return nil, fmt.Errorf("%s[%d].timeout_seconds: must be non-negative", label, i) + } + if h.TimeoutSeconds > maxHookTimeoutSeconds { + return nil, fmt.Errorf("%s[%d].timeout_seconds: must be <= %d", label, i, maxHookTimeoutSeconds) + } + cmd, err := substitute(h.Command, inputs) + if err != nil { + return nil, fmt.Errorf("%s[%d].command: %w", label, i, err) + } + h.Command = cmd + out[i] = h + } + return out, nil +} + +// ParseInputs converts a slice of "key=value" strings into a map. +func ParseInputs(pairs []string) (map[string]string, error) { + out := make(map[string]string, len(pairs)) + for _, p := range pairs { + k, v, ok := strings.Cut(p, "=") + if !ok { + return nil, fmt.Errorf("invalid --set %q, expected KEY=VALUE", p) + } + out[k] = v + } + return out, nil +} diff --git a/pkg/sandbox/spec_test.go b/pkg/sandbox/spec_test.go new file mode 100644 index 00000000..8e7e9df3 --- /dev/null +++ b/pkg/sandbox/spec_test.go @@ -0,0 +1,99 @@ +package sandbox + +import ( + "strings" + "testing" +) + +func TestResolveHooksShellQuotesInputs(t *testing.T) { + spec := &Spec{ + On: HooksSpec{ + Exec: []HookSpec{{Command: "echo ${input.value}"}}, + }, + } + + hooks, err := spec.ResolveHooks(map[string]string{ + "value": "hello; touch /tmp/pwned", + }) + if err != nil { + t.Fatalf("ResolveHooks returned error: %v", err) + } + + got := hooks.Exec[0].Command + want := "echo 'hello; touch /tmp/pwned'" + if got != want { + t.Fatalf("resolved command = %q, want %q", got, want) + } +} + +func TestResolveHooksEscapesSingleQuotes(t *testing.T) { + spec := &Spec{ + On: HooksSpec{ + Exec: []HookSpec{{Command: "printf %s ${input.value}"}}, + }, + } + + hooks, err := spec.ResolveHooks(map[string]string{ + "value": "can't", + }) + if err != nil { + t.Fatalf("ResolveHooks returned error: %v", err) + } + + got := hooks.Exec[0].Command + want := "printf %s 'can'\\''t'" + if got != want { + t.Fatalf("resolved command = %q, want %q", got, want) + } +} + +func TestResolveHooksRejectsQuotedInputPlaceholders(t *testing.T) { + for _, command := range []string{ + "echo '${input.value}'", + "echo \"${input.value}\"", + } { + t.Run(command, func(t *testing.T) { + spec := &Spec{ + On: HooksSpec{ + Exec: []HookSpec{{Command: command}}, + }, + } + + _, err := spec.ResolveHooks(map[string]string{ + "value": "attacker; touch /tmp/pwned", + }) + if err == nil { + t.Fatal("expected quoted placeholder to fail") + } + if !strings.Contains(err.Error(), "inside shell quotes") { + t.Fatalf("error = %q, want inside shell quotes", err) + } + }) + } +} + +func TestResolveHooksRejectsInvalidTimeoutSeconds(t *testing.T) { + for name, timeout := range map[string]int{ + "negative": -1, + "too-large": maxHookTimeoutSeconds + 1, + } { + t.Run(name, func(t *testing.T) { + spec := &Spec{ + On: HooksSpec{ + Exec: []HookSpec{{ + Command: "true", + TimeoutSeconds: timeout, + }}, + }, + } + + _, err := spec.ResolveHooks(nil) + if err == nil { + t.Fatal("expected invalid timeout_seconds to fail") + } + if !strings.Contains(err.Error(), "timeout_seconds") { + t.Fatalf("error = %q, want timeout_seconds", err) + } + }) + } +} diff --git a/proto/depot/agent/v1/sandbox.proto b/proto/depot/agent/v1/sandbox.proto index 180d00f2..66363ae1 100644 --- a/proto/depot/agent/v1/sandbox.proto +++ b/proto/depot/agent/v1/sandbox.proto @@ -15,7 +15,7 @@ service SandboxService { rpc AddSecret(AddSecretRequest) returns (AddSecretResponse); rpc RemoveSecret(RemoveSecretRequest) returns (RemoveSecretResponse); rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse); - + // Shutdown is called from within the sandbox to gracefully terminate rpc Shutdown(ShutdownRequest) returns (ShutdownResponse); } diff --git a/proto/depot/ci/v1/api.proto b/proto/depot/ci/v1/api.proto index 1ed42c86..802ed4dc 100644 --- a/proto/depot/ci/v1/api.proto +++ b/proto/depot/ci/v1/api.proto @@ -67,6 +67,10 @@ message Command { } // ExecuteCommandResponse returns the command execution results. +// +// Legacy line-framed rail (oneof) and binary-safe raw rail (flat fields) +// are populated on the same message when applicable. Old clients switch +// on the oneof variant; new clients concatenate the raw fields. message ExecuteCommandResponse { oneof message { string stdout = 1; diff --git a/proto/depot/sandbox/v1/command.proto b/proto/depot/sandbox/v1/command.proto new file mode 100644 index 00000000..799d0717 --- /dev/null +++ b/proto/depot/sandbox/v1/command.proto @@ -0,0 +1,236 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; +import "google/protobuf/timestamp.proto"; + +// Service surface for running and inspecting commands inside a sandbox. It +// covers starting a command and streaming its output, feeding it input over a +// pipe, looking up and listing past commands, reattaching to a running or +// finished command's output, and signaling a command to stop. +// +// Command output travels on the wire as raw bytes rather than strings, because +// process output is not guaranteed to be valid UTF-8. Clients decode it +// themselves. + +// Lifecycle stages a command moves through. The status reflects where the +// command is in its lifecycle and is independent of the process exit code. +// +// PENDING: accepted but not yet started inside the sandbox. +// RUNNING: started and may be producing output. +// FINISHED: the process exited; exit_code is populated. +// FAILED: the process never started, or the sandbox reported an error. +// KILLED: the command was signaled to stop while running. +enum SandboxCommandExecutionStatus { + SANDBOX_COMMAND_EXECUTION_STATUS_UNSPECIFIED = 0; + SANDBOX_COMMAND_EXECUTION_STATUS_PENDING = 1; + SANDBOX_COMMAND_EXECUTION_STATUS_RUNNING = 2; + SANDBOX_COMMAND_EXECUTION_STATUS_FINISHED = 3; + SANDBOX_COMMAND_EXECUTION_STATUS_FAILED = 4; + SANDBOX_COMMAND_EXECUTION_STATUS_KILLED = 5; +} + +// Metadata describing a single command that was run in a sandbox. Returned by +// the lookup, list, and attach calls. +message SandboxCommandExecution { + // Unique command identifier assigned by the server. + string cmd_id = 1; + // Identifier of the sandbox the command ran in. + string sandbox_id = 2; + // The program that was executed. + string cmd = 3; + // Arguments passed to the program. + repeated string args = 4; + // Working directory the command ran in, if one was specified. + optional string cwd = 5; + // Environment variables that were set for the command. + map env = 6; + // Whether the command ran with elevated privileges. + bool sudo = 7; + // Whether the command was requested to run detached from the output stream. + bool detached = 8; + // Current lifecycle stage of the command. + SandboxCommandExecutionStatus status = 9; + // When the command started running. + google.protobuf.Timestamp started_at = 10; + // When the command finished, once it has exited. + optional google.protobuf.Timestamp finished_at = 11; + // Exit code of the process, once it has exited. + optional int32 exit_code = 12; + // Total number of bytes emitted on stdout so far. + int64 stdout_bytes_emitted = 13; + // Total number of bytes emitted on stderr so far. + int64 stderr_bytes_emitted = 14; +} + +// A single event in a command's output stream. Output data is carried as raw +// bytes, which clients decode themselves. The stream normally begins with a +// Started event, carries interleaved stdout and stderr chunks, and ends with a +// Finished event. +message SandboxCommandExecutionEvent { + oneof event { + Started started = 1; + StdoutBytes stdout = 2; + StderrBytes stderr = 3; + Finished finished = 4; + Error error = 5; + EvictedEarlyData evicted = 6; + } + + // Emitted once when the command begins running. + message Started { + // Identifier of the command that started. + string cmd_id = 1; + // When the command started running. + google.protobuf.Timestamp started_at = 2; + } + // A chunk of standard output. + message StdoutBytes { + // The raw output bytes in this chunk. + bytes data = 1; + // Cumulative number of stdout bytes through the end of this chunk. + int64 byte_offset = 2; + // When this chunk was produced. + google.protobuf.Timestamp timestamp = 3; + } + // A chunk of standard error. + message StderrBytes { + // The raw output bytes in this chunk. + bytes data = 1; + // Cumulative number of stderr bytes through the end of this chunk. + int64 byte_offset = 2; + // When this chunk was produced. + google.protobuf.Timestamp timestamp = 3; + } + // Emitted once when the command exits. + message Finished { + // The process exit code. + int32 exit_code = 1; + // When the command finished. + google.protobuf.Timestamp finished_at = 2; + } + // Reports a problem with the output stream while it remains open, for example + // a dropped chunk when more output is still expected. Most failures are + // surfaced as transport-level errors instead; this event is for partial + // problems where the stream continues. + message Error { + // A human-readable description of the problem. + string reason = 1; + } + // Reports that some early output was discarded before this consumer began + // reading, which can happen when reattaching to a command whose buffered + // output had already rolled over. The counts let the consumer understand how + // much output is missing. + message EvictedEarlyData { + // Number of stdout bytes that were dropped. + int64 dropped_bytes_stdout = 1; + // Number of stderr bytes that were dropped. + int64 dropped_bytes_stderr = 2; + } +} + +// Request to run a command in a sandbox. The response is a stream of output +// events that begins with Started and ends with Finished, or terminates with a +// transport-level error. +message RunCommandRequest { + // The sandbox to run the command in. + SandboxRef sandbox = 1; + // The program to execute. + string cmd = 2; + // Arguments to pass to the program. + repeated string args = 3; + // Working directory to run the command in. Defaults to the sandbox default. + optional string cwd = 4; + // Environment variables for the command. These are merged on top of the + // sandbox environment, and values given here take precedence on conflict. + map env = 5; + // Run the command with elevated privileges. + optional bool sudo = 6; + // Reserved for running a command detached from the output stream. Detached + // mode is not yet supported and requests that set it are rejected. + optional bool detached = 7; +} + +// A message on the bidirectional pipe stream used to run a command while +// feeding it standard input. The first message on the stream must carry init, +// which describes the command to run, using the same fields as RunCommand. +// Every later message carries a chunk of stdin bytes, and closing the request +// stream signals end of input. The response is the same output event stream +// that RunCommand produces. Input bytes are not retained, so reattaching to a +// command shows only its output, not the input it was given. +message RunCommandPipeRequest { + oneof input { + // Describes the command to run. Required as the first message. + RunCommandRequest init = 1; + // A chunk of bytes to write to the command's standard input. + bytes stdin = 2; + } +} + +// Response containing the metadata for a single command looked up by its id. +message GetCommandResponse { + // The command's metadata. + SandboxCommandExecution command = 1; +} + +// Request to list the commands run in a sandbox, ordered newest first and +// returned a page at a time. +message ListCommandsRequest { + // The sandbox whose commands to list. + SandboxRef sandbox = 1; + // Maximum number of commands to return in one page. + optional int32 page_size = 2; + // Opaque token from a previous response used to fetch the next page. Pass it + // back unchanged. + optional string page_token = 3; + // If non-empty, only commands whose status appears in this set are returned. + // Unspecified entries are ignored. + repeated SandboxCommandExecutionStatus status_filter = 4; +} +// A page of command metadata. +message ListCommandsResponse { + // The commands in this page. + repeated SandboxCommandExecution commands = 1; + // Token to pass on a later request to fetch the next page, absent when there + // are no more results. + optional string next_page_token = 2; +} + +// Request to reattach to the output of a command that was already started. The +// response is the same output event stream the run calls produce: a replay of +// the command's stored output, followed by live output if the command is still +// running. +message AttachCommandRequest { + // The command to reattach to. + SandboxCommandExecutionRef command = 1; + // Optional starting point for the replay. When set, only output past the + // given offsets is replayed, which lets a caller resume without seeing output + // it already received. + optional AttachOffset since_offset = 2; +} +// Per-stream starting offsets for an attach replay. Each offset is compared +// against the cumulative end-of-chunk byte count, so only events strictly past +// the given offset are replayed. An unset offset defaults to zero, replaying +// that stream from the beginning. +message AttachOffset { + // Replay only stdout past this cumulative byte offset. + optional int64 stdout_offset = 1; + // Replay only stderr past this cumulative byte offset. + optional int64 stderr_offset = 2; +} + +// Request to signal a running command identified by its id. An unknown signal +// name is rejected with an invalid-argument error, and a command that is no +// longer running (already finished or never registered) is reported as not +// found. +message KillCommandRequest { + // Identifier of the command to signal. + string cmd_id = 1; + // Signal to send, such as "SIGTERM" or "SIGINT". Defaults to SIGTERM when + // omitted. SIGKILL is not supported and is rejected with an invalid-argument + // error. + optional string signal = 2; +} +// Empty response returned when a command is successfully signaled. +message KillCommandResponse {} diff --git a/proto/depot/sandbox/v1/filesystem.proto b/proto/depot/sandbox/v1/filesystem.proto new file mode 100644 index 00000000..429cca0c --- /dev/null +++ b/proto/depot/sandbox/v1/filesystem.proto @@ -0,0 +1,222 @@ +// File system operations against a sandbox. +// +// The server may back these operations with different implementations, but the +// message surface is the same regardless of which one is active. +// +// Errors are returned as Connect errors with a FileSystemErrorDetail attached. +// The SDK converts that detail into a Node-style Error carrying code, syscall, +// path, and errno, so callers can keep writing code against the shape of +// node:fs/promises. +// +// The RPCs themselves are declared on the sandbox service; this file only +// defines the messages and enums they use. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; + +// Mirrors the Node fs error codes the SDK exposes. The server attaches one of +// these to a Connect error, and the client maps it to Error.code. +// +// OTHER is the catch-all used when the server cannot classify the failure into +// a specific Node code. Callers still receive a FileSystemError with the +// syscall and path context, just with a generic code. +enum FileSystemErrorCode { + FILESYSTEM_ERROR_CODE_UNSPECIFIED = 0; + FILESYSTEM_ERROR_CODE_ENOENT = 1; + FILESYSTEM_ERROR_CODE_EEXIST = 2; + FILESYSTEM_ERROR_CODE_EACCES = 3; + FILESYSTEM_ERROR_CODE_EISDIR = 4; + FILESYSTEM_ERROR_CODE_ENOTDIR = 5; + FILESYSTEM_ERROR_CODE_ENOTEMPTY = 6; + FILESYSTEM_ERROR_CODE_EROFS = 7; + FILESYSTEM_ERROR_CODE_EBADF = 8; + FILESYSTEM_ERROR_CODE_EIO = 9; + FILESYSTEM_ERROR_CODE_EINVAL = 10; + FILESYSTEM_ERROR_CODE_ENAMETOOLONG = 11; + FILESYSTEM_ERROR_CODE_ELOOP = 12; + FILESYSTEM_ERROR_CODE_OTHER = 99; +} + +// The error detail the server attaches to a Connect error's details. The SDK +// reads it back and uses it to build a Node-style FileSystemError. +message FileSystemErrorDetail { + FileSystemErrorCode code = 1; + string syscall = 2; + string path = 3; + optional string message = 4; +} + +// The kind of file returned by Stat. The SDK uses it to back the isDirectory, +// isFile, and similar checks on a node:fs/promises-style Stats object. +enum FileType { + FILE_TYPE_UNSPECIFIED = 0; + FILE_TYPE_FILE = 1; + FILE_TYPE_DIRECTORY = 2; + FILE_TYPE_SYMLINK = 3; + FILE_TYPE_BLOCK_DEVICE = 4; + FILE_TYPE_CHARACTER_DEVICE = 5; + FILE_TYPE_FIFO = 6; + FILE_TYPE_SOCKET = 7; +} + +// Messages for the unary file system RPCs. + +message MkdirRequest { + SandboxRef sandbox = 1; + string path = 2; + // When true, create parent directories as needed (mkdir -p). When false (the + // default), a missing parent directory fails with ENOENT. + optional bool recursive = 3; + // Octal permission mode for the new directory. When unset, the server applies + // its umask. + optional uint32 mode = 4; +} +message MkdirResponse {} + +message StatRequest { + SandboxRef sandbox = 1; + string path = 2; + // When true (the default), follow symlinks like stat. When false, report on + // the link itself like lstat. + optional bool follow_symlinks = 3; +} +message StatResponse { + string path = 1; + int64 size = 2; + uint32 mode = 3; + FileType type = 4; + string uname = 5; + string gname = 6; + int64 mtime_unix_seconds = 7; +} + +message ReadDirRequest { + SandboxRef sandbox = 1; + string path = 2; + // Matches the withFileTypes option of node:fs/promises readdir. The response + // entries always carry name and type; when this is false the SDK exposes them + // as a plain array of names instead. + optional bool with_file_types = 3; +} +message ReadDirResponse { + repeated DirEntry entries = 1; +} +message DirEntry { + string name = 1; + FileType type = 2; +} + +message RemoveRequest { + SandboxRef sandbox = 1; + string path = 2; + // When true, remove directories and their contents recursively (rm -rf). + optional bool recursive = 3; + // When true, removing a path that does not exist succeeds instead of failing + // with ENOENT, matching the force option of node fs.rm. + optional bool ignore_missing = 4; +} +message RemoveResponse {} + +message RenameRequest { + SandboxRef sandbox = 1; + string from_path = 2; + string to_path = 3; +} +message RenameResponse {} + +message CopyFileRequest { + SandboxRef sandbox = 1; + string from_path = 2; + string to_path = 3; + // When true, preserve the file's mode, owner, and timestamps where the server + // can (cp -p). + optional bool preserve_metadata = 4; +} +message CopyFileResponse {} + +message TruncateRequest { + SandboxRef sandbox = 1; + string path = 2; + int64 size = 3; +} +message TruncateResponse {} + +message ChmodRequest { + SandboxRef sandbox = 1; + string path = 2; + // The new permission mode as an octal integer. The SDK accepts either a + // string ("755") or a number (0o755) and converts it. + uint32 mode = 3; +} +message ChmodResponse {} + +message ChownRequest { + SandboxRef sandbox = 1; + string path = 2; + optional uint32 uid = 3; + optional uint32 gid = 4; +} +message ChownResponse {} + +message SymlinkRequest { + SandboxRef sandbox = 1; + // Create link_path as a symlink pointing at target (ln -s target link_path). + string target = 2; + string link_path = 3; +} +message SymlinkResponse {} + +message ReadlinkRequest { + SandboxRef sandbox = 1; + string path = 2; +} +message ReadlinkResponse { + string target = 1; +} + +message AccessRequest { + SandboxRef sandbox = 1; + string path = 2; + // Bitmask of access checks to perform (F_OK, R_OK, W_OK, X_OK). When unset, + // the server checks for existence (F_OK). + optional uint32 mode = 3; +} +message AccessResponse {} + +// Messages for the streaming file system RPCs. + +message ReadFileRequest { + SandboxRef sandbox = 1; + string path = 2; +} + +// One chunk of a file streamed by ReadFile. Chunks arrive in order. The final +// chunk may carry eof = true; the stream closing also signals the end of file. +message FileChunk { + bytes data = 1; + optional bool eof = 2; +} + +// A message in the WriteFile request stream. The first message must carry init; +// every message after it carries data bytes. In init, append selects append +// semantics, and mode is applied if the file is created. +message WriteFileRequest { + oneof input { + Init init = 1; + bytes data = 2; + } + message Init { + SandboxRef sandbox = 1; + string path = 2; + optional uint32 mode = 3; + optional bool append = 4; + // When true, create the parent directories before opening the file. + optional bool create_directories = 5; + } +} +message WriteFileResponse { + int64 bytes_written = 1; +} diff --git a/proto/depot/sandbox/v1/hook.proto b/proto/depot/sandbox/v1/hook.proto new file mode 100644 index 00000000..6459a299 --- /dev/null +++ b/proto/depot/sandbox/v1/hook.proto @@ -0,0 +1,54 @@ +// Hook definitions and the request envelope for the RunHook RPC. +// +// This file holds the messages a hook needs: the value shapes (HookSpec and +// HookStage) that a sandbox spec uses to declare hooks, plus RunHookRequest, +// which the RunHook RPC takes. +// +// These messages live here rather than alongside the spec messages so that the +// service definition can import them without creating an import cycle. The +// service's proto imports this file for RunHookRequest, and the spec proto +// imports the service's proto for shared types, so the hook messages must sit +// in a file that does not depend on either of those. +// +// RunHook is reachable on the wire but is not exposed on the public SDK +// surface; it is invoked internally when a sandbox is created from a spec. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; + +// A single hook command that runs during one lifecycle stage. A spec may +// declare a hook as a bare string ("echo hi"), which is normalized into a +// HookSpec with that string as its command. +message HookSpec { + string command = 1; + optional bool detach = 2; + optional string name = 3; + optional int32 timeout_seconds = 4; +} + +// Names a sandbox lifecycle stage that a hook can run in. The stage is +// metadata: a hook runs the same way regardless of which stage it belongs to, +// and the caller decides which stages it fires. +enum HookStage { + HOOK_STAGE_UNSPECIFIED = 0; + HOOK_STAGE_CREATE = 1; + HOOK_STAGE_START = 2; + HOOK_STAGE_EXEC = 3; + HOOK_STAGE_SHELL = 4; + HOOK_STAGE_SNAPSHOT = 5; + HOOK_STAGE_DOWN = 6; +} + +// Request to run a single hook. RunHook is server-streaming and emits the same +// event shape as RunCommand: a Started event, then stdout/stderr byte chunks, +// then a Finished event. A detached hook (detach = true) only emits Started and +// a Finished event with exit code 0; its output is written to a log file under +// /var/log/depot inside the sandbox instead of streaming back. +message RunHookRequest { + SandboxRef sandbox = 1; + HookStage stage = 2; + HookSpec hook = 3; +} diff --git a/proto/depot/sandbox/v1/logs.proto b/proto/depot/sandbox/v1/logs.proto new file mode 100644 index 00000000..a99f94ce --- /dev/null +++ b/proto/depot/sandbox/v1/logs.proto @@ -0,0 +1,81 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; +import "google/protobuf/timestamp.proto"; + +// Log streaming for sandboxes. +// +// StreamSandboxLogs lets clients subscribe to a sandbox's startup output. The +// server reads from a per-sandbox in-memory log buffer and delivers entries to +// each subscriber as SandboxLogEvent messages. +// +// The current event kinds cover sandbox startup: stdout, stderr, a +// finished signal, and a notice that early data was dropped. Additional event +// kinds may be added later without changing the existing wire format. + +// A single event emitted by the StreamSandboxLogs RPC. +// +// Output data is carried as raw bytes; callers decode text (such as UTF-8) as +// needed. Exactly one of the event fields is set per message. +// +// EvictedEarlyData is sent when the log buffer had to drop the oldest output +// before this subscriber connected. Its byte count covers both stdout and +// stderr combined, since the buffer orders entries by arrival rather than by +// stream. +message SandboxLogEvent { + oneof event { + BootStdout boot_stdout = 1; + BootStderr boot_stderr = 2; + BootFinished boot_finished = 3; + EvictedEarlyData evicted_early_data = 4; + } + + // Tags 5..15 are reserved for future event kinds so they can be added + // without changing the existing wire format. + reserved 5 to 15; + + message BootStdout { + bytes data = 1; + // Total number of stdout bytes emitted up to and including the end of + // this chunk. Clients can use it to deduplicate output across their own + // resubscriptions. Note that this is a per-stream byte count and is + // distinct from the request's since_offset, which is a buffer position. + int64 byte_offset = 2; + google.protobuf.Timestamp timestamp = 3; + } + message BootStderr { + bytes data = 1; + // Total number of stderr bytes emitted up to and including the end of + // this chunk; see BootStdout.byte_offset. + int64 byte_offset = 2; + google.protobuf.Timestamp timestamp = 3; + } + message BootFinished { + int32 exit_code = 1; + google.protobuf.Timestamp finished_at = 2; + } + // Sent when the buffer dropped the oldest output before this subscriber + // connected. Carries the number of bytes that were dropped so the + // subscriber knows there is a gap in the output it receives. + message EvictedEarlyData { + int64 dropped_bytes = 1; + } +} + +// Request for the StreamSandboxLogs server-streaming RPC. The response is a +// sequence of SandboxLogEvent messages read from the sandbox's log buffer. The +// stream ends when the sandbox finishes, or with an error. +// +// since_offset selects where in the buffer to begin. The server replays events +// at or after that position. If the requested position is older than the oldest +// entry still held in the buffer, the stream begins with a single +// EvictedEarlyData event before the replayed events. +message StreamSandboxLogsRequest { + SandboxRef sandbox = 1; + // Buffer position to start streaming from. The server replays events at or + // after this position. Leave unset (or 0) to start from the oldest entry + // still held in the buffer. + optional int64 since_offset = 2; +} diff --git a/proto/depot/sandbox/v1/pty.proto b/proto/depot/sandbox/v1/pty.proto new file mode 100644 index 00000000..4d12c3c5 --- /dev/null +++ b/proto/depot/sandbox/v1/pty.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; + +// Interactive pseudo-terminal session in a sandbox. +// +// This is served by a single bidirectional RPC, OpenPty. The first request on +// the stream must carry start; later requests carry stdin bytes or resize +// window changes. The response stream is a series of data byte chunks, +// terminated by an Exit message carrying the exit code. +// +// The session always runs /bin/sh, so there is no field to choose a shell. +// There is no way to reattach to a session; closing the stream ends the pty. +// +// Pty output is binary and may include ANSI control sequences and other +// non-UTF-8 bytes, so it is carried as raw bytes and the SDK exposes it as a +// Buffer rather than decoding it to a string. + +message OpenPtyRequest { + oneof input { + Start start = 1; + bytes stdin = 2; + Resize resize = 3; + } + + // Carries the parameters that open the session. It must be the first message + // on the stream. Any later start message on the same stream is invalid and is + // ignored by the handler. + message Start { + SandboxRef sandbox = 1; + map env = 2; + optional uint32 rows = 3; + optional uint32 cols = 4; + optional string cwd = 5; + } + + // Changes the terminal window size. Values are passed through to the + // operating system, which clamps any that are out of range. + message Resize { + uint32 rows = 1; + uint32 cols = 2; + } +} + +message OpenPtyResponse { + oneof output { + bytes data = 1; + Exit exit = 2; + } + + message Exit { + int32 exit_code = 1; + } +} diff --git a/proto/depot/sandbox/v1/refs.proto b/proto/depot/sandbox/v1/refs.proto new file mode 100644 index 00000000..2eb1bea0 --- /dev/null +++ b/proto/depot/sandbox/v1/refs.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +// Selector messages shared across the depot.sandbox.v1 package. These Ref +// types live in their own file so that other protos (such as sandbox and +// command) can import them without creating an import cycle, and so any other +// surface that needs to reference a sandbox, command execution, or snapshot +// uses the same shapes instead of redefining them. +// +// Each Ref wraps its selector in a oneof. Today the only way to look something +// up is by `id`, but the oneof leaves room to add alternate lookup forms (for +// example an org-scoped name or an idempotency key) at higher field numbers +// later without breaking the wire format. Those alternate forms are added only +// when something actually needs them, not pre-declared here. + +message SandboxRef { + oneof selector { + string id = 1; + } +} + +message SandboxCommandExecutionRef { + oneof selector { + string id = 1; + } +} + +message SnapshotRef { + oneof selector { + string id = 1; + } +} diff --git a/proto/depot/sandbox/v1/runtime.proto b/proto/depot/sandbox/v1/runtime.proto new file mode 100644 index 00000000..331bc7ba --- /dev/null +++ b/proto/depot/sandbox/v1/runtime.proto @@ -0,0 +1,26 @@ +// Value types describing the compute resources and runtime environment +// requested for a sandbox. + +syntax = "proto3"; + +package depot.sandbox.v1; + +// Compute resources a caller can request for a sandbox. Every field is +// optional; any field left unset falls back to a server-chosen default. +message Resources { + optional int32 vcpus = 1; + optional int32 memory_mb = 2; + optional int32 disk_gb = 3; +} + +// Selects the runtime environment for a sandbox. Choose exactly one option. +message Runtime { + oneof runtime { + // A named, curated runtime resolved by the server, such as "node24". + // Any string is accepted on the wire; the server may reject names it + // does not recognize. + string named = 1; + // An OCI image reference to use directly as the runtime. + string image_ref = 2; + } +} diff --git a/proto/depot/sandbox/v1/sandbox.proto b/proto/depot/sandbox/v1/sandbox.proto new file mode 100644 index 00000000..5107a547 --- /dev/null +++ b/proto/depot/sandbox/v1/sandbox.proto @@ -0,0 +1,277 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/command.proto"; +import "depot/sandbox/v1/filesystem.proto"; +import "depot/sandbox/v1/hook.proto"; +import "depot/sandbox/v1/logs.proto"; +import "depot/sandbox/v1/pty.proto"; +import "depot/sandbox/v1/refs.proto"; +import "depot/sandbox/v1/runtime.proto"; +import "depot/sandbox/v1/snapshot.proto"; +import "depot/sandbox/v1/source.proto"; +import "google/protobuf/timestamp.proto"; + +// SandboxService is the v1 API for creating and managing sandboxes: isolated +// virtual machines you can run commands in, attach a filesystem and terminal +// to, and snapshot. +// +// It covers the full sandbox lifecycle (create, inspect, list, stop, kill), +// command execution (one-shot, streaming, and interactive), a filesystem API, +// pseudo-terminal access, log streaming, and durable snapshots. + +service SandboxService { + rpc CreateSandbox(CreateSandboxRequest) returns (CreateSandboxResponse); + rpc GetSandbox(SandboxRef) returns (GetSandboxResponse); + rpc ListSandboxes(ListSandboxesRequest) returns (ListSandboxesResponse); + + // To create a sandbox from a declarative spec, use CreateSandboxFromSpec on + // SandboxSpecService in spec_rpc.proto, not this service. That service is + // independent of this one, so existing SandboxService callers are unaffected. + + // StopSandbox shuts a sandbox down gracefully (terminated_by=GRACEFUL); + // KillSandbox forces it to stop (terminated_by=FORCED). Calling either on a + // sandbox that is already in a terminal state returns FailedPrecondition + // rather than acting again. + rpc StopSandbox(StopSandboxRequest) returns (StopSandboxResponse); + rpc KillSandbox(KillSandboxRequest) returns (KillSandboxResponse); + + // RunCommand runs a command in the sandbox and streams its output. The + // response stream begins with a Started event and ends with a Finished + // event, or terminates with an error. + rpc RunCommand(RunCommandRequest) returns (stream SandboxCommandExecutionEvent); + + // RunCommandPipe runs a command and lets you stream input to it while it + // runs. The first request on the stream must carry `init`; later requests + // carry `stdin` bytes. The response stream has the same shape as RunCommand. + // stdin bytes are delivered to the process but are not persisted. + rpc RunCommandPipe(stream RunCommandPipeRequest) returns (stream SandboxCommandExecutionEvent); + + // RunHook runs a lifecycle hook command inside the sandbox. The hook runs + // through /bin/sh, with the merged environment exported and the working + // directory set to the workspace. It either streams command output in the + // foreground or runs detached with output written to a log file. The hook's + // stage is a label only and does not change how the command runs. + rpc RunHook(RunHookRequest) returns (stream SandboxCommandExecutionEvent); + + // GetCommand and ListCommands return persisted metadata about commands that + // have run in the sandbox. AttachCommand replays a command's stored + // stdout/stderr and, when the command is still running, tails its live + // output. + rpc GetCommand(SandboxCommandExecutionRef) returns (GetCommandResponse); + rpc ListCommands(ListCommandsRequest) returns (ListCommandsResponse); + rpc AttachCommand(AttachCommandRequest) returns (stream SandboxCommandExecutionEvent); + + // StreamSandboxLogs streams a sandbox's logs to the caller. Today it emits + // the four boot-output event kinds (boot_stdout, boot_stderr, + // boot_finished, evicted_early_data). There is no replay of past output: + // terminal sandboxes return FailedPrecondition. See logs.proto. + rpc StreamSandboxLogs(StreamSandboxLogsRequest) returns (stream SandboxLogEvent); + + // KillCommand delivers a signal to a running command. The default signal is + // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with + // InvalidArgument. If the command has already finished or was never + // registered, this returns NotFound. + rpc KillCommand(KillCommandRequest) returns (KillCommandResponse); + + // OpenPty opens an interactive pseudo-terminal in the sandbox. The first + // request carries `start`; later requests carry stdin bytes or window + // resize messages. The response stream emits `data` byte chunks until the + // shell exits, followed by a single `exit` event carrying the exit code. + // The shell is always /bin/sh and is not selectable. Closing the stream + // ends the pty; there is no reattach. + rpc OpenPty(stream OpenPtyRequest) returns (stream OpenPtyResponse); + + // Filesystem operations on the sandbox (see filesystem.proto). Errors are + // returned as Connect errors with a FileSystemErrorDetail attached. + rpc Mkdir(MkdirRequest) returns (MkdirResponse); + rpc Stat(StatRequest) returns (StatResponse); + rpc ReadDir(ReadDirRequest) returns (ReadDirResponse); + rpc Remove(RemoveRequest) returns (RemoveResponse); + rpc Rename(RenameRequest) returns (RenameResponse); + rpc CopyFile(CopyFileRequest) returns (CopyFileResponse); + rpc Truncate(TruncateRequest) returns (TruncateResponse); + rpc Chmod(ChmodRequest) returns (ChmodResponse); + rpc Chown(ChownRequest) returns (ChownResponse); + rpc Symlink(SymlinkRequest) returns (SymlinkResponse); + rpc Readlink(ReadlinkRequest) returns (ReadlinkResponse); + rpc Access(AccessRequest) returns (AccessResponse); + rpc ReadFile(ReadFileRequest) returns (stream FileChunk); + rpc WriteFile(stream WriteFileRequest) returns (WriteFileResponse); + + // Durable filesystem snapshots of a sandbox (see snapshot.proto). Once a + // snapshot is durable, CreateSnapshot also gracefully stops the source + // sandbox. + rpc CreateSnapshot(CreateSnapshotRequest) returns (CreateSnapshotResponse); + rpc GetSnapshot(GetSnapshotRequest) returns (GetSnapshotResponse); + rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse); + rpc DeleteSnapshot(DeleteSnapshotRequest) returns (DeleteSnapshotResponse); +} + +// SandboxRef, the selector used to identify a sandbox, lives in refs.proto +// alongside the other selector messages (SandboxCommandExecutionRef, +// SnapshotRef). + +// SandboxStatus describes where a sandbox is in its lifecycle. +// +// CREATED: the sandbox record exists, but no compute has been assigned yet. +// ASSIGNED: compute has been assigned, but the VM has not started. +// STARTING: the VM is booting. +// RUNNING: the VM has booted and is ready to accept commands. +// FINISHED: the sandbox terminated cleanly (graceful stop or normal exit). +// CANCELLED: the sandbox was forcibly terminated (killed). +// FAILED: the sandbox ended with an error (such as an image pull failure, +// out-of-memory, or a crash). +enum SandboxStatus { + SANDBOX_STATUS_UNSPECIFIED = 0; + SANDBOX_STATUS_CREATED = 1; + SANDBOX_STATUS_ASSIGNED = 2; + SANDBOX_STATUS_STARTING = 3; + SANDBOX_STATUS_RUNNING = 4; + SANDBOX_STATUS_FINISHED = 5; + SANDBOX_STATUS_CANCELLED = 6; + SANDBOX_STATUS_FAILED = 7; +} + +// TerminationReason classifies why a sandbox ended. It is populated only on a +// terminal status (FINISHED, CANCELLED, or FAILED). UNSPECIFIED is never +// written by the server; callers should treat it as "unknown". +// +// GRACEFUL: a clean shutdown the caller requested via StopSandbox. +// FORCED: an immediate termination the caller requested via KillSandbox. +// TIMED_OUT: the sandbox's time-to-live expired and the server ended it. +// SYSTEM_FAULT: host failure, out-of-memory, a crash, or another +// server-side error. +enum TerminationReason { + TERMINATION_REASON_UNSPECIFIED = 0; + TERMINATION_REASON_GRACEFUL = 1; + TERMINATION_REASON_FORCED = 2; + TERMINATION_REASON_TIMED_OUT = 3; + TERMINATION_REASON_SYSTEM_FAULT = 4; +} + +// The Resources and Runtime messages are defined in runtime.proto. + +// Sandbox is the message returned by the lifecycle RPCs and describes a single +// sandbox and its current state. +message Sandbox { + string sandbox_id = 1; + string organization_id = 2; + SandboxStatus status = 3; + + // Lifecycle timestamps. created_at is always set; started_at and stopped_at + // are set once the sandbox reaches the corresponding state. + google.protobuf.Timestamp created_at = 4; + optional google.protobuf.Timestamp started_at = 5; + optional google.protobuf.Timestamp stopped_at = 6; + + // Time-to-live. expires_at is the stored expiry when known; + // timeout_ms_remaining is recomputed on each read against the current time. + // Both are unset when the sandbox has no timeout policy. + optional google.protobuf.Timestamp expires_at = 7; + optional int64 timeout_ms_remaining = 8; + + // Usage metering. Populated only after the sandbox reaches a terminal state, + // and only when usage data is available; otherwise both fields are unset. + optional int64 active_cpu_usage_ms = 9; + optional NetworkUsage network_usage = 10; + + // The resources and runtime the server actually resolved, echoed back from + // the request so callers can see what was applied. + Resources resources = 11; + Runtime runtime = 12; + + // Terminal-state metadata, populated only on a terminal status (FINISHED, + // CANCELLED, or FAILED). exit_code is a Unix exit code in the range 0..255; + // negative values are reserved for future signal-coded use. + optional TerminationReason terminated_by = 13; + optional int32 exit_code = 14; + optional string error_message = 15; + + // The human-readable label set when the sandbox was created. Empty when the + // sandbox was created without one. Returned by GetSandbox and ListSandboxes + // so callers can show or filter on the label they chose. + optional string name = 17; +} + +// NetworkUsage records bytes transferred over the sandbox's primary network +// interface, with ingress and egress tracked separately. +message NetworkUsage { + int64 ingress_bytes = 1; + int64 egress_bytes = 2; +} + +message CreateSandboxRequest { + // Optional human-readable label for the sandbox, scoped to the organization. + optional string name = 1; + // Requested resources. The server applies defaults for any unset fields. + optional Resources resources = 2; + // Requested runtime. The server resolves a `named` runtime against its + // catalog or pulls an `image_ref` directly. + optional Runtime runtime = 3; + // Where the sandbox's initial content comes from (git, snapshot, image, or + // template). When unset, the sandbox starts with the default content. + optional Source source = 4; +} + +message CreateSandboxResponse { + Sandbox sandbox = 1; +} + +message GetSandboxResponse { + Sandbox sandbox = 1; +} + +// ListSandboxesRequest lists sandboxes, optionally filtered by status and +// creation time, with cursor-based pagination. page_token is the cursor +// returned by a previous response. +message ListSandboxesRequest { + optional int32 page_size = 1; + optional string page_token = 2; + message Filter { + // If non-empty, only sandboxes whose status is in this set are returned. + repeated SandboxStatus states = 1; + optional google.protobuf.Timestamp created_after = 2; + optional google.protobuf.Timestamp created_before = 3; + } + optional Filter filter = 3; +} + +message ListSandboxesResponse { + repeated Sandbox sandboxes = 1; + optional string next_page_token = 2; +} + +// StopSandboxRequest gracefully shuts a sandbox down. The server records the +// termination request immediately; when `blocking` is true the RPC waits, up to +// a server-side limit, for the sandbox to reach a terminal state before +// returning. To control the signal used, use KillSandbox instead. +message StopSandboxRequest { + SandboxRef sandbox = 1; + // If true, the server waits until the sandbox reaches a terminal state (or a + // server-side limit is hit) before responding. If false (the default), the + // RPC returns as soon as the termination request is recorded. + optional bool blocking = 2; +} + +message StopSandboxResponse { + // The sandbox after the termination request was recorded. Its status is + // either RUNNING (with termination requested) or a terminal status if it + // transitioned before the read. + Sandbox sandbox = 1; +} + +// KillSandboxRequest forcibly terminates a sandbox. It is fire-and-forget with +// no blocking option. The `signal` field is accepted but currently ignored; the +// server always issues a hard cancel. +message KillSandboxRequest { + SandboxRef sandbox = 1; + // Signal name (for example "SIGKILL"). Reserved for forward compatibility; + // it is currently ignored and a hard cancel is always issued. + optional string signal = 2; +} + +message KillSandboxResponse { + Sandbox sandbox = 1; +} diff --git a/proto/depot/sandbox/v1/snapshot.proto b/proto/depot/sandbox/v1/snapshot.proto new file mode 100644 index 00000000..72d84c91 --- /dev/null +++ b/proto/depot/sandbox/v1/snapshot.proto @@ -0,0 +1,64 @@ +// A durable filesystem snapshot of a sandbox, with the RPCs to create, get, +// list, and delete one. +// +// This file defines the wire surface and the SDK ergonomics for snapshots. The +// underlying snapshot and restore pipeline is not yet implemented, so the +// handlers currently return Unimplemented. +// +// The selector used to reference a snapshot, SnapshotRef, is defined in +// refs.proto. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +// A snapshot, as returned by the snapshot RPCs. +// +// expires_at is reserved for a future time-to-live feature and is currently +// left unset. +message Snapshot { + string snapshot_id = 1; + string source_sandbox_id = 2; + google.protobuf.Timestamp created_at = 3; + optional google.protobuf.Timestamp expires_at = 4; +} + +message CreateSnapshotRequest { + SandboxRef sandbox = 1; + // Requested time-to-live for the snapshot. The server currently ignores this + // value; the field exists so the SDK option is available now and a future + // version can honor it without a wire break. + optional google.protobuf.Duration expiration = 2; +} + +message CreateSnapshotResponse { + Snapshot snapshot = 1; +} + +message GetSnapshotRequest { + SnapshotRef snapshot = 1; +} + +message GetSnapshotResponse { + Snapshot snapshot = 1; +} + +message ListSnapshotsRequest { + optional int32 page_size = 1; + optional string page_token = 2; +} + +message ListSnapshotsResponse { + repeated Snapshot snapshots = 1; + optional string next_page_token = 2; +} + +message DeleteSnapshotRequest { + SnapshotRef snapshot = 1; +} + +message DeleteSnapshotResponse {} diff --git a/proto/depot/sandbox/v1/source.proto b/proto/depot/sandbox/v1/source.proto new file mode 100644 index 00000000..722e142b --- /dev/null +++ b/proto/depot/sandbox/v1/source.proto @@ -0,0 +1,40 @@ +// Describes where a new sandbox's initial filesystem comes from. A sandbox +// can be created from a Git repository, a snapshot, an OCI image, or a +// template, and this descriptor carries exactly one of those choices. + +syntax = "proto3"; + +package depot.sandbox.v1; + +message Source { + oneof variant { + GitSource git = 1; // Clone a Git repository into the sandbox. + SnapshotSource snapshot = 2; // Restore from a previously taken snapshot. + ImageSource image = 3; // Start from an OCI image. + TemplateSource template = 4; // Start from a named template. + } +} + +message GitSource { + string url = 1; + optional string branch = 2; + optional string commit = 3; + // Name of an organization secret holding the credentials used to clone + // the repository. Leave unset for public repositories that need no + // authentication; when set, the named secret is resolved at clone time. + optional string secret = 4; +} + +message SnapshotSource { + string snapshot_id = 1; +} + +message ImageSource { + string image_ref = 1; + // The registry must be either public or reachable using credentials the + // host already provides; per-image authentication is not yet supported. +} + +message TemplateSource { + string template_id = 1; +} diff --git a/proto/depot/sandbox/v1/spec.proto b/proto/depot/sandbox/v1/spec.proto new file mode 100644 index 00000000..41fdd967 --- /dev/null +++ b/proto/depot/sandbox/v1/spec.proto @@ -0,0 +1,99 @@ +// Declarative spec messages for a sandbox. +// +// This file defines the message types that describe a sandbox spec: SandboxSpec +// and its nested SSHSpec, ContainerSpec, BuildSpec, and Hooks. The HookSpec and +// HookStage types live in hook.proto, and the CreateSandboxFromSpec RPC with its +// request and event types lives in spec_rpc.proto. Splitting those out keeps +// spec.proto free of an import cycle with sandbox.proto. +// +// SandboxSpec mirrors the YAML spec schema field for field, so the shapes used +// in the CLI carry over directly and the SDK adapter handles any cosmetic +// renaming on the way out. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/hook.proto"; +import "depot/sandbox/v1/runtime.proto"; +import "depot/sandbox/v1/source.proto"; + +// A declarative description of a sandbox to create. SandboxSpec mirrors the YAML +// spec schema field for field, so the shapes used in the CLI carry over directly +// and the SDK adapter handles any cosmetic renaming on the way out. +message SandboxSpec { + // Identity and lifecycle settings for the sandbox. + optional string name = 1; + optional string argv = 2; + optional string command = 3; + optional bool detach = 4; + optional string template = 5; + + // Where the sandbox filesystem comes from. Either `source` or + // `container.build` may be set, but not both; the parser rejects specs that + // set both. + optional Source source = 6; + optional ContainerSpec container = 7; + // A pre-built image reference to use directly, bypassing `container.build`. + optional string image = 8; + + // Resources and runtime configuration for the sandbox. + optional Resources resources = 9; + optional Runtime runtime = 10; + // Environment variables to set inside the sandbox. + map env = 11; + + // SSH configuration. Retained for parity with the CLI even though the SDK does + // not surface SSH details directly. + optional SSHSpec ssh = 12; + + // Tag 13 is reserved so that an MCP field can be added later without wire-shape + // ambiguity. + reserved 13; + reserved "mcp"; + + // Commands to run at each sandbox lifecycle stage, such as on create or on + // start. + optional Hooks on = 14; +} + +// SSH access configuration for a sandbox. +message SSHSpec { + bool enabled = 1; + optional int32 timeout_minutes = 2; +} + +// How to obtain the sandbox image when building from a container definition. +message ContainerSpec { + optional BuildSpec build = 1; +} + +// Instructions for building a container image for the sandbox. +message BuildSpec { + // Path or URL to the build context. + optional string context = 1; + optional string dockerfile = 2; + optional string target = 3; + map build_args = 4; + optional bool push = 5; + optional bool no_cache = 6; +} + +// Hooks to run at each sandbox lifecycle stage. Each stage holds an ordered list +// of HookSpec entries that run in sequence. +message Hooks { + repeated HookSpec create = 1; + repeated HookSpec start = 2; + repeated HookSpec exec = 3; + repeated HookSpec shell = 4; + repeated HookSpec snapshot = 5; + repeated HookSpec down = 6; +} + +// HookSpec and HookStage are defined in hook.proto, and spec.proto imports them +// for the HookSpec lists in Hooks above. They live there, rather than here, to +// avoid an import cycle between sandbox.proto, hook.proto, and spec.proto. +// +// The CreateSandboxFromSpec request and event types are defined in spec_rpc.proto +// rather than here, since they reference both SandboxSpec and the Sandbox type +// from sandbox.proto. diff --git a/proto/depot/sandbox/v1/spec_rpc.proto b/proto/depot/sandbox/v1/spec_rpc.proto new file mode 100644 index 00000000..697c0dc2 --- /dev/null +++ b/proto/depot/sandbox/v1/spec_rpc.proto @@ -0,0 +1,81 @@ +// The CreateSandboxFromSpec RPC, its request and event types, and the service +// that hosts it. +// +// This RPC creates a sandbox declaratively from a SandboxSpec. It lives in its +// own service, SandboxSpecService, rather than on SandboxService because its +// request and event types reference both the Sandbox type from sandbox.proto and +// SandboxSpec from spec.proto. Keeping the RPC and its types in a separate file +// and service avoids an import cycle between those proto files. +// +// The SDK consumes SandboxSpecService alongside SandboxService over the same +// transport and auth surface. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/command.proto"; +import "depot/sandbox/v1/hook.proto"; +import "depot/sandbox/v1/sandbox.proto"; +import "depot/sandbox/v1/spec.proto"; + +// Service for creating sandboxes declaratively from a SandboxSpec. +// CreateSandboxFromSpec parses the spec, resolves its source, creates the +// sandbox, delivers source, and runs hooks as a single server-streamed flow. +service SandboxSpecService { + rpc CreateSandboxFromSpec(CreateSandboxFromSpecRequest) returns (stream CreateSandboxFromSpecEvent); +} + +// Request to create a sandbox from a spec. Carries the spec, either as a parsed +// SandboxSpec message or as a YAML string, plus a map of inputs to substitute +// into the spec before it is validated and run. +message CreateSandboxFromSpecRequest { + oneof spec { + string spec_yaml = 1; + SandboxSpec sandbox_spec = 2; + } + map inputs = 3; +} + +// An event in the server stream returned by CreateSandboxFromSpec. A +// SandboxStarted event is sent once the sandbox is running and source delivery +// has completed, followed by a HookEvent for each create-stage hook. The stream +// ends with exactly one terminal event, either Done or Error. +message CreateSandboxFromSpecEvent { + oneof event { + SandboxStarted sandbox_started = 1; + HookEvent hook_event = 2; + Done done = 3; + Error error = 4; + // Tags 5 and 6 are reserved for build and convert log events to be added + // later. + } + + message SandboxStarted { + Sandbox sandbox = 1; + } + + message HookEvent { + HookStage stage = 1; + string hook_name = 2; + SandboxCommandExecutionEvent inner = 3; + } + + message Done { + Sandbox sandbox = 1; + } + + message Error { + string reason = 1; + Stage stage = 2; + + enum Stage { + STAGE_UNSPECIFIED = 0; + STAGE_PARSE = 1; + STAGE_BUILD = 2; + STAGE_CONVERT = 3; + STAGE_CREATE = 4; + STAGE_HOOKS_CREATE = 5; + } + } +}