From a4dedaf62d750a7027339cd21117a781aab07df0 Mon Sep 17 00:00:00 2001 From: Rob Stolarz Date: Mon, 25 May 2026 20:57:30 -0700 Subject: [PATCH 1/7] chore(proto): regen sandbox/v1 from frozen M33 api SHA 8eaa5c945 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the depot.sandbox.v1 wire (sandbox.proto, spec.proto, spec_rpc.proto, command.proto, filesystem.proto, hook.proto, logs.proto, pty.proto, refs.proto, runtime.proto, snapshot.proto, source.proto) to CLI's local buf workspace and regenerates Go + connect-go bindings under pkg/proto/depot/sandbox/v1/. Source: api-sdk-v0-work @ 8eaa5c945 (M33 v0-scope-complete SHA). Workaround for MD-1: buf.build/depot/api registry has not published the M33 SHA, so CLI cannot resolve depot.sandbox.v1 via the registry dep in proto/buf.yaml. The local proto/depot/sandbox/v1/ source is consumed by the existing buf workspace (proto.work.yaml → proto module) and produces the correct pkg/proto/depot/sandbox/v1 + sandboxv1connect outputs. Follow-up: when buf.build/depot/api publishes the M33 SHA, swap the local source back to the registry dep (delete proto/depot/sandbox/v1/, re-add the sandbox-v1 dep to proto/buf.yaml's deps list, re-run buf generate). Refs: DEP-4395 (CLI), M34 themewise PR (Theme 2 — CLI v2 catches up to SDK v0) Co-Authored-By: Claude Opus 4.7 --- pkg/proto/depot/sandbox/v1/command.pb.go | 1893 ++++++++++++ pkg/proto/depot/sandbox/v1/filesystem.pb.go | 2719 +++++++++++++++++ pkg/proto/depot/sandbox/v1/hook.pb.go | 392 +++ pkg/proto/depot/sandbox/v1/logs.pb.go | 683 +++++ pkg/proto/depot/sandbox/v1/pty.pb.go | 581 ++++ pkg/proto/depot/sandbox/v1/refs.pb.go | 349 +++ pkg/proto/depot/sandbox/v1/runtime.pb.go | 305 ++ pkg/proto/depot/sandbox/v1/sandbox.pb.go | 1751 +++++++++++ .../v1/sandboxv1connect/sandbox.connect.go | 1041 +++++++ .../v1/sandboxv1connect/spec_rpc.connect.go | 123 + pkg/proto/depot/sandbox/v1/snapshot.pb.go | 777 +++++ pkg/proto/depot/sandbox/v1/source.pb.go | 541 ++++ pkg/proto/depot/sandbox/v1/spec.pb.go | 755 +++++ pkg/proto/depot/sandbox/v1/spec_rpc.pb.go | 788 +++++ proto/depot/sandbox/v1/command.proto | 218 ++ proto/depot/sandbox/v1/filesystem.proto | 219 ++ proto/depot/sandbox/v1/hook.proto | 63 + proto/depot/sandbox/v1/logs.proto | 101 + proto/depot/sandbox/v1/pty.proto | 58 + proto/depot/sandbox/v1/refs.proto | 33 + proto/depot/sandbox/v1/runtime.proto | 40 + proto/depot/sandbox/v1/sandbox.proto | 313 ++ proto/depot/sandbox/v1/snapshot.proto | 63 + proto/depot/sandbox/v1/source.proto | 51 + proto/depot/sandbox/v1/spec.proto | 114 + proto/depot/sandbox/v1/spec_rpc.proto | 87 + 26 files changed, 14058 insertions(+) create mode 100644 pkg/proto/depot/sandbox/v1/command.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/filesystem.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/hook.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/logs.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/pty.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/refs.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/runtime.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/sandbox.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go create mode 100644 pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go create mode 100644 pkg/proto/depot/sandbox/v1/snapshot.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/source.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/spec.pb.go create mode 100644 pkg/proto/depot/sandbox/v1/spec_rpc.pb.go create mode 100644 proto/depot/sandbox/v1/command.proto create mode 100644 proto/depot/sandbox/v1/filesystem.proto create mode 100644 proto/depot/sandbox/v1/hook.proto create mode 100644 proto/depot/sandbox/v1/logs.proto create mode 100644 proto/depot/sandbox/v1/pty.proto create mode 100644 proto/depot/sandbox/v1/refs.proto create mode 100644 proto/depot/sandbox/v1/runtime.proto create mode 100644 proto/depot/sandbox/v1/sandbox.proto create mode 100644 proto/depot/sandbox/v1/snapshot.proto create mode 100644 proto/depot/sandbox/v1/source.proto create mode 100644 proto/depot/sandbox/v1/spec.proto create mode 100644 proto/depot/sandbox/v1/spec_rpc.proto 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..c4732b3c --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/command.pb.go @@ -0,0 +1,1893 @@ +// 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) +) + +// CommandStatus mirrors the lifecycle stages a command transitions through. +// +// PENDING: queued, not yet started in the guest. +// RUNNING: started; bytes can be streaming. +// FINISHED: process exited; exit_code populated. +// FAILED: process never started, or the guest reported an error path. +// KILLED: signaled mid-run (DEP-4522). +type CommandStatus int32 + +const ( + CommandStatus_COMMAND_STATUS_UNSPECIFIED CommandStatus = 0 + CommandStatus_COMMAND_STATUS_PENDING CommandStatus = 1 + CommandStatus_COMMAND_STATUS_RUNNING CommandStatus = 2 + CommandStatus_COMMAND_STATUS_FINISHED CommandStatus = 3 + CommandStatus_COMMAND_STATUS_FAILED CommandStatus = 4 + CommandStatus_COMMAND_STATUS_KILLED CommandStatus = 5 +) + +// Enum value maps for CommandStatus. +var ( + CommandStatus_name = map[int32]string{ + 0: "COMMAND_STATUS_UNSPECIFIED", + 1: "COMMAND_STATUS_PENDING", + 2: "COMMAND_STATUS_RUNNING", + 3: "COMMAND_STATUS_FINISHED", + 4: "COMMAND_STATUS_FAILED", + 5: "COMMAND_STATUS_KILLED", + } + CommandStatus_value = map[string]int32{ + "COMMAND_STATUS_UNSPECIFIED": 0, + "COMMAND_STATUS_PENDING": 1, + "COMMAND_STATUS_RUNNING": 2, + "COMMAND_STATUS_FINISHED": 3, + "COMMAND_STATUS_FAILED": 4, + "COMMAND_STATUS_KILLED": 5, + } +) + +func (x CommandStatus) Enum() *CommandStatus { + p := new(CommandStatus) + *p = x + return p +} + +func (x CommandStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommandStatus) Descriptor() protoreflect.EnumDescriptor { + return file_depot_sandbox_v1_command_proto_enumTypes[0].Descriptor() +} + +func (CommandStatus) Type() protoreflect.EnumType { + return &file_depot_sandbox_v1_command_proto_enumTypes[0] +} + +func (x CommandStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommandStatus.Descriptor instead. +func (CommandStatus) EnumDescriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{0} +} + +// Command is the persisted metadata for a single RunCommand invocation. The +// row shape lives in src/sandbox/schema-additions.ts (CommandRow); this is its +// wire projection. Populated by Get/List/Attach RPCs in follow-up slices. +type Command struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Server-minted ULID. Architecture §7. + CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + SandboxId string `protobuf:"bytes,2,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` + Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` + Cwd *string `protobuf:"bytes,5,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` + 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"` + Sudo bool `protobuf:"varint,7,opt,name=sudo,proto3" json:"sudo,omitempty"` + Detached bool `protobuf:"varint,8,opt,name=detached,proto3" json:"detached,omitempty"` + Status CommandStatus `protobuf:"varint,9,opt,name=status,proto3,enum=depot.sandbox.v1.CommandStatus" json:"status,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=finished_at,json=finishedAt,proto3,oneof" json:"finished_at,omitempty"` + ExitCode *int32 `protobuf:"varint,12,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` + // Per-stream cumulative byte counts. Split per architecture §8. + StdoutBytesEmitted int64 `protobuf:"varint,13,opt,name=stdout_bytes_emitted,json=stdoutBytesEmitted,proto3" json:"stdout_bytes_emitted,omitempty"` + StderrBytesEmitted int64 `protobuf:"varint,14,opt,name=stderr_bytes_emitted,json=stderrBytesEmitted,proto3" json:"stderr_bytes_emitted,omitempty"` +} + +func (x *Command) Reset() { + *x = Command{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Command) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Command) ProtoMessage() {} + +func (x *Command) 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 Command.ProtoReflect.Descriptor instead. +func (*Command) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{0} +} + +func (x *Command) GetCmdId() string { + if x != nil { + return x.CmdId + } + return "" +} + +func (x *Command) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +func (x *Command) GetCmd() string { + if x != nil { + return x.Cmd + } + return "" +} + +func (x *Command) GetArgs() []string { + if x != nil { + return x.Args + } + return nil +} + +func (x *Command) GetCwd() string { + if x != nil && x.Cwd != nil { + return *x.Cwd + } + return "" +} + +func (x *Command) GetEnv() map[string]string { + if x != nil { + return x.Env + } + return nil +} + +func (x *Command) GetSudo() bool { + if x != nil { + return x.Sudo + } + return false +} + +func (x *Command) GetDetached() bool { + if x != nil { + return x.Detached + } + return false +} + +func (x *Command) GetStatus() CommandStatus { + if x != nil { + return x.Status + } + return CommandStatus_COMMAND_STATUS_UNSPECIFIED +} + +func (x *Command) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *Command) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +func (x *Command) GetExitCode() int32 { + if x != nil && x.ExitCode != nil { + return *x.ExitCode + } + return 0 +} + +func (x *Command) GetStdoutBytesEmitted() int64 { + if x != nil { + return x.StdoutBytesEmitted + } + return 0 +} + +func (x *Command) GetStderrBytesEmitted() int64 { + if x != nil { + return x.StderrBytesEmitted + } + return 0 +} + +// CommandEvent is the streamed event during RunCommand / RunCommandPipe / +// AttachCommand. Bytes everywhere; the SDK decodes UTF-8 at the adapter layer. +// +// EvictedEarlyData fires only on reattach scenarios where the K-Streaming ring +// (architecture §10) had to drop head data before the consumer subscribed. +// It is part of the oneof from day one so the wire shape doesn't need a +// reserved slot retrofit when the BufferedEventLog impl lands with P10b. +type CommandEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Event: + // + // *CommandEvent_Started_ + // *CommandEvent_Stdout + // *CommandEvent_Stderr + // *CommandEvent_Finished_ + // *CommandEvent_Error_ + // *CommandEvent_Evicted + Event isCommandEvent_Event `protobuf_oneof:"event"` +} + +func (x *CommandEvent) Reset() { + *x = CommandEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_command_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent) ProtoMessage() {} + +func (x *CommandEvent) 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 CommandEvent.ProtoReflect.Descriptor instead. +func (*CommandEvent) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1} +} + +func (m *CommandEvent) GetEvent() isCommandEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *CommandEvent) GetStarted() *CommandEvent_Started { + if x, ok := x.GetEvent().(*CommandEvent_Started_); ok { + return x.Started + } + return nil +} + +func (x *CommandEvent) GetStdout() *CommandEvent_StdoutBytes { + if x, ok := x.GetEvent().(*CommandEvent_Stdout); ok { + return x.Stdout + } + return nil +} + +func (x *CommandEvent) GetStderr() *CommandEvent_StderrBytes { + if x, ok := x.GetEvent().(*CommandEvent_Stderr); ok { + return x.Stderr + } + return nil +} + +func (x *CommandEvent) GetFinished() *CommandEvent_Finished { + if x, ok := x.GetEvent().(*CommandEvent_Finished_); ok { + return x.Finished + } + return nil +} + +func (x *CommandEvent) GetError() *CommandEvent_Error { + if x, ok := x.GetEvent().(*CommandEvent_Error_); ok { + return x.Error + } + return nil +} + +func (x *CommandEvent) GetEvicted() *CommandEvent_EvictedEarlyData { + if x, ok := x.GetEvent().(*CommandEvent_Evicted); ok { + return x.Evicted + } + return nil +} + +type isCommandEvent_Event interface { + isCommandEvent_Event() +} + +type CommandEvent_Started_ struct { + Started *CommandEvent_Started `protobuf:"bytes,1,opt,name=started,proto3,oneof"` +} + +type CommandEvent_Stdout struct { + Stdout *CommandEvent_StdoutBytes `protobuf:"bytes,2,opt,name=stdout,proto3,oneof"` +} + +type CommandEvent_Stderr struct { + Stderr *CommandEvent_StderrBytes `protobuf:"bytes,3,opt,name=stderr,proto3,oneof"` +} + +type CommandEvent_Finished_ struct { + Finished *CommandEvent_Finished `protobuf:"bytes,4,opt,name=finished,proto3,oneof"` +} + +type CommandEvent_Error_ struct { + Error *CommandEvent_Error `protobuf:"bytes,5,opt,name=error,proto3,oneof"` +} + +type CommandEvent_Evicted struct { + Evicted *CommandEvent_EvictedEarlyData `protobuf:"bytes,6,opt,name=evicted,proto3,oneof"` +} + +func (*CommandEvent_Started_) isCommandEvent_Event() {} + +func (*CommandEvent_Stdout) isCommandEvent_Event() {} + +func (*CommandEvent_Stderr) isCommandEvent_Event() {} + +func (*CommandEvent_Finished_) isCommandEvent_Event() {} + +func (*CommandEvent_Error_) isCommandEvent_Event() {} + +func (*CommandEvent_Evicted) isCommandEvent_Event() {} + +// RunCommand — DEP-4517. Server-streaming RPC; the response stream is a +// sequence of CommandEvents starting with Started and ending with Finished +// (or terminating with a Connect error). +type RunCommandRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Sandbox to run the command in. Tag 1 was `string sandbox_id` in M6 (a + // workaround for the proto import cycle that refs.proto now resolves) — see + // the commit body for the wire-break audit. Safe to reuse tag 1 here because + // RunCommand is shipped Unimplemented; no client depends on the prior shape. + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Cmd string `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"` + Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` + Cwd *string `protobuf:"bytes,4,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` + 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"` + Sudo *bool `protobuf:"varint,6,opt,name=sudo,proto3,oneof" json:"sudo,omitempty"` + // When true, the server returns the Started event and disconnects the + // stream; the command runs in the background and can be reattached via + // AttachCommand (DEP-4520). + 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 +} + +// RunCommandPipe — DEP-4519. Client-side bidirectional streaming. The first +// request on the stream MUST carry `init` (the same RunCommandRequest the +// blocking RunCommand RPC uses). Every subsequent request carries `stdin` +// bytes; closing the request stream signals EOF on the command's stdin. +// +// The response stream is a sequence of CommandEvents identical in shape to +// RunCommand's: Started → Stdout/Stderr bytes → Finished (or Connect error). +// +// stdin bytes are NOT persisted in v0 — only stdout and stderr land in the +// ClickHouse log table. AttachCommand replay shows command OUTPUT regardless +// of whether the original command was Run or RunCommandPipe. +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 { + Init *RunCommandRequest `protobuf:"bytes,1,opt,name=init,proto3,oneof"` +} + +type RunCommandPipeRequest_Stdin struct { + Stdin []byte `protobuf:"bytes,2,opt,name=stdin,proto3,oneof"` +} + +func (*RunCommandPipeRequest_Init) isRunCommandPipeRequest_Input() {} + +func (*RunCommandPipeRequest_Stdin) isRunCommandPipeRequest_Input() {} + +// GetCommand looks up command metadata by cmd_id. Authorization is sandbox- +// scoped: the server resolves cmd_id → sandbox_id via a Kysely select filtered +// by the caller's orgId, then enforces sandbox-level access on the resolved +// sandbox row (api/CLAUDE.md authz convention). +type GetCommandResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Command *Command `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() *Command { + if x != nil { + return x.Command + } + return nil +} + +// ListCommands enumerates commands within a single sandbox, newest first. +// Pagination follows the ListSandboxes cursor convention: page_token is an +// opaque server-minted string that clients pass back verbatim to fetch the +// next page. +type ListCommandsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + PageSize *int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + PageToken *string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` + // If non-empty, only commands whose status is in this set are returned. + // UNSPECIFIED entries are ignored. The full CommandStatus enum is accepted. + StatusFilter []CommandStatus `protobuf:"varint,4,rep,packed,name=status_filter,json=statusFilter,proto3,enum=depot.sandbox.v1.CommandStatus" 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() []CommandStatus { + if x != nil { + return x.StatusFilter + } + return nil +} + +type ListCommandsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Commands []*Command `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` + 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() []*Command { + if x != nil { + return x.Commands + } + return nil +} + +func (x *ListCommandsResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +// AttachCommand re-subscribes to the output of a previously-issued +// RunCommand / RunCommandPipe. The response stream is the same CommandEvent +// sequence those RPCs emit live: replay of persisted Stdout/Stderr chunks +// followed (if the command is still running on the same replica) by live tail. +// +// Sandbox-level authz: cmd_id is resolved to its sandbox_id server-side, then +// the standard sandbox-row org check applies. CommandRef carries only the +// cmd_id today (refs.proto's selector pattern); a future sandbox-qualified +// selector form can be added without a wire break. +type AttachCommandRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Command *CommandRef `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` + // Per-stream WATERMARK: replay events whose byte_offset is STRICTLY GREATER + // than the supplied offset. The wire field byte_offset is end-of-chunk + // (cumulative bytes through the END of `data`), so a caller that replayed + // up through "I last received stdout byteOffset = 100" supplies + // stdout_offset = 100 and receives the next event starting at >100. Unset + // fields default to 0 — start replay from the beginning of that stream. + 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() *CommandRef { + if x != nil { + return x.Command + } + return nil +} + +func (x *AttachCommandRequest) GetSinceOffset() *AttachOffset { + if x != nil { + return x.SinceOffset + } + return nil +} + +type AttachOffset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Watermark on stdout: yield events whose byte_offset > stdout_offset. + StdoutOffset *int64 `protobuf:"varint,1,opt,name=stdout_offset,json=stdoutOffset,proto3,oneof" json:"stdout_offset,omitempty"` + // Watermark on stderr: yield events whose byte_offset > stderr_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 +} + +// KillCommand — DEP-4522. Targets a previously-issued command by cmd_id and +// asks the host to deliver `signal` (default SIGTERM) to the running process. +// Two-step authorization mirrors AttachCommand: resolve cmd_id → sandbox_id +// scoped to the caller's org, then enforce sandbox-level access on the +// resolved sandbox row. Signal is a string passthrough to vm3 SendSignal; +// unknown signal names propagate vm3's InvalidArgument. Killing a command +// the host registry no longer knows about (already-finished or never- +// registered) returns NotFound — this covers the kill-on-finished race +// without a separate code path. +type KillCommandRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + // Signal name (e.g. "SIGTERM", "SIGINT"). Omit for SIGTERM. SIGKILL is + // rejected by vm3 in v0 to keep the abort path SIGKILL-free; that + // rejection surfaces here as a Connect InvalidArgument. + 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 "" +} + +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} +} + +type CommandEvent_Started struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` +} + +func (x *CommandEvent_Started) Reset() { + *x = CommandEvent_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 *CommandEvent_Started) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent_Started) ProtoMessage() {} + +func (x *CommandEvent_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 CommandEvent_Started.ProtoReflect.Descriptor instead. +func (*CommandEvent_Started) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *CommandEvent_Started) GetCmdId() string { + if x != nil { + return x.CmdId + } + return "" +} + +func (x *CommandEvent_Started) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +type CommandEvent_StdoutBytes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Cumulative byte index for this stream as of the END of `data`. + 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 *CommandEvent_StdoutBytes) Reset() { + *x = CommandEvent_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 *CommandEvent_StdoutBytes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent_StdoutBytes) ProtoMessage() {} + +func (x *CommandEvent_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 CommandEvent_StdoutBytes.ProtoReflect.Descriptor instead. +func (*CommandEvent_StdoutBytes) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *CommandEvent_StdoutBytes) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *CommandEvent_StdoutBytes) GetByteOffset() int64 { + if x != nil { + return x.ByteOffset + } + return 0 +} + +func (x *CommandEvent_StdoutBytes) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type CommandEvent_StderrBytes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + 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 *CommandEvent_StderrBytes) Reset() { + *x = CommandEvent_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 *CommandEvent_StderrBytes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent_StderrBytes) ProtoMessage() {} + +func (x *CommandEvent_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 CommandEvent_StderrBytes.ProtoReflect.Descriptor instead. +func (*CommandEvent_StderrBytes) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *CommandEvent_StderrBytes) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *CommandEvent_StderrBytes) GetByteOffset() int64 { + if x != nil { + return x.ByteOffset + } + return 0 +} + +func (x *CommandEvent_StderrBytes) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type CommandEvent_Finished 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 *CommandEvent_Finished) Reset() { + *x = CommandEvent_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 *CommandEvent_Finished) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent_Finished) ProtoMessage() {} + +func (x *CommandEvent_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 CommandEvent_Finished.ProtoReflect.Descriptor instead. +func (*CommandEvent_Finished) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 3} +} + +func (x *CommandEvent_Finished) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *CommandEvent_Finished) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +// Mid-stream failure where the stream itself continues (e.g. one chunk lost +// but more coming). Connect errors remain the primary error channel; this +// payload is for partial-degradation cases. Bare string for v0; structured +// codes are a follow-on if call sites need to discriminate. +type CommandEvent_Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *CommandEvent_Error) Reset() { + *x = CommandEvent_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 *CommandEvent_Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent_Error) ProtoMessage() {} + +func (x *CommandEvent_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 CommandEvent_Error.ProtoReflect.Descriptor instead. +func (*CommandEvent_Error) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 4} +} + +func (x *CommandEvent_Error) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +// K-Streaming evicted head data before this consumer subscribed. Carries the +// per-stream byte counts that were dropped so the consumer can reason about +// the gap. Architecture §10. +type CommandEvent_EvictedEarlyData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DroppedBytesStdout int64 `protobuf:"varint,1,opt,name=dropped_bytes_stdout,json=droppedBytesStdout,proto3" json:"dropped_bytes_stdout,omitempty"` + DroppedBytesStderr int64 `protobuf:"varint,2,opt,name=dropped_bytes_stderr,json=droppedBytesStderr,proto3" json:"dropped_bytes_stderr,omitempty"` +} + +func (x *CommandEvent_EvictedEarlyData) Reset() { + *x = CommandEvent_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 *CommandEvent_EvictedEarlyData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent_EvictedEarlyData) ProtoMessage() {} + +func (x *CommandEvent_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 CommandEvent_EvictedEarlyData.ProtoReflect.Descriptor instead. +func (*CommandEvent_EvictedEarlyData) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1, 5} +} + +func (x *CommandEvent_EvictedEarlyData) GetDroppedBytesStdout() int64 { + if x != nil { + return x.DroppedBytesStdout + } + return 0 +} + +func (x *CommandEvent_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, 0xfc, 0x04, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 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, 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, + 0x34, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 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, + 0x91, 0x08, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x42, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x44, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x44, 0x0a, 0x06, 0x73, 0x74, + 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x45, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x3c, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4b, 0x0a, 0x07, 0x65, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 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, 0x49, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 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, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0xf6, + 0x01, 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, 0x44, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0xa7, 0x01, 0x0a, 0x14, 0x41, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0xba, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4d, + 0x4d, 0x41, 0x4e, 0x44, 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, 0x43, 0x4f, 0x4d, + 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, + 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, + 0x4d, 0x41, 0x4e, 0x44, 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{}{ + (CommandStatus)(0), // 0: depot.sandbox.v1.CommandStatus + (*Command)(nil), // 1: depot.sandbox.v1.Command + (*CommandEvent)(nil), // 2: depot.sandbox.v1.CommandEvent + (*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.Command.EnvEntry + (*CommandEvent_Started)(nil), // 13: depot.sandbox.v1.CommandEvent.Started + (*CommandEvent_StdoutBytes)(nil), // 14: depot.sandbox.v1.CommandEvent.StdoutBytes + (*CommandEvent_StderrBytes)(nil), // 15: depot.sandbox.v1.CommandEvent.StderrBytes + (*CommandEvent_Finished)(nil), // 16: depot.sandbox.v1.CommandEvent.Finished + (*CommandEvent_Error)(nil), // 17: depot.sandbox.v1.CommandEvent.Error + (*CommandEvent_EvictedEarlyData)(nil), // 18: depot.sandbox.v1.CommandEvent.EvictedEarlyData + nil, // 19: depot.sandbox.v1.RunCommandRequest.EnvEntry + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*SandboxRef)(nil), // 21: depot.sandbox.v1.SandboxRef + (*CommandRef)(nil), // 22: depot.sandbox.v1.CommandRef +} +var file_depot_sandbox_v1_command_proto_depIdxs = []int32{ + 12, // 0: depot.sandbox.v1.Command.env:type_name -> depot.sandbox.v1.Command.EnvEntry + 0, // 1: depot.sandbox.v1.Command.status:type_name -> depot.sandbox.v1.CommandStatus + 20, // 2: depot.sandbox.v1.Command.started_at:type_name -> google.protobuf.Timestamp + 20, // 3: depot.sandbox.v1.Command.finished_at:type_name -> google.protobuf.Timestamp + 13, // 4: depot.sandbox.v1.CommandEvent.started:type_name -> depot.sandbox.v1.CommandEvent.Started + 14, // 5: depot.sandbox.v1.CommandEvent.stdout:type_name -> depot.sandbox.v1.CommandEvent.StdoutBytes + 15, // 6: depot.sandbox.v1.CommandEvent.stderr:type_name -> depot.sandbox.v1.CommandEvent.StderrBytes + 16, // 7: depot.sandbox.v1.CommandEvent.finished:type_name -> depot.sandbox.v1.CommandEvent.Finished + 17, // 8: depot.sandbox.v1.CommandEvent.error:type_name -> depot.sandbox.v1.CommandEvent.Error + 18, // 9: depot.sandbox.v1.CommandEvent.evicted:type_name -> depot.sandbox.v1.CommandEvent.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.Command + 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.CommandStatus + 1, // 16: depot.sandbox.v1.ListCommandsResponse.commands:type_name -> depot.sandbox.v1.Command + 22, // 17: depot.sandbox.v1.AttachCommandRequest.command:type_name -> depot.sandbox.v1.CommandRef + 9, // 18: depot.sandbox.v1.AttachCommandRequest.since_offset:type_name -> depot.sandbox.v1.AttachOffset + 20, // 19: depot.sandbox.v1.CommandEvent.Started.started_at:type_name -> google.protobuf.Timestamp + 20, // 20: depot.sandbox.v1.CommandEvent.StdoutBytes.timestamp:type_name -> google.protobuf.Timestamp + 20, // 21: depot.sandbox.v1.CommandEvent.StderrBytes.timestamp:type_name -> google.protobuf.Timestamp + 20, // 22: depot.sandbox.v1.CommandEvent.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.(*Command); 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.(*CommandEvent); 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.(*CommandEvent_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.(*CommandEvent_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.(*CommandEvent_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.(*CommandEvent_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.(*CommandEvent_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.(*CommandEvent_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{}{ + (*CommandEvent_Started_)(nil), + (*CommandEvent_Stdout)(nil), + (*CommandEvent_Stderr)(nil), + (*CommandEvent_Finished_)(nil), + (*CommandEvent_Error_)(nil), + (*CommandEvent_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..45505fe4 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/filesystem.pb.go @@ -0,0 +1,2719 @@ +// depot.sandbox.v1 — FileSystem surface (DEP-4524). +// +// Covers the exec-first server-side first slice (P15) and the native vm3 swap +// (DEP-4525 / P17). Same proto surface across implementations; the server +// picks the active implementation per-org. +// +// Errors travel as Connect errors with a `FileSystemErrorDetail` attached. +// The SDK adapter (sdk-sandbox/src/errors.ts) converts that into a Node-shape +// Error object carrying `{code, syscall, path, errno}` so customers can keep +// coding against node:fs/promises shape. +// +// The RPC declarations live on `service SandboxService` in sandbox.proto; +// this file only carries messages + enums. + +// 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) +) + +// FileSystemErrorCode mirrors the Node fs error codes the SDK exposes. +// Server attaches one of these on a Connect error; client maps to Error.code. +// +// `OTHER` is the catch-all when the exec-first classifier cannot pin a +// specific Node code (e.g. busybox-stderr phrasing the regex doesn't match); +// callers surface it as a generic FileSystemError without losing the syscall +// + path context. +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} +} + +// FileType is the discriminator returned by Stat. SDK uses it to back +// `.isDirectory()`/`.isFile()`/... on a node:fs/promises-shape 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} +} + +// FileSystemErrorDetail is the proto message the server attaches to the +// Connect error (`ConnectError.details`). The SDK reads it back via +// `findDetails(FileSystemErrorDetailSchema)` and synthesizes a Node-shape +// `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"` + // mkdir -p semantics; default false → ENOENT on a missing parent. + Recursive *bool `protobuf:"varint,3,opt,name=recursive,proto3,oneof" json:"recursive,omitempty"` + // Octal mode (e.g. 0o755 = 0x1ED). Server applies the umask when unset. + 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"` + // Follow symlinks (stat) vs not (lstat). Default true. + 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"` + // node:fs/promises.readdir({withFileTypes}) parity: when false the entries + // still carry name + type, but the SDK exposes a string[] surface. + 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"` + // rm -rf when true. + Recursive *bool `protobuf:"varint,3,opt,name=recursive,proto3,oneof" json:"recursive,omitempty"` + // node fs.rm({force: true}) parity — ENOENT is swallowed. + 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"` + // cp -p — preserve mode/owner/timestamps where the server can. + 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"` + // Octal int; the SDK accepts string ("755") or number (0o755) and converts. + 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"` + // 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"` + // F_OK / R_OK / W_OK / X_OK bitmask. Server defaults to F_OK when unset. + 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 "" +} + +// FileChunk is the streamed shape for ReadFile — chunks land in order, with +// the last carrying `eof = true` when the implementation knows. The stream +// closing also signals EOF. +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 +} + +// WriteFile — first request on the stream MUST carry `init`; subsequent +// requests carry `data` bytes. `append` selects O_APPEND semantics. `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"` + // mkdir -p the parent path 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..904c4a86 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/hook.pb.go @@ -0,0 +1,392 @@ +// depot.sandbox.v1 — Hook value-shapes + RunHook wire envelope (DEP-4534 / P23). +// +// Spec Cluster INTERIOR (step 2 of 5). This file holds the hook-related +// messages: the value-shapes (HookSpec + HookStage) that the YAML spec uses +// and the wire envelope (RunHookRequest) that the RunHook RPC takes. +// +// HookSpec and HookStage originally shipped in spec.proto at S24 (P22). +// They moved here at P23 to break an import cycle that would otherwise form +// once sandbox.proto adopts the RunHook RPC: +// +// sandbox.proto -> hook.proto -> spec.proto -> sandbox.proto +// +// (spec.proto imports sandbox.proto for Resources + Runtime; sandbox.proto +// must import hook.proto for RunHookRequest; so hook.proto cannot transitively +// import sandbox.proto.) Wire shapes are unchanged — both messages remain in +// the depot.sandbox.v1 package; only their `.proto` home is different. +// +// RunHook is wire-reachable today but hidden from the public SDK surface +// (pattern F per architecture §15). The canonical consumer is the +// CreateSandboxFromSpec orchestrator that lands in P25b — no caller exists +// in trunk today. + +// 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) +) + +// HookStage names a lifecycle stage. Used by the RunHook RPC + the future +// Hooks-replay surface (architecture §12). Stage label is metadata-only +// from the daemon's perspective — execution shape does NOT vary across the +// six stages; orchestrators decide which stages they fire. +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} +} + +// HookSpec — a single hook command within one lifecycle stage. The YAML +// bare-string form ("echo hi") parses into HookSpec{command: "echo hi"}; +// see src/sandbox/spec.ts for normalization. +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 +} + +// RunHookRequest — DEP-4534 / P23. Server-streaming response is the same +// CommandEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> +// Finished. Detached hooks (hook.detach=true) emit only Started + +// Finished{exit_code=0} on the wire; the actual hook output lands in +// /var/log/depot/hook--.log inside the sandbox (architecture +// §12). +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..c65d35f2 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/logs.pb.go @@ -0,0 +1,683 @@ +// 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) +) + +// SandboxLogEvent is the streamed event the StreamSandboxLogs RPC emits. +// Bytes everywhere on the stdout/stderr rails (DEP-4404); the SDK decodes +// UTF-8 at the adapter layer. +// +// EvictedEarlyData fires when the K-Streaming ring (architecture §10) had to +// drop head data before this consumer subscribed — analogous to +// CommandEvent.EvictedEarlyData. The dropped-bytes counter is single-rail +// here (no per-stream split) because the boot-output buffer is keyed by +// arrival across both stdout/stderr. +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() {} + +// StreamSandboxLogs — DEP-4532. Server-streaming RPC; the response stream is +// a sequence of SandboxLogEvents drained from the per-sandbox boot-output +// BufferedEventLog (P27a). Terminates when the buffer ends (boot finished) +// or with a Connect error. +// +// `since_offset` is a BufferedEventLog ring offset (NOT a per-stream byte +// index). The server replays events whose ring offset is >= the supplied +// value, and any subscription that requests an offset older than the live +// ring head receives an EvictedEarlyData prefix once before the replay +// starts. +// +// Cross-replica caveat (MD-33-3 / Risk R1): if this RPC lands on a different +// replica than the CreateSandboxFromSpec orchestrator that minted the +// sandbox, the buffer lookup misses and — for non-terminal sandboxes — the +// stream closes cleanly with no events. The handler also surfaces +// FailedPrecondition for terminal sandboxes (no past-replay rail in v0). +type StreamSandboxLogsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + // BufferedEventLog ring offset to start from. Replay events whose offset + // is >= since_offset. Unset (or 0) means "from the beginning of the + // resident 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"` + // Cumulative byte index for the stdout rail as of the END of `data` + // (end-of-chunk semantics, mirroring CommandEvent.StdoutBytes.byte_offset + // from command.proto). Useful for consumers that want to dedup across + // resubscribes that they themselves coordinate at the byte rail; the + // server-side replay watermark is the request's `since_offset`, which + // is a BufferedEventLog ring offset rather than a per-stream byte + // index (MD-33-4). + 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"` + // Cumulative byte index for the stderr rail; 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 +} + +// K-Streaming evicted head data before this consumer subscribed. Carries +// the byte count that was dropped so the consumer can reason about the +// gap. Architecture §10. +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..29a450bc --- /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() {} + +// Start carries the per-session init parameters. Sent as the first message +// on the stream. Subsequent `start` messages on the same stream are a +// protocol violation and 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 "" +} + +// Resize is a window-size change. vm3 maps it to the OS pty Setsize ioctl +// which clamps out-of-range values; bounds are intentionally pass-through. +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..a8f3293b --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/refs.pb.go @@ -0,0 +1,349 @@ +// 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 CommandRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Selector: + // + // *CommandRef_Id + Selector isCommandRef_Selector `protobuf_oneof:"selector"` +} + +func (x *CommandRef) Reset() { + *x = CommandRef{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_sandbox_v1_refs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandRef) ProtoMessage() {} + +func (x *CommandRef) 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 CommandRef.ProtoReflect.Descriptor instead. +func (*CommandRef) Descriptor() ([]byte, []int) { + return file_depot_sandbox_v1_refs_proto_rawDescGZIP(), []int{1} +} + +func (m *CommandRef) GetSelector() isCommandRef_Selector { + if m != nil { + return m.Selector + } + return nil +} + +func (x *CommandRef) GetId() string { + if x, ok := x.GetSelector().(*CommandRef_Id); ok { + return x.Id + } + return "" +} + +type isCommandRef_Selector interface { + isCommandRef_Selector() +} + +type CommandRef_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +func (*CommandRef_Id) isCommandRef_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, 0x2a, 0x0a, 0x0a, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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 + (*CommandRef)(nil), // 1: depot.sandbox.v1.CommandRef + (*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.(*CommandRef); 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{}{ + (*CommandRef_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..a825958b --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/runtime.pb.go @@ -0,0 +1,305 @@ +// depot.sandbox.v1 — Resources + Runtime value-shapes. +// +// Extracted from sandbox.proto in P25b (M29) to break the +// sandbox.proto <-> spec.proto cycle that would otherwise form when the +// CreateSandboxFromSpec RPC's request/event types land in sandbox.proto +// (sandbox.proto needs to import spec.proto for SandboxSpec; spec.proto +// imported sandbox.proto for Resources + Runtime). Wire shape is +// unchanged — both messages remain in the depot.sandbox.v1 package; only +// their `.proto` home is different. Mirrors the hook.proto split-out +// pattern at P23. + +// 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) +) + +// Resources caller may request for a sandbox (DEP-4512). +// +// All fields optional; unset means "use server-side default". TODO(policy): +// defaults are currently server-controlled and undocumented at the wire layer. +// A future slice will pin them either here in proto comments or in a published +// policy doc. +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 +} + +// Runtime selector for a sandbox (DEP-4512). Callers pick exactly one of: +// - `named`: a curated runtime identifier (e.g. "node24") resolved server-side +// - `image_ref`: an arbitrary OCI image reference +// +// TODO(open-question): the catalog of named runtimes is intentionally open in +// this slice — any string is accepted on the wire and the server may reject +// unknown names. A follow-up slice picks between a proto enum vs server config. +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 { + Named string `protobuf:"bytes,1,opt,name=named,proto3,oneof"` +} + +type Runtime_ImageRef struct { + 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..e9cf01cb --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/sandbox.pb.go @@ -0,0 +1,1751 @@ +// 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 is the lifecycle enum for a sandbox. +// +// CREATED: row materialized, no compute backing assigned yet. +// ASSIGNED: compute backing assigned, VM not yet started. +// STARTING: VM boot in progress. +// RUNNING: VM booted, ready to accept commands. +// FINISHED: clean termination (graceful stop, normal exit). +// CANCELLED: forced termination (kill). +// FAILED: ended with an error (image pull fail, OOM, panic, etc.). +// +// Values mirror the orchestration-side ComputeSandbox.state vocabulary at v0 +// to minimize the projection layer. The proto is its own type — when v2 needs +// to diverge (e.g. surface a value the orchestration doesn't track, or hide +// a CI-only sub-state), it can do so without coordinating with the underlying +// schema. Terminal-state granularity today (FINISHED vs CANCELLED vs FAILED) +// carries the gross reason. +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 how a sandbox ended (DEP-4518). Populated only +// on terminal status (FINISHED / CANCELLED / FAILED). UNSPECIFIED is the proto sentinel and +// is never written by the server; callers MUST treat it as "unknown". +// +// GRACEFUL: StopSandbox path — clean shutdown the caller asked for. +// FORCED: KillSandbox path — caller asked for an immediate end. +// TIMED_OUT: TTL expired — server-initiated termination. +// SYSTEM_FAULT: host failure, OOM, panic, or any other 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 canonical message returned by the lifecycle RPCs. +// +// Field numbering — the 4..10 block was reserved-by-comment after M2; M4 +// consumes it fully along with 13..15 for the terminal metadata. 11/12 stay +// with Resources/Runtime (claimed by M2). No gaps remain. +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 (DEP-4518). created_at is always populated; the other + // two are populated 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"` + // TTL surface (DEP-4518). expires_at is authoritative storage when known; + // timeout_ms_remaining is recomputed on read against now(). Both are unset + // when the sandbox carries 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 (DEP-4518). Populated only after terminal status, and only + // when a metering source is available. TODO(metering): wire to the + // SandboxUsage table populated by tasks/cron/createSandboxUsage.ts. Until + // wired, both fields remain unset even on terminal sandboxes. + 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"` + // Effective resources + runtime echoed back from the request so callers see + // what the server actually resolved (DEP-4512). + 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 (DEP-4518). All three are populated only on + // terminal status (FINISHED / CANCELLED / FAILED). exit_code uses int32 in the Unix 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"` +} + +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 "" +} + +// NetworkUsage records bytes transferred over the sandbox's primary network +// interface (DEP-4518). Split counters mirror typical cloud-vendor metering +// surfaces and keep ingress/egress visible separately even when one direction +// dominates. +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 + + // Human label for the sandbox, scoped to the organization. Optional. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Requested resources; server applies defaults for unset fields (DEP-4512). + Resources *Resources `protobuf:"bytes,2,opt,name=resources,proto3,oneof" json:"resources,omitempty"` + // Requested runtime; server resolves `named` against its catalog or pulls + // `image_ref` directly (DEP-4512). + Runtime *Runtime `protobuf:"bytes,3,opt,name=runtime,proto3,oneof" json:"runtime,omitempty"` + // Sandbox content source — git/snapshot/image/template variants. The v0 + // CreateSandbox handler does NOT read this field; it is wired by the + // closing slice of the Source/Git Cluster (DEP-4531) and consumed by + // DEP-4529 (snapshot). Unset == prior behavior. + 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 +} + +// ListSandboxes — DEP-4514. State + creation-time filter, cursor-based +// pagination (page_token encodes the last seen ComputeSandbox.createdAt; +// the cursor pattern mirrors src/domains/ci/service/list-runs.ts). +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 "" +} + +// StopSandbox — DEP-4515. Graceful shutdown. The server records the termination +// request on the row immediately; when `blocking` is true the RPC waits up to a +// server-side cap for the VM to reach terminal status before returning. +// +// `signal` lives on KillSandbox, not here (architecture §5). +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 polls until the sandbox reaches a terminal state (or + // the server-side cap expires) before responding. If false (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 row after recording the termination request. Status is either + // either RUNNING (with terminationRequestedAt non-null) or a terminal status or a terminal status when + // the row 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 +} + +// KillSandbox — DEP-4515. Forced termination. Fire-and-forget; no blocking +// option. `signal` is documented at the wire level but ignored by the v0 +// server (which always asks the VM scheduler to mark the row `cancelled`). +// A future slice wires this through to vm3 SendSignal. +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 (e.g. "SIGKILL"). Reserved for forward-compat; v0 ignores it + // and always issues a hard cancel. + 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 + + // Status filter: if non-empty, only sandboxes whose status is in this set + // are returned. (Sketch uses the plural `states` for the field name; + // mirrored here.) + 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, 0xe7, 0x07, 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, 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, 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, 0xd6, 0x15, 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, 0x53, 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, 0x1e, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x5d, + 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, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4d, 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, 0x1e, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x50, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x59, 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, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 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 + (*CommandRef)(nil), // 22: depot.sandbox.v1.CommandRef + (*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 + (*CommandEvent)(nil), // 46: depot.sandbox.v1.CommandEvent + (*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.CommandRef + 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.CommandEvent + 46, // 61: depot.sandbox.v1.SandboxService.RunCommandPipe:output_type -> depot.sandbox.v1.CommandEvent + 46, // 62: depot.sandbox.v1.SandboxService.RunHook:output_type -> depot.sandbox.v1.CommandEvent + 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.CommandEvent + 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..448a861d --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go @@ -0,0 +1,1041 @@ +// 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) + // DEP-4515 — stop is graceful (terminated_by=GRACEFUL); kill is forced + // (terminated_by=FORCED). Both are idempotent on already-terminal sandboxes + // in the sense that they return FailedPrecondition rather than re-running. + StopSandbox(context.Context, *connect.Request[v1.StopSandboxRequest]) (*connect.Response[v1.StopSandboxResponse], error) + KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) + // DEP-4517 — server-streaming command execution. The response stream begins + // with a Started event and ends with Finished (or terminates with a Connect + // error). Persistence + the K-Streaming buffered-event-log + the vm3 + // Execute proxy land with the next two slices (P10b/P10c); this RPC is + // wire-reachable today but returns Unimplemented until those land. + RunCommand(context.Context, *connect.Request[v1.RunCommandRequest]) (*connect.ServerStreamForClient[v1.CommandEvent], error) + // DEP-4519 — bidirectional-streaming command execution with stdin. The + // first request on the stream MUST carry `init`; subsequent requests carry + // `stdin` bytes. The response stream shape is identical to RunCommand. + // stdin bytes flow through to the guest process and are NOT persisted. + RunCommandPipe(context.Context) *connect.BidiStreamForClient[v1.RunCommandPipeRequest, v1.CommandEvent] + // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced + // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator + // (P25b). NOT exposed as an SDK method. Wraps the hook command in + // /bin/sh -lc, prepends /tmp/.depot-env sourcing, exports merged env, + // cd's to /workspace, and either streams CommandEvents (foreground) or + // detaches via setsid with log redirect to + // /var/log/depot/hook--.log (detached). Stage label is + // metadata-only — execution shape does NOT vary across the six HookStage + // values. Architecture §12. Spec Cluster INTERIOR step 2/5. + RunHook(context.Context, *connect.Request[v1.RunHookRequest]) (*connect.ServerStreamForClient[v1.CommandEvent], error) + // DEP-4520 — read side of the Command surface. Get and List return persisted + // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when + // the command is still running on the same replica) tails live output via + // the process-local per-cmd BufferedEventLog. + GetCommand(context.Context, *connect.Request[v1.CommandRef]) (*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.CommandEvent], error) + // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the + // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits + // SandboxLogEvent messages to the subscriber. v0 emits the four + // boot-output kinds only (boot_stdout / boot_stderr / boot_finished / + // evicted_early_data); future event kinds use the reserved tags 5..15 on + // the SandboxLogEvent oneof. Cross-replica caveat (MD-33-3): if the + // sandbox's boot buffer is hosted on a different replica, the stream + // closes cleanly with no events. No past-replay rail in v0 — terminal + // sandboxes return FailedPrecondition. See logs.proto. + StreamSandboxLogs(context.Context, *connect.Request[v1.StreamSandboxLogsRequest]) (*connect.ServerStreamForClient[v1.SandboxLogEvent], error) + // DEP-4522 — deliver a signal to a running command. Default signal is + // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with + // InvalidArgument in v0 (the abort path stays SIGKILL-free). Kills of + // commands that have already finished (or were never registered) return + // NotFound, which the SDK surfaces as Code.NotFound. + KillCommand(context.Context, *connect.Request[v1.KillCommandRequest]) (*connect.Response[v1.KillCommandResponse], error) + // DEP-4527 — interactive pseudo-terminal. Bidi-streaming RPC; the first + // request carries `start`, subsequent requests carry stdin bytes or window + // resize messages. The response stream emits `data` byte chunks until the + // shell exits, then a single `exit` carrying the exit code. v0 always runs + // /bin/sh; the shell is intentionally not selectable at the wire layer. + // Architecture §13: no reattach — closing the stream ends the pty. + OpenPty(context.Context) *connect.BidiStreamForClient[v1.OpenPtyRequest, v1.OpenPtyResponse] + // ─── FileSystem (filesystem.proto, DEP-4524) ──────────────────────────── + // Same RPC surface across exec-first (P15) and native vm3 (P17) + // implementations; the server picks per-org behind a resolver. Errors + // travel as Connect errors with a FileSystemErrorDetail attached — see + // src/sandbox/fs-errors.ts for the remapper. + 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] + // ─── Snapshot (snapshot.proto, DEP-4529) ──────────────────────────────── + // Durable filesystem snapshots of a sandbox. The wire surface + the SDK + // ergonomics ship here; the vm3-side snapshot/restore pipeline that backs + // these RPCs is a follow-on slice — v0 handlers return Unimplemented until + // that lands. CreateSnapshot will additionally fire a graceful StopSandbox + // on the source sandbox once the snapshot is durable (Vercel parity, + // architecture §6). + 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.CommandEvent]( + httpClient, + baseURL+SandboxServiceRunCommandProcedure, + opts..., + ), + runCommandPipe: connect.NewClient[v1.RunCommandPipeRequest, v1.CommandEvent]( + httpClient, + baseURL+SandboxServiceRunCommandPipeProcedure, + opts..., + ), + runHook: connect.NewClient[v1.RunHookRequest, v1.CommandEvent]( + httpClient, + baseURL+SandboxServiceRunHookProcedure, + opts..., + ), + getCommand: connect.NewClient[v1.CommandRef, v1.GetCommandResponse]( + httpClient, + baseURL+SandboxServiceGetCommandProcedure, + opts..., + ), + listCommands: connect.NewClient[v1.ListCommandsRequest, v1.ListCommandsResponse]( + httpClient, + baseURL+SandboxServiceListCommandsProcedure, + opts..., + ), + attachCommand: connect.NewClient[v1.AttachCommandRequest, v1.CommandEvent]( + 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.CommandEvent] + runCommandPipe *connect.Client[v1.RunCommandPipeRequest, v1.CommandEvent] + runHook *connect.Client[v1.RunHookRequest, v1.CommandEvent] + getCommand *connect.Client[v1.CommandRef, v1.GetCommandResponse] + listCommands *connect.Client[v1.ListCommandsRequest, v1.ListCommandsResponse] + attachCommand *connect.Client[v1.AttachCommandRequest, v1.CommandEvent] + 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.CommandEvent], 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.CommandEvent] { + 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.CommandEvent], 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.CommandRef]) (*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.CommandEvent], 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) + // DEP-4515 — stop is graceful (terminated_by=GRACEFUL); kill is forced + // (terminated_by=FORCED). Both are idempotent on already-terminal sandboxes + // in the sense that they return FailedPrecondition rather than re-running. + StopSandbox(context.Context, *connect.Request[v1.StopSandboxRequest]) (*connect.Response[v1.StopSandboxResponse], error) + KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) + // DEP-4517 — server-streaming command execution. The response stream begins + // with a Started event and ends with Finished (or terminates with a Connect + // error). Persistence + the K-Streaming buffered-event-log + the vm3 + // Execute proxy land with the next two slices (P10b/P10c); this RPC is + // wire-reachable today but returns Unimplemented until those land. + RunCommand(context.Context, *connect.Request[v1.RunCommandRequest], *connect.ServerStream[v1.CommandEvent]) error + // DEP-4519 — bidirectional-streaming command execution with stdin. The + // first request on the stream MUST carry `init`; subsequent requests carry + // `stdin` bytes. The response stream shape is identical to RunCommand. + // stdin bytes flow through to the guest process and are NOT persisted. + RunCommandPipe(context.Context, *connect.BidiStream[v1.RunCommandPipeRequest, v1.CommandEvent]) error + // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced + // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator + // (P25b). NOT exposed as an SDK method. Wraps the hook command in + // /bin/sh -lc, prepends /tmp/.depot-env sourcing, exports merged env, + // cd's to /workspace, and either streams CommandEvents (foreground) or + // detaches via setsid with log redirect to + // /var/log/depot/hook--.log (detached). Stage label is + // metadata-only — execution shape does NOT vary across the six HookStage + // values. Architecture §12. Spec Cluster INTERIOR step 2/5. + RunHook(context.Context, *connect.Request[v1.RunHookRequest], *connect.ServerStream[v1.CommandEvent]) error + // DEP-4520 — read side of the Command surface. Get and List return persisted + // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when + // the command is still running on the same replica) tails live output via + // the process-local per-cmd BufferedEventLog. + GetCommand(context.Context, *connect.Request[v1.CommandRef]) (*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.CommandEvent]) error + // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the + // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits + // SandboxLogEvent messages to the subscriber. v0 emits the four + // boot-output kinds only (boot_stdout / boot_stderr / boot_finished / + // evicted_early_data); future event kinds use the reserved tags 5..15 on + // the SandboxLogEvent oneof. Cross-replica caveat (MD-33-3): if the + // sandbox's boot buffer is hosted on a different replica, the stream + // closes cleanly with no events. No past-replay rail in v0 — terminal + // sandboxes return FailedPrecondition. See logs.proto. + StreamSandboxLogs(context.Context, *connect.Request[v1.StreamSandboxLogsRequest], *connect.ServerStream[v1.SandboxLogEvent]) error + // DEP-4522 — deliver a signal to a running command. Default signal is + // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with + // InvalidArgument in v0 (the abort path stays SIGKILL-free). Kills of + // commands that have already finished (or were never registered) return + // NotFound, which the SDK surfaces as Code.NotFound. + KillCommand(context.Context, *connect.Request[v1.KillCommandRequest]) (*connect.Response[v1.KillCommandResponse], error) + // DEP-4527 — interactive pseudo-terminal. Bidi-streaming RPC; the first + // request carries `start`, subsequent requests carry stdin bytes or window + // resize messages. The response stream emits `data` byte chunks until the + // shell exits, then a single `exit` carrying the exit code. v0 always runs + // /bin/sh; the shell is intentionally not selectable at the wire layer. + // Architecture §13: no reattach — closing the stream ends the pty. + OpenPty(context.Context, *connect.BidiStream[v1.OpenPtyRequest, v1.OpenPtyResponse]) error + // ─── FileSystem (filesystem.proto, DEP-4524) ──────────────────────────── + // Same RPC surface across exec-first (P15) and native vm3 (P17) + // implementations; the server picks per-org behind a resolver. Errors + // travel as Connect errors with a FileSystemErrorDetail attached — see + // src/sandbox/fs-errors.ts for the remapper. + 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) + // ─── Snapshot (snapshot.proto, DEP-4529) ──────────────────────────────── + // Durable filesystem snapshots of a sandbox. The wire surface + the SDK + // ergonomics ship here; the vm3-side snapshot/restore pipeline that backs + // these RPCs is a follow-on slice — v0 handlers return Unimplemented until + // that lands. CreateSnapshot will additionally fire a graceful StopSandbox + // on the source sandbox once the snapshot is durable (Vercel parity, + // architecture §6). + 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.CommandEvent]) 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.CommandEvent]) 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.CommandEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("depot.sandbox.v1.SandboxService.RunHook is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) GetCommand(context.Context, *connect.Request[v1.CommandRef]) (*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.CommandEvent]) 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..c7e24766 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go @@ -0,0 +1,123 @@ +// depot.sandbox.v1 — CreateSandboxFromSpec RPC envelope + service +// (DEP-4534 / P25b, Spec Cluster CLOSING). +// +// This file hosts the RPC for declarative sandbox creation from a SandboxSpec. +// It lives in its own service (SandboxSpecService) rather than on the existing +// SandboxService — the request/event types reference BOTH Sandbox (from +// sandbox.proto) AND SandboxSpec (from spec.proto), which sets up an import +// cycle if those types are added to sandbox.proto and sandbox.proto then has +// to import spec.proto in turn. Carving the RPC + envelope into a separate +// file with a separate service breaks that cycle cleanly (mirrors the +// hook.proto split-out done at P23 for the same kind of cycle). +// +// SDK consumes SandboxSpecService alongside SandboxService — same Connect +// transport, same auth surface. The orchestrator implementation lives in +// src/sandbox/spec-orchestrator.ts; the handler is a thin tokenAuth + +// authorizeAndEnterOrg + delegate. + +// 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..7c4d29ee --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/snapshot.pb.go @@ -0,0 +1,777 @@ +// depot.sandbox.v1.Snapshot — durable filesystem snapshot of a sandbox. +// +// DEP-4529 — Snapshot Cluster CRUD surface. The cluster ships the wire surface +// + the SDK ergonomics; the vm3-side snapshot/restore pipeline that backs the +// handlers is a follow-on. v0 handlers return Unimplemented until that lands. +// +// Storage reuses the legacy SandboxTemplate registry (one row per snapshot, +// soft-deleted via deletedAt). The cross-package selector SnapshotRef lives 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) +) + +// Snapshot is the canonical message returned by the Snapshot CRUD RPCs. +// +// `expires_at` is reserved for a future TTL surface; v0 leaves it 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"` + // Forward-compat TTL hint. The v0 server IGNORES this value; the field is + // reserved on the wire so the SDK option lands today and a future slice + // can wire 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..e1591b76 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/source.pb.go @@ -0,0 +1,541 @@ +// depot.sandbox.v1.Source — shared sandbox-creation source descriptor. +// +// The `source` field on CreateSandboxRequest (and, in a later slice, +// CreateSandboxFromSpecRequest) accepts one of: git, snapshot, image, template. +// Tickets that reference this without introducing it: DEP-4529 (snapshot +// source consumer), DEP-4531 (git source consumer, the closing P20 slice of +// the Source/Git Cluster). +// +// Cluster boundary note: none of GitSource/SnapshotSource/ImageSource/ +// TemplateSource embed SandboxRef, so this file intentionally does NOT +// import refs.proto. If a future variant needs SandboxRef, import refs.proto +// here — NOT sandbox.proto (which would create a cycle). + +// 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"` // DEP-4531 — host-side fetch, ext4 layer mount +} + +type Source_Snapshot struct { + Snapshot *SnapshotSource `protobuf:"bytes,2,opt,name=snapshot,proto3,oneof"` // DEP-4529 — create from snapshot +} + +type Source_Image struct { + Image *ImageSource `protobuf:"bytes,3,opt,name=image,proto3,oneof"` // raw OCI image (v1 carry-over) +} + +type Source_Template struct { + Template *TemplateSource `protobuf:"bytes,4,opt,name=template,proto3,oneof"` // legacy template id (v1 carry-over) +} + +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"` + // Org secret name carrying credentials. Resolution rules: + // unset → public repo (no auth); set → looked up via org secret store. + // TODO(open-question): DEP-4531 leaves credential resolution underspecified; + // the closing slice picks the resolution semantics. + 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..311d5f11 --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/spec.pb.go @@ -0,0 +1,755 @@ +// depot.sandbox.v1.SandboxSpec — declarative spec messages (DEP-4534 / P22). +// +// Spec Cluster INTERIOR (step 1 of 5). This file lands ONLY the message types +// that describe a sandbox spec: SandboxSpec + nested SSHSpec / ContainerSpec / +// BuildSpec / Hooks. HookSpec + HookStage live in hook.proto (P23). The +// CreateSandboxFromSpec RPC + its request/event types live in spec_rpc.proto +// (M29 / P25b) — moved there to break the sandbox.proto <-> spec.proto cycle +// that would otherwise form. +// +// MCP support was removed from v0 in M30 (separate roadmap item); MCPSpec / +// MCPServer message types + SandboxSpec.mcp field are intentionally absent. +// +// SandboxSpec mirrors the YAML schema field-for-field per architecture §15. +// CLI shapes carry verbatim into the proto; the SDK adapter does any cosmetic +// renaming on the way out. Reference for the YAML schema: cli/pkg/sandbox/ +// spec.go on the unmerged rob/dep-4395 branch — read-only context, NOT a +// dependency. The server-side YAML parser lives in src/sandbox/spec.ts and is +// dormant in v0 (no RPC consumes it until the closing Spec Cluster slice). +// +// Cluster boundary note: SandboxSpec does NOT embed SandboxRef directly +// (only value-shapes — Source, Resources, Runtime — drawn from sibling proto +// files). This file therefore does NOT import refs.proto, matching the +// dependency rule established by source.proto. + +// 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) +) + +// SandboxSpec mirrors the YAML schema field-for-field. Architecture §15: CLI +// shapes carry verbatim into the proto; the SDK adapter does any cosmetic +// renaming on the way out. +type SandboxSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identity / lifecycle knobs. + 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"` + // Source / image. Either `source` or `container.build` may be set; not both. + // v0 parser enforces this mutual exclusion. (The DEP-4526 ticket leaves open + // whether build-then-mount should also be allowed; the conservative v0 + // interpretation is "not both" — revisited in a later slice if customer + // demand emerges.) + 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"` + // Pre-built image ref; bypasses `container.build`. + Image *string `protobuf:"bytes,8,opt,name=image,proto3,oneof" json:"image,omitempty"` + // Runtime. + 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"` + 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 config — retained for CLI parity even though the SDK does not surface + // SSH details directly. The legacy v1 ssh_config maps here. + Ssh *SSHSpec `protobuf:"bytes,12,opt,name=ssh,proto3,oneof" json:"ssh,omitempty"` + // Hook lifecycle stages — `on.create`, `on.start`, etc. + 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 +} + +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 +} + +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 +} + +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 per stage. Each stage holds an ordered list of HookSpec entries. +// Bare-string YAML form ("echo hi") parses into HookSpec{command: "echo hi"} +// — see src/sandbox/spec.ts for normalization. +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..6956ba7e --- /dev/null +++ b/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go @@ -0,0 +1,788 @@ +// depot.sandbox.v1 — CreateSandboxFromSpec RPC envelope + service +// (DEP-4534 / P25b, Spec Cluster CLOSING). +// +// This file hosts the RPC for declarative sandbox creation from a SandboxSpec. +// It lives in its own service (SandboxSpecService) rather than on the existing +// SandboxService — the request/event types reference BOTH Sandbox (from +// sandbox.proto) AND SandboxSpec (from spec.proto), which sets up an import +// cycle if those types are added to sandbox.proto and sandbox.proto then has +// to import spec.proto in turn. Carving the RPC + envelope into a separate +// file with a separate service breaks that cycle cleanly (mirrors the +// hook.proto split-out done at P23 for the same kind of cycle). +// +// SDK consumes SandboxSpecService alongside SandboxService — same Connect +// transport, same auth surface. The orchestrator implementation lives in +// src/sandbox/spec-orchestrator.ts; the handler is a thin tokenAuth + +// authorizeAndEnterOrg + delegate. + +// 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} +} + +// CreateSandboxFromSpecRequest — carries a SandboxSpec (either pre-parsed +// proto or YAML string) plus the ${input.KEY} inputs map. The orchestrator +// applies inputs substitution, validates, then runs the create flow. +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() {} + +// CreateSandboxFromSpecEvent — server-streamed event frames. The orchestrator +// yields SandboxStarted once the VM reaches running state and any post-boot +// source delivery completes; then HookEvent frames per CREATE-stage hook; +// the stream ends with exactly one terminal frame (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 *CommandEvent `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() *CommandEvent { + 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, 0x84, 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, 0x91, 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, 0x34, 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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 + (*CommandEvent)(nil), // 11: depot.sandbox.v1.CommandEvent +} +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.CommandEvent + 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/proto/depot/sandbox/v1/command.proto b/proto/depot/sandbox/v1/command.proto new file mode 100644 index 00000000..f4ae6c9d --- /dev/null +++ b/proto/depot/sandbox/v1/command.proto @@ -0,0 +1,218 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; +import "google/protobuf/timestamp.proto"; + +// Command surface for depot.sandbox.v1 (DEP-4517, DEP-4519, DEP-4520). +// +// RunCommand (DEP-4517) and RunCommandPipe (DEP-4519) shipped first. +// GetCommand, ListCommands, and AttachCommand (DEP-4520) ship next. +// KillCommand (DEP-4522) lands in this slice. +// +// SandboxRef is imported from refs.proto (introduced in M7). The previous +// import-cycle workaround — passing `string sandbox_id` on RunCommandRequest — +// is gone now that refs.proto exists as a neutral home for the Ref types. +// +// Bytes-everywhere on the wire (DEP-4404): stdout/stderr chunks are `bytes`, +// not `string`. UTF-8 decoding happens in the SDK adapter, not in the proto. + +// CommandStatus mirrors the lifecycle stages a command transitions through. +// +// PENDING: queued, not yet started in the guest. +// RUNNING: started; bytes can be streaming. +// FINISHED: process exited; exit_code populated. +// FAILED: process never started, or the guest reported an error path. +// KILLED: signaled mid-run (DEP-4522). +enum CommandStatus { + COMMAND_STATUS_UNSPECIFIED = 0; + COMMAND_STATUS_PENDING = 1; + COMMAND_STATUS_RUNNING = 2; + COMMAND_STATUS_FINISHED = 3; + COMMAND_STATUS_FAILED = 4; + COMMAND_STATUS_KILLED = 5; +} + +// Command is the persisted metadata for a single RunCommand invocation. The +// row shape lives in src/sandbox/schema-additions.ts (CommandRow); this is its +// wire projection. Populated by Get/List/Attach RPCs in follow-up slices. +message Command { + // Server-minted ULID. Architecture §7. + string cmd_id = 1; + string sandbox_id = 2; + string cmd = 3; + repeated string args = 4; + optional string cwd = 5; + map env = 6; + bool sudo = 7; + bool detached = 8; + CommandStatus status = 9; + google.protobuf.Timestamp started_at = 10; + optional google.protobuf.Timestamp finished_at = 11; + optional int32 exit_code = 12; + // Per-stream cumulative byte counts. Split per architecture §8. + int64 stdout_bytes_emitted = 13; + int64 stderr_bytes_emitted = 14; +} + +// CommandEvent is the streamed event during RunCommand / RunCommandPipe / +// AttachCommand. Bytes everywhere; the SDK decodes UTF-8 at the adapter layer. +// +// EvictedEarlyData fires only on reattach scenarios where the K-Streaming ring +// (architecture §10) had to drop head data before the consumer subscribed. +// It is part of the oneof from day one so the wire shape doesn't need a +// reserved slot retrofit when the BufferedEventLog impl lands with P10b. +message CommandEvent { + oneof event { + Started started = 1; + StdoutBytes stdout = 2; + StderrBytes stderr = 3; + Finished finished = 4; + Error error = 5; + EvictedEarlyData evicted = 6; + } + + message Started { + string cmd_id = 1; + google.protobuf.Timestamp started_at = 2; + } + message StdoutBytes { + bytes data = 1; + // Cumulative byte index for this stream as of the END of `data`. + int64 byte_offset = 2; + google.protobuf.Timestamp timestamp = 3; + } + message StderrBytes { + bytes data = 1; + int64 byte_offset = 2; + google.protobuf.Timestamp timestamp = 3; + } + message Finished { + int32 exit_code = 1; + google.protobuf.Timestamp finished_at = 2; + } + // Mid-stream failure where the stream itself continues (e.g. one chunk lost + // but more coming). Connect errors remain the primary error channel; this + // payload is for partial-degradation cases. Bare string for v0; structured + // codes are a follow-on if call sites need to discriminate. + message Error { + string reason = 1; + } + // K-Streaming evicted head data before this consumer subscribed. Carries the + // per-stream byte counts that were dropped so the consumer can reason about + // the gap. Architecture §10. + message EvictedEarlyData { + int64 dropped_bytes_stdout = 1; + int64 dropped_bytes_stderr = 2; + } +} + +// RunCommand — DEP-4517. Server-streaming RPC; the response stream is a +// sequence of CommandEvents starting with Started and ending with Finished +// (or terminating with a Connect error). +message RunCommandRequest { + // Sandbox to run the command in. Tag 1 was `string sandbox_id` in M6 (a + // workaround for the proto import cycle that refs.proto now resolves) — see + // the commit body for the wire-break audit. Safe to reuse tag 1 here because + // RunCommand is shipped Unimplemented; no client depends on the prior shape. + SandboxRef sandbox = 1; + string cmd = 2; + repeated string args = 3; + optional string cwd = 4; + map env = 5; + optional bool sudo = 6; + // When true, the server returns the Started event and disconnects the + // stream; the command runs in the background and can be reattached via + // AttachCommand (DEP-4520). + optional bool detached = 7; +} + +// RunCommandPipe — DEP-4519. Client-side bidirectional streaming. The first +// request on the stream MUST carry `init` (the same RunCommandRequest the +// blocking RunCommand RPC uses). Every subsequent request carries `stdin` +// bytes; closing the request stream signals EOF on the command's stdin. +// +// The response stream is a sequence of CommandEvents identical in shape to +// RunCommand's: Started → Stdout/Stderr bytes → Finished (or Connect error). +// +// stdin bytes are NOT persisted in v0 — only stdout and stderr land in the +// ClickHouse log table. AttachCommand replay shows command OUTPUT regardless +// of whether the original command was Run or RunCommandPipe. +message RunCommandPipeRequest { + oneof input { + RunCommandRequest init = 1; + bytes stdin = 2; + } +} + +// GetCommand / ListCommands / AttachCommand — DEP-4520. + +// GetCommand looks up command metadata by cmd_id. Authorization is sandbox- +// scoped: the server resolves cmd_id → sandbox_id via a Kysely select filtered +// by the caller's orgId, then enforces sandbox-level access on the resolved +// sandbox row (api/CLAUDE.md authz convention). +message GetCommandResponse { + Command command = 1; +} + +// ListCommands enumerates commands within a single sandbox, newest first. +// Pagination follows the ListSandboxes cursor convention: page_token is an +// opaque server-minted string that clients pass back verbatim to fetch the +// next page. +message ListCommandsRequest { + SandboxRef sandbox = 1; + optional int32 page_size = 2; + optional string page_token = 3; + // If non-empty, only commands whose status is in this set are returned. + // UNSPECIFIED entries are ignored. The full CommandStatus enum is accepted. + repeated CommandStatus status_filter = 4; +} +message ListCommandsResponse { + repeated Command commands = 1; + optional string next_page_token = 2; +} + +// AttachCommand re-subscribes to the output of a previously-issued +// RunCommand / RunCommandPipe. The response stream is the same CommandEvent +// sequence those RPCs emit live: replay of persisted Stdout/Stderr chunks +// followed (if the command is still running on the same replica) by live tail. +// +// Sandbox-level authz: cmd_id is resolved to its sandbox_id server-side, then +// the standard sandbox-row org check applies. CommandRef carries only the +// cmd_id today (refs.proto's selector pattern); a future sandbox-qualified +// selector form can be added without a wire break. +message AttachCommandRequest { + CommandRef command = 1; + // Per-stream WATERMARK: replay events whose byte_offset is STRICTLY GREATER + // than the supplied offset. The wire field byte_offset is end-of-chunk + // (cumulative bytes through the END of `data`), so a caller that replayed + // up through "I last received stdout byteOffset = 100" supplies + // stdout_offset = 100 and receives the next event starting at >100. Unset + // fields default to 0 — start replay from the beginning of that stream. + optional AttachOffset since_offset = 2; +} +message AttachOffset { + // Watermark on stdout: yield events whose byte_offset > stdout_offset. + optional int64 stdout_offset = 1; + // Watermark on stderr: yield events whose byte_offset > stderr_offset. + optional int64 stderr_offset = 2; +} + +// KillCommand — DEP-4522. Targets a previously-issued command by cmd_id and +// asks the host to deliver `signal` (default SIGTERM) to the running process. +// Two-step authorization mirrors AttachCommand: resolve cmd_id → sandbox_id +// scoped to the caller's org, then enforce sandbox-level access on the +// resolved sandbox row. Signal is a string passthrough to vm3 SendSignal; +// unknown signal names propagate vm3's InvalidArgument. Killing a command +// the host registry no longer knows about (already-finished or never- +// registered) returns NotFound — this covers the kill-on-finished race +// without a separate code path. +message KillCommandRequest { + string cmd_id = 1; + // Signal name (e.g. "SIGTERM", "SIGINT"). Omit for SIGTERM. SIGKILL is + // rejected by vm3 in v0 to keep the abort path SIGKILL-free; that + // rejection surfaces here as a Connect InvalidArgument. + optional string signal = 2; +} +message KillCommandResponse {} diff --git a/proto/depot/sandbox/v1/filesystem.proto b/proto/depot/sandbox/v1/filesystem.proto new file mode 100644 index 00000000..22995e52 --- /dev/null +++ b/proto/depot/sandbox/v1/filesystem.proto @@ -0,0 +1,219 @@ +// depot.sandbox.v1 — FileSystem surface (DEP-4524). +// +// Covers the exec-first server-side first slice (P15) and the native vm3 swap +// (DEP-4525 / P17). Same proto surface across implementations; the server +// picks the active implementation per-org. +// +// Errors travel as Connect errors with a `FileSystemErrorDetail` attached. +// The SDK adapter (sdk-sandbox/src/errors.ts) converts that into a Node-shape +// Error object carrying `{code, syscall, path, errno}` so customers can keep +// coding against node:fs/promises shape. +// +// The RPC declarations live on `service SandboxService` in sandbox.proto; +// this file only carries messages + enums. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; + +// FileSystemErrorCode mirrors the Node fs error codes the SDK exposes. +// Server attaches one of these on a Connect error; client maps to Error.code. +// +// `OTHER` is the catch-all when the exec-first classifier cannot pin a +// specific Node code (e.g. busybox-stderr phrasing the regex doesn't match); +// callers surface it as a generic FileSystemError without losing the syscall +// + path context. +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; +} + +// FileSystemErrorDetail is the proto message the server attaches to the +// Connect error (`ConnectError.details`). The SDK reads it back via +// `findDetails(FileSystemErrorDetailSchema)` and synthesizes a Node-shape +// `FileSystemError`. +message FileSystemErrorDetail { + FileSystemErrorCode code = 1; + string syscall = 2; + string path = 3; + optional string message = 4; +} + +// FileType is the discriminator returned by Stat. SDK uses it to back +// `.isDirectory()`/`.isFile()`/... on a node:fs/promises-shape 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; +} + +// ─── Unary RPCs ────────────────────────────────────────────────────────── + +message MkdirRequest { + SandboxRef sandbox = 1; + string path = 2; + // mkdir -p semantics; default false → ENOENT on a missing parent. + optional bool recursive = 3; + // Octal mode (e.g. 0o755 = 0x1ED). Server applies the umask when unset. + optional uint32 mode = 4; +} +message MkdirResponse {} + +message StatRequest { + SandboxRef sandbox = 1; + string path = 2; + // Follow symlinks (stat) vs not (lstat). Default true. + 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; + // node:fs/promises.readdir({withFileTypes}) parity: when false the entries + // still carry name + type, but the SDK exposes a string[] surface. + 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; + // rm -rf when true. + optional bool recursive = 3; + // node fs.rm({force: true}) parity — ENOENT is swallowed. + 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; + // cp -p — preserve mode/owner/timestamps where the server can. + 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; + // Octal int; the SDK accepts string ("755") or number (0o755) and converts. + 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; + // 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; + // F_OK / R_OK / W_OK / X_OK bitmask. Server defaults to F_OK when unset. + optional uint32 mode = 3; +} +message AccessResponse {} + +// ─── Streaming RPCs ────────────────────────────────────────────────────── + +message ReadFileRequest { + SandboxRef sandbox = 1; + string path = 2; +} + +// FileChunk is the streamed shape for ReadFile — chunks land in order, with +// the last carrying `eof = true` when the implementation knows. The stream +// closing also signals EOF. +message FileChunk { + bytes data = 1; + optional bool eof = 2; +} + +// WriteFile — first request on the stream MUST carry `init`; subsequent +// requests carry `data` bytes. `append` selects O_APPEND semantics. `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; + // mkdir -p the parent path 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..a0637d48 --- /dev/null +++ b/proto/depot/sandbox/v1/hook.proto @@ -0,0 +1,63 @@ +// depot.sandbox.v1 — Hook value-shapes + RunHook wire envelope (DEP-4534 / P23). +// +// Spec Cluster INTERIOR (step 2 of 5). This file holds the hook-related +// messages: the value-shapes (HookSpec + HookStage) that the YAML spec uses +// and the wire envelope (RunHookRequest) that the RunHook RPC takes. +// +// HookSpec and HookStage originally shipped in spec.proto at S24 (P22). +// They moved here at P23 to break an import cycle that would otherwise form +// once sandbox.proto adopts the RunHook RPC: +// +// sandbox.proto -> hook.proto -> spec.proto -> sandbox.proto +// +// (spec.proto imports sandbox.proto for Resources + Runtime; sandbox.proto +// must import hook.proto for RunHookRequest; so hook.proto cannot transitively +// import sandbox.proto.) Wire shapes are unchanged — both messages remain in +// the depot.sandbox.v1 package; only their `.proto` home is different. +// +// RunHook is wire-reachable today but hidden from the public SDK surface +// (pattern F per architecture §15). The canonical consumer is the +// CreateSandboxFromSpec orchestrator that lands in P25b — no caller exists +// in trunk today. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; + +// HookSpec — a single hook command within one lifecycle stage. The YAML +// bare-string form ("echo hi") parses into HookSpec{command: "echo hi"}; +// see src/sandbox/spec.ts for normalization. +message HookSpec { + string command = 1; + optional bool detach = 2; + optional string name = 3; + optional int32 timeout_seconds = 4; +} + +// HookStage names a lifecycle stage. Used by the RunHook RPC + the future +// Hooks-replay surface (architecture §12). Stage label is metadata-only +// from the daemon's perspective — execution shape does NOT vary across the +// six stages; orchestrators decide which stages they fire. +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; +} + +// RunHookRequest — DEP-4534 / P23. Server-streaming response is the same +// CommandEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> +// Finished. Detached hooks (hook.detach=true) emit only Started + +// Finished{exit_code=0} on the wire; the actual hook output lands in +// /var/log/depot/hook--.log inside the sandbox (architecture +// §12). +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..373ca475 --- /dev/null +++ b/proto/depot/sandbox/v1/logs.proto @@ -0,0 +1,101 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; +import "google/protobuf/timestamp.proto"; + +// Logs surface for depot.sandbox.v1 (DEP-4532, M33 — Logs Cluster CLOSING). +// +// StreamSandboxLogs is the customer-facing read surface that fans the +// per-sandbox boot-output BufferedEventLog (P27a, capture-side +// internal TS type) out to subscribers as proto SandboxLogEvent messages. +// +// v0 scope (MD-33-1): the four boot-output kinds — `boot_stdout`, `boot_stderr`, +// `boot_finished`, `evicted_early_data`. Wire tags 5..15 are reserved-by-comment +// for follow-on event kinds (metrics, lifecycle, hook_event, command_event_relay +// per Logs Cluster meta-pattern #11) so adding them in subsequent slices does +// not force a wire-shape bump on this oneof. +// +// Replay rail OUT OF SCOPE for v0 (MD-33-3): the per-sandbox buffer is +// process-local on the replica that hosts the CreateSandboxFromSpec +// orchestrator. If StreamSandboxLogs lands on a different replica than the +// one that minted the buffer, the lookup misses and the stream closes +// cleanly with no events. Persistence + cross-replica replay land via a +// follow-on slice (CRR-013 candidate). + +// SandboxLogEvent is the streamed event the StreamSandboxLogs RPC emits. +// Bytes everywhere on the stdout/stderr rails (DEP-4404); the SDK decodes +// UTF-8 at the adapter layer. +// +// EvictedEarlyData fires when the K-Streaming ring (architecture §10) had to +// drop head data before this consumer subscribed — analogous to +// CommandEvent.EvictedEarlyData. The dropped-bytes counter is single-rail +// here (no per-stream split) because the boot-output buffer is keyed by +// arrival across both stdout/stderr. +message SandboxLogEvent { + oneof event { + BootStdout boot_stdout = 1; + BootStderr boot_stderr = 2; + BootFinished boot_finished = 3; + EvictedEarlyData evicted_early_data = 4; + } + + // Tags 5..15 reserved for future event kinds (metrics, lifecycle, + // hook_event, command_event_relay) so adding them does not force a wire + // bump on this oneof. Logs Cluster meta-pattern #11. + reserved 5 to 15; + + message BootStdout { + bytes data = 1; + // Cumulative byte index for the stdout rail as of the END of `data` + // (end-of-chunk semantics, mirroring CommandEvent.StdoutBytes.byte_offset + // from command.proto). Useful for consumers that want to dedup across + // resubscribes that they themselves coordinate at the byte rail; the + // server-side replay watermark is the request's `since_offset`, which + // is a BufferedEventLog ring offset rather than a per-stream byte + // index (MD-33-4). + int64 byte_offset = 2; + google.protobuf.Timestamp timestamp = 3; + } + message BootStderr { + bytes data = 1; + // Cumulative byte index for the stderr rail; 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; + } + // K-Streaming evicted head data before this consumer subscribed. Carries + // the byte count that was dropped so the consumer can reason about the + // gap. Architecture §10. + message EvictedEarlyData { + int64 dropped_bytes = 1; + } +} + +// StreamSandboxLogs — DEP-4532. Server-streaming RPC; the response stream is +// a sequence of SandboxLogEvents drained from the per-sandbox boot-output +// BufferedEventLog (P27a). Terminates when the buffer ends (boot finished) +// or with a Connect error. +// +// `since_offset` is a BufferedEventLog ring offset (NOT a per-stream byte +// index). The server replays events whose ring offset is >= the supplied +// value, and any subscription that requests an offset older than the live +// ring head receives an EvictedEarlyData prefix once before the replay +// starts. +// +// Cross-replica caveat (MD-33-3 / Risk R1): if this RPC lands on a different +// replica than the CreateSandboxFromSpec orchestrator that minted the +// sandbox, the buffer lookup misses and — for non-terminal sandboxes — the +// stream closes cleanly with no events. The handler also surfaces +// FailedPrecondition for terminal sandboxes (no past-replay rail in v0). +message StreamSandboxLogsRequest { + SandboxRef sandbox = 1; + // BufferedEventLog ring offset to start from. Replay events whose offset + // is >= since_offset. Unset (or 0) means "from the beginning of the + // resident 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..7231615e --- /dev/null +++ b/proto/depot/sandbox/v1/pty.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/refs.proto"; + +// Pty surface for depot.sandbox.v1 (DEP-4527 / P18). +// +// Single bidi RPC: SandboxService.OpenPty. The first request on the stream +// MUST carry `start`; subsequent requests carry `stdin` bytes or `resize` +// window changes. Response stream is `data` byte chunks terminated by an +// `Exit` carrying the exit code. +// +// Implementation passes through to vm3 ProxyService.PtySession (same wire path +// as the legacy ci.v1.OpenPtySession); vm3 hardcodes /bin/sh, so no `shell` +// selector exists at the wire layer. Architecture §13: no reattach in v0; +// closing the stream ends the pty. +// +// Bytes-everywhere on the wire: pty output is binary-safe (often includes +// ANSI control sequences and other non-UTF-8 bytes); the SDK exposes it as +// Buffer rather than decoding to string at the adapter. + +message OpenPtyRequest { + oneof input { + Start start = 1; + bytes stdin = 2; + Resize resize = 3; + } + + // Start carries the per-session init parameters. Sent as the first message + // on the stream. Subsequent `start` messages on the same stream are a + // protocol violation and ignored by the handler. + message Start { + SandboxRef sandbox = 1; + map env = 2; + optional uint32 rows = 3; + optional uint32 cols = 4; + optional string cwd = 5; + } + + // Resize is a window-size change. vm3 maps it to the OS pty Setsize ioctl + // which clamps out-of-range values; bounds are intentionally pass-through. + 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..6c217534 --- /dev/null +++ b/proto/depot/sandbox/v1/refs.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package depot.sandbox.v1; + +// Cross-cutting selector messages for depot.sandbox.v1. The three Ref types +// live here so sandbox.proto and command.proto can both import them without +// closing a sandbox -> command -> sandbox cycle, and so future surfaces +// (snapshot, spec, pty, filesystem, logs) reach the same shapes without +// having to extract or duplicate them. +// +// Watts selector pattern (DEP-4343/4426/4356/4485): each Ref is a oneof so +// alt-id forms (org-scoped name, idempotency key) can be added at higher +// field numbers without a wire break. The lone selector today is `id`; per +// the M7 open-question answer, future selectors are NOT pre-declared — a +// slice that needs one adds it then. + +message SandboxRef { + oneof selector { + string id = 1; + } +} + +message CommandRef { + 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..457fc700 --- /dev/null +++ b/proto/depot/sandbox/v1/runtime.proto @@ -0,0 +1,40 @@ +// depot.sandbox.v1 — Resources + Runtime value-shapes. +// +// Extracted from sandbox.proto in P25b (M29) to break the +// sandbox.proto <-> spec.proto cycle that would otherwise form when the +// CreateSandboxFromSpec RPC's request/event types land in sandbox.proto +// (sandbox.proto needs to import spec.proto for SandboxSpec; spec.proto +// imported sandbox.proto for Resources + Runtime). Wire shape is +// unchanged — both messages remain in the depot.sandbox.v1 package; only +// their `.proto` home is different. Mirrors the hook.proto split-out +// pattern at P23. + +syntax = "proto3"; + +package depot.sandbox.v1; + +// Resources caller may request for a sandbox (DEP-4512). +// +// All fields optional; unset means "use server-side default". TODO(policy): +// defaults are currently server-controlled and undocumented at the wire layer. +// A future slice will pin them either here in proto comments or in a published +// policy doc. +message Resources { + optional int32 vcpus = 1; + optional int32 memory_mb = 2; + optional int32 disk_gb = 3; +} + +// Runtime selector for a sandbox (DEP-4512). Callers pick exactly one of: +// - `named`: a curated runtime identifier (e.g. "node24") resolved server-side +// - `image_ref`: an arbitrary OCI image reference +// +// TODO(open-question): the catalog of named runtimes is intentionally open in +// this slice — any string is accepted on the wire and the server may reject +// unknown names. A follow-up slice picks between a proto enum vs server config. +message Runtime { + oneof runtime { + string named = 1; + 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..08cba38c --- /dev/null +++ b/proto/depot/sandbox/v1/sandbox.proto @@ -0,0 +1,313 @@ +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"; + +// Cold-start scaffold for the v1 sandbox surface (DEP-4511, DEP-4512, DEP-4514, +// DEP-4518). +// +// This package is the home for the v2 sandbox API that will eventually replace +// depot.agent.v1.SandboxService. The legacy service remains in place; this +// service starts with Create + Get + List, with a SandboxStatus lifecycle enum +// + lifecycle metadata (timestamps, usage block, terminated_by) covering the +// read surface. Stop/Kill/Extend, command/filesystem/pty/snapshot/logs surfaces +// all land in follow-up slices. + +service SandboxService { + rpc CreateSandbox(CreateSandboxRequest) returns (CreateSandboxResponse); + rpc GetSandbox(SandboxRef) returns (GetSandboxResponse); + rpc ListSandboxes(ListSandboxesRequest) returns (ListSandboxesResponse); + + // CreateSandboxFromSpec (DEP-4534 / P25b) lives on SandboxSpecService in + // spec_rpc.proto, NOT this service, to break the sandbox.proto <-> + // spec.proto cycle. The SDK consumes the new service alongside this one; + // wire shape is independent so existing SandboxService callers are not + // affected. See spec_rpc.proto header. + + // DEP-4515 — stop is graceful (terminated_by=GRACEFUL); kill is forced + // (terminated_by=FORCED). Both are idempotent on already-terminal sandboxes + // in the sense that they return FailedPrecondition rather than re-running. + rpc StopSandbox(StopSandboxRequest) returns (StopSandboxResponse); + rpc KillSandbox(KillSandboxRequest) returns (KillSandboxResponse); + + // DEP-4517 — server-streaming command execution. The response stream begins + // with a Started event and ends with Finished (or terminates with a Connect + // error). Persistence + the K-Streaming buffered-event-log + the vm3 + // Execute proxy land with the next two slices (P10b/P10c); this RPC is + // wire-reachable today but returns Unimplemented until those land. + rpc RunCommand(RunCommandRequest) returns (stream CommandEvent); + + // DEP-4519 — bidirectional-streaming command execution with stdin. The + // first request on the stream MUST carry `init`; subsequent requests carry + // `stdin` bytes. The response stream shape is identical to RunCommand. + // stdin bytes flow through to the guest process and are NOT persisted. + rpc RunCommandPipe(stream RunCommandPipeRequest) returns (stream CommandEvent); + + // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced + // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator + // (P25b). NOT exposed as an SDK method. Wraps the hook command in + // /bin/sh -lc, prepends /tmp/.depot-env sourcing, exports merged env, + // cd's to /workspace, and either streams CommandEvents (foreground) or + // detaches via setsid with log redirect to + // /var/log/depot/hook--.log (detached). Stage label is + // metadata-only — execution shape does NOT vary across the six HookStage + // values. Architecture §12. Spec Cluster INTERIOR step 2/5. + rpc RunHook(RunHookRequest) returns (stream CommandEvent); + + // DEP-4520 — read side of the Command surface. Get and List return persisted + // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when + // the command is still running on the same replica) tails live output via + // the process-local per-cmd BufferedEventLog. + rpc GetCommand(CommandRef) returns (GetCommandResponse); + rpc ListCommands(ListCommandsRequest) returns (ListCommandsResponse); + rpc AttachCommand(AttachCommandRequest) returns (stream CommandEvent); + + // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the + // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits + // SandboxLogEvent messages to the subscriber. v0 emits the four + // boot-output kinds only (boot_stdout / boot_stderr / boot_finished / + // evicted_early_data); future event kinds use the reserved tags 5..15 on + // the SandboxLogEvent oneof. Cross-replica caveat (MD-33-3): if the + // sandbox's boot buffer is hosted on a different replica, the stream + // closes cleanly with no events. No past-replay rail in v0 — terminal + // sandboxes return FailedPrecondition. See logs.proto. + rpc StreamSandboxLogs(StreamSandboxLogsRequest) returns (stream SandboxLogEvent); + + // DEP-4522 — deliver a signal to a running command. Default signal is + // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with + // InvalidArgument in v0 (the abort path stays SIGKILL-free). Kills of + // commands that have already finished (or were never registered) return + // NotFound, which the SDK surfaces as Code.NotFound. + rpc KillCommand(KillCommandRequest) returns (KillCommandResponse); + + // DEP-4527 — interactive pseudo-terminal. Bidi-streaming RPC; the first + // request carries `start`, subsequent requests carry stdin bytes or window + // resize messages. The response stream emits `data` byte chunks until the + // shell exits, then a single `exit` carrying the exit code. v0 always runs + // /bin/sh; the shell is intentionally not selectable at the wire layer. + // Architecture §13: no reattach — closing the stream ends the pty. + rpc OpenPty(stream OpenPtyRequest) returns (stream OpenPtyResponse); + + // ─── FileSystem (filesystem.proto, DEP-4524) ──────────────────────────── + // Same RPC surface across exec-first (P15) and native vm3 (P17) + // implementations; the server picks per-org behind a resolver. Errors + // travel as Connect errors with a FileSystemErrorDetail attached — see + // src/sandbox/fs-errors.ts for the remapper. + 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); + + // ─── Snapshot (snapshot.proto, DEP-4529) ──────────────────────────────── + // Durable filesystem snapshots of a sandbox. The wire surface + the SDK + // ergonomics ship here; the vm3-side snapshot/restore pipeline that backs + // these RPCs is a follow-on slice — v0 handlers return Unimplemented until + // that lands. CreateSnapshot will additionally fire a graceful StopSandbox + // on the source sandbox once the snapshot is durable (Vercel parity, + // architecture §6). + rpc CreateSnapshot(CreateSnapshotRequest) returns (CreateSnapshotResponse); + rpc GetSnapshot(GetSnapshotRequest) returns (GetSnapshotResponse); + rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse); + rpc DeleteSnapshot(DeleteSnapshotRequest) returns (DeleteSnapshotResponse); +} + +// SandboxRef lives in refs.proto alongside the other cross-cutting selector +// messages (CommandRef, SnapshotRef). See the comment at the top of +// refs.proto for the selector-pattern rationale. + +// SandboxStatus is the lifecycle enum for a sandbox. +// +// CREATED: row materialized, no compute backing assigned yet. +// ASSIGNED: compute backing assigned, VM not yet started. +// STARTING: VM boot in progress. +// RUNNING: VM booted, ready to accept commands. +// FINISHED: clean termination (graceful stop, normal exit). +// CANCELLED: forced termination (kill). +// FAILED: ended with an error (image pull fail, OOM, panic, etc.). +// +// Values mirror the orchestration-side ComputeSandbox.state vocabulary at v0 +// to minimize the projection layer. The proto is its own type — when v2 needs +// to diverge (e.g. surface a value the orchestration doesn't track, or hide +// a CI-only sub-state), it can do so without coordinating with the underlying +// schema. Terminal-state granularity today (FINISHED vs CANCELLED vs FAILED) +// carries the gross reason. +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 how a sandbox ended (DEP-4518). Populated only +// on terminal status (FINISHED / CANCELLED / FAILED). UNSPECIFIED is the proto sentinel and +// is never written by the server; callers MUST treat it as "unknown". +// +// GRACEFUL: StopSandbox path — clean shutdown the caller asked for. +// FORCED: KillSandbox path — caller asked for an immediate end. +// TIMED_OUT: TTL expired — server-initiated termination. +// SYSTEM_FAULT: host failure, OOM, panic, or any other 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; +} + +// Resources + Runtime extracted to runtime.proto (M29 / P25b) to break the +// sandbox.proto <-> spec.proto cycle. See runtime.proto header. + +// Sandbox is the canonical message returned by the lifecycle RPCs. +// +// Field numbering — the 4..10 block was reserved-by-comment after M2; M4 +// consumes it fully along with 13..15 for the terminal metadata. 11/12 stay +// with Resources/Runtime (claimed by M2). No gaps remain. +message Sandbox { + string sandbox_id = 1; + string organization_id = 2; + SandboxStatus status = 3; + + // Lifecycle timestamps (DEP-4518). created_at is always populated; the other + // two are populated 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; + + // TTL surface (DEP-4518). expires_at is authoritative storage when known; + // timeout_ms_remaining is recomputed on read against now(). Both are unset + // when the sandbox carries no timeout policy. + optional google.protobuf.Timestamp expires_at = 7; + optional int64 timeout_ms_remaining = 8; + + // Usage metering (DEP-4518). Populated only after terminal status, and only + // when a metering source is available. TODO(metering): wire to the + // SandboxUsage table populated by tasks/cron/createSandboxUsage.ts. Until + // wired, both fields remain unset even on terminal sandboxes. + optional int64 active_cpu_usage_ms = 9; + optional NetworkUsage network_usage = 10; + + // Effective resources + runtime echoed back from the request so callers see + // what the server actually resolved (DEP-4512). + Resources resources = 11; + Runtime runtime = 12; + + // Terminal-state metadata (DEP-4518). All three are populated only on + // terminal status (FINISHED / CANCELLED / FAILED). exit_code uses int32 in the Unix 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; +} + +// NetworkUsage records bytes transferred over the sandbox's primary network +// interface (DEP-4518). Split counters mirror typical cloud-vendor metering +// surfaces and keep ingress/egress visible separately even when one direction +// dominates. +message NetworkUsage { + int64 ingress_bytes = 1; + int64 egress_bytes = 2; +} + +message CreateSandboxRequest { + // Human label for the sandbox, scoped to the organization. Optional. + optional string name = 1; + // Requested resources; server applies defaults for unset fields (DEP-4512). + optional Resources resources = 2; + // Requested runtime; server resolves `named` against its catalog or pulls + // `image_ref` directly (DEP-4512). + optional Runtime runtime = 3; + // Sandbox content source — git/snapshot/image/template variants. The v0 + // CreateSandbox handler does NOT read this field; it is wired by the + // closing slice of the Source/Git Cluster (DEP-4531) and consumed by + // DEP-4529 (snapshot). Unset == prior behavior. + optional Source source = 4; +} + +message CreateSandboxResponse { + Sandbox sandbox = 1; +} + +message GetSandboxResponse { + Sandbox sandbox = 1; +} + +// ListSandboxes — DEP-4514. State + creation-time filter, cursor-based +// pagination (page_token encodes the last seen ComputeSandbox.createdAt; +// the cursor pattern mirrors src/domains/ci/service/list-runs.ts). +message ListSandboxesRequest { + optional int32 page_size = 1; + optional string page_token = 2; + message Filter { + // Status filter: if non-empty, only sandboxes whose status is in this set + // are returned. (Sketch uses the plural `states` for the field name; + // mirrored here.) + 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; +} + +// StopSandbox — DEP-4515. Graceful shutdown. The server records the termination +// request on the row immediately; when `blocking` is true the RPC waits up to a +// server-side cap for the VM to reach terminal status before returning. +// +// `signal` lives on KillSandbox, not here (architecture §5). +message StopSandboxRequest { + SandboxRef sandbox = 1; + // If true, the server polls until the sandbox reaches a terminal state (or + // the server-side cap expires) before responding. If false (default), the + // RPC returns as soon as the termination request is recorded. + optional bool blocking = 2; +} + +message StopSandboxResponse { + // The sandbox row after recording the termination request. Status is either + // either RUNNING (with terminationRequestedAt non-null) or a terminal status or a terminal status when + // the row transitioned before the read. + Sandbox sandbox = 1; +} + +// KillSandbox — DEP-4515. Forced termination. Fire-and-forget; no blocking +// option. `signal` is documented at the wire level but ignored by the v0 +// server (which always asks the VM scheduler to mark the row `cancelled`). +// A future slice wires this through to vm3 SendSignal. +message KillSandboxRequest { + SandboxRef sandbox = 1; + // Signal name (e.g. "SIGKILL"). Reserved for forward-compat; v0 ignores it + // and always issues a hard cancel. + 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..fcf4d3d8 --- /dev/null +++ b/proto/depot/sandbox/v1/snapshot.proto @@ -0,0 +1,63 @@ +// depot.sandbox.v1.Snapshot — durable filesystem snapshot of a sandbox. +// +// DEP-4529 — Snapshot Cluster CRUD surface. The cluster ships the wire surface +// + the SDK ergonomics; the vm3-side snapshot/restore pipeline that backs the +// handlers is a follow-on. v0 handlers return Unimplemented until that lands. +// +// Storage reuses the legacy SandboxTemplate registry (one row per snapshot, +// soft-deleted via deletedAt). The cross-package selector SnapshotRef lives 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"; + +// Snapshot is the canonical message returned by the Snapshot CRUD RPCs. +// +// `expires_at` is reserved for a future TTL surface; v0 leaves it 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; + // Forward-compat TTL hint. The v0 server IGNORES this value; the field is + // reserved on the wire so the SDK option lands today and a future slice + // can wire 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..36bd4d5c --- /dev/null +++ b/proto/depot/sandbox/v1/source.proto @@ -0,0 +1,51 @@ +// depot.sandbox.v1.Source — shared sandbox-creation source descriptor. +// +// The `source` field on CreateSandboxRequest (and, in a later slice, +// CreateSandboxFromSpecRequest) accepts one of: git, snapshot, image, template. +// Tickets that reference this without introducing it: DEP-4529 (snapshot +// source consumer), DEP-4531 (git source consumer, the closing P20 slice of +// the Source/Git Cluster). +// +// Cluster boundary note: none of GitSource/SnapshotSource/ImageSource/ +// TemplateSource embed SandboxRef, so this file intentionally does NOT +// import refs.proto. If a future variant needs SandboxRef, import refs.proto +// here — NOT sandbox.proto (which would create a cycle). + +syntax = "proto3"; + +package depot.sandbox.v1; + +message Source { + oneof variant { + GitSource git = 1; // DEP-4531 — host-side fetch, ext4 layer mount + SnapshotSource snapshot = 2; // DEP-4529 — create from snapshot + ImageSource image = 3; // raw OCI image (v1 carry-over) + TemplateSource template = 4; // legacy template id (v1 carry-over) + } +} + +message GitSource { + string url = 1; + optional string branch = 2; + optional string commit = 3; + // Org secret name carrying credentials. Resolution rules: + // unset → public repo (no auth); set → looked up via org secret store. + // TODO(open-question): DEP-4531 leaves credential resolution underspecified; + // the closing slice picks the resolution semantics. + optional string secret = 4; +} + +message SnapshotSource { + string snapshot_id = 1; +} + +message ImageSource { + string image_ref = 1; + // Future: optional auth handle. v0 assumes the registry is public or + // covered by the host-side credentials helper. Reserved for follow-on + // tickets in the Public Beta milestone (external OCI image support). +} + +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..e1a479af --- /dev/null +++ b/proto/depot/sandbox/v1/spec.proto @@ -0,0 +1,114 @@ +// depot.sandbox.v1.SandboxSpec — declarative spec messages (DEP-4534 / P22). +// +// Spec Cluster INTERIOR (step 1 of 5). This file lands ONLY the message types +// that describe a sandbox spec: SandboxSpec + nested SSHSpec / ContainerSpec / +// BuildSpec / Hooks. HookSpec + HookStage live in hook.proto (P23). The +// CreateSandboxFromSpec RPC + its request/event types live in spec_rpc.proto +// (M29 / P25b) — moved there to break the sandbox.proto <-> spec.proto cycle +// that would otherwise form. +// +// MCP support was removed from v0 in M30 (separate roadmap item); MCPSpec / +// MCPServer message types + SandboxSpec.mcp field are intentionally absent. +// +// SandboxSpec mirrors the YAML schema field-for-field per architecture §15. +// CLI shapes carry verbatim into the proto; the SDK adapter does any cosmetic +// renaming on the way out. Reference for the YAML schema: cli/pkg/sandbox/ +// spec.go on the unmerged rob/dep-4395 branch — read-only context, NOT a +// dependency. The server-side YAML parser lives in src/sandbox/spec.ts and is +// dormant in v0 (no RPC consumes it until the closing Spec Cluster slice). +// +// Cluster boundary note: SandboxSpec does NOT embed SandboxRef directly +// (only value-shapes — Source, Resources, Runtime — drawn from sibling proto +// files). This file therefore does NOT import refs.proto, matching the +// dependency rule established by source.proto. + +syntax = "proto3"; + +package depot.sandbox.v1; + +import "depot/sandbox/v1/hook.proto"; +import "depot/sandbox/v1/runtime.proto"; +import "depot/sandbox/v1/source.proto"; + +// SandboxSpec mirrors the YAML schema field-for-field. Architecture §15: CLI +// shapes carry verbatim into the proto; the SDK adapter does any cosmetic +// renaming on the way out. +message SandboxSpec { + // Identity / lifecycle knobs. + optional string name = 1; + optional string argv = 2; + optional string command = 3; + optional bool detach = 4; + optional string template = 5; + + // Source / image. Either `source` or `container.build` may be set; not both. + // v0 parser enforces this mutual exclusion. (The DEP-4526 ticket leaves open + // whether build-then-mount should also be allowed; the conservative v0 + // interpretation is "not both" — revisited in a later slice if customer + // demand emerges.) + optional Source source = 6; + optional ContainerSpec container = 7; + // Pre-built image ref; bypasses `container.build`. + optional string image = 8; + + // Runtime. + optional Resources resources = 9; + optional Runtime runtime = 10; + map env = 11; + + // SSH config — retained for CLI parity even though the SDK does not surface + // SSH details directly. The legacy v1 ssh_config maps here. + optional SSHSpec ssh = 12; + + // Field tag 13 was previously MCPSpec mcp; MCP support removed from v0 in + // M30 (separate roadmap item). Tag remains reserved so a follow-on slice + // can reintroduce the field without wire-shape ambiguity. + reserved 13; + reserved "mcp"; + + // Hook lifecycle stages — `on.create`, `on.start`, etc. + optional Hooks on = 14; +} + +message SSHSpec { + bool enabled = 1; + optional int32 timeout_minutes = 2; +} + +message ContainerSpec { + optional BuildSpec build = 1; +} + +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 per stage. Each stage holds an ordered list of HookSpec entries. +// Bare-string YAML form ("echo hi") parses into HookSpec{command: "echo hi"} +// — see src/sandbox/spec.ts for normalization. +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 + HookStage moved to hook.proto in P23 to break the import cycle +// that would otherwise form when sandbox.proto adopts the RunHook RPC +// (sandbox.proto -> hook.proto -> spec.proto -> sandbox.proto). The wire +// shapes are unchanged — both remain in the depot.sandbox.v1 package — and +// spec.proto now imports hook.proto for the Hooks{HookSpec[]} fields above. +// +// CreateSandboxFromSpec request/event envelopes live in spec_rpc.proto (not +// here). spec_rpc.proto imports both sandbox.proto (for Sandbox in the +// SandboxStarted/Done events) and this file (for SandboxSpec). Resources + +// Runtime moved out of sandbox.proto into runtime.proto in M29 so spec.proto +// no longer needs to import 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..04349b43 --- /dev/null +++ b/proto/depot/sandbox/v1/spec_rpc.proto @@ -0,0 +1,87 @@ +// depot.sandbox.v1 — CreateSandboxFromSpec RPC envelope + service +// (DEP-4534 / P25b, Spec Cluster CLOSING). +// +// This file hosts the RPC for declarative sandbox creation from a SandboxSpec. +// It lives in its own service (SandboxSpecService) rather than on the existing +// SandboxService — the request/event types reference BOTH Sandbox (from +// sandbox.proto) AND SandboxSpec (from spec.proto), which sets up an import +// cycle if those types are added to sandbox.proto and sandbox.proto then has +// to import spec.proto in turn. Carving the RPC + envelope into a separate +// file with a separate service breaks that cycle cleanly (mirrors the +// hook.proto split-out done at P23 for the same kind of cycle). +// +// SDK consumes SandboxSpecService alongside SandboxService — same Connect +// transport, same auth surface. The orchestrator implementation lives in +// src/sandbox/spec-orchestrator.ts; the handler is a thin tokenAuth + +// authorizeAndEnterOrg + delegate. + +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"; + +// SandboxSpecService — DEP-4534 / P25b. Single RPC for now; +// CreateSandboxFromSpec is the closing slice of the Spec Cluster and +// composes the dormant helpers (parse, source resolution, createComputeSandbox, +// boot-delivery, hook-runner) into one server-streamed flow. +service SandboxSpecService { + rpc CreateSandboxFromSpec(CreateSandboxFromSpecRequest) returns (stream CreateSandboxFromSpecEvent); +} + +// CreateSandboxFromSpecRequest — carries a SandboxSpec (either pre-parsed +// proto or YAML string) plus the ${input.KEY} inputs map. The orchestrator +// applies inputs substitution, validates, then runs the create flow. +message CreateSandboxFromSpecRequest { + oneof spec { + string spec_yaml = 1; + SandboxSpec sandbox_spec = 2; + } + map inputs = 3; +} + +// CreateSandboxFromSpecEvent — server-streamed event frames. The orchestrator +// yields SandboxStarted once the VM reaches running state and any post-boot +// source delivery completes; then HookEvent frames per CREATE-stage hook; +// the stream ends with exactly one terminal frame (Done OR Error). +message CreateSandboxFromSpecEvent { + oneof event { + SandboxStarted sandbox_started = 1; + HookEvent hook_event = 2; + Done done = 3; + Error error = 4; + // Numbers 5,6 reserved for BuildLog / ConvertLog when TIER 1 of the + // build helper unlocks; see src/sandbox/build.ts header (TIER LADDER). + } + + message SandboxStarted { + Sandbox sandbox = 1; + } + + message HookEvent { + HookStage stage = 1; + string hook_name = 2; + CommandEvent 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; + } + } +} From aa9dfb2d5711aff99e6eb40422682ce94ebfb25a Mon Sep 17 00:00:00 2001 From: Rob Stolarz Date: Tue, 26 May 2026 18:35:55 -0700 Subject: [PATCH 2/7] sandbox cli: create / exec / stop / kill verbs (vertical-slice subset of M34) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pruned from 9060ce5 + 7bac31f. Ships only the four verbs needed to prove the SDK end-to-end via CLI parity: create → exec → kill (with stop for graceful-shutdown symmetry). Verb files (from 7bac31f's final SDK-v0 shape): - pkg/cmd/sandbox/create.go — wraps depot.sandbox.v1.CreateSandbox - pkg/cmd/sandbox/exec.go — wraps RunCommand, streams CommandEvent - pkg/cmd/sandbox/stop.go — wraps StopSandbox (fires on.down hooks) - pkg/cmd/sandbox/kill.go — wraps KillSandbox (forced termination) Shared scaffolding (carries hook/state/spec-parser machinery used by the kept verbs; unused but present helpers will be picked up by future verb PRs): - pkg/cmd/sandbox/{common,common_test,sandbox,sandbox_test}.go - pkg/cmd/sandbox/hooks.go — runHookStage / addHookFlags - pkg/cmd/sandbox/state.go — ~/.depot/sandbox-state file helpers, with terminal-status switch updated to the redesigned enum vocab (FINISHED + CANCELLED + FAILED instead of STOPPED + FAILED) - pkg/sandbox/spec.go — sandbox.depot.yml parser - pkg/api/rpc.go — NewSandboxV0Client / NewSandboxSpecV0Client - pkg/pty/* + depot/agent/v1/* + depot/ci/v1/* — additive carry-along Masked out (verbs not in vertical slice): - get / list / from-spec / exec-pipe / shell / logs (command surface) - fs/ subtree (14 filesystem methods) - snapshot/ subtree (CRUD + image) - init / build / convert / cp (declarative + helpers) sandbox.go edited to drop AddCommand wiring for the masked verbs and the fs/ + snapshot/ subdir imports; doc text trimmed to reflect the shipped surface. sandbox_test.go trimmed to assert only the four shipped verbs. Legacy DEP-4395 files exec-pipe.go + pty.go remain at origin/main state (reverted from the M34 modifications) — they're functions defined but unreferenced from the new verb tree, harmless dead code that a follow-on verb PR can revisit. --- pkg/api/rpc.go | 9 + pkg/cmd/sandbox/common.go | 121 + pkg/cmd/sandbox/common_test.go | 52 + pkg/cmd/sandbox/create.go | 76 + pkg/cmd/sandbox/exec.go | 155 +- pkg/cmd/sandbox/hooks.go | 180 ++ pkg/cmd/sandbox/kill.go | 105 + pkg/cmd/sandbox/sandbox.go | 37 +- pkg/cmd/sandbox/sandbox_test.go | 30 + pkg/cmd/sandbox/state.go | 66 + pkg/cmd/sandbox/stop.go | 102 + .../v1/agentv1connect/sandbox.connect.go | 184 +- pkg/proto/depot/agent/v1/sandbox.pb.go | 2779 +++++++++++++---- pkg/proto/depot/ci/v1/api.pb.go | 4 + pkg/pty/resize_unix.go | 47 +- pkg/pty/resize_windows.go | 10 + pkg/pty/session.go | 38 +- pkg/pty/session_sandboxv1.go | 143 + pkg/sandbox/spec.go | 324 ++ proto/depot/agent/v1/sandbox.proto | 138 +- proto/depot/ci/v1/api.proto | 4 + 21 files changed, 3847 insertions(+), 757 deletions(-) create mode 100644 pkg/cmd/sandbox/common.go create mode 100644 pkg/cmd/sandbox/common_test.go create mode 100644 pkg/cmd/sandbox/create.go create mode 100644 pkg/cmd/sandbox/hooks.go create mode 100644 pkg/cmd/sandbox/kill.go create mode 100644 pkg/cmd/sandbox/sandbox_test.go create mode 100644 pkg/cmd/sandbox/state.go create mode 100644 pkg/cmd/sandbox/stop.go create mode 100644 pkg/pty/session_sandboxv1.go create mode 100644 pkg/sandbox/spec.go 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..5faf4426 --- /dev/null +++ b/pkg/cmd/sandbox/common.go @@ -0,0 +1,121 @@ +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}, + } +} + +// commandRef wraps a command id in the depot.sandbox.v1 selector oneof. +// Used by AttachCommand / KillCommand callers. +func commandRef(id string) *sandboxv1.CommandRef { + return &sandboxv1.CommandRef{ + Selector: &sandboxv1.CommandRef_Id{Id: id}, + } +} + +// snapshotRef wraps a snapshot id in the depot.sandbox.v1 selector oneof. +// Used by GetSnapshot / DeleteSnapshot. +func snapshotRef(id string) *sandboxv1.SnapshotRef { + return &sandboxv1.SnapshotRef{ + Selector: &sandboxv1.SnapshotRef_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 are surfaced the +// same way and do not abort the loop (the server is signalling partial +// degradation, not a fatal end — Connect transport errors are the fatal path). +// detachedMode flags a RunCommand stream that the server will close after +// Started — no Finished event will arrive, and that's not an error. +type detachedMode bool + +const ( + streamUntilFinished detachedMode = false + streamUntilStarted detachedMode = true +) + +func consumeCommandEventStream( + stream *connect.ServerStreamForClient[sandboxv1.CommandEvent], + stdout, stderr io.Writer, + mode detachedMode, +) (exitCode int32, err error) { + defer func() { _ = stream.Close() }() + for stream.Receive() { + msg := stream.Msg() + switch ev := msg.Event.(type) { + case *sandboxv1.CommandEvent_Started_: + // metadata only — nothing to print + case *sandboxv1.CommandEvent_Stdout: + if ev.Stdout != nil && len(ev.Stdout.Data) > 0 { + _, _ = stdout.Write(ev.Stdout.Data) + } + case *sandboxv1.CommandEvent_Stderr: + if ev.Stderr != nil && len(ev.Stderr.Data) > 0 { + _, _ = stderr.Write(ev.Stderr.Data) + } + case *sandboxv1.CommandEvent_Finished_: + if ev.Finished != nil { + return ev.Finished.ExitCode, nil + } + case *sandboxv1.CommandEvent_Error_: + if ev.Error != nil { + fmt.Fprintf(stderr, "[command-error] %s\n", ev.Error.Reason) + } + case *sandboxv1.CommandEvent_Evicted: + if ev.Evicted != nil { + fmt.Fprintf(stderr, "[evicted-early-data] dropped %d bytes stdout / %d bytes stderr\n", + ev.Evicted.DroppedBytesStdout, ev.Evicted.DroppedBytesStderr) + } + } + } + if err := stream.Err(); err != nil && !errors.Is(err, io.EOF) { + return 0, fmt.Errorf("command stream: %w", err) + } + // In detached mode the server hangs up after Started — no Finished is + // expected and "exit 0, no error" is the right success signal. For + // non-detached commands, end-of-stream without Finished means the server + // disconnected mid-run; surface that as an error so callers don't conflate + // a clean disconnect with a real exit-0 completion. + if mode == streamUntilStarted { + return 0, nil + } + 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..e3b2f99e --- /dev/null +++ b/pkg/cmd/sandbox/common_test.go @@ -0,0 +1,52 @@ +package sandbox + +import ( + "testing" + + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" +) + +// Touch-test (D-M34-D): every on the v0 wire flows through +// sandboxRef(). Pin the wire shape so a future refactor can't 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 TestCommandRef_PinnedShape(t *testing.T) { + r := commandRef("cmd-xyz789") + if r == nil { + t.Fatal("commandRef returned nil") + } + sel, ok := r.Selector.(*sandboxv1.CommandRef_Id) + if !ok { + t.Fatalf("expected CommandRef_Id selector, got %T", r.Selector) + } + if sel.Id != "cmd-xyz789" { + t.Errorf("id = %q, want cmd-xyz789", sel.Id) + } +} + +func TestSnapshotRef_PinnedShape(t *testing.T) { + r := snapshotRef("snap-456") + if r == nil { + t.Fatal("snapshotRef returned nil") + } + sel, ok := r.Selector.(*sandboxv1.SnapshotRef_Id) + if !ok { + t.Fatalf("expected SnapshotRef_Id selector, got %T", r.Selector) + } + if sel.Id != "snap-456" { + t.Errorf("id = %q, want snap-456", sel.Id) + } +} diff --git a/pkg/cmd/sandbox/create.go b/pkg/cmd/sandbox/create.go new file mode 100644 index 00000000..8f4a6a15 --- /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 wraps depot.sandbox.v1.SandboxService.CreateSandbox — the +// v0 customer-surface lifecycle entry point. Mirrors the @depot/sandbox TS +// SDK's `Sandbox.create({...})`: optional name + image ref, server-side +// defaults otherwise. +// +// For a declarative `sandbox.depot.yml`-driven flow, use `depot sandbox +// from-spec` (the M34 rename of `up`). +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") + } + fmt.Fprintf(cmd.OutOrStdout(), "Sandbox %s created (org %s, status %s)\n", + sb.SandboxId, sb.OrganizationId, sb.Status.String()) + fmt.Fprintf(cmd.OutOrStdout(), "Shell: depot sandbox shell %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..3bf9ea62 100644 --- a/pkg/cmd/sandbox/exec.go +++ b/pkg/cmd/sandbox/exec.go @@ -3,105 +3,132 @@ package sandbox import ( "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 wraps depot.sandbox.v1.SandboxService.RunCommand — execute +// one command in an existing sandbox and stream the CommandEvent rail. +// +// M34 retires the legacy --sess flag (D-M34-M) — sandboxv1 takes a SandboxRef only. +// M34 deprecates --timeout (MD-7); the flag is hidden + ignored, removed in a +// follow-on slice. 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: cobra.MinimumNArgs(2), 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 orgID == "" { - orgID = config.GetCurrentOrganization() - } + sandboxID := args[0] + cmdArgs := args[1:] - 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", + func(h sandbox.HooksSpec) []sandbox.HookSpec { return h.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") + detached, _ := cmd.Flags().GetBool("detached") - 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 + } + if detached { + req.Detached = &detached + } - client := api.NewComputeClient() + // --timeout is deprecated (MD-7). Warn if anyone still sets it, + // but don't fail — the wire field is gone in v0. + 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 - } + mode := streamUntilFinished + if detached { + mode = streamUntilStarted } - if err := stream.Err(); err != nil { - return sandboxExecStreamError(err, sandboxID) + exit, err := consumeCommandEventStream(stream, os.Stdout, os.Stderr, mode) + if err != nil { + return err + } + if exit != 0 { + os.Exit(int(exit)) } - return nil }, } - 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") + 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().Bool("detached", false, "Return after Started; reattach later via AttachCommand") + // Deprecated — hidden + ignored. Removed in a follow-on slice (MD-7). + 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 } + +// parseEnvSlice converts ["KEY=VALUE", ...] into a map; rejects entries with +// no '='. Shared by exec / exec-pipe / shell. +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..cbd96afe --- /dev/null +++ b/pkg/cmd/sandbox/hooks.go @@ -0,0 +1,180 @@ +package sandbox + +import ( + "context" + "fmt" + "io" + "os" + "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" +) + +// hookWrapperScript is the shell stub that runs every CLI-side hook command +// (on.exec / on.shell / on.snapshot / on.down). The on.create / on.start +// stages run server-side now via CreateSandboxFromSpec's HookEvents (M34 / +// D-M34-I) so the wrapper here only covers the four stages that still wrap +// around the user's command on the client. +// +// Positional args (filled in by hook caller): +// +// $0 = "depot-hook" (script-name placeholder) +// $1 = the user's hook command (single string, run via bash -lc) +// $2 = log file path (used only when detached) +// $3 = "1" if the hook should be detached, "0" otherwise +// +// /tmp/.depot-env is sourced when present so detached processes inherit the +// same env that the API's exec wrapper would normally set up. +const hookWrapperScript = `[ -f /tmp/.depot-env ] && . /tmp/.depot-env +if [ "$3" = "1" ]; then + mkdir -p "$(dirname "$2")" + setsid nohup /bin/bash -lc "$1" >"$2" 2>&1 & + exit 0 +fi +exec /bin/bash -lc "$1" +` + +// addHookFlags declares the --file / --set / --no-hook triple every hook-aware +// command shares. stageLabel ("on.exec", "on.shell", …) is interpolated into +// the help text so `--help` reads naturally. +func addHookFlags(cmd *cobra.Command, stageLabel string) { + cmd.Flags().StringP("file", "f", "", fmt.Sprintf("Path to a sandbox.depot.yml file for %s resolution (default: walk up from cwd)", 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 standard --file/--set/--no-hook flags, resolves the +// named stage from the local spec, and runs it against sandboxID. A --no-hook +// flag short-circuits to a no-op. pick selects which stage's hooks to fire +// out of the resolved HooksSpec. +// +// Sessions are gone in v0 (D-M34-M) — RunCommand on sandboxv1 takes a +// SandboxRef only. +func runHookStage( + ctx context.Context, + cmd *cobra.Command, + client sandboxv1connect.SandboxServiceClient, + token, orgID, sandboxID, label string, + pick func(sandbox.HooksSpec) []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") + hooks, err := resolveStageHooks(file, setPairs) + if err != nil { + return fmt.Errorf("resolve %s: %w", label, err) + } + return runHooks(ctx, client, token, orgID, sandboxID, label, pick(hooks), stdout, stderr) +} + +// resolveStageHooks loads the nearest sandbox.depot.yml (walking up from +// cwd, or honoring --file if non-empty) and returns the resolved hooks for +// every stage. Returns a zero-valued HooksSpec if no spec is found — that +// matches the behavior of `exec`/`shell`/`snapshot` against a raw sandbox +// id outside any project tree. +func resolveStageHooks(file string, setPairs []string) (sandbox.HooksSpec, error) { + var path string + if file != "" { + path = file + } else { + cwd, err := os.Getwd() + if err != nil { + return sandbox.HooksSpec{}, err + } + p, err := sandbox.FindSpec(cwd) + if err != nil { + return sandbox.HooksSpec{}, nil //nolint:nilerr // no spec, no hooks + } + path = p + } + spec, err := sandbox.Load(path) + if err != nil { + return sandbox.HooksSpec{}, err + } + inputs, err := sandbox.ParseInputs(setPairs) + if err != nil { + return sandbox.HooksSpec{}, err + } + return spec.ResolveHooks(inputs) +} + +// runHooks runs each hook sequentially against the given sandbox via +// RunCommand on the sandboxv1 wire. label is used in CLI output +// ("on.exec" / "on.shell" / "on.snapshot" / "on.down"). A non-zero exit +// from any foreground hook aborts and returns immediately. Detached hooks +// only fail if the spawn itself fails. +func runHooks(ctx context.Context, client sandboxv1connect.SandboxServiceClient, token, orgID, sandboxID, label string, 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] %s\n", label, name, h.Command) + if err := runHook(ctx, client, token, orgID, sandboxID, name, 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, h sandbox.HookSpec, stdout, stderr io.Writer) error { + logFile := fmt.Sprintf("/tmp/depot-hook-%s.log", name) + detachFlag := "0" + if h.Detach { + detachFlag = "1" + } + + req := &sandboxv1.RunCommandRequest{ + Sandbox: sandboxRef(sandboxID), + Cmd: "/bin/sh", + Args: []string{"-c", hookWrapperScript, "depot-hook", h.Command, logFile, detachFlag}, + } + + stream, err := client.RunCommand(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + if err != nil { + return fmt.Errorf("exec: %w", err) + } + + // Detached hooks finish at Started — the wrapper script forks the user + // command via setsid and exits 0, so the foreground hook stream sees a + // quick Finished too; either way, "until finished" semantics hold. + exit, err := consumeCommandEventStream(stream, stdout, stderr, streamUntilFinished) + if err != nil { + return err + } + if exit != 0 { + return fmt.Errorf("exit %d", exit) + } + if h.Detach { + fmt.Fprintf(stdout, "[%s detached, log: %s]\n", name, logFile) + } + 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..6922f5fa --- /dev/null +++ b/pkg/cmd/sandbox/kill.go @@ -0,0 +1,105 @@ +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" +) + +// newSandboxKill wraps depot.sandbox.v1.SandboxService.KillSandbox — the +// forced-termination verb (terminated_by=FORCED). No hooks; if you need +// hooks, use `depot sandbox stop`. +// +// With no positional args, walks up from cwd for a sandbox.depot.yml and +// resolves the most-recent sandbox started under that spec name. +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. + +With no arguments, walks up from the cwd for a sandbox.depot.yml and kills +the sandbox last started under that spec's name (per +~/.depot/sandbox-state/.id). Useful inside a demo dir where you just +want to undo the last "from-spec". + +For a graceful shutdown that fires on.down hooks first, use 'depot sandbox stop'.`, + Args: cobra.ArbitraryArgs, + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + token, orgID, err := resolveAuthAndOrg(ctx, cmd) + if err != nil { + return err + } + + ids := args + if len(ids) == 0 { + file, _ := cmd.Flags().GetString("file") + id, err := sandboxIDFromLocalSpec(file) + if err != nil { + return err + } + ids = []string{id} + } + + 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 + }, + } + cmd.Flags().StringP("file", "f", "", "Path to a sandbox.depot.yml file when resolving by spec (default: walk up from cwd)") + return cmd +} + +// sandboxIDFromLocalSpec resolves the most recent sandbox id launched +// from the spec at `file` (or the nearest sandbox.depot.yml if file is +// empty). Errors if no spec is found or no state record exists yet. +func sandboxIDFromLocalSpec(file string) (string, error) { + var path string + if file != "" { + path = file + } else { + cwd, err := os.Getwd() + if err != nil { + return "", err + } + p, err := sandbox.FindSpec(cwd) + if err != nil { + return "", fmt.Errorf("no sandbox-id given and no sandbox.depot.yml found from cwd; pass an id or run from inside a spec dir") + } + path = p + } + spec, err := sandbox.Load(path) + if err != nil { + return "", err + } + if spec.Name == "" { + return "", fmt.Errorf("spec %s has no name; can't resolve a state file without one", path) + } + id, err := loadSandboxState(spec.Name) + if err != nil { + return "", fmt.Errorf("read state for %q: %w", spec.Name, err) + } + if id == "" { + return "", fmt.Errorf("no recorded sandbox for spec %q (no ~/.depot/sandbox-state/.id); pass an id explicitly", spec.Name) + } + return id, nil +} diff --git a/pkg/cmd/sandbox/sandbox.go b/pkg/cmd/sandbox/sandbox.go index 9bd7a468..6186eb28 100644 --- a/pkg/cmd/sandbox/sandbox.go +++ b/pkg/cmd/sandbox/sandbox.go @@ -4,26 +4,45 @@ import ( "github.com/spf13/cobra" ) +// NewCmdSandbox wires the `depot sandbox` verb tree. +// +// Vertical-slice subset of the M34 "CLI v2 catches up to SDK v0" surface: +// the new depot.sandbox.v1 verbs (create / exec / stop / kill) ship in this +// PR alongside the pre-existing legacy verbs (exec-pipe / pty) which target +// CI-bastion sandboxes via depot.ci.v1. The remaining v0 surface +// (get / list / from-spec / shell / logs / fs / snapshot / build) lands in +// follow-ons. 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 (depot.sandbox.v1) + cmd.AddCommand(newSandboxCreate()) + cmd.AddCommand(newSandboxStop()) + cmd.AddCommand(newSandboxKill()) + + // Command surface cmd.AddCommand(newSandboxExec()) - cmd.AddCommand(newSandboxPty()) + + // Legacy CI-bastion verbs (depot.ci.v1) 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..b79019f3 --- /dev/null +++ b/pkg/cmd/sandbox/sandbox_test.go @@ -0,0 +1,30 @@ +package sandbox + +import ( + "strings" + "testing" +) + +// Touch-test: every vertical-slice verb is registered on the root command. +// This catches the wiring regression where a verb file ships but sandbox.go +// forgets the AddCommand. +func TestSandboxVerbTree(t *testing.T) { + root := NewCmdSandbox() + + want := []string{"create", "exec", "stop", "kill"} + got := map[string]bool{} + for _, c := range root.Commands() { + // cobra command Use can include "[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) + } + } +} diff --git a/pkg/cmd/sandbox/state.go b/pkg/cmd/sandbox/state.go new file mode 100644 index 00000000..a5f160af --- /dev/null +++ b/pkg/cmd/sandbox/state.go @@ -0,0 +1,66 @@ +package sandbox + +import ( + "errors" + "io/fs" + "os" + "path/filepath" + "strings" +) + +// We track the most recent sandbox_id per spec name in +// ~/.depot/sandbox-state/.id so `depot sandbox from-spec` can +// refuse to launch a duplicate while one is already alive. This is a pure +// local convenience — the API doesn't carry a spec-name surface yet +// (sandbox.v1.Sandbox has no name field beyond the optional create-time +// label), so cross-machine collisions still slip through. Once the proto +// gains a name field, this lookup should move server-side. + +func sandboxStateDir() (string, error) { + home, err := os.UserHomeDir() + if err != nil { + return "", err + } + return filepath.Join(home, ".depot", "sandbox-state"), nil +} + +func sandboxStatePath(name string) (string, error) { + dir, err := sandboxStateDir() + if err != nil { + return "", err + } + return filepath.Join(dir, sanitizeStateName(name)+".id"), nil +} + +// sanitizeStateName keeps only safe characters so a spec name with slashes +// or dots can't escape the state dir. +func sanitizeStateName(name string) string { + if name == "" { + return "_unnamed" + } + return strings.Map(func(r rune) rune { + switch { + case r >= 'a' && r <= 'z', r >= 'A' && r <= 'Z', r >= '0' && r <= '9', r == '-', r == '_': + return r + } + return '_' + }, name) +} + +func loadSandboxState(name string) (string, error) { + if name == "" { + return "", nil + } + path, err := sandboxStatePath(name) + if err != nil { + return "", err + } + data, err := os.ReadFile(path) + if errors.Is(err, fs.ErrNotExist) { + return "", nil + } + if err != nil { + return "", err + } + return strings.TrimSpace(string(data)), nil +} diff --git a/pkg/cmd/sandbox/stop.go b/pkg/cmd/sandbox/stop.go new file mode 100644 index 00000000..a5b6cbd6 --- /dev/null +++ b/pkg/cmd/sandbox/stop.go @@ -0,0 +1,102 @@ +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 wraps depot.sandbox.v1.SandboxService.StopSandbox — the +// graceful shutdown verb (terminated_by=GRACEFUL). M34 renames the legacy +// `down` to `stop` to match the SDK vocabulary; `down` survives as a cobra +// alias for script-compat (D-M34-O). +// +// With no positional args, walks up from cwd for a sandbox.depot.yml and +// resolves the most-recent sandbox started under that spec name (per +// ~/.depot/sandbox-state/.id). With one or more ids, stops each. +// +// Hook behavior: on.down hooks are still CLI-side (D-M34-I) — they run via +// RunCommand against the sandboxv1 wire before the StopSandbox call. Pass +// --no-hook to skip and stop immediately. +func newSandboxStop() *cobra.Command { + cmd := &cobra.Command{ + Use: "stop [...]", + Aliases: []string{"down"}, + Short: "Gracefully stop a sandbox (runs on.down hooks first)", + Long: `Stop a sandbox via depot.sandbox.v1.StopSandbox (terminated_by=GRACEFUL). + +With no arguments, walks up from cwd for a sandbox.depot.yml, picks up the +sandbox last started under that spec's name, runs on.down hooks, then asks +the server to stop it. + +With one or more sandbox ids, runs on.down (resolved from the local spec, if +one is found) against each, then stops each. Pass --no-hook to skip the +hooks and stop immediately.`, + Args: cobra.ArbitraryArgs, + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + token, orgID, err := resolveAuthAndOrg(ctx, cmd) + if err != nil { + return err + } + + file, _ := cmd.Flags().GetString("file") + setPairs, _ := cmd.Flags().GetStringArray("set") + noHook, _ := cmd.Flags().GetBool("no-hook") + blocking, _ := cmd.Flags().GetBool("blocking") + + ids := args + if len(ids) == 0 { + id, err := sandboxIDFromLocalSpec(file) + if err != nil { + return err + } + ids = []string{id} + } + + var downHooks []sandbox.HookSpec + if !noHook { + hooks, err := resolveStageHooks(file, setPairs) + if err != nil { + return fmt.Errorf("resolve on.down: %w", err) + } + downHooks = hooks.Down + } + + client := api.NewSandboxV0Client() + var failures []string + for _, id := range ids { + if len(downHooks) > 0 { + if err := runHooks(ctx, client, token, orgID, id, "on.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/agent/v1/agentv1connect/sandbox.connect.go b/pkg/proto/depot/agent/v1/agentv1connect/sandbox.connect.go index b36203f5..07265f1a 100644 --- a/pkg/proto/depot/agent/v1/agentv1connect/sandbox.connect.go +++ b/pkg/proto/depot/agent/v1/agentv1connect/sandbox.connect.go @@ -36,6 +36,9 @@ const ( // SandboxServiceStartSandboxProcedure is the fully-qualified name of the SandboxService's // StartSandbox RPC. SandboxServiceStartSandboxProcedure = "/depot.agent.v1.SandboxService/StartSandbox" + // SandboxServiceExecInSandboxProcedure is the fully-qualified name of the SandboxService's + // ExecInSandbox RPC. + SandboxServiceExecInSandboxProcedure = "/depot.agent.v1.SandboxService/ExecInSandbox" // SandboxServiceGetSandboxProcedure is the fully-qualified name of the SandboxService's GetSandbox // RPC. SandboxServiceGetSandboxProcedure = "/depot.agent.v1.SandboxService/GetSandbox" @@ -59,11 +62,27 @@ const ( SandboxServiceListSecretsProcedure = "/depot.agent.v1.SandboxService/ListSecrets" // SandboxServiceShutdownProcedure is the fully-qualified name of the SandboxService's Shutdown RPC. SandboxServiceShutdownProcedure = "/depot.agent.v1.SandboxService/Shutdown" + // SandboxServiceGetSSHConnectionProcedure is the fully-qualified name of the SandboxService's + // GetSSHConnection RPC. + SandboxServiceGetSSHConnectionProcedure = "/depot.agent.v1.SandboxService/GetSSHConnection" + // SandboxServiceCreateSandboxTemplateProcedure is the fully-qualified name of the SandboxService's + // CreateSandboxTemplate RPC. + SandboxServiceCreateSandboxTemplateProcedure = "/depot.agent.v1.SandboxService/CreateSandboxTemplate" + // SandboxServiceGetSandboxTemplateProcedure is the fully-qualified name of the SandboxService's + // GetSandboxTemplate RPC. + SandboxServiceGetSandboxTemplateProcedure = "/depot.agent.v1.SandboxService/GetSandboxTemplate" + // SandboxServiceListSandboxTemplatesProcedure is the fully-qualified name of the SandboxService's + // ListSandboxTemplates RPC. + SandboxServiceListSandboxTemplatesProcedure = "/depot.agent.v1.SandboxService/ListSandboxTemplates" + // SandboxServiceDeleteSandboxTemplateProcedure is the fully-qualified name of the SandboxService's + // DeleteSandboxTemplate RPC. + SandboxServiceDeleteSandboxTemplateProcedure = "/depot.agent.v1.SandboxService/DeleteSandboxTemplate" ) // SandboxServiceClient is a client for the depot.agent.v1.SandboxService service. type SandboxServiceClient interface { StartSandbox(context.Context, *connect.Request[v1.StartSandboxRequest]) (*connect.Response[v1.StartSandboxResponse], error) + ExecInSandbox(context.Context, *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) GetSandbox(context.Context, *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) ListSandboxs(context.Context, *connect.Request[v1.ListSandboxsRequest]) (*connect.Response[v1.ListSandboxsResponse], error) KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) @@ -73,6 +92,13 @@ type SandboxServiceClient interface { ListSecrets(context.Context, *connect.Request[v1.ListSecretsRequest]) (*connect.Response[v1.ListSecretsResponse], error) // Shutdown is called from within the sandbox to gracefully terminate Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error) + // GetSSHConnection returns the SSH connection info for a running sandbox + GetSSHConnection(context.Context, *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) + // Template management - save and reuse pre-configured sandbox filesystems + CreateSandboxTemplate(context.Context, *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) + GetSandboxTemplate(context.Context, *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) + ListSandboxTemplates(context.Context, *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) + DeleteSandboxTemplate(context.Context, *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) } // NewSandboxServiceClient constructs a client for the depot.agent.v1.SandboxService service. By @@ -90,6 +116,11 @@ func NewSandboxServiceClient(httpClient connect.HTTPClient, baseURL string, opts baseURL+SandboxServiceStartSandboxProcedure, opts..., ), + execInSandbox: connect.NewClient[v1.ExecInSandboxRequest, v1.ExecInSandboxResponse]( + httpClient, + baseURL+SandboxServiceExecInSandboxProcedure, + opts..., + ), getSandbox: connect.NewClient[v1.GetSandboxRequest, v1.GetSandboxResponse]( httpClient, baseURL+SandboxServiceGetSandboxProcedure, @@ -130,20 +161,51 @@ func NewSandboxServiceClient(httpClient connect.HTTPClient, baseURL string, opts baseURL+SandboxServiceShutdownProcedure, opts..., ), + getSSHConnection: connect.NewClient[v1.GetSSHConnectionRequest, v1.GetSSHConnectionResponse]( + httpClient, + baseURL+SandboxServiceGetSSHConnectionProcedure, + opts..., + ), + createSandboxTemplate: connect.NewClient[v1.CreateSandboxTemplateRequest, v1.CreateSandboxTemplateResponse]( + httpClient, + baseURL+SandboxServiceCreateSandboxTemplateProcedure, + opts..., + ), + getSandboxTemplate: connect.NewClient[v1.GetSandboxTemplateRequest, v1.GetSandboxTemplateResponse]( + httpClient, + baseURL+SandboxServiceGetSandboxTemplateProcedure, + opts..., + ), + listSandboxTemplates: connect.NewClient[v1.ListSandboxTemplatesRequest, v1.ListSandboxTemplatesResponse]( + httpClient, + baseURL+SandboxServiceListSandboxTemplatesProcedure, + opts..., + ), + deleteSandboxTemplate: connect.NewClient[v1.DeleteSandboxTemplateRequest, v1.DeleteSandboxTemplateResponse]( + httpClient, + baseURL+SandboxServiceDeleteSandboxTemplateProcedure, + opts..., + ), } } // sandboxServiceClient implements SandboxServiceClient. type sandboxServiceClient struct { - startSandbox *connect.Client[v1.StartSandboxRequest, v1.StartSandboxResponse] - getSandbox *connect.Client[v1.GetSandboxRequest, v1.GetSandboxResponse] - listSandboxs *connect.Client[v1.ListSandboxsRequest, v1.ListSandboxsResponse] - killSandbox *connect.Client[v1.KillSandboxRequest, v1.KillSandboxResponse] - streamSandboxLogs *connect.Client[v1.StreamSandboxLogsRequest, v1.StreamSandboxLogsResponse] - addSecret *connect.Client[v1.AddSecretRequest, v1.AddSecretResponse] - removeSecret *connect.Client[v1.RemoveSecretRequest, v1.RemoveSecretResponse] - listSecrets *connect.Client[v1.ListSecretsRequest, v1.ListSecretsResponse] - shutdown *connect.Client[v1.ShutdownRequest, v1.ShutdownResponse] + startSandbox *connect.Client[v1.StartSandboxRequest, v1.StartSandboxResponse] + execInSandbox *connect.Client[v1.ExecInSandboxRequest, v1.ExecInSandboxResponse] + getSandbox *connect.Client[v1.GetSandboxRequest, v1.GetSandboxResponse] + listSandboxs *connect.Client[v1.ListSandboxsRequest, v1.ListSandboxsResponse] + killSandbox *connect.Client[v1.KillSandboxRequest, v1.KillSandboxResponse] + streamSandboxLogs *connect.Client[v1.StreamSandboxLogsRequest, v1.StreamSandboxLogsResponse] + addSecret *connect.Client[v1.AddSecretRequest, v1.AddSecretResponse] + removeSecret *connect.Client[v1.RemoveSecretRequest, v1.RemoveSecretResponse] + listSecrets *connect.Client[v1.ListSecretsRequest, v1.ListSecretsResponse] + shutdown *connect.Client[v1.ShutdownRequest, v1.ShutdownResponse] + getSSHConnection *connect.Client[v1.GetSSHConnectionRequest, v1.GetSSHConnectionResponse] + createSandboxTemplate *connect.Client[v1.CreateSandboxTemplateRequest, v1.CreateSandboxTemplateResponse] + getSandboxTemplate *connect.Client[v1.GetSandboxTemplateRequest, v1.GetSandboxTemplateResponse] + listSandboxTemplates *connect.Client[v1.ListSandboxTemplatesRequest, v1.ListSandboxTemplatesResponse] + deleteSandboxTemplate *connect.Client[v1.DeleteSandboxTemplateRequest, v1.DeleteSandboxTemplateResponse] } // StartSandbox calls depot.agent.v1.SandboxService.StartSandbox. @@ -151,6 +213,11 @@ func (c *sandboxServiceClient) StartSandbox(ctx context.Context, req *connect.Re return c.startSandbox.CallUnary(ctx, req) } +// ExecInSandbox calls depot.agent.v1.SandboxService.ExecInSandbox. +func (c *sandboxServiceClient) ExecInSandbox(ctx context.Context, req *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) { + return c.execInSandbox.CallUnary(ctx, req) +} + // GetSandbox calls depot.agent.v1.SandboxService.GetSandbox. func (c *sandboxServiceClient) GetSandbox(ctx context.Context, req *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) { return c.getSandbox.CallUnary(ctx, req) @@ -191,9 +258,35 @@ func (c *sandboxServiceClient) Shutdown(ctx context.Context, req *connect.Reques return c.shutdown.CallUnary(ctx, req) } +// GetSSHConnection calls depot.agent.v1.SandboxService.GetSSHConnection. +func (c *sandboxServiceClient) GetSSHConnection(ctx context.Context, req *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) { + return c.getSSHConnection.CallUnary(ctx, req) +} + +// CreateSandboxTemplate calls depot.agent.v1.SandboxService.CreateSandboxTemplate. +func (c *sandboxServiceClient) CreateSandboxTemplate(ctx context.Context, req *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) { + return c.createSandboxTemplate.CallUnary(ctx, req) +} + +// GetSandboxTemplate calls depot.agent.v1.SandboxService.GetSandboxTemplate. +func (c *sandboxServiceClient) GetSandboxTemplate(ctx context.Context, req *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) { + return c.getSandboxTemplate.CallUnary(ctx, req) +} + +// ListSandboxTemplates calls depot.agent.v1.SandboxService.ListSandboxTemplates. +func (c *sandboxServiceClient) ListSandboxTemplates(ctx context.Context, req *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) { + return c.listSandboxTemplates.CallUnary(ctx, req) +} + +// DeleteSandboxTemplate calls depot.agent.v1.SandboxService.DeleteSandboxTemplate. +func (c *sandboxServiceClient) DeleteSandboxTemplate(ctx context.Context, req *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) { + return c.deleteSandboxTemplate.CallUnary(ctx, req) +} + // SandboxServiceHandler is an implementation of the depot.agent.v1.SandboxService service. type SandboxServiceHandler interface { StartSandbox(context.Context, *connect.Request[v1.StartSandboxRequest]) (*connect.Response[v1.StartSandboxResponse], error) + ExecInSandbox(context.Context, *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) GetSandbox(context.Context, *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) ListSandboxs(context.Context, *connect.Request[v1.ListSandboxsRequest]) (*connect.Response[v1.ListSandboxsResponse], error) KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) @@ -203,6 +296,13 @@ type SandboxServiceHandler interface { ListSecrets(context.Context, *connect.Request[v1.ListSecretsRequest]) (*connect.Response[v1.ListSecretsResponse], error) // Shutdown is called from within the sandbox to gracefully terminate Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error) + // GetSSHConnection returns the SSH connection info for a running sandbox + GetSSHConnection(context.Context, *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) + // Template management - save and reuse pre-configured sandbox filesystems + CreateSandboxTemplate(context.Context, *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) + GetSandboxTemplate(context.Context, *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) + ListSandboxTemplates(context.Context, *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) + DeleteSandboxTemplate(context.Context, *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) } // NewSandboxServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -216,6 +316,11 @@ func NewSandboxServiceHandler(svc SandboxServiceHandler, opts ...connect.Handler svc.StartSandbox, opts..., ) + sandboxServiceExecInSandboxHandler := connect.NewUnaryHandler( + SandboxServiceExecInSandboxProcedure, + svc.ExecInSandbox, + opts..., + ) sandboxServiceGetSandboxHandler := connect.NewUnaryHandler( SandboxServiceGetSandboxProcedure, svc.GetSandbox, @@ -256,10 +361,37 @@ func NewSandboxServiceHandler(svc SandboxServiceHandler, opts ...connect.Handler svc.Shutdown, opts..., ) + sandboxServiceGetSSHConnectionHandler := connect.NewUnaryHandler( + SandboxServiceGetSSHConnectionProcedure, + svc.GetSSHConnection, + opts..., + ) + sandboxServiceCreateSandboxTemplateHandler := connect.NewUnaryHandler( + SandboxServiceCreateSandboxTemplateProcedure, + svc.CreateSandboxTemplate, + opts..., + ) + sandboxServiceGetSandboxTemplateHandler := connect.NewUnaryHandler( + SandboxServiceGetSandboxTemplateProcedure, + svc.GetSandboxTemplate, + opts..., + ) + sandboxServiceListSandboxTemplatesHandler := connect.NewUnaryHandler( + SandboxServiceListSandboxTemplatesProcedure, + svc.ListSandboxTemplates, + opts..., + ) + sandboxServiceDeleteSandboxTemplateHandler := connect.NewUnaryHandler( + SandboxServiceDeleteSandboxTemplateProcedure, + svc.DeleteSandboxTemplate, + opts..., + ) return "/depot.agent.v1.SandboxService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case SandboxServiceStartSandboxProcedure: sandboxServiceStartSandboxHandler.ServeHTTP(w, r) + case SandboxServiceExecInSandboxProcedure: + sandboxServiceExecInSandboxHandler.ServeHTTP(w, r) case SandboxServiceGetSandboxProcedure: sandboxServiceGetSandboxHandler.ServeHTTP(w, r) case SandboxServiceListSandboxsProcedure: @@ -276,6 +408,16 @@ func NewSandboxServiceHandler(svc SandboxServiceHandler, opts ...connect.Handler sandboxServiceListSecretsHandler.ServeHTTP(w, r) case SandboxServiceShutdownProcedure: sandboxServiceShutdownHandler.ServeHTTP(w, r) + case SandboxServiceGetSSHConnectionProcedure: + sandboxServiceGetSSHConnectionHandler.ServeHTTP(w, r) + case SandboxServiceCreateSandboxTemplateProcedure: + sandboxServiceCreateSandboxTemplateHandler.ServeHTTP(w, r) + case SandboxServiceGetSandboxTemplateProcedure: + sandboxServiceGetSandboxTemplateHandler.ServeHTTP(w, r) + case SandboxServiceListSandboxTemplatesProcedure: + sandboxServiceListSandboxTemplatesHandler.ServeHTTP(w, r) + case SandboxServiceDeleteSandboxTemplateProcedure: + sandboxServiceDeleteSandboxTemplateHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -289,6 +431,10 @@ func (UnimplementedSandboxServiceHandler) StartSandbox(context.Context, *connect return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.StartSandbox is not implemented")) } +func (UnimplementedSandboxServiceHandler) ExecInSandbox(context.Context, *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.ExecInSandbox is not implemented")) +} + func (UnimplementedSandboxServiceHandler) GetSandbox(context.Context, *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.GetSandbox is not implemented")) } @@ -320,3 +466,23 @@ func (UnimplementedSandboxServiceHandler) ListSecrets(context.Context, *connect. func (UnimplementedSandboxServiceHandler) Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.Shutdown is not implemented")) } + +func (UnimplementedSandboxServiceHandler) GetSSHConnection(context.Context, *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.GetSSHConnection is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) CreateSandboxTemplate(context.Context, *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.CreateSandboxTemplate is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) GetSandboxTemplate(context.Context, *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.GetSandboxTemplate is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) ListSandboxTemplates(context.Context, *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.ListSandboxTemplates is not implemented")) +} + +func (UnimplementedSandboxServiceHandler) DeleteSandboxTemplate(context.Context, *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.DeleteSandboxTemplate is not implemented")) +} diff --git a/pkg/proto/depot/agent/v1/sandbox.pb.go b/pkg/proto/depot/agent/v1/sandbox.pb.go index dfd44271..8ce48bfc 100644 --- a/pkg/proto/depot/agent/v1/sandbox.pb.go +++ b/pkg/proto/depot/agent/v1/sandbox.pb.go @@ -67,7 +67,7 @@ func (x StreamSandboxLogsResponse_LogEvent_LogType) Number() protoreflect.EnumNu // Deprecated: Use StreamSandboxLogsResponse_LogEvent_LogType.Descriptor instead. func (StreamSandboxLogsResponse_LogEvent_LogType) EnumDescriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17, 0, 0} + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{23, 0, 0} } type StartSandboxRequest struct { @@ -75,12 +75,26 @@ type StartSandboxRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AgentType AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` - SessionId *string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` - ResumeSessionId *string `protobuf:"bytes,3,opt,name=resume_session_id,json=resumeSessionId,proto3,oneof" json:"resume_session_id,omitempty"` - Argv string `protobuf:"bytes,4,opt,name=argv,proto3" json:"argv,omitempty"` - EnvironmentVariables map[string]string `protobuf:"bytes,5,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Context *StartSandboxRequest_Context `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + AgentType AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` + SessionId *string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` + ResumeSessionId *string `protobuf:"bytes,3,opt,name=resume_session_id,json=resumeSessionId,proto3,oneof" json:"resume_session_id,omitempty"` + Argv string `protobuf:"bytes,4,opt,name=argv,proto3" json:"argv,omitempty"` + EnvironmentVariables map[string]string `protobuf:"bytes,5,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Context *StartSandboxRequest_Context `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + SshConfig *StartSandboxRequest_SSHConfig `protobuf:"bytes,7,opt,name=ssh_config,json=sshConfig,proto3,oneof" json:"ssh_config,omitempty"` + // Start sandbox from a saved template (pre-configured filesystem) + // When set, creates a fresh session with the template's filesystem state + TemplateId *string `protobuf:"bytes,8,opt,name=template_id,json=templateId,proto3,oneof" json:"template_id,omitempty"` + // Optional command to execute inside the sandbox after it starts. + // If not provided, the sandbox starts as usual. + Command *string `protobuf:"bytes,9,opt,name=command,proto3,oneof" json:"command,omitempty"` + // When true, wait for the command to finish and return its exit code, + // stdout, and stderr in command_result. When false (default), the command + // is started but the response returns immediately without waiting. + WaitForCommand *bool `protobuf:"varint,10,opt,name=wait_for_command,json=waitForCommand,proto3,oneof" json:"wait_for_command,omitempty"` + // Optional image reference used as the sandbox base image. + // When omitted, the default Depot sandbox image is used. + Image *string `protobuf:"bytes,11,opt,name=image,proto3,oneof" json:"image,omitempty"` } func (x *StartSandboxRequest) Reset() { @@ -157,14 +171,52 @@ func (x *StartSandboxRequest) GetContext() *StartSandboxRequest_Context { return nil } +func (x *StartSandboxRequest) GetSshConfig() *StartSandboxRequest_SSHConfig { + if x != nil { + return x.SshConfig + } + return nil +} + +func (x *StartSandboxRequest) GetTemplateId() string { + if x != nil && x.TemplateId != nil { + return *x.TemplateId + } + return "" +} + +func (x *StartSandboxRequest) GetCommand() string { + if x != nil && x.Command != nil { + return *x.Command + } + return "" +} + +func (x *StartSandboxRequest) GetWaitForCommand() bool { + if x != nil && x.WaitForCommand != nil { + return *x.WaitForCommand + } + return false +} + +func (x *StartSandboxRequest) GetImage() string { + if x != nil && x.Image != nil { + return *x.Image + } + return "" +} + type StartSandboxResponse 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"` - SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + SshConnection *SSHConnection `protobuf:"bytes,4,opt,name=ssh_connection,json=sshConnection,proto3,oneof" json:"ssh_connection,omitempty"` + // Result of the command execution, if a command was provided in the request + CommandResult *CommandResult `protobuf:"bytes,5,opt,name=command_result,json=commandResult,proto3,oneof" json:"command_result,omitempty"` } func (x *StartSandboxResponse) Reset() { @@ -220,16 +272,34 @@ func (x *StartSandboxResponse) GetOrganizationId() string { return "" } -type GetSandboxRequest struct { +func (x *StartSandboxResponse) GetSshConnection() *SSHConnection { + if x != nil { + return x.SshConnection + } + return nil +} + +func (x *StartSandboxResponse) GetCommandResult() *CommandResult { + if x != nil { + return x.CommandResult + } + return nil +} + +type ExecInSandboxRequest 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"` + Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` + // When true (default), wait for command completion and return output. + // When false, start command and return immediately. + WaitForCommand *bool `protobuf:"varint,3,opt,name=wait_for_command,json=waitForCommand,proto3,oneof" json:"wait_for_command,omitempty"` } -func (x *GetSandboxRequest) Reset() { - *x = GetSandboxRequest{} +func (x *ExecInSandboxRequest) Reset() { + *x = ExecInSandboxRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -237,13 +307,13 @@ func (x *GetSandboxRequest) Reset() { } } -func (x *GetSandboxRequest) String() string { +func (x *ExecInSandboxRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSandboxRequest) ProtoMessage() {} +func (*ExecInSandboxRequest) ProtoMessage() {} -func (x *GetSandboxRequest) ProtoReflect() protoreflect.Message { +func (x *ExecInSandboxRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -255,28 +325,42 @@ func (x *GetSandboxRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSandboxRequest.ProtoReflect.Descriptor instead. -func (*GetSandboxRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ExecInSandboxRequest.ProtoReflect.Descriptor instead. +func (*ExecInSandboxRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{2} } -func (x *GetSandboxRequest) GetSandboxId() string { +func (x *ExecInSandboxRequest) GetSandboxId() string { if x != nil { return x.SandboxId } return "" } -type GetSandboxResponse struct { +func (x *ExecInSandboxRequest) GetCommand() string { + if x != nil { + return x.Command + } + return "" +} + +func (x *ExecInSandboxRequest) GetWaitForCommand() bool { + if x != nil && x.WaitForCommand != nil { + return *x.WaitForCommand + } + return false +} + +type ExecInSandboxResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + CommandResult *CommandResult `protobuf:"bytes,1,opt,name=command_result,json=commandResult,proto3,oneof" json:"command_result,omitempty"` } -func (x *GetSandboxResponse) Reset() { - *x = GetSandboxResponse{} +func (x *ExecInSandboxResponse) Reset() { + *x = ExecInSandboxResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -284,13 +368,13 @@ func (x *GetSandboxResponse) Reset() { } } -func (x *GetSandboxResponse) String() string { +func (x *ExecInSandboxResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSandboxResponse) ProtoMessage() {} +func (*ExecInSandboxResponse) ProtoMessage() {} -func (x *GetSandboxResponse) ProtoReflect() protoreflect.Message { +func (x *ExecInSandboxResponse) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -302,31 +386,31 @@ func (x *GetSandboxResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSandboxResponse.ProtoReflect.Descriptor instead. -func (*GetSandboxResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ExecInSandboxResponse.ProtoReflect.Descriptor instead. +func (*ExecInSandboxResponse) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{3} } -func (x *GetSandboxResponse) GetSandbox() *Sandbox { +func (x *ExecInSandboxResponse) GetCommandResult() *CommandResult { if x != nil { - return x.Sandbox + return x.CommandResult } return nil } -type AddSecretRequest struct { +// CommandResult contains the output from executing a command inside a sandbox +type CommandResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` - SecretDescription *string `protobuf:"bytes,2,opt,name=secret_description,json=secretDescription,proto3,oneof" json:"secret_description,omitempty"` - SecretValue string `protobuf:"bytes,3,opt,name=secret_value,json=secretValue,proto3" json:"secret_value,omitempty"` - AgentType *AgentType `protobuf:"varint,4,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` + ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + Stdout string `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"` + Stderr string `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"` } -func (x *AddSecretRequest) Reset() { - *x = AddSecretRequest{} +func (x *CommandResult) Reset() { + *x = CommandResult{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -334,13 +418,13 @@ func (x *AddSecretRequest) Reset() { } } -func (x *AddSecretRequest) String() string { +func (x *CommandResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddSecretRequest) ProtoMessage() {} +func (*CommandResult) ProtoMessage() {} -func (x *AddSecretRequest) ProtoReflect() protoreflect.Message { +func (x *CommandResult) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -352,47 +436,46 @@ func (x *AddSecretRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddSecretRequest.ProtoReflect.Descriptor instead. -func (*AddSecretRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CommandResult.ProtoReflect.Descriptor instead. +func (*CommandResult) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{4} } -func (x *AddSecretRequest) GetSecretName() string { +func (x *CommandResult) GetExitCode() int32 { if x != nil { - return x.SecretName + return x.ExitCode } - return "" + return 0 } -func (x *AddSecretRequest) GetSecretDescription() string { - if x != nil && x.SecretDescription != nil { - return *x.SecretDescription +func (x *CommandResult) GetStdout() string { + if x != nil { + return x.Stdout } return "" } -func (x *AddSecretRequest) GetSecretValue() string { +func (x *CommandResult) GetStderr() string { if x != nil { - return x.SecretValue + return x.Stderr } return "" } -func (x *AddSecretRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType - } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -type AddSecretResponse struct { +// SSHConnection contains the connection details for direct SSH access to a sandbox +type SSHConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` // Always "depot" + PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // PEM format, base64 encoded } -func (x *AddSecretResponse) Reset() { - *x = AddSecretResponse{} +func (x *SSHConnection) Reset() { + *x = SSHConnection{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -400,13 +483,13 @@ func (x *AddSecretResponse) Reset() { } } -func (x *AddSecretResponse) String() string { +func (x *SSHConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddSecretResponse) ProtoMessage() {} +func (*SSHConnection) ProtoMessage() {} -func (x *AddSecretResponse) ProtoReflect() protoreflect.Message { +func (x *SSHConnection) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -418,22 +501,49 @@ func (x *AddSecretResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddSecretResponse.ProtoReflect.Descriptor instead. -func (*AddSecretResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SSHConnection.ProtoReflect.Descriptor instead. +func (*SSHConnection) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{5} } -type RemoveSecretRequest struct { +func (x *SSHConnection) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *SSHConnection) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +func (x *SSHConnection) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *SSHConnection) GetPrivateKey() string { + if x != nil { + return x.PrivateKey + } + return "" +} + +type GetSSHConnectionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` - AgentType *AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` } -func (x *RemoveSecretRequest) Reset() { - *x = RemoveSecretRequest{} +func (x *GetSSHConnectionRequest) Reset() { + *x = GetSSHConnectionRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -441,13 +551,13 @@ func (x *RemoveSecretRequest) Reset() { } } -func (x *RemoveSecretRequest) String() string { +func (x *GetSSHConnectionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RemoveSecretRequest) ProtoMessage() {} +func (*GetSSHConnectionRequest) ProtoMessage() {} -func (x *RemoveSecretRequest) ProtoReflect() protoreflect.Message { +func (x *GetSSHConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -459,33 +569,28 @@ func (x *RemoveSecretRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RemoveSecretRequest.ProtoReflect.Descriptor instead. -func (*RemoveSecretRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSSHConnectionRequest.ProtoReflect.Descriptor instead. +func (*GetSSHConnectionRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{6} } -func (x *RemoveSecretRequest) GetSecretName() string { +func (x *GetSSHConnectionRequest) GetSessionId() string { if x != nil { - return x.SecretName + return x.SessionId } return "" } -func (x *RemoveSecretRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType - } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -type RemoveSecretResponse struct { +type GetSSHConnectionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + SshConnection *SSHConnection `protobuf:"bytes,1,opt,name=ssh_connection,json=sshConnection,proto3" json:"ssh_connection,omitempty"` } -func (x *RemoveSecretResponse) Reset() { - *x = RemoveSecretResponse{} +func (x *GetSSHConnectionResponse) Reset() { + *x = GetSSHConnectionResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -493,13 +598,13 @@ func (x *RemoveSecretResponse) Reset() { } } -func (x *RemoveSecretResponse) String() string { +func (x *GetSSHConnectionResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RemoveSecretResponse) ProtoMessage() {} +func (*GetSSHConnectionResponse) ProtoMessage() {} -func (x *RemoveSecretResponse) ProtoReflect() protoreflect.Message { +func (x *GetSSHConnectionResponse) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -511,21 +616,28 @@ func (x *RemoveSecretResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RemoveSecretResponse.ProtoReflect.Descriptor instead. -func (*RemoveSecretResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSSHConnectionResponse.ProtoReflect.Descriptor instead. +func (*GetSSHConnectionResponse) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{7} } -type ListSecretsRequest struct { +func (x *GetSSHConnectionResponse) GetSshConnection() *SSHConnection { + if x != nil { + return x.SshConnection + } + return nil +} + +type GetSandboxRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AgentType *AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` } -func (x *ListSecretsRequest) Reset() { - *x = ListSecretsRequest{} +func (x *GetSandboxRequest) Reset() { + *x = GetSandboxRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -533,13 +645,13 @@ func (x *ListSecretsRequest) Reset() { } } -func (x *ListSecretsRequest) String() string { +func (x *GetSandboxRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListSecretsRequest) ProtoMessage() {} +func (*GetSandboxRequest) ProtoMessage() {} -func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { +func (x *GetSandboxRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -551,28 +663,28 @@ func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListSecretsRequest.ProtoReflect.Descriptor instead. -func (*ListSecretsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSandboxRequest.ProtoReflect.Descriptor instead. +func (*GetSandboxRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{8} } -func (x *ListSecretsRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType +func (x *GetSandboxRequest) GetSandboxId() string { + if x != nil { + return x.SandboxId } - return AgentType_AGENT_TYPE_UNSPECIFIED + return "" } -type ListSecretsResponse struct { +type GetSandboxResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` } -func (x *ListSecretsResponse) Reset() { - *x = ListSecretsResponse{} +func (x *GetSandboxResponse) Reset() { + *x = GetSandboxResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -580,13 +692,13 @@ func (x *ListSecretsResponse) Reset() { } } -func (x *ListSecretsResponse) String() string { +func (x *GetSandboxResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListSecretsResponse) ProtoMessage() {} +func (*GetSandboxResponse) ProtoMessage() {} -func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { +func (x *GetSandboxResponse) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -598,30 +710,31 @@ func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListSecretsResponse.ProtoReflect.Descriptor instead. -func (*ListSecretsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSandboxResponse.ProtoReflect.Descriptor instead. +func (*GetSandboxResponse) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{9} } -func (x *ListSecretsResponse) GetSecrets() []*Secret { +func (x *GetSandboxResponse) GetSandbox() *Sandbox { if x != nil { - return x.Secrets + return x.Sandbox } return nil } -type Secret struct { +type AddSecretRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` - LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` + SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` + SecretDescription *string `protobuf:"bytes,2,opt,name=secret_description,json=secretDescription,proto3,oneof" json:"secret_description,omitempty"` + SecretValue string `protobuf:"bytes,3,opt,name=secret_value,json=secretValue,proto3" json:"secret_value,omitempty"` + AgentType *AgentType `protobuf:"varint,4,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` } -func (x *Secret) Reset() { - *x = Secret{} +func (x *AddSecretRequest) Reset() { + *x = AddSecretRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -629,13 +742,13 @@ func (x *Secret) Reset() { } } -func (x *Secret) String() string { +func (x *AddSecretRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Secret) ProtoMessage() {} +func (*AddSecretRequest) ProtoMessage() {} -func (x *Secret) ProtoReflect() protoreflect.Message { +func (x *AddSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -647,44 +760,47 @@ func (x *Secret) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { +// Deprecated: Use AddSecretRequest.ProtoReflect.Descriptor instead. +func (*AddSecretRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{10} } -func (x *Secret) GetName() string { +func (x *AddSecretRequest) GetSecretName() string { if x != nil { - return x.Name + return x.SecretName } return "" } -func (x *Secret) GetDescription() string { - if x != nil && x.Description != nil { - return *x.Description +func (x *AddSecretRequest) GetSecretDescription() string { + if x != nil && x.SecretDescription != nil { + return *x.SecretDescription } return "" } -func (x *Secret) GetLastModified() *timestamppb.Timestamp { +func (x *AddSecretRequest) GetSecretValue() string { if x != nil { - return x.LastModified + return x.SecretValue } - return nil + return "" } -type ListSandboxsRequest struct { +func (x *AddSecretRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType + } + return AgentType_AGENT_TYPE_UNSPECIFIED +} + +type AddSecretResponse 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"` - AgentType *AgentType `protobuf:"varint,3,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` // Filter by agent type } -func (x *ListSandboxsRequest) Reset() { - *x = ListSandboxsRequest{} +func (x *AddSecretResponse) Reset() { + *x = AddSecretResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -692,14 +808,841 @@ func (x *ListSandboxsRequest) Reset() { } } -func (x *ListSandboxsRequest) String() string { +func (x *AddSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSecretResponse) ProtoMessage() {} + +func (x *AddSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_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 AddSecretResponse.ProtoReflect.Descriptor instead. +func (*AddSecretResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{11} +} + +type RemoveSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` + AgentType *AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` +} + +func (x *RemoveSecretRequest) Reset() { + *x = RemoveSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveSecretRequest) ProtoMessage() {} + +func (x *RemoveSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 RemoveSecretRequest.ProtoReflect.Descriptor instead. +func (*RemoveSecretRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{12} +} + +func (x *RemoveSecretRequest) GetSecretName() string { + if x != nil { + return x.SecretName + } + return "" +} + +func (x *RemoveSecretRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType + } + return AgentType_AGENT_TYPE_UNSPECIFIED +} + +type RemoveSecretResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveSecretResponse) Reset() { + *x = RemoveSecretResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveSecretResponse) ProtoMessage() {} + +func (x *RemoveSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 RemoveSecretResponse.ProtoReflect.Descriptor instead. +func (*RemoveSecretResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{13} +} + +type ListSecretsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AgentType *AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` +} + +func (x *ListSecretsRequest) Reset() { + *x = ListSecretsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecretsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecretsRequest) ProtoMessage() {} + +func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 ListSecretsRequest.ProtoReflect.Descriptor instead. +func (*ListSecretsRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{14} +} + +func (x *ListSecretsRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType + } + return AgentType_AGENT_TYPE_UNSPECIFIED +} + +type ListSecretsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` +} + +func (x *ListSecretsResponse) Reset() { + *x = ListSecretsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecretsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecretsResponse) ProtoMessage() {} + +func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 ListSecretsResponse.ProtoReflect.Descriptor instead. +func (*ListSecretsResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{15} +} + +func (x *ListSecretsResponse) GetSecrets() []*Secret { + if x != nil { + return x.Secrets + } + return nil +} + +type Secret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` + LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` +} + +func (x *Secret) Reset() { + *x = Secret{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Secret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Secret) ProtoMessage() {} + +func (x *Secret) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 Secret.ProtoReflect.Descriptor instead. +func (*Secret) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{16} +} + +func (x *Secret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Secret) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *Secret) GetLastModified() *timestamppb.Timestamp { + if x != nil { + return x.LastModified + } + return nil +} + +type ListSandboxsRequest 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"` + AgentType *AgentType `protobuf:"varint,3,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` // Filter by agent type +} + +func (x *ListSandboxsRequest) Reset() { + *x = ListSandboxsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSandboxsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListSandboxsRequest) ProtoMessage() {} -func (x *ListSandboxsRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[11] +func (x *ListSandboxsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 ListSandboxsRequest.ProtoReflect.Descriptor instead. +func (*ListSandboxsRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17} +} + +func (x *ListSandboxsRequest) GetPageSize() int32 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListSandboxsRequest) GetPageToken() string { + if x != nil && x.PageToken != nil { + return *x.PageToken + } + return "" +} + +func (x *ListSandboxsRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType + } + return AgentType_AGENT_TYPE_UNSPECIFIED +} + +type ListSandboxsResponse 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 *ListSandboxsResponse) Reset() { + *x = ListSandboxsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSandboxsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSandboxsResponse) ProtoMessage() {} + +func (x *ListSandboxsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 ListSandboxsResponse.ProtoReflect.Descriptor instead. +func (*ListSandboxsResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{18} +} + +func (x *ListSandboxsResponse) GetSandboxes() []*Sandbox { + if x != nil { + return x.Sandboxes + } + return nil +} + +func (x *ListSandboxsResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +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"` + AgentType AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + SessionId string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=started_at,json=startedAt,proto3,oneof" json:"started_at,omitempty"` + CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=completed_at,json=completedAt,proto3,oneof" json:"completed_at,omitempty"` + ExitCode *int32 `protobuf:"varint,8,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` + DurationSeconds *float64 `protobuf:"fixed64,9,opt,name=duration_seconds,json=durationSeconds,proto3,oneof" json:"duration_seconds,omitempty"` + ErrorMessage *string `protobuf:"bytes,10,opt,name=error_message,json=errorMessage,proto3,oneof" json:"error_message,omitempty"` + SshEnabled *bool `protobuf:"varint,11,opt,name=ssh_enabled,json=sshEnabled,proto3,oneof" json:"ssh_enabled,omitempty"` + SshHost *string `protobuf:"bytes,12,opt,name=ssh_host,json=sshHost,proto3,oneof" json:"ssh_host,omitempty"` + SshPort *int32 `protobuf:"varint,13,opt,name=ssh_port,json=sshPort,proto3,oneof" json:"ssh_port,omitempty"` +} + +func (x *Sandbox) Reset() { + *x = Sandbox{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[19] + 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_agent_v1_sandbox_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 Sandbox.ProtoReflect.Descriptor instead. +func (*Sandbox) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{19} +} + +func (x *Sandbox) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +func (x *Sandbox) GetAgentType() AgentType { + if x != nil { + return x.AgentType + } + return AgentType_AGENT_TYPE_UNSPECIFIED +} + +func (x *Sandbox) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Sandbox) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +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) GetCompletedAt() *timestamppb.Timestamp { + if x != nil { + return x.CompletedAt + } + return nil +} + +func (x *Sandbox) GetExitCode() int32 { + if x != nil && x.ExitCode != nil { + return *x.ExitCode + } + return 0 +} + +func (x *Sandbox) GetDurationSeconds() float64 { + if x != nil && x.DurationSeconds != nil { + return *x.DurationSeconds + } + return 0 +} + +func (x *Sandbox) GetErrorMessage() string { + if x != nil && x.ErrorMessage != nil { + return *x.ErrorMessage + } + return "" +} + +func (x *Sandbox) GetSshEnabled() bool { + if x != nil && x.SshEnabled != nil { + return *x.SshEnabled + } + return false +} + +func (x *Sandbox) GetSshHost() string { + if x != nil && x.SshHost != nil { + return *x.SshHost + } + return "" +} + +func (x *Sandbox) GetSshPort() int32 { + if x != nil && x.SshPort != nil { + return *x.SshPort + } + return 0 +} + +type KillSandboxRequest 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"` +} + +func (x *KillSandboxRequest) Reset() { + *x = KillSandboxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[20] + 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_agent_v1_sandbox_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 KillSandboxRequest.ProtoReflect.Descriptor instead. +func (*KillSandboxRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{20} +} + +func (x *KillSandboxRequest) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +type KillSandboxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *KillSandboxResponse) Reset() { + *x = KillSandboxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[21] + 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_agent_v1_sandbox_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 KillSandboxResponse.ProtoReflect.Descriptor instead. +func (*KillSandboxResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{21} +} + +type StreamSandboxLogsRequest 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"` +} + +func (x *StreamSandboxLogsRequest) Reset() { + *x = StreamSandboxLogsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[22] + 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_agent_v1_sandbox_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 StreamSandboxLogsRequest.ProtoReflect.Descriptor instead. +func (*StreamSandboxLogsRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{22} +} + +func (x *StreamSandboxLogsRequest) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +type StreamSandboxLogsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Event *StreamSandboxLogsResponse_LogEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *StreamSandboxLogsResponse) Reset() { + *x = StreamSandboxLogsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamSandboxLogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamSandboxLogsResponse) ProtoMessage() {} + +func (x *StreamSandboxLogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 StreamSandboxLogsResponse.ProtoReflect.Descriptor instead. +func (*StreamSandboxLogsResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{23} +} + +func (x *StreamSandboxLogsResponse) GetEvent() *StreamSandboxLogsResponse_LogEvent { + if x != nil { + return x.Event + } + return nil +} + +type ShutdownRequest 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"` +} + +func (x *ShutdownRequest) Reset() { + *x = ShutdownRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShutdownRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShutdownRequest) ProtoMessage() {} + +func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 ShutdownRequest.ProtoReflect.Descriptor instead. +func (*ShutdownRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{24} +} + +func (x *ShutdownRequest) GetSandboxId() string { + if x != nil { + return x.SandboxId + } + return "" +} + +type ShutdownResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ShutdownResponse) Reset() { + *x = ShutdownResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShutdownResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShutdownResponse) ProtoMessage() {} + +func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 ShutdownResponse.ProtoReflect.Descriptor instead. +func (*ShutdownResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{25} +} + +// SandboxTemplate represents a saved filesystem state that can be used to create new sandboxes +type SandboxTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + // Source information (from the sandbox that was used to create this template) + SourceRepository *string `protobuf:"bytes,5,opt,name=source_repository,json=sourceRepository,proto3,oneof" json:"source_repository,omitempty"` + SourceBranch *string `protobuf:"bytes,6,opt,name=source_branch,json=sourceBranch,proto3,oneof" json:"source_branch,omitempty"` + SourceCommitHash *string `protobuf:"bytes,7,opt,name=source_commit_hash,json=sourceCommitHash,proto3,oneof" json:"source_commit_hash,omitempty"` + // Whether this template can be used with SSH mode + // Only templates created from SSH-enabled sandboxes have tmate installed + SshCompatible bool `protobuf:"varint,8,opt,name=ssh_compatible,json=sshCompatible,proto3" json:"ssh_compatible,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (x *SandboxTemplate) Reset() { + *x = SandboxTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SandboxTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxTemplate) ProtoMessage() {} + +func (x *SandboxTemplate) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -710,121 +1653,105 @@ func (x *ListSandboxsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListSandboxsRequest.ProtoReflect.Descriptor instead. -func (*ListSandboxsRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{11} +// Deprecated: Use SandboxTemplate.ProtoReflect.Descriptor instead. +func (*SandboxTemplate) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{26} } -func (x *ListSandboxsRequest) GetPageSize() int32 { - if x != nil && x.PageSize != nil { - return *x.PageSize +func (x *SandboxTemplate) GetId() string { + if x != nil { + return x.Id } - return 0 + return "" } -func (x *ListSandboxsRequest) GetPageToken() string { - if x != nil && x.PageToken != nil { - return *x.PageToken +func (x *SandboxTemplate) GetOrganizationId() string { + if x != nil { + return x.OrganizationId } return "" } -func (x *ListSandboxsRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType +func (x *SandboxTemplate) GetName() string { + if x != nil { + return x.Name } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -type ListSandboxsResponse 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"` + return "" } -func (x *ListSandboxsResponse) Reset() { - *x = ListSandboxsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *SandboxTemplate) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description } + return "" } -func (x *ListSandboxsResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *SandboxTemplate) GetSourceRepository() string { + if x != nil && x.SourceRepository != nil { + return *x.SourceRepository + } + return "" } -func (*ListSandboxsResponse) ProtoMessage() {} - -func (x *ListSandboxsResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *SandboxTemplate) GetSourceBranch() string { + if x != nil && x.SourceBranch != nil { + return *x.SourceBranch } - return mi.MessageOf(x) + return "" } -// Deprecated: Use ListSandboxsResponse.ProtoReflect.Descriptor instead. -func (*ListSandboxsResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{12} +func (x *SandboxTemplate) GetSourceCommitHash() string { + if x != nil && x.SourceCommitHash != nil { + return *x.SourceCommitHash + } + return "" } -func (x *ListSandboxsResponse) GetSandboxes() []*Sandbox { +func (x *SandboxTemplate) GetSshCompatible() bool { if x != nil { - return x.Sandboxes + return x.SshCompatible } - return nil + return false } -func (x *ListSandboxsResponse) GetNextPageToken() string { - if x != nil && x.NextPageToken != nil { - return *x.NextPageToken +func (x *SandboxTemplate) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt } - return "" + return nil } -type Sandbox struct { +// CreateSandboxTemplate creates a new template from a running sandbox's filesystem +type CreateSandboxTemplateRequest 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"` - AgentType AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` - OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` - SessionId string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=started_at,json=startedAt,proto3,oneof" json:"started_at,omitempty"` - CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=completed_at,json=completedAt,proto3,oneof" json:"completed_at,omitempty"` - ExitCode *int32 `protobuf:"varint,8,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` - DurationSeconds *float64 `protobuf:"fixed64,9,opt,name=duration_seconds,json=durationSeconds,proto3,oneof" json:"duration_seconds,omitempty"` - ErrorMessage *string `protobuf:"bytes,10,opt,name=error_message,json=errorMessage,proto3,oneof" json:"error_message,omitempty"` + // The running sandbox to snapshot + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + // Unique name for the template within the organization + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Optional description + Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"` } -func (x *Sandbox) Reset() { - *x = Sandbox{} +func (x *CreateSandboxTemplateRequest) Reset() { + *x = CreateSandboxTemplateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[13] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Sandbox) String() string { +func (x *CreateSandboxTemplateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Sandbox) ProtoMessage() {} +func (*CreateSandboxTemplateRequest) ProtoMessage() {} -func (x *Sandbox) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[13] +func (x *CreateSandboxTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -835,106 +1762,105 @@ func (x *Sandbox) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Sandbox.ProtoReflect.Descriptor instead. -func (*Sandbox) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{13} +// Deprecated: Use CreateSandboxTemplateRequest.ProtoReflect.Descriptor instead. +func (*CreateSandboxTemplateRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{27} } -func (x *Sandbox) GetSandboxId() string { +func (x *CreateSandboxTemplateRequest) GetSandboxId() string { if x != nil { return x.SandboxId } return "" } -func (x *Sandbox) GetAgentType() AgentType { - if x != nil { - return x.AgentType - } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -func (x *Sandbox) GetOrganizationId() string { +func (x *CreateSandboxTemplateRequest) GetName() string { if x != nil { - return x.OrganizationId + return x.Name } return "" } -func (x *Sandbox) GetSessionId() string { - if x != nil { - return x.SessionId +func (x *CreateSandboxTemplateRequest) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description } return "" } -func (x *Sandbox) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil +type CreateSandboxTemplateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Template *SandboxTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` } -func (x *Sandbox) GetStartedAt() *timestamppb.Timestamp { - if x != nil { - return x.StartedAt +func (x *CreateSandboxTemplateResponse) Reset() { + *x = CreateSandboxTemplateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *Sandbox) GetCompletedAt() *timestamppb.Timestamp { - if x != nil { - return x.CompletedAt - } - return nil +func (x *CreateSandboxTemplateResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *Sandbox) GetExitCode() int32 { - if x != nil && x.ExitCode != nil { - return *x.ExitCode +func (*CreateSandboxTemplateResponse) ProtoMessage() {} + +func (x *CreateSandboxTemplateResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 0 + return mi.MessageOf(x) } -func (x *Sandbox) GetDurationSeconds() float64 { - if x != nil && x.DurationSeconds != nil { - return *x.DurationSeconds - } - return 0 +// Deprecated: Use CreateSandboxTemplateResponse.ProtoReflect.Descriptor instead. +func (*CreateSandboxTemplateResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{28} } -func (x *Sandbox) GetErrorMessage() string { - if x != nil && x.ErrorMessage != nil { - return *x.ErrorMessage +func (x *CreateSandboxTemplateResponse) GetTemplate() *SandboxTemplate { + if x != nil { + return x.Template } - return "" + return nil } -type KillSandboxRequest struct { +// GetSandboxTemplate retrieves a template by ID +type GetSandboxTemplateRequest 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"` + TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"` } -func (x *KillSandboxRequest) Reset() { - *x = KillSandboxRequest{} +func (x *GetSandboxTemplateRequest) Reset() { + *x = GetSandboxTemplateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[14] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *KillSandboxRequest) String() string { +func (x *GetSandboxTemplateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*KillSandboxRequest) ProtoMessage() {} +func (*GetSandboxTemplateRequest) ProtoMessage() {} -func (x *KillSandboxRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[14] +func (x *GetSandboxTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -945,41 +1871,43 @@ func (x *KillSandboxRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use KillSandboxRequest.ProtoReflect.Descriptor instead. -func (*KillSandboxRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{14} +// Deprecated: Use GetSandboxTemplateRequest.ProtoReflect.Descriptor instead. +func (*GetSandboxTemplateRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{29} } -func (x *KillSandboxRequest) GetSandboxId() string { +func (x *GetSandboxTemplateRequest) GetTemplateId() string { if x != nil { - return x.SandboxId + return x.TemplateId } return "" } -type KillSandboxResponse struct { +type GetSandboxTemplateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Template *SandboxTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` } -func (x *KillSandboxResponse) Reset() { - *x = KillSandboxResponse{} +func (x *GetSandboxTemplateResponse) Reset() { + *x = GetSandboxTemplateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[15] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *KillSandboxResponse) String() string { +func (x *GetSandboxTemplateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*KillSandboxResponse) ProtoMessage() {} +func (*GetSandboxTemplateResponse) ProtoMessage() {} -func (x *KillSandboxResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[15] +func (x *GetSandboxTemplateResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -990,36 +1918,45 @@ func (x *KillSandboxResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use KillSandboxResponse.ProtoReflect.Descriptor instead. -func (*KillSandboxResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{15} +// Deprecated: Use GetSandboxTemplateResponse.ProtoReflect.Descriptor instead. +func (*GetSandboxTemplateResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{30} } -type StreamSandboxLogsRequest struct { +func (x *GetSandboxTemplateResponse) GetTemplate() *SandboxTemplate { + if x != nil { + return x.Template + } + return nil +} + +// ListSandboxTemplates lists all templates for an organization +type ListSandboxTemplatesRequest 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"` + 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 *StreamSandboxLogsRequest) Reset() { - *x = StreamSandboxLogsRequest{} +func (x *ListSandboxTemplatesRequest) Reset() { + *x = ListSandboxTemplatesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[16] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StreamSandboxLogsRequest) String() string { +func (x *ListSandboxTemplatesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StreamSandboxLogsRequest) ProtoMessage() {} +func (*ListSandboxTemplatesRequest) ProtoMessage() {} -func (x *StreamSandboxLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[16] +func (x *ListSandboxTemplatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1030,43 +1967,51 @@ func (x *StreamSandboxLogsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StreamSandboxLogsRequest.ProtoReflect.Descriptor instead. -func (*StreamSandboxLogsRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{16} +// Deprecated: Use ListSandboxTemplatesRequest.ProtoReflect.Descriptor instead. +func (*ListSandboxTemplatesRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{31} } -func (x *StreamSandboxLogsRequest) GetSandboxId() string { - if x != nil { - return x.SandboxId +func (x *ListSandboxTemplatesRequest) GetPageSize() int32 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListSandboxTemplatesRequest) GetPageToken() string { + if x != nil && x.PageToken != nil { + return *x.PageToken } return "" } -type StreamSandboxLogsResponse struct { +type ListSandboxTemplatesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Event *StreamSandboxLogsResponse_LogEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + Templates []*SandboxTemplate `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"` + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` } -func (x *StreamSandboxLogsResponse) Reset() { - *x = StreamSandboxLogsResponse{} +func (x *ListSandboxTemplatesResponse) Reset() { + *x = ListSandboxTemplatesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[17] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StreamSandboxLogsResponse) String() string { +func (x *ListSandboxTemplatesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StreamSandboxLogsResponse) ProtoMessage() {} +func (*ListSandboxTemplatesResponse) ProtoMessage() {} -func (x *StreamSandboxLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[17] +func (x *ListSandboxTemplatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1077,43 +2022,51 @@ func (x *StreamSandboxLogsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StreamSandboxLogsResponse.ProtoReflect.Descriptor instead. -func (*StreamSandboxLogsResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17} +// Deprecated: Use ListSandboxTemplatesResponse.ProtoReflect.Descriptor instead. +func (*ListSandboxTemplatesResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{32} } -func (x *StreamSandboxLogsResponse) GetEvent() *StreamSandboxLogsResponse_LogEvent { +func (x *ListSandboxTemplatesResponse) GetTemplates() []*SandboxTemplate { if x != nil { - return x.Event + return x.Templates } return nil } -type ShutdownRequest struct { +func (x *ListSandboxTemplatesResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +// DeleteSandboxTemplate soft-deletes a template +type DeleteSandboxTemplateRequest 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"` + TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"` } -func (x *ShutdownRequest) Reset() { - *x = ShutdownRequest{} +func (x *DeleteSandboxTemplateRequest) Reset() { + *x = DeleteSandboxTemplateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[18] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ShutdownRequest) String() string { +func (x *DeleteSandboxTemplateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ShutdownRequest) ProtoMessage() {} +func (*DeleteSandboxTemplateRequest) ProtoMessage() {} -func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[18] +func (x *DeleteSandboxTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1124,41 +2077,41 @@ func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead. -func (*ShutdownRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{18} +// Deprecated: Use DeleteSandboxTemplateRequest.ProtoReflect.Descriptor instead. +func (*DeleteSandboxTemplateRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{33} } -func (x *ShutdownRequest) GetSandboxId() string { +func (x *DeleteSandboxTemplateRequest) GetTemplateId() string { if x != nil { - return x.SandboxId + return x.TemplateId } return "" } -type ShutdownResponse struct { +type DeleteSandboxTemplateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *ShutdownResponse) Reset() { - *x = ShutdownResponse{} +func (x *DeleteSandboxTemplateResponse) Reset() { + *x = DeleteSandboxTemplateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[19] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ShutdownResponse) String() string { +func (x *DeleteSandboxTemplateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ShutdownResponse) ProtoMessage() {} +func (*DeleteSandboxTemplateResponse) ProtoMessage() {} -func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[19] +func (x *DeleteSandboxTemplateResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1169,9 +2122,9 @@ func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ShutdownResponse.ProtoReflect.Descriptor instead. -func (*ShutdownResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{19} +// Deprecated: Use DeleteSandboxTemplateResponse.ProtoReflect.Descriptor instead. +func (*DeleteSandboxTemplateResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{34} } type StartSandboxRequest_Context struct { @@ -1188,7 +2141,7 @@ type StartSandboxRequest_Context struct { func (x *StartSandboxRequest_Context) Reset() { *x = StartSandboxRequest_Context{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[21] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1201,7 +2154,7 @@ func (x *StartSandboxRequest_Context) String() string { func (*StartSandboxRequest_Context) ProtoMessage() {} func (x *StartSandboxRequest_Context) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[21] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1241,6 +2194,61 @@ type StartSandboxRequest_Context_Git struct { func (*StartSandboxRequest_Context_Git) isStartSandboxRequest_Context_Context() {} +type StartSandboxRequest_SSHConfig 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 *StartSandboxRequest_SSHConfig) Reset() { + *x = StartSandboxRequest_SSHConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartSandboxRequest_SSHConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartSandboxRequest_SSHConfig) ProtoMessage() {} + +func (x *StartSandboxRequest_SSHConfig) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[37] + 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 StartSandboxRequest_SSHConfig.ProtoReflect.Descriptor instead. +func (*StartSandboxRequest_SSHConfig) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *StartSandboxRequest_SSHConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *StartSandboxRequest_SSHConfig) GetTimeoutMinutes() int32 { + if x != nil && x.TimeoutMinutes != nil { + return *x.TimeoutMinutes + } + return 0 +} + type StartSandboxRequest_Context_GitContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1255,7 +2263,7 @@ type StartSandboxRequest_Context_GitContext struct { func (x *StartSandboxRequest_Context_GitContext) Reset() { *x = StartSandboxRequest_Context_GitContext{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[22] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1268,7 +2276,7 @@ func (x *StartSandboxRequest_Context_GitContext) String() string { func (*StartSandboxRequest_Context_GitContext) ProtoMessage() {} func (x *StartSandboxRequest_Context_GitContext) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[22] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1325,7 +2333,7 @@ type StreamSandboxLogsResponse_LogEvent struct { func (x *StreamSandboxLogsResponse_LogEvent) Reset() { *x = StreamSandboxLogsResponse_LogEvent{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[23] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1338,7 +2346,7 @@ func (x *StreamSandboxLogsResponse_LogEvent) String() string { func (*StreamSandboxLogsResponse_LogEvent) ProtoMessage() {} func (x *StreamSandboxLogsResponse_LogEvent) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[23] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1351,7 +2359,7 @@ func (x *StreamSandboxLogsResponse_LogEvent) ProtoReflect() protoreflect.Message // Deprecated: Use StreamSandboxLogsResponse_LogEvent.ProtoReflect.Descriptor instead. func (*StreamSandboxLogsResponse_LogEvent) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17, 0} + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{23, 0} } func (x *StreamSandboxLogsResponse_LogEvent) GetData() []byte { @@ -1384,7 +2392,7 @@ var file_depot_agent_v1_sandbox_proto_rawDesc = []byte{ 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0x8e, 0x06, 0x0a, 0x13, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x09, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, @@ -1408,239 +2416,443 @@ var file_depot_agent_v1_sandbox_proto_rawDesc = []byte{ 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x1a, 0x47, 0x0a, 0x19, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 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, 0x1a, 0xaa, 0x02, 0x0a, 0x07, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x4a, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x03, 0x67, - 0x69, 0x74, 0x1a, 0xc7, 0x01, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x1b, - 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x09, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, - 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x7d, 0x0a, 0x14, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 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, 0x22, - 0x47, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, - 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x22, 0xef, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, - 0x0a, 0x12, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, - 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x64, - 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x84, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, - 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, - 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x22, 0x47, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x65, 0x70, - 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x06, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, - 0x65, 0x64, 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, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x13, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 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, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, - 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 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, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, - 0x6f, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x73, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0xba, 0x04, 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, 0x38, - 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, + 0x74, 0x12, 0x51, 0x0a, 0x0a, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x53, 0x48, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x48, 0x02, 0x52, 0x09, 0x73, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0a, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x77, 0x61, 0x69, + 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0e, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x88, 0x01, 0x01, 0x1a, 0x47, 0x0a, 0x19, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 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, 0x1a, 0xaa, 0x02, 0x0a, + 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x4a, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, + 0x03, 0x67, 0x69, 0x74, 0x1a, 0xc7, 0x01, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, + 0x12, 0x1b, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, + 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x09, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x67, 0x0a, 0x09, 0x53, 0x53, 0x48, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x73, 0x68, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x22, 0xb9, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 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, - 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, 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, 0x00, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x0c, 0x63, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 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, 0x01, 0x52, - 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x20, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x05, 0x48, 0x02, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x48, 0x03, 0x52, 0x0f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, - 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x63, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x33, 0x0a, 0x12, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x64, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x53, 0x48, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x73, 0x68, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x0e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x48, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x73, 0x68, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x93, 0x01, + 0x0a, 0x14, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x15, 0x0a, 0x13, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, - 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 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, 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, 0x22, 0xdf, 0x02, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, - 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, - 0xf7, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, + 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, + 0x2d, 0x0a, 0x10, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x61, 0x69, + 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x22, 0x75, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 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, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, + 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0x74, 0x0a, 0x0d, 0x53, 0x53, 0x48, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x38, + 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, + 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x53, + 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x73, 0x68, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x47, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x07, + 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x22, 0xef, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, + 0x12, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x64, 0x64, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, + 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x47, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x06, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, + 0x64, 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, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 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, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 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, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x73, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0xca, 0x05, 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, 0x38, 0x0a, + 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 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, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x67, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x07, 0x4c, 0x6f, - 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x4f, - 0x55, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x53, 0x54, 0x44, 0x45, 0x52, 0x52, 0x10, 0x02, 0x22, 0x30, 0x0a, 0x0f, 0x53, 0x68, 0x75, - 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x12, 0x0a, 0x10, 0x53, - 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xb3, 0x06, 0x0a, 0x0e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, - 0x6f, 0x78, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, - 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, - 0x0a, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x21, 0x2e, 0x64, 0x65, + 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, 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, 0x00, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x0c, 0x63, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 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, 0x01, 0x52, 0x0b, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x20, + 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x05, 0x48, 0x02, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x48, 0x03, 0x52, 0x0f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x73, + 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x05, 0x52, 0x0a, 0x73, 0x73, 0x68, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x06, 0x52, 0x07, 0x73, 0x73, 0x68, 0x48, 0x6f, 0x73, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x07, 0x52, 0x07, 0x73, 0x73, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x22, + 0x33, 0x0a, 0x12, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x15, 0x0a, 0x13, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 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, 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, 0x22, 0xdf, 0x02, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, + 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0xf7, + 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x07, 0x4c, 0x6f, 0x67, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, + 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x4f, 0x55, + 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x54, 0x44, 0x45, 0x52, 0x52, 0x10, 0x02, 0x22, 0x30, 0x0a, 0x0f, 0x53, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x68, + 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc5, + 0x03, 0x0a, 0x0f, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 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, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, + 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, + 0x73, 0x68, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 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, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x10, 0x0a, + 0x0e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, + 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x22, 0x88, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x5c, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, + 0x3c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x59, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 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, 0x1c, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 0x3f, 0x0a, 0x1c, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x1f, 0x0a, + 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc4, + 0x0b, 0x0a, 0x0e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0d, + 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x24, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, + 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, - 0x64, 0x62, 0x6f, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, - 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x22, 0x2e, 0x64, - 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, - 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x70, - 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, - 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x50, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x59, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x73, 0x12, + 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x4b, 0x69, + 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x22, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4b, + 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x50, + 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, - 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x22, 0x2e, - 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, - 0x77, 0x6e, 0x12, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, + 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x15, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x14, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x74, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb3, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, @@ -1669,79 +2881,116 @@ func file_depot_agent_v1_sandbox_proto_rawDescGZIP() []byte { } var file_depot_agent_v1_sandbox_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_depot_agent_v1_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_depot_agent_v1_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_depot_agent_v1_sandbox_proto_goTypes = []interface{}{ (StreamSandboxLogsResponse_LogEvent_LogType)(0), // 0: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.LogType (*StartSandboxRequest)(nil), // 1: depot.agent.v1.StartSandboxRequest (*StartSandboxResponse)(nil), // 2: depot.agent.v1.StartSandboxResponse - (*GetSandboxRequest)(nil), // 3: depot.agent.v1.GetSandboxRequest - (*GetSandboxResponse)(nil), // 4: depot.agent.v1.GetSandboxResponse - (*AddSecretRequest)(nil), // 5: depot.agent.v1.AddSecretRequest - (*AddSecretResponse)(nil), // 6: depot.agent.v1.AddSecretResponse - (*RemoveSecretRequest)(nil), // 7: depot.agent.v1.RemoveSecretRequest - (*RemoveSecretResponse)(nil), // 8: depot.agent.v1.RemoveSecretResponse - (*ListSecretsRequest)(nil), // 9: depot.agent.v1.ListSecretsRequest - (*ListSecretsResponse)(nil), // 10: depot.agent.v1.ListSecretsResponse - (*Secret)(nil), // 11: depot.agent.v1.Secret - (*ListSandboxsRequest)(nil), // 12: depot.agent.v1.ListSandboxsRequest - (*ListSandboxsResponse)(nil), // 13: depot.agent.v1.ListSandboxsResponse - (*Sandbox)(nil), // 14: depot.agent.v1.Sandbox - (*KillSandboxRequest)(nil), // 15: depot.agent.v1.KillSandboxRequest - (*KillSandboxResponse)(nil), // 16: depot.agent.v1.KillSandboxResponse - (*StreamSandboxLogsRequest)(nil), // 17: depot.agent.v1.StreamSandboxLogsRequest - (*StreamSandboxLogsResponse)(nil), // 18: depot.agent.v1.StreamSandboxLogsResponse - (*ShutdownRequest)(nil), // 19: depot.agent.v1.ShutdownRequest - (*ShutdownResponse)(nil), // 20: depot.agent.v1.ShutdownResponse - nil, // 21: depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry - (*StartSandboxRequest_Context)(nil), // 22: depot.agent.v1.StartSandboxRequest.Context - (*StartSandboxRequest_Context_GitContext)(nil), // 23: depot.agent.v1.StartSandboxRequest.Context.GitContext - (*StreamSandboxLogsResponse_LogEvent)(nil), // 24: depot.agent.v1.StreamSandboxLogsResponse.LogEvent - (AgentType)(0), // 25: depot.agent.v1.AgentType - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*ExecInSandboxRequest)(nil), // 3: depot.agent.v1.ExecInSandboxRequest + (*ExecInSandboxResponse)(nil), // 4: depot.agent.v1.ExecInSandboxResponse + (*CommandResult)(nil), // 5: depot.agent.v1.CommandResult + (*SSHConnection)(nil), // 6: depot.agent.v1.SSHConnection + (*GetSSHConnectionRequest)(nil), // 7: depot.agent.v1.GetSSHConnectionRequest + (*GetSSHConnectionResponse)(nil), // 8: depot.agent.v1.GetSSHConnectionResponse + (*GetSandboxRequest)(nil), // 9: depot.agent.v1.GetSandboxRequest + (*GetSandboxResponse)(nil), // 10: depot.agent.v1.GetSandboxResponse + (*AddSecretRequest)(nil), // 11: depot.agent.v1.AddSecretRequest + (*AddSecretResponse)(nil), // 12: depot.agent.v1.AddSecretResponse + (*RemoveSecretRequest)(nil), // 13: depot.agent.v1.RemoveSecretRequest + (*RemoveSecretResponse)(nil), // 14: depot.agent.v1.RemoveSecretResponse + (*ListSecretsRequest)(nil), // 15: depot.agent.v1.ListSecretsRequest + (*ListSecretsResponse)(nil), // 16: depot.agent.v1.ListSecretsResponse + (*Secret)(nil), // 17: depot.agent.v1.Secret + (*ListSandboxsRequest)(nil), // 18: depot.agent.v1.ListSandboxsRequest + (*ListSandboxsResponse)(nil), // 19: depot.agent.v1.ListSandboxsResponse + (*Sandbox)(nil), // 20: depot.agent.v1.Sandbox + (*KillSandboxRequest)(nil), // 21: depot.agent.v1.KillSandboxRequest + (*KillSandboxResponse)(nil), // 22: depot.agent.v1.KillSandboxResponse + (*StreamSandboxLogsRequest)(nil), // 23: depot.agent.v1.StreamSandboxLogsRequest + (*StreamSandboxLogsResponse)(nil), // 24: depot.agent.v1.StreamSandboxLogsResponse + (*ShutdownRequest)(nil), // 25: depot.agent.v1.ShutdownRequest + (*ShutdownResponse)(nil), // 26: depot.agent.v1.ShutdownResponse + (*SandboxTemplate)(nil), // 27: depot.agent.v1.SandboxTemplate + (*CreateSandboxTemplateRequest)(nil), // 28: depot.agent.v1.CreateSandboxTemplateRequest + (*CreateSandboxTemplateResponse)(nil), // 29: depot.agent.v1.CreateSandboxTemplateResponse + (*GetSandboxTemplateRequest)(nil), // 30: depot.agent.v1.GetSandboxTemplateRequest + (*GetSandboxTemplateResponse)(nil), // 31: depot.agent.v1.GetSandboxTemplateResponse + (*ListSandboxTemplatesRequest)(nil), // 32: depot.agent.v1.ListSandboxTemplatesRequest + (*ListSandboxTemplatesResponse)(nil), // 33: depot.agent.v1.ListSandboxTemplatesResponse + (*DeleteSandboxTemplateRequest)(nil), // 34: depot.agent.v1.DeleteSandboxTemplateRequest + (*DeleteSandboxTemplateResponse)(nil), // 35: depot.agent.v1.DeleteSandboxTemplateResponse + nil, // 36: depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry + (*StartSandboxRequest_Context)(nil), // 37: depot.agent.v1.StartSandboxRequest.Context + (*StartSandboxRequest_SSHConfig)(nil), // 38: depot.agent.v1.StartSandboxRequest.SSHConfig + (*StartSandboxRequest_Context_GitContext)(nil), // 39: depot.agent.v1.StartSandboxRequest.Context.GitContext + (*StreamSandboxLogsResponse_LogEvent)(nil), // 40: depot.agent.v1.StreamSandboxLogsResponse.LogEvent + (AgentType)(0), // 41: depot.agent.v1.AgentType + (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp } var file_depot_agent_v1_sandbox_proto_depIdxs = []int32{ - 25, // 0: depot.agent.v1.StartSandboxRequest.agent_type:type_name -> depot.agent.v1.AgentType - 21, // 1: depot.agent.v1.StartSandboxRequest.environment_variables:type_name -> depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry - 22, // 2: depot.agent.v1.StartSandboxRequest.context:type_name -> depot.agent.v1.StartSandboxRequest.Context - 14, // 3: depot.agent.v1.GetSandboxResponse.sandbox:type_name -> depot.agent.v1.Sandbox - 25, // 4: depot.agent.v1.AddSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType - 25, // 5: depot.agent.v1.RemoveSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType - 25, // 6: depot.agent.v1.ListSecretsRequest.agent_type:type_name -> depot.agent.v1.AgentType - 11, // 7: depot.agent.v1.ListSecretsResponse.secrets:type_name -> depot.agent.v1.Secret - 26, // 8: depot.agent.v1.Secret.last_modified:type_name -> google.protobuf.Timestamp - 25, // 9: depot.agent.v1.ListSandboxsRequest.agent_type:type_name -> depot.agent.v1.AgentType - 14, // 10: depot.agent.v1.ListSandboxsResponse.sandboxes:type_name -> depot.agent.v1.Sandbox - 25, // 11: depot.agent.v1.Sandbox.agent_type:type_name -> depot.agent.v1.AgentType - 26, // 12: depot.agent.v1.Sandbox.created_at:type_name -> google.protobuf.Timestamp - 26, // 13: depot.agent.v1.Sandbox.started_at:type_name -> google.protobuf.Timestamp - 26, // 14: depot.agent.v1.Sandbox.completed_at:type_name -> google.protobuf.Timestamp - 24, // 15: depot.agent.v1.StreamSandboxLogsResponse.event:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent - 23, // 16: depot.agent.v1.StartSandboxRequest.Context.git:type_name -> depot.agent.v1.StartSandboxRequest.Context.GitContext - 26, // 17: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.timestamp:type_name -> google.protobuf.Timestamp - 0, // 18: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.type:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent.LogType - 1, // 19: depot.agent.v1.SandboxService.StartSandbox:input_type -> depot.agent.v1.StartSandboxRequest - 3, // 20: depot.agent.v1.SandboxService.GetSandbox:input_type -> depot.agent.v1.GetSandboxRequest - 12, // 21: depot.agent.v1.SandboxService.ListSandboxs:input_type -> depot.agent.v1.ListSandboxsRequest - 15, // 22: depot.agent.v1.SandboxService.KillSandbox:input_type -> depot.agent.v1.KillSandboxRequest - 17, // 23: depot.agent.v1.SandboxService.StreamSandboxLogs:input_type -> depot.agent.v1.StreamSandboxLogsRequest - 5, // 24: depot.agent.v1.SandboxService.AddSecret:input_type -> depot.agent.v1.AddSecretRequest - 7, // 25: depot.agent.v1.SandboxService.RemoveSecret:input_type -> depot.agent.v1.RemoveSecretRequest - 9, // 26: depot.agent.v1.SandboxService.ListSecrets:input_type -> depot.agent.v1.ListSecretsRequest - 19, // 27: depot.agent.v1.SandboxService.Shutdown:input_type -> depot.agent.v1.ShutdownRequest - 2, // 28: depot.agent.v1.SandboxService.StartSandbox:output_type -> depot.agent.v1.StartSandboxResponse - 4, // 29: depot.agent.v1.SandboxService.GetSandbox:output_type -> depot.agent.v1.GetSandboxResponse - 13, // 30: depot.agent.v1.SandboxService.ListSandboxs:output_type -> depot.agent.v1.ListSandboxsResponse - 16, // 31: depot.agent.v1.SandboxService.KillSandbox:output_type -> depot.agent.v1.KillSandboxResponse - 18, // 32: depot.agent.v1.SandboxService.StreamSandboxLogs:output_type -> depot.agent.v1.StreamSandboxLogsResponse - 6, // 33: depot.agent.v1.SandboxService.AddSecret:output_type -> depot.agent.v1.AddSecretResponse - 8, // 34: depot.agent.v1.SandboxService.RemoveSecret:output_type -> depot.agent.v1.RemoveSecretResponse - 10, // 35: depot.agent.v1.SandboxService.ListSecrets:output_type -> depot.agent.v1.ListSecretsResponse - 20, // 36: depot.agent.v1.SandboxService.Shutdown:output_type -> depot.agent.v1.ShutdownResponse - 28, // [28:37] is the sub-list for method output_type - 19, // [19:28] 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 + 41, // 0: depot.agent.v1.StartSandboxRequest.agent_type:type_name -> depot.agent.v1.AgentType + 36, // 1: depot.agent.v1.StartSandboxRequest.environment_variables:type_name -> depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry + 37, // 2: depot.agent.v1.StartSandboxRequest.context:type_name -> depot.agent.v1.StartSandboxRequest.Context + 38, // 3: depot.agent.v1.StartSandboxRequest.ssh_config:type_name -> depot.agent.v1.StartSandboxRequest.SSHConfig + 6, // 4: depot.agent.v1.StartSandboxResponse.ssh_connection:type_name -> depot.agent.v1.SSHConnection + 5, // 5: depot.agent.v1.StartSandboxResponse.command_result:type_name -> depot.agent.v1.CommandResult + 5, // 6: depot.agent.v1.ExecInSandboxResponse.command_result:type_name -> depot.agent.v1.CommandResult + 6, // 7: depot.agent.v1.GetSSHConnectionResponse.ssh_connection:type_name -> depot.agent.v1.SSHConnection + 20, // 8: depot.agent.v1.GetSandboxResponse.sandbox:type_name -> depot.agent.v1.Sandbox + 41, // 9: depot.agent.v1.AddSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType + 41, // 10: depot.agent.v1.RemoveSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType + 41, // 11: depot.agent.v1.ListSecretsRequest.agent_type:type_name -> depot.agent.v1.AgentType + 17, // 12: depot.agent.v1.ListSecretsResponse.secrets:type_name -> depot.agent.v1.Secret + 42, // 13: depot.agent.v1.Secret.last_modified:type_name -> google.protobuf.Timestamp + 41, // 14: depot.agent.v1.ListSandboxsRequest.agent_type:type_name -> depot.agent.v1.AgentType + 20, // 15: depot.agent.v1.ListSandboxsResponse.sandboxes:type_name -> depot.agent.v1.Sandbox + 41, // 16: depot.agent.v1.Sandbox.agent_type:type_name -> depot.agent.v1.AgentType + 42, // 17: depot.agent.v1.Sandbox.created_at:type_name -> google.protobuf.Timestamp + 42, // 18: depot.agent.v1.Sandbox.started_at:type_name -> google.protobuf.Timestamp + 42, // 19: depot.agent.v1.Sandbox.completed_at:type_name -> google.protobuf.Timestamp + 40, // 20: depot.agent.v1.StreamSandboxLogsResponse.event:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent + 42, // 21: depot.agent.v1.SandboxTemplate.created_at:type_name -> google.protobuf.Timestamp + 27, // 22: depot.agent.v1.CreateSandboxTemplateResponse.template:type_name -> depot.agent.v1.SandboxTemplate + 27, // 23: depot.agent.v1.GetSandboxTemplateResponse.template:type_name -> depot.agent.v1.SandboxTemplate + 27, // 24: depot.agent.v1.ListSandboxTemplatesResponse.templates:type_name -> depot.agent.v1.SandboxTemplate + 39, // 25: depot.agent.v1.StartSandboxRequest.Context.git:type_name -> depot.agent.v1.StartSandboxRequest.Context.GitContext + 42, // 26: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.timestamp:type_name -> google.protobuf.Timestamp + 0, // 27: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.type:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent.LogType + 1, // 28: depot.agent.v1.SandboxService.StartSandbox:input_type -> depot.agent.v1.StartSandboxRequest + 3, // 29: depot.agent.v1.SandboxService.ExecInSandbox:input_type -> depot.agent.v1.ExecInSandboxRequest + 9, // 30: depot.agent.v1.SandboxService.GetSandbox:input_type -> depot.agent.v1.GetSandboxRequest + 18, // 31: depot.agent.v1.SandboxService.ListSandboxs:input_type -> depot.agent.v1.ListSandboxsRequest + 21, // 32: depot.agent.v1.SandboxService.KillSandbox:input_type -> depot.agent.v1.KillSandboxRequest + 23, // 33: depot.agent.v1.SandboxService.StreamSandboxLogs:input_type -> depot.agent.v1.StreamSandboxLogsRequest + 11, // 34: depot.agent.v1.SandboxService.AddSecret:input_type -> depot.agent.v1.AddSecretRequest + 13, // 35: depot.agent.v1.SandboxService.RemoveSecret:input_type -> depot.agent.v1.RemoveSecretRequest + 15, // 36: depot.agent.v1.SandboxService.ListSecrets:input_type -> depot.agent.v1.ListSecretsRequest + 25, // 37: depot.agent.v1.SandboxService.Shutdown:input_type -> depot.agent.v1.ShutdownRequest + 7, // 38: depot.agent.v1.SandboxService.GetSSHConnection:input_type -> depot.agent.v1.GetSSHConnectionRequest + 28, // 39: depot.agent.v1.SandboxService.CreateSandboxTemplate:input_type -> depot.agent.v1.CreateSandboxTemplateRequest + 30, // 40: depot.agent.v1.SandboxService.GetSandboxTemplate:input_type -> depot.agent.v1.GetSandboxTemplateRequest + 32, // 41: depot.agent.v1.SandboxService.ListSandboxTemplates:input_type -> depot.agent.v1.ListSandboxTemplatesRequest + 34, // 42: depot.agent.v1.SandboxService.DeleteSandboxTemplate:input_type -> depot.agent.v1.DeleteSandboxTemplateRequest + 2, // 43: depot.agent.v1.SandboxService.StartSandbox:output_type -> depot.agent.v1.StartSandboxResponse + 4, // 44: depot.agent.v1.SandboxService.ExecInSandbox:output_type -> depot.agent.v1.ExecInSandboxResponse + 10, // 45: depot.agent.v1.SandboxService.GetSandbox:output_type -> depot.agent.v1.GetSandboxResponse + 19, // 46: depot.agent.v1.SandboxService.ListSandboxs:output_type -> depot.agent.v1.ListSandboxsResponse + 22, // 47: depot.agent.v1.SandboxService.KillSandbox:output_type -> depot.agent.v1.KillSandboxResponse + 24, // 48: depot.agent.v1.SandboxService.StreamSandboxLogs:output_type -> depot.agent.v1.StreamSandboxLogsResponse + 12, // 49: depot.agent.v1.SandboxService.AddSecret:output_type -> depot.agent.v1.AddSecretResponse + 14, // 50: depot.agent.v1.SandboxService.RemoveSecret:output_type -> depot.agent.v1.RemoveSecretResponse + 16, // 51: depot.agent.v1.SandboxService.ListSecrets:output_type -> depot.agent.v1.ListSecretsResponse + 26, // 52: depot.agent.v1.SandboxService.Shutdown:output_type -> depot.agent.v1.ShutdownResponse + 8, // 53: depot.agent.v1.SandboxService.GetSSHConnection:output_type -> depot.agent.v1.GetSSHConnectionResponse + 29, // 54: depot.agent.v1.SandboxService.CreateSandboxTemplate:output_type -> depot.agent.v1.CreateSandboxTemplateResponse + 31, // 55: depot.agent.v1.SandboxService.GetSandboxTemplate:output_type -> depot.agent.v1.GetSandboxTemplateResponse + 33, // 56: depot.agent.v1.SandboxService.ListSandboxTemplates:output_type -> depot.agent.v1.ListSandboxTemplatesResponse + 35, // 57: depot.agent.v1.SandboxService.DeleteSandboxTemplate:output_type -> depot.agent.v1.DeleteSandboxTemplateResponse + 43, // [43:58] is the sub-list for method output_type + 28, // [28:43] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_depot_agent_v1_sandbox_proto_init() } @@ -1776,7 +3025,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSandboxRequest); i { + switch v := v.(*ExecInSandboxRequest); i { case 0: return &v.state case 1: @@ -1788,7 +3037,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSandboxResponse); i { + switch v := v.(*ExecInSandboxResponse); i { case 0: return &v.state case 1: @@ -1800,7 +3049,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddSecretRequest); i { + switch v := v.(*CommandResult); i { case 0: return &v.state case 1: @@ -1812,7 +3061,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddSecretResponse); i { + switch v := v.(*SSHConnection); i { case 0: return &v.state case 1: @@ -1824,7 +3073,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveSecretRequest); i { + switch v := v.(*GetSSHConnectionRequest); i { case 0: return &v.state case 1: @@ -1836,7 +3085,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveSecretResponse); i { + switch v := v.(*GetSSHConnectionResponse); i { case 0: return &v.state case 1: @@ -1848,7 +3097,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecretsRequest); i { + switch v := v.(*GetSandboxRequest); i { case 0: return &v.state case 1: @@ -1860,7 +3109,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecretsResponse); i { + switch v := v.(*GetSandboxResponse); i { case 0: return &v.state case 1: @@ -1872,7 +3121,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Secret); i { + switch v := v.(*AddSecretRequest); i { case 0: return &v.state case 1: @@ -1884,7 +3133,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSandboxsRequest); i { + switch v := v.(*AddSecretResponse); i { case 0: return &v.state case 1: @@ -1896,7 +3145,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSandboxsResponse); i { + switch v := v.(*RemoveSecretRequest); i { case 0: return &v.state case 1: @@ -1908,7 +3157,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Sandbox); i { + switch v := v.(*RemoveSecretResponse); i { case 0: return &v.state case 1: @@ -1920,7 +3169,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KillSandboxRequest); i { + switch v := v.(*ListSecretsRequest); i { case 0: return &v.state case 1: @@ -1932,7 +3181,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KillSandboxResponse); i { + switch v := v.(*ListSecretsResponse); i { case 0: return &v.state case 1: @@ -1944,7 +3193,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamSandboxLogsRequest); i { + switch v := v.(*Secret); i { case 0: return &v.state case 1: @@ -1956,7 +3205,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamSandboxLogsResponse); i { + switch v := v.(*ListSandboxsRequest); i { case 0: return &v.state case 1: @@ -1968,7 +3217,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShutdownRequest); i { + switch v := v.(*ListSandboxsResponse); i { case 0: return &v.state case 1: @@ -1980,7 +3229,19 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShutdownResponse); i { + 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_agent_v1_sandbox_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KillSandboxRequest); i { case 0: return &v.state case 1: @@ -1992,7 +3253,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartSandboxRequest_Context); i { + switch v := v.(*KillSandboxResponse); i { case 0: return &v.state case 1: @@ -2004,7 +3265,7 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartSandboxRequest_Context_GitContext); i { + switch v := v.(*StreamSandboxLogsRequest); i { case 0: return &v.state case 1: @@ -2016,6 +3277,186 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamSandboxLogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShutdownRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShutdownResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SandboxTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSandboxTemplateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSandboxTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSandboxTemplateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSandboxTemplatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSandboxTemplatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSandboxTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSandboxTemplateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartSandboxRequest_Context); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartSandboxRequest_SSHConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartSandboxRequest_Context_GitContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_agent_v1_sandbox_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamSandboxLogsResponse_LogEvent); i { case 0: return &v.state @@ -2029,24 +3470,32 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[3].OneofWrappers = []interface{}{} file_depot_agent_v1_sandbox_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[11].OneofWrappers = []interface{}{} file_depot_agent_v1_sandbox_proto_msgTypes[12].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[21].OneofWrappers = []interface{}{ + file_depot_agent_v1_sandbox_proto_msgTypes[14].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[16].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[17].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[18].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[19].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[26].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[27].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[31].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[32].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[36].OneofWrappers = []interface{}{ (*StartSandboxRequest_Context_Git)(nil), } - file_depot_agent_v1_sandbox_proto_msgTypes[22].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[37].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[38].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_depot_agent_v1_sandbox_proto_rawDesc, NumEnums: 1, - NumMessages: 24, + NumMessages: 40, NumExtensions: 0, NumServices: 1, }, 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/pty/resize_unix.go b/pkg/pty/resize_unix.go index 40acc92b..cab4abc1 100644 --- a/pkg/pty/resize_unix.go +++ b/pkg/pty/resize_unix.go @@ -9,11 +9,12 @@ import ( "syscall" civ1 "github.com/depot/cli/pkg/proto/depot/ci/v1" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" "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, @@ -53,3 +54,45 @@ func watchTerminalResize( return func() { signal.Stop(sigwinch) } } + +// watchTerminalResizeSandboxV0 is the M34 counterpart that sends +// depot.sandbox.v1.OpenPtyRequest.Resize messages. Used by RunSandboxV0. +func watchTerminalResizeSandboxV0( + ctx context.Context, + fd int, + sendCh chan<- *sandboxv1.OpenPtyRequest, +) func() { + sigwinch := make(chan os.Signal, 1) + signal.Notify(sigwinch, syscall.SIGWINCH) + + go func() { + for { + select { + case <-ctx.Done(): + return + case _, ok := <-sigwinch: + if !ok { + return + } + w, h, err := term.GetSize(fd) + if err != nil { + continue + } + select { + case sendCh <- &sandboxv1.OpenPtyRequest{ + Input: &sandboxv1.OpenPtyRequest_Resize_{ + Resize: &sandboxv1.OpenPtyRequest_Resize{ + Rows: uint32(h), + Cols: uint32(w), + }, + }, + }: + case <-ctx.Done(): + return + } + } + } + }() + + return func() { signal.Stop(sigwinch) } +} diff --git a/pkg/pty/resize_windows.go b/pkg/pty/resize_windows.go index 8de4bc1f..5e802140 100644 --- a/pkg/pty/resize_windows.go +++ b/pkg/pty/resize_windows.go @@ -4,6 +4,7 @@ import ( "context" civ1 "github.com/depot/cli/pkg/proto/depot/ci/v1" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" ) // watchTerminalResize is a no-op on Windows since SIGWINCH is not available. @@ -14,3 +15,12 @@ func watchTerminalResize( ) func() { return func() {} } + +// watchTerminalResizeSandboxV0 — Windows no-op for the sandboxv1 PTY path. +func watchTerminalResizeSandboxV0( + _ context.Context, + _ int, + _ chan<- *sandboxv1.OpenPtyRequest, +) func() { + return func() {} +} diff --git a/pkg/pty/session.go b/pkg/pty/session.go index 553d77ab..881e379f 100644 --- a/pkg/pty/session.go +++ b/pkg/pty/session.go @@ -15,18 +15,36 @@ 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. +// - pty.RunSandboxV0 (M34): depot.sandbox.v1.SandboxService.OpenPty — +// the new sandboxv1 wire used by `depot sandbox shell`. Session-id is +// gone (D-M34-M); RunSandboxV0 ignores it. +// +// Once the CI bastion verbs migrate to sandboxv1 (Theme 3 follow-on), the +// legacy Run can be retired and SessionID dropped from this struct. type SessionOptions struct { Token string OrgID string // sent as x-depot-org header for multi-org users SandboxID string - SessionID string + SessionID string // legacy CI bastion only; ignored by RunSandboxV0 (D-M34-M) Cwd string Env map[string]string + + // StdinPrefix is sent as the first stdin chunk after the pty session is + // open, before forwarding os.Stdin. Used by `depot sandbox shell` to + // inject on.shell entries into the login shell. Must be terminated with + // "\n" so the shell's line discipline flushes it. + StdinPrefix []byte } -// 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`. Sandbox v0 callers (`depot sandbox shell`) use +// RunSandboxV0 instead. func Run(ctx context.Context, opts SessionOptions) error { fd := int(os.Stdin.Fd()) rows, cols := 24, 80 //nolint:mnd @@ -91,7 +109,14 @@ func Run(ctx context.Context, opts SessionOptions) error { stopResize := watchTerminalResize(ctx, fd, sendCh) defer stopResize() - // Forward stdin to the stream. + if len(opts.StdinPrefix) > 0 { + if err := stream.Send(&civ1.OpenPtySessionRequest{ + Message: &civ1.OpenPtySessionRequest_Stdin{Stdin: opts.StdinPrefix}, + }); err != nil { + return fmt.Errorf("send on.shell prefix: %w", err) + } + } + go func() { buf := make([]byte, 4096) //nolint:mnd for { @@ -113,7 +138,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 +148,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/pty/session_sandboxv1.go b/pkg/pty/session_sandboxv1.go new file mode 100644 index 00000000..a3eb373c --- /dev/null +++ b/pkg/pty/session_sandboxv1.go @@ -0,0 +1,143 @@ +package pty + +import ( + "context" + "errors" + "fmt" + "io" + "os" + "os/signal" + "syscall" + + "github.com/depot/cli/pkg/api" + sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" + "golang.org/x/term" +) + +// RunSandboxV0 opens an interactive PTY session against the depot.sandbox.v1 +// SandboxService.OpenPty bidi-streaming RPC. M34 (D-M34-L) consumer of the +// v0 sandbox surface; called by `depot sandbox shell`. Session-id is gone — +// the wire takes a SandboxRef only. +// +// Wire shape (pty.proto): +// - First request MUST carry Start{sandbox, env, rows, cols, cwd} +// - Subsequent requests carry Stdin bytes or Resize{rows, cols} +// - Response stream emits Data bytes terminated by a single Exit{exit_code} +func RunSandboxV0(ctx context.Context, opts SessionOptions) error { + fd := int(os.Stdin.Fd()) + rows, cols := 24, 80 //nolint:mnd + if w, h, err := term.GetSize(fd); err == nil { + cols, rows = w, h + } + + oldState, err := term.MakeRaw(fd) + if err != nil { + return fmt.Errorf("make raw: %w", err) + } + defer term.Restore(fd, oldState) //nolint:errcheck + + sigCh := make(chan os.Signal, 1) + signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM) + go func() { + <-sigCh + term.Restore(fd, oldState) //nolint:errcheck + os.Exit(1) + }() + defer signal.Stop(sigCh) + + client := api.NewSandboxV0Client() + stream := client.OpenPty(ctx) + stream.RequestHeader().Set("Authorization", "Bearer "+opts.Token) + if opts.OrgID != "" { + stream.RequestHeader().Set("x-depot-org", opts.OrgID) + } + + startRows := uint32(rows) + startCols := uint32(cols) + start := &sandboxv1.OpenPtyRequest_Start{ + Sandbox: &sandboxv1.SandboxRef{Selector: &sandboxv1.SandboxRef_Id{Id: opts.SandboxID}}, + Env: opts.Env, + Rows: &startRows, + Cols: &startCols, + } + if opts.Cwd != "" { + start.Cwd = &opts.Cwd + } + if err := stream.Send(&sandboxv1.OpenPtyRequest{ + Input: &sandboxv1.OpenPtyRequest_Start_{Start: start}, + }); err != nil { + return fmt.Errorf("send pty start: %w", err) + } + + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + sendCh := make(chan *sandboxv1.OpenPtyRequest, 1) + + go func() { + for { + select { + case msg := <-sendCh: + _ = stream.Send(msg) + case <-ctx.Done(): + _ = stream.CloseRequest() + return + } + } + }() + + stopResize := watchTerminalResizeSandboxV0(ctx, fd, sendCh) + defer stopResize() + + if len(opts.StdinPrefix) > 0 { + if err := stream.Send(&sandboxv1.OpenPtyRequest{ + Input: &sandboxv1.OpenPtyRequest_Stdin{Stdin: opts.StdinPrefix}, + }); err != nil { + return fmt.Errorf("send on.shell prefix: %w", err) + } + } + + go func() { + buf := make([]byte, 4096) //nolint:mnd + for { + n, err := os.Stdin.Read(buf) + if n > 0 { + data := make([]byte, n) + copy(data, buf[:n]) + select { + case sendCh <- &sandboxv1.OpenPtyRequest{ + Input: &sandboxv1.OpenPtyRequest_Stdin{Stdin: data}, + }: + case <-ctx.Done(): + return + } + } + if err != nil { + return + } + } + }() + + for { + resp, err := stream.Receive() + if err != nil { + if errors.Is(err, io.EOF) { + return nil + } + return fmt.Errorf("recv: %w", err) + } + switch m := resp.Output.(type) { + case *sandboxv1.OpenPtyResponse_Data: + _, _ = os.Stdout.Write(m.Data) + case *sandboxv1.OpenPtyResponse_Exit_: + if m.Exit != nil { + fmt.Fprintf(os.Stderr, "\r\n[exit %d]\r\n", m.Exit.ExitCode) + if m.Exit.ExitCode != 0 { + term.Restore(fd, oldState) //nolint:errcheck + os.Exit(int(m.Exit.ExitCode)) + } + } + return nil + } + } +} diff --git a/pkg/sandbox/spec.go b/pkg/sandbox/spec.go new file mode 100644 index 00000000..7c2b41f2 --- /dev/null +++ b/pkg/sandbox/spec.go @@ -0,0 +1,324 @@ +// Package sandbox provides parsing and translation of the declarative +// `sandbox.depot.yml` spec into StartSandboxRequest messages. The spec is +// inspired by fly.toml: one file declares everything about a sandbox so the +// caller does not have to assemble flags or JSON for each StartSandbox call. +package sandbox + +import ( + "fmt" + "os" + "path/filepath" + "regexp" + "strings" + + "gopkg.in/yaml.v3" +) + +// MCPEnvVar is the environment variable the boot process inside the sandbox +// reads to materialize MCP server configs. The value is JSON-encoded MCPSpec. +const MCPEnvVar = "DEPOT_AGENT_MCP_CONFIG" + +// DefaultSpecFilenames are the names searched in directory walk-up order. +var DefaultSpecFilenames = []string{"sandbox.depot.yml", "sandbox.depot.yaml"} + +// Spec is the on-disk schema for a sandbox. +type Spec struct { + Name string `yaml:"name"` + AgentType string `yaml:"agent_type,omitempty"` + Argv string `yaml:"argv,omitempty"` + Command string `yaml:"command,omitempty"` + Detach *bool `yaml:"detach,omitempty"` + Template string `yaml:"template,omitempty"` + Env map[string]string `yaml:"env,omitempty"` + Git *GitSpec `yaml:"git,omitempty"` + SSH *SSHSpec `yaml:"ssh,omitempty"` + MCP *MCPSpec `yaml:"mcp,omitempty"` + Container *ContainerSpec `yaml:"container,omitempty"` + + // On groups every lifecycle hook stage under one key. Stages: + // create — once after the sandbox first boots (one-shot setup). + // start — every boot (fresh up, plus future resume flows). + // exec — before each `depot sandbox exec` user command. + // shell — installed at up time as /etc/profile.d/99-depot-on-shell.sh + // so it replaces the login shell when `depot sandbox shell` + // opens a pty. + // snapshot — before `depot sandbox snapshot` runs the tar pipeline. + // All stages are sequential; a non-zero exit from a foreground hook + // aborts the surrounding command. + On HooksSpec `yaml:"on,omitempty"` + + // Image is the rootfs image ref handed to StartSandbox. Two ways it + // gets set: + // 1. User pins a prebuilt ref via the YAML `image:` key (e.g., the + // output of `depot sandbox build` or `depot sandbox snapshot`). + // 2. The CLI's build/convert pipeline derives one from spec.Name + + // project + org and overwrites whatever the YAML had. + // + // When [container.build] is set, (2) wins — the build product is + // always preferred over a stale YAML ref. With no build section, the + // YAML ref is used verbatim. With neither, the API picks a default. + Image string `yaml:"image,omitempty"` +} + +// ContainerSpec describes how to produce the sandbox's rootfs. +// +// Today only Build is supported: the CLI runs `depot build --save` (saves to +// .registry.depot.dev/:), runs an ext4 convert +// CI run against it, and hands StartSandbox the bare-host form +// registry.depot.dev/:-ext4 (the API does the org-tenant +// routing internally). +// +// The build/convert destinations are CLI-derived from spec.Name, the build +// project, and the current org — there's no Tag field to override them yet. +type ContainerSpec struct { + Build *BuildSpec `yaml:"build,omitempty"` +} + +// BuildSpec describes how to produce the sandbox's container image when +// `depot sandbox up` runs from a directory holding a Dockerfile. It mirrors +// the relevant `depot build` flags so users can read the yml and predict what +// shells out. +type BuildSpec struct { + Context string `yaml:"context,omitempty"` // default "." + Dockerfile string `yaml:"dockerfile,omitempty"` // default "Dockerfile" + Target string `yaml:"target,omitempty"` // multistage target + BuildArgs map[string]string `yaml:"build_args,omitempty"` // --build-arg + Push *PushSpec `yaml:"push,omitempty"` // when nil, defaults are filled in + NoCache bool `yaml:"no_cache,omitempty"` +} + +// PushSpec controls where the built image is pushed. Both fields default +// (Project from the nearest depot.json, Tag from the spec name + git short sha +// or "latest") so most specs leave this section empty. +type PushSpec struct { + Project string `yaml:"project,omitempty"` + Tag string `yaml:"tag,omitempty"` +} + +// HooksSpec groups the lifecycle hook stages. Each list runs sequentially. +// See Spec.On for stage semantics. +type HooksSpec struct { + Create []HookSpec `yaml:"create,omitempty"` + Start []HookSpec `yaml:"start,omitempty"` + Exec []HookSpec `yaml:"exec,omitempty"` + Shell []HookSpec `yaml:"shell,omitempty"` + Snapshot []HookSpec `yaml:"snapshot,omitempty"` + Down []HookSpec `yaml:"down,omitempty"` +} + +// HookSpec is one entry in any On.* list. Command is a shell string +// run via `bash -lc`; Detach=true backgrounds it with setsid so it outlives +// the exec stream (use for long-running processes like an agent loop). +// +// 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 backgrounds the command (setsid + redirect stdio) so the + // caller's exec stream returns once the process has been spawned, not + // when it exits. Stdio is captured to /tmp/depot-hook-.log + // inside the sandbox. + 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 a foreground hook. Ignored when Detach=true + // (the spawn itself is fast; the backgrounded process has no timeout). + // 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 +} + +type GitSpec struct { + URL string `yaml:"url"` + Branch string `yaml:"branch,omitempty"` + Commit string `yaml:"commit,omitempty"` + Secret string `yaml:"secret,omitempty"` +} + +type SSHSpec struct { + Enabled bool `yaml:"enabled"` + TimeoutMinutes int32 `yaml:"timeout_minutes,omitempty"` +} + +type MCPSpec struct { + Servers map[string]MCPServer `yaml:"servers" json:"servers"` +} + +// MCPServer covers both Claude Code MCP transports: +// - stdio: `command: ["bin", "arg"]` (subprocess MCP servers, e.g. Plain) +// - http: `type: http`, `url: "..."` (hosted MCP servers, e.g. Linear) +// +// The bootstrap script in the agent image translates this into the schema +// `claude --mcp-config` expects. +type MCPServer struct { + // http transport + Type string `yaml:"type,omitempty" json:"type,omitempty"` + URL string `yaml:"url,omitempty" json:"url,omitempty"` + // stdio transport + Command []string `yaml:"command,omitempty" json:"command,omitempty"` + Args []string `yaml:"args,omitempty" json:"args,omitempty"` + Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"` + // optional headers for http transport (e.g., Authorization) + Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"` +} + +// Load reads a spec from an explicit path. Use FindSpec for walk-up discovery. +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 +} + +// FindSpec walks up from cwd looking for one of DefaultSpecFilenames and +// returns its absolute path. Mirrors pkg/project.FindConfigFileUp. +func FindSpec(cwd string) (string, error) { + current, err := filepath.Abs(cwd) + if err != nil { + return "", err + } + for { + for _, name := range DefaultSpecFilenames { + p := filepath.Join(current, name) + if _, err := os.Stat(p); err == nil { + return p, nil + } + } + next := filepath.Dir(current) + if next == current { + break + } + current = next + } + return "", fmt.Errorf("no %s found from %s upward", DefaultSpecFilenames[0], cwd) +} + +// 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 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 + out := inputRefRe.ReplaceAllStringFunc(s, func(match string) string { + groups := inputRefRe.FindStringSubmatch(match) + key := groups[1] + optional := groups[2] == "?" + v, ok := inputs[key] + if !ok { + if optional { + return "" + } + missing = append(missing, key) + return match + } + return v + }) + if len(missing) > 0 { + return "", fmt.Errorf("missing input(s): %s", strings.Join(missing, ", ")) + } + return out, nil +} + +// MarshalSpec re-serializes the in-memory Spec back to YAML, used by the +// from-spec CLI verb after it patches spec.Image with a build-then-convert +// result. Round-trip is structural — comments / formatting from the on-disk +// file are lost, so call sites should prefer reading the original bytes when +// no in-memory edits have been made (D-M34-G Path B). +func MarshalSpec(s *Spec) ([]byte, error) { + b, err := yaml.Marshal(s) + if err != nil { + return nil, fmt.Errorf("marshal spec: %w", err) + } + return b, nil +} + +// 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.create", s.On.Create, &out.Create}, + {"on.start", s.On.Start, &out.Start}, + {"on.exec", s.On.Exec, &out.Exec}, + {"on.shell", s.On.Shell, &out.Shell}, + {"on.snapshot", s.On.Snapshot, &out.Snapshot}, + {"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 +} + +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) + } + 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/proto/depot/agent/v1/sandbox.proto b/proto/depot/agent/v1/sandbox.proto index 180d00f2..545fe1f2 100644 --- a/proto/depot/agent/v1/sandbox.proto +++ b/proto/depot/agent/v1/sandbox.proto @@ -7,6 +7,7 @@ import "google/protobuf/timestamp.proto"; service SandboxService { rpc StartSandbox(StartSandboxRequest) returns (StartSandboxResponse); + rpc ExecInSandbox(ExecInSandboxRequest) returns (ExecInSandboxResponse); rpc GetSandbox(GetSandboxRequest) returns (GetSandboxResponse); rpc ListSandboxs(ListSandboxsRequest) returns (ListSandboxsResponse); rpc KillSandbox(KillSandboxRequest) returns (KillSandboxResponse); @@ -15,9 +16,18 @@ 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); + + // GetSSHConnection returns the SSH connection info for a running sandbox + rpc GetSSHConnection(GetSSHConnectionRequest) returns (GetSSHConnectionResponse); + + // Template management - save and reuse pre-configured sandbox filesystems + rpc CreateSandboxTemplate(CreateSandboxTemplateRequest) returns (CreateSandboxTemplateResponse); + rpc GetSandboxTemplate(GetSandboxTemplateRequest) returns (GetSandboxTemplateResponse); + rpc ListSandboxTemplates(ListSandboxTemplatesRequest) returns (ListSandboxTemplatesResponse); + rpc DeleteSandboxTemplate(DeleteSandboxTemplateRequest) returns (DeleteSandboxTemplateResponse); } message StartSandboxRequest { @@ -27,6 +37,22 @@ message StartSandboxRequest { string argv = 4; map environment_variables = 5; Context context = 6; + optional SSHConfig ssh_config = 7; + // Start sandbox from a saved template (pre-configured filesystem) + // When set, creates a fresh session with the template's filesystem state + optional string template_id = 8; + + // Optional command to execute inside the sandbox after it starts. + // If not provided, the sandbox starts as usual. + optional string command = 9; + // When true, wait for the command to finish and return its exit code, + // stdout, and stderr in command_result. When false (default), the command + // is started but the response returns immediately without waiting. + optional bool wait_for_command = 10; + + // Optional image reference used as the sandbox base image. + // When omitted, the default Depot sandbox image is used. + optional string image = 11; message Context { oneof context { @@ -39,12 +65,55 @@ message StartSandboxRequest { optional string commit_hash = 4; } } + + message SSHConfig { + bool enabled = 1; + optional int32 timeout_minutes = 2; + } } message StartSandboxResponse { string sandbox_id = 1; string session_id = 2; string organization_id = 3; + optional SSHConnection ssh_connection = 4; + // Result of the command execution, if a command was provided in the request + optional CommandResult command_result = 5; +} + +message ExecInSandboxRequest { + string sandbox_id = 1; + string command = 2; + // When true (default), wait for command completion and return output. + // When false, start command and return immediately. + optional bool wait_for_command = 3; +} + +message ExecInSandboxResponse { + optional CommandResult command_result = 1; +} + +// CommandResult contains the output from executing a command inside a sandbox +message CommandResult { + int32 exit_code = 1; + string stdout = 2; + string stderr = 3; +} + +// SSHConnection contains the connection details for direct SSH access to a sandbox +message SSHConnection { + string host = 1; + int32 port = 2; + string username = 3; // Always "depot" + string private_key = 4; // PEM format, base64 encoded +} + +message GetSSHConnectionRequest { + string session_id = 1; +} + +message GetSSHConnectionResponse { + SSHConnection ssh_connection = 1; } message GetSandboxRequest { @@ -107,6 +176,9 @@ message Sandbox { optional int32 exit_code = 8; optional double duration_seconds = 9; optional string error_message = 10; + optional bool ssh_enabled = 11; + optional string ssh_host = 12; + optional int32 ssh_port = 13; } message KillSandboxRequest { @@ -140,3 +212,67 @@ message ShutdownRequest { } message ShutdownResponse {} + +// ============================================================================ +// Sandbox Template Messages +// ============================================================================ + +// SandboxTemplate represents a saved filesystem state that can be used to create new sandboxes +message SandboxTemplate { + string id = 1; + string organization_id = 2; + string name = 3; + optional string description = 4; + + // Source information (from the sandbox that was used to create this template) + optional string source_repository = 5; + optional string source_branch = 6; + optional string source_commit_hash = 7; + + // Whether this template can be used with SSH mode + // Only templates created from SSH-enabled sandboxes have tmate installed + bool ssh_compatible = 8; + + google.protobuf.Timestamp created_at = 9; +} + +// CreateSandboxTemplate creates a new template from a running sandbox's filesystem +message CreateSandboxTemplateRequest { + // The running sandbox to snapshot + string sandbox_id = 1; + // Unique name for the template within the organization + string name = 2; + // Optional description + optional string description = 3; +} + +message CreateSandboxTemplateResponse { + SandboxTemplate template = 1; +} + +// GetSandboxTemplate retrieves a template by ID +message GetSandboxTemplateRequest { + string template_id = 1; +} + +message GetSandboxTemplateResponse { + SandboxTemplate template = 1; +} + +// ListSandboxTemplates lists all templates for an organization +message ListSandboxTemplatesRequest { + optional int32 page_size = 1; + optional string page_token = 2; +} + +message ListSandboxTemplatesResponse { + repeated SandboxTemplate templates = 1; + optional string next_page_token = 2; +} + +// DeleteSandboxTemplate soft-deletes a template +message DeleteSandboxTemplateRequest { + string template_id = 1; +} + +message DeleteSandboxTemplateResponse {} 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; From 0b5114f36714049d10c5717dc3380706e8a5efa0 Mon Sep 17 00:00:00 2001 From: Rob Stolarz Date: Thu, 28 May 2026 14:43:01 -0700 Subject: [PATCH 3/7] sandbox/v1: rename Command type to SandboxCommandExecution Renames the persisted-execution resource type and its companions (CommandEvent->SandboxCommandExecutionEvent, CommandStatus->...Status, CommandRef->...Ref) across the depot.sandbox.v1 protos and regenerates the Go bindings. RPC verbs (RunCommand, GetCommand, etc.) are unchanged. DEP-4520 Co-Authored-By: Claude Opus 4.8 (1M context) --- pkg/cmd/sandbox/common.go | 20 +- pkg/cmd/sandbox/common_test.go | 2 +- pkg/proto/depot/sandbox/v1/command.pb.go | 654 +++++++++--------- pkg/proto/depot/sandbox/v1/hook.pb.go | 2 +- pkg/proto/depot/sandbox/v1/logs.pb.go | 4 +- pkg/proto/depot/sandbox/v1/refs.pb.go | 49 +- pkg/proto/depot/sandbox/v1/sandbox.pb.go | 189 ++--- .../v1/sandboxv1connect/sandbox.connect.go | 64 +- pkg/proto/depot/sandbox/v1/spec_rpc.pb.go | 23 +- proto/depot/sandbox/v1/command.proto | 42 +- proto/depot/sandbox/v1/hook.proto | 2 +- proto/depot/sandbox/v1/logs.proto | 4 +- proto/depot/sandbox/v1/refs.proto | 2 +- proto/depot/sandbox/v1/sandbox.proto | 14 +- proto/depot/sandbox/v1/spec_rpc.proto | 2 +- 15 files changed, 551 insertions(+), 522 deletions(-) diff --git a/pkg/cmd/sandbox/common.go b/pkg/cmd/sandbox/common.go index 5faf4426..52188777 100644 --- a/pkg/cmd/sandbox/common.go +++ b/pkg/cmd/sandbox/common.go @@ -40,9 +40,9 @@ func sandboxRef(id string) *sandboxv1.SandboxRef { // commandRef wraps a command id in the depot.sandbox.v1 selector oneof. // Used by AttachCommand / KillCommand callers. -func commandRef(id string) *sandboxv1.CommandRef { - return &sandboxv1.CommandRef{ - Selector: &sandboxv1.CommandRef_Id{Id: id}, +func commandRef(id string) *sandboxv1.SandboxCommandExecutionRef { + return &sandboxv1.SandboxCommandExecutionRef{ + Selector: &sandboxv1.SandboxCommandExecutionRef_Id{Id: id}, } } @@ -73,7 +73,7 @@ const ( ) func consumeCommandEventStream( - stream *connect.ServerStreamForClient[sandboxv1.CommandEvent], + stream *connect.ServerStreamForClient[sandboxv1.SandboxCommandExecutionEvent], stdout, stderr io.Writer, mode detachedMode, ) (exitCode int32, err error) { @@ -81,25 +81,25 @@ func consumeCommandEventStream( for stream.Receive() { msg := stream.Msg() switch ev := msg.Event.(type) { - case *sandboxv1.CommandEvent_Started_: + case *sandboxv1.SandboxCommandExecutionEvent_Started_: // metadata only — nothing to print - case *sandboxv1.CommandEvent_Stdout: + case *sandboxv1.SandboxCommandExecutionEvent_Stdout: if ev.Stdout != nil && len(ev.Stdout.Data) > 0 { _, _ = stdout.Write(ev.Stdout.Data) } - case *sandboxv1.CommandEvent_Stderr: + case *sandboxv1.SandboxCommandExecutionEvent_Stderr: if ev.Stderr != nil && len(ev.Stderr.Data) > 0 { _, _ = stderr.Write(ev.Stderr.Data) } - case *sandboxv1.CommandEvent_Finished_: + case *sandboxv1.SandboxCommandExecutionEvent_Finished_: if ev.Finished != nil { return ev.Finished.ExitCode, nil } - case *sandboxv1.CommandEvent_Error_: + case *sandboxv1.SandboxCommandExecutionEvent_Error_: if ev.Error != nil { fmt.Fprintf(stderr, "[command-error] %s\n", ev.Error.Reason) } - case *sandboxv1.CommandEvent_Evicted: + case *sandboxv1.SandboxCommandExecutionEvent_Evicted: if ev.Evicted != nil { fmt.Fprintf(stderr, "[evicted-early-data] dropped %d bytes stdout / %d bytes stderr\n", ev.Evicted.DroppedBytesStdout, ev.Evicted.DroppedBytesStderr) diff --git a/pkg/cmd/sandbox/common_test.go b/pkg/cmd/sandbox/common_test.go index e3b2f99e..8ff74c44 100644 --- a/pkg/cmd/sandbox/common_test.go +++ b/pkg/cmd/sandbox/common_test.go @@ -28,7 +28,7 @@ func TestCommandRef_PinnedShape(t *testing.T) { if r == nil { t.Fatal("commandRef returned nil") } - sel, ok := r.Selector.(*sandboxv1.CommandRef_Id) + sel, ok := r.Selector.(*sandboxv1.SandboxCommandExecutionRef_Id) if !ok { t.Fatalf("expected CommandRef_Id selector, got %T", r.Selector) } diff --git a/pkg/proto/depot/sandbox/v1/command.pb.go b/pkg/proto/depot/sandbox/v1/command.pb.go index c4732b3c..50759f38 100644 --- a/pkg/proto/depot/sandbox/v1/command.pb.go +++ b/pkg/proto/depot/sandbox/v1/command.pb.go @@ -21,99 +21,99 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// CommandStatus mirrors the lifecycle stages a command transitions through. +// SandboxCommandExecutionStatus mirrors the lifecycle stages a command transitions through. // // PENDING: queued, not yet started in the guest. // RUNNING: started; bytes can be streaming. // FINISHED: process exited; exit_code populated. // FAILED: process never started, or the guest reported an error path. // KILLED: signaled mid-run (DEP-4522). -type CommandStatus int32 +type SandboxCommandExecutionStatus int32 const ( - CommandStatus_COMMAND_STATUS_UNSPECIFIED CommandStatus = 0 - CommandStatus_COMMAND_STATUS_PENDING CommandStatus = 1 - CommandStatus_COMMAND_STATUS_RUNNING CommandStatus = 2 - CommandStatus_COMMAND_STATUS_FINISHED CommandStatus = 3 - CommandStatus_COMMAND_STATUS_FAILED CommandStatus = 4 - CommandStatus_COMMAND_STATUS_KILLED CommandStatus = 5 + 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 CommandStatus. +// Enum value maps for SandboxCommandExecutionStatus. var ( - CommandStatus_name = map[int32]string{ - 0: "COMMAND_STATUS_UNSPECIFIED", - 1: "COMMAND_STATUS_PENDING", - 2: "COMMAND_STATUS_RUNNING", - 3: "COMMAND_STATUS_FINISHED", - 4: "COMMAND_STATUS_FAILED", - 5: "COMMAND_STATUS_KILLED", - } - CommandStatus_value = map[string]int32{ - "COMMAND_STATUS_UNSPECIFIED": 0, - "COMMAND_STATUS_PENDING": 1, - "COMMAND_STATUS_RUNNING": 2, - "COMMAND_STATUS_FINISHED": 3, - "COMMAND_STATUS_FAILED": 4, - "COMMAND_STATUS_KILLED": 5, + 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 CommandStatus) Enum() *CommandStatus { - p := new(CommandStatus) +func (x SandboxCommandExecutionStatus) Enum() *SandboxCommandExecutionStatus { + p := new(SandboxCommandExecutionStatus) *p = x return p } -func (x CommandStatus) String() string { +func (x SandboxCommandExecutionStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (CommandStatus) Descriptor() protoreflect.EnumDescriptor { +func (SandboxCommandExecutionStatus) Descriptor() protoreflect.EnumDescriptor { return file_depot_sandbox_v1_command_proto_enumTypes[0].Descriptor() } -func (CommandStatus) Type() protoreflect.EnumType { +func (SandboxCommandExecutionStatus) Type() protoreflect.EnumType { return &file_depot_sandbox_v1_command_proto_enumTypes[0] } -func (x CommandStatus) Number() protoreflect.EnumNumber { +func (x SandboxCommandExecutionStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use CommandStatus.Descriptor instead. -func (CommandStatus) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use SandboxCommandExecutionStatus.Descriptor instead. +func (SandboxCommandExecutionStatus) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{0} } -// Command is the persisted metadata for a single RunCommand invocation. The +// SandboxCommandExecution is the persisted metadata for a single RunCommand invocation. The // row shape lives in src/sandbox/schema-additions.ts (CommandRow); this is its // wire projection. Populated by Get/List/Attach RPCs in follow-up slices. -type Command struct { +type SandboxCommandExecution struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Server-minted ULID. Architecture §7. - CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` - SandboxId string `protobuf:"bytes,2,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` - Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` - Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` - Cwd *string `protobuf:"bytes,5,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` - 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"` - Sudo bool `protobuf:"varint,7,opt,name=sudo,proto3" json:"sudo,omitempty"` - Detached bool `protobuf:"varint,8,opt,name=detached,proto3" json:"detached,omitempty"` - Status CommandStatus `protobuf:"varint,9,opt,name=status,proto3,enum=depot.sandbox.v1.CommandStatus" json:"status,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - FinishedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=finished_at,json=finishedAt,proto3,oneof" json:"finished_at,omitempty"` - ExitCode *int32 `protobuf:"varint,12,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` + CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + SandboxId string `protobuf:"bytes,2,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` + Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` + Cwd *string `protobuf:"bytes,5,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` + 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"` + Sudo bool `protobuf:"varint,7,opt,name=sudo,proto3" json:"sudo,omitempty"` + Detached bool `protobuf:"varint,8,opt,name=detached,proto3" json:"detached,omitempty"` + Status SandboxCommandExecutionStatus `protobuf:"varint,9,opt,name=status,proto3,enum=depot.sandbox.v1.SandboxCommandExecutionStatus" json:"status,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=finished_at,json=finishedAt,proto3,oneof" json:"finished_at,omitempty"` + ExitCode *int32 `protobuf:"varint,12,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` // Per-stream cumulative byte counts. Split per architecture §8. StdoutBytesEmitted int64 `protobuf:"varint,13,opt,name=stdout_bytes_emitted,json=stdoutBytesEmitted,proto3" json:"stdout_bytes_emitted,omitempty"` StderrBytesEmitted int64 `protobuf:"varint,14,opt,name=stderr_bytes_emitted,json=stderrBytesEmitted,proto3" json:"stderr_bytes_emitted,omitempty"` } -func (x *Command) Reset() { - *x = Command{} +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)) @@ -121,13 +121,13 @@ func (x *Command) Reset() { } } -func (x *Command) String() string { +func (x *SandboxCommandExecution) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Command) ProtoMessage() {} +func (*SandboxCommandExecution) ProtoMessage() {} -func (x *Command) ProtoReflect() protoreflect.Message { +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)) @@ -139,134 +139,134 @@ func (x *Command) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Command.ProtoReflect.Descriptor instead. -func (*Command) Descriptor() ([]byte, []int) { +// Deprecated: Use SandboxCommandExecution.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecution) Descriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{0} } -func (x *Command) GetCmdId() string { +func (x *SandboxCommandExecution) GetCmdId() string { if x != nil { return x.CmdId } return "" } -func (x *Command) GetSandboxId() string { +func (x *SandboxCommandExecution) GetSandboxId() string { if x != nil { return x.SandboxId } return "" } -func (x *Command) GetCmd() string { +func (x *SandboxCommandExecution) GetCmd() string { if x != nil { return x.Cmd } return "" } -func (x *Command) GetArgs() []string { +func (x *SandboxCommandExecution) GetArgs() []string { if x != nil { return x.Args } return nil } -func (x *Command) GetCwd() string { +func (x *SandboxCommandExecution) GetCwd() string { if x != nil && x.Cwd != nil { return *x.Cwd } return "" } -func (x *Command) GetEnv() map[string]string { +func (x *SandboxCommandExecution) GetEnv() map[string]string { if x != nil { return x.Env } return nil } -func (x *Command) GetSudo() bool { +func (x *SandboxCommandExecution) GetSudo() bool { if x != nil { return x.Sudo } return false } -func (x *Command) GetDetached() bool { +func (x *SandboxCommandExecution) GetDetached() bool { if x != nil { return x.Detached } return false } -func (x *Command) GetStatus() CommandStatus { +func (x *SandboxCommandExecution) GetStatus() SandboxCommandExecutionStatus { if x != nil { return x.Status } - return CommandStatus_COMMAND_STATUS_UNSPECIFIED + return SandboxCommandExecutionStatus_SANDBOX_COMMAND_EXECUTION_STATUS_UNSPECIFIED } -func (x *Command) GetStartedAt() *timestamppb.Timestamp { +func (x *SandboxCommandExecution) GetStartedAt() *timestamppb.Timestamp { if x != nil { return x.StartedAt } return nil } -func (x *Command) GetFinishedAt() *timestamppb.Timestamp { +func (x *SandboxCommandExecution) GetFinishedAt() *timestamppb.Timestamp { if x != nil { return x.FinishedAt } return nil } -func (x *Command) GetExitCode() int32 { +func (x *SandboxCommandExecution) GetExitCode() int32 { if x != nil && x.ExitCode != nil { return *x.ExitCode } return 0 } -func (x *Command) GetStdoutBytesEmitted() int64 { +func (x *SandboxCommandExecution) GetStdoutBytesEmitted() int64 { if x != nil { return x.StdoutBytesEmitted } return 0 } -func (x *Command) GetStderrBytesEmitted() int64 { +func (x *SandboxCommandExecution) GetStderrBytesEmitted() int64 { if x != nil { return x.StderrBytesEmitted } return 0 } -// CommandEvent is the streamed event during RunCommand / RunCommandPipe / +// SandboxCommandExecutionEvent is the streamed event during RunCommand / RunCommandPipe / // AttachCommand. Bytes everywhere; the SDK decodes UTF-8 at the adapter layer. // // EvictedEarlyData fires only on reattach scenarios where the K-Streaming ring // (architecture §10) had to drop head data before the consumer subscribed. // It is part of the oneof from day one so the wire shape doesn't need a // reserved slot retrofit when the BufferedEventLog impl lands with P10b. -type CommandEvent struct { +type SandboxCommandExecutionEvent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Event: // - // *CommandEvent_Started_ - // *CommandEvent_Stdout - // *CommandEvent_Stderr - // *CommandEvent_Finished_ - // *CommandEvent_Error_ - // *CommandEvent_Evicted - Event isCommandEvent_Event `protobuf_oneof:"event"` + // *SandboxCommandExecutionEvent_Started_ + // *SandboxCommandExecutionEvent_Stdout + // *SandboxCommandExecutionEvent_Stderr + // *SandboxCommandExecutionEvent_Finished_ + // *SandboxCommandExecutionEvent_Error_ + // *SandboxCommandExecutionEvent_Evicted + Event isSandboxCommandExecutionEvent_Event `protobuf_oneof:"event"` } -func (x *CommandEvent) Reset() { - *x = CommandEvent{} +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)) @@ -274,13 +274,13 @@ func (x *CommandEvent) Reset() { } } -func (x *CommandEvent) String() string { +func (x *SandboxCommandExecutionEvent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandEvent) ProtoMessage() {} +func (*SandboxCommandExecutionEvent) ProtoMessage() {} -func (x *CommandEvent) ProtoReflect() protoreflect.Message { +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)) @@ -292,99 +292,99 @@ func (x *CommandEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandEvent.ProtoReflect.Descriptor instead. -func (*CommandEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use SandboxCommandExecutionEvent.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionEvent) Descriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{1} } -func (m *CommandEvent) GetEvent() isCommandEvent_Event { +func (m *SandboxCommandExecutionEvent) GetEvent() isSandboxCommandExecutionEvent_Event { if m != nil { return m.Event } return nil } -func (x *CommandEvent) GetStarted() *CommandEvent_Started { - if x, ok := x.GetEvent().(*CommandEvent_Started_); ok { +func (x *SandboxCommandExecutionEvent) GetStarted() *SandboxCommandExecutionEvent_Started { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Started_); ok { return x.Started } return nil } -func (x *CommandEvent) GetStdout() *CommandEvent_StdoutBytes { - if x, ok := x.GetEvent().(*CommandEvent_Stdout); ok { +func (x *SandboxCommandExecutionEvent) GetStdout() *SandboxCommandExecutionEvent_StdoutBytes { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Stdout); ok { return x.Stdout } return nil } -func (x *CommandEvent) GetStderr() *CommandEvent_StderrBytes { - if x, ok := x.GetEvent().(*CommandEvent_Stderr); ok { +func (x *SandboxCommandExecutionEvent) GetStderr() *SandboxCommandExecutionEvent_StderrBytes { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Stderr); ok { return x.Stderr } return nil } -func (x *CommandEvent) GetFinished() *CommandEvent_Finished { - if x, ok := x.GetEvent().(*CommandEvent_Finished_); ok { +func (x *SandboxCommandExecutionEvent) GetFinished() *SandboxCommandExecutionEvent_Finished { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Finished_); ok { return x.Finished } return nil } -func (x *CommandEvent) GetError() *CommandEvent_Error { - if x, ok := x.GetEvent().(*CommandEvent_Error_); ok { +func (x *SandboxCommandExecutionEvent) GetError() *SandboxCommandExecutionEvent_Error { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Error_); ok { return x.Error } return nil } -func (x *CommandEvent) GetEvicted() *CommandEvent_EvictedEarlyData { - if x, ok := x.GetEvent().(*CommandEvent_Evicted); ok { +func (x *SandboxCommandExecutionEvent) GetEvicted() *SandboxCommandExecutionEvent_EvictedEarlyData { + if x, ok := x.GetEvent().(*SandboxCommandExecutionEvent_Evicted); ok { return x.Evicted } return nil } -type isCommandEvent_Event interface { - isCommandEvent_Event() +type isSandboxCommandExecutionEvent_Event interface { + isSandboxCommandExecutionEvent_Event() } -type CommandEvent_Started_ struct { - Started *CommandEvent_Started `protobuf:"bytes,1,opt,name=started,proto3,oneof"` +type SandboxCommandExecutionEvent_Started_ struct { + Started *SandboxCommandExecutionEvent_Started `protobuf:"bytes,1,opt,name=started,proto3,oneof"` } -type CommandEvent_Stdout struct { - Stdout *CommandEvent_StdoutBytes `protobuf:"bytes,2,opt,name=stdout,proto3,oneof"` +type SandboxCommandExecutionEvent_Stdout struct { + Stdout *SandboxCommandExecutionEvent_StdoutBytes `protobuf:"bytes,2,opt,name=stdout,proto3,oneof"` } -type CommandEvent_Stderr struct { - Stderr *CommandEvent_StderrBytes `protobuf:"bytes,3,opt,name=stderr,proto3,oneof"` +type SandboxCommandExecutionEvent_Stderr struct { + Stderr *SandboxCommandExecutionEvent_StderrBytes `protobuf:"bytes,3,opt,name=stderr,proto3,oneof"` } -type CommandEvent_Finished_ struct { - Finished *CommandEvent_Finished `protobuf:"bytes,4,opt,name=finished,proto3,oneof"` +type SandboxCommandExecutionEvent_Finished_ struct { + Finished *SandboxCommandExecutionEvent_Finished `protobuf:"bytes,4,opt,name=finished,proto3,oneof"` } -type CommandEvent_Error_ struct { - Error *CommandEvent_Error `protobuf:"bytes,5,opt,name=error,proto3,oneof"` +type SandboxCommandExecutionEvent_Error_ struct { + Error *SandboxCommandExecutionEvent_Error `protobuf:"bytes,5,opt,name=error,proto3,oneof"` } -type CommandEvent_Evicted struct { - Evicted *CommandEvent_EvictedEarlyData `protobuf:"bytes,6,opt,name=evicted,proto3,oneof"` +type SandboxCommandExecutionEvent_Evicted struct { + Evicted *SandboxCommandExecutionEvent_EvictedEarlyData `protobuf:"bytes,6,opt,name=evicted,proto3,oneof"` } -func (*CommandEvent_Started_) isCommandEvent_Event() {} +func (*SandboxCommandExecutionEvent_Started_) isSandboxCommandExecutionEvent_Event() {} -func (*CommandEvent_Stdout) isCommandEvent_Event() {} +func (*SandboxCommandExecutionEvent_Stdout) isSandboxCommandExecutionEvent_Event() {} -func (*CommandEvent_Stderr) isCommandEvent_Event() {} +func (*SandboxCommandExecutionEvent_Stderr) isSandboxCommandExecutionEvent_Event() {} -func (*CommandEvent_Finished_) isCommandEvent_Event() {} +func (*SandboxCommandExecutionEvent_Finished_) isSandboxCommandExecutionEvent_Event() {} -func (*CommandEvent_Error_) isCommandEvent_Event() {} +func (*SandboxCommandExecutionEvent_Error_) isSandboxCommandExecutionEvent_Event() {} -func (*CommandEvent_Evicted) isCommandEvent_Event() {} +func (*SandboxCommandExecutionEvent_Evicted) isSandboxCommandExecutionEvent_Event() {} // RunCommand — DEP-4517. Server-streaming RPC; the response stream is a // sequence of CommandEvents starting with Started and ending with Finished @@ -592,7 +592,7 @@ type GetCommandResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Command *Command `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` + Command *SandboxCommandExecution `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` } func (x *GetCommandResponse) Reset() { @@ -627,7 +627,7 @@ func (*GetCommandResponse) Descriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{4} } -func (x *GetCommandResponse) GetCommand() *Command { +func (x *GetCommandResponse) GetCommand() *SandboxCommandExecution { if x != nil { return x.Command } @@ -647,8 +647,8 @@ type ListCommandsRequest struct { PageSize *int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` PageToken *string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` // If non-empty, only commands whose status is in this set are returned. - // UNSPECIFIED entries are ignored. The full CommandStatus enum is accepted. - StatusFilter []CommandStatus `protobuf:"varint,4,rep,packed,name=status_filter,json=statusFilter,proto3,enum=depot.sandbox.v1.CommandStatus" json:"status_filter,omitempty"` + // UNSPECIFIED entries are ignored. The full SandboxCommandExecutionStatus enum is accepted. + 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() { @@ -704,7 +704,7 @@ func (x *ListCommandsRequest) GetPageToken() string { return "" } -func (x *ListCommandsRequest) GetStatusFilter() []CommandStatus { +func (x *ListCommandsRequest) GetStatusFilter() []SandboxCommandExecutionStatus { if x != nil { return x.StatusFilter } @@ -716,8 +716,8 @@ type ListCommandsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Commands []*Command `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` - NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` + Commands []*SandboxCommandExecution `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` } func (x *ListCommandsResponse) Reset() { @@ -752,7 +752,7 @@ func (*ListCommandsResponse) Descriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{6} } -func (x *ListCommandsResponse) GetCommands() []*Command { +func (x *ListCommandsResponse) GetCommands() []*SandboxCommandExecution { if x != nil { return x.Commands } @@ -767,12 +767,12 @@ func (x *ListCommandsResponse) GetNextPageToken() string { } // AttachCommand re-subscribes to the output of a previously-issued -// RunCommand / RunCommandPipe. The response stream is the same CommandEvent +// RunCommand / RunCommandPipe. The response stream is the same SandboxCommandExecutionEvent // sequence those RPCs emit live: replay of persisted Stdout/Stderr chunks // followed (if the command is still running on the same replica) by live tail. // // Sandbox-level authz: cmd_id is resolved to its sandbox_id server-side, then -// the standard sandbox-row org check applies. CommandRef carries only the +// the standard sandbox-row org check applies. SandboxCommandExecutionRef carries only the // cmd_id today (refs.proto's selector pattern); a future sandbox-qualified // selector form can be added without a wire break. type AttachCommandRequest struct { @@ -780,7 +780,7 @@ type AttachCommandRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Command *CommandRef `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` + Command *SandboxCommandExecutionRef `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` // Per-stream WATERMARK: replay events whose byte_offset is STRICTLY GREATER // than the supplied offset. The wire field byte_offset is end-of-chunk // (cumulative bytes through the END of `data`), so a caller that replayed @@ -822,7 +822,7 @@ func (*AttachCommandRequest) Descriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{7} } -func (x *AttachCommandRequest) GetCommand() *CommandRef { +func (x *AttachCommandRequest) GetCommand() *SandboxCommandExecutionRef { if x != nil { return x.Command } @@ -998,7 +998,7 @@ func (*KillCommandResponse) Descriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{10} } -type CommandEvent_Started struct { +type SandboxCommandExecutionEvent_Started struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1007,8 +1007,8 @@ type CommandEvent_Started struct { StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` } -func (x *CommandEvent_Started) Reset() { - *x = CommandEvent_Started{} +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)) @@ -1016,13 +1016,13 @@ func (x *CommandEvent_Started) Reset() { } } -func (x *CommandEvent_Started) String() string { +func (x *SandboxCommandExecutionEvent_Started) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandEvent_Started) ProtoMessage() {} +func (*SandboxCommandExecutionEvent_Started) ProtoMessage() {} -func (x *CommandEvent_Started) ProtoReflect() protoreflect.Message { +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)) @@ -1034,26 +1034,26 @@ func (x *CommandEvent_Started) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandEvent_Started.ProtoReflect.Descriptor instead. -func (*CommandEvent_Started) Descriptor() ([]byte, []int) { +// 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 *CommandEvent_Started) GetCmdId() string { +func (x *SandboxCommandExecutionEvent_Started) GetCmdId() string { if x != nil { return x.CmdId } return "" } -func (x *CommandEvent_Started) GetStartedAt() *timestamppb.Timestamp { +func (x *SandboxCommandExecutionEvent_Started) GetStartedAt() *timestamppb.Timestamp { if x != nil { return x.StartedAt } return nil } -type CommandEvent_StdoutBytes struct { +type SandboxCommandExecutionEvent_StdoutBytes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1064,8 +1064,8 @@ type CommandEvent_StdoutBytes struct { Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } -func (x *CommandEvent_StdoutBytes) Reset() { - *x = CommandEvent_StdoutBytes{} +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)) @@ -1073,13 +1073,13 @@ func (x *CommandEvent_StdoutBytes) Reset() { } } -func (x *CommandEvent_StdoutBytes) String() string { +func (x *SandboxCommandExecutionEvent_StdoutBytes) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandEvent_StdoutBytes) ProtoMessage() {} +func (*SandboxCommandExecutionEvent_StdoutBytes) ProtoMessage() {} -func (x *CommandEvent_StdoutBytes) ProtoReflect() protoreflect.Message { +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)) @@ -1091,33 +1091,33 @@ func (x *CommandEvent_StdoutBytes) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandEvent_StdoutBytes.ProtoReflect.Descriptor instead. -func (*CommandEvent_StdoutBytes) Descriptor() ([]byte, []int) { +// 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 *CommandEvent_StdoutBytes) GetData() []byte { +func (x *SandboxCommandExecutionEvent_StdoutBytes) GetData() []byte { if x != nil { return x.Data } return nil } -func (x *CommandEvent_StdoutBytes) GetByteOffset() int64 { +func (x *SandboxCommandExecutionEvent_StdoutBytes) GetByteOffset() int64 { if x != nil { return x.ByteOffset } return 0 } -func (x *CommandEvent_StdoutBytes) GetTimestamp() *timestamppb.Timestamp { +func (x *SandboxCommandExecutionEvent_StdoutBytes) GetTimestamp() *timestamppb.Timestamp { if x != nil { return x.Timestamp } return nil } -type CommandEvent_StderrBytes struct { +type SandboxCommandExecutionEvent_StderrBytes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1127,8 +1127,8 @@ type CommandEvent_StderrBytes struct { Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } -func (x *CommandEvent_StderrBytes) Reset() { - *x = CommandEvent_StderrBytes{} +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)) @@ -1136,13 +1136,13 @@ func (x *CommandEvent_StderrBytes) Reset() { } } -func (x *CommandEvent_StderrBytes) String() string { +func (x *SandboxCommandExecutionEvent_StderrBytes) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandEvent_StderrBytes) ProtoMessage() {} +func (*SandboxCommandExecutionEvent_StderrBytes) ProtoMessage() {} -func (x *CommandEvent_StderrBytes) ProtoReflect() protoreflect.Message { +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)) @@ -1154,33 +1154,33 @@ func (x *CommandEvent_StderrBytes) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandEvent_StderrBytes.ProtoReflect.Descriptor instead. -func (*CommandEvent_StderrBytes) Descriptor() ([]byte, []int) { +// 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 *CommandEvent_StderrBytes) GetData() []byte { +func (x *SandboxCommandExecutionEvent_StderrBytes) GetData() []byte { if x != nil { return x.Data } return nil } -func (x *CommandEvent_StderrBytes) GetByteOffset() int64 { +func (x *SandboxCommandExecutionEvent_StderrBytes) GetByteOffset() int64 { if x != nil { return x.ByteOffset } return 0 } -func (x *CommandEvent_StderrBytes) GetTimestamp() *timestamppb.Timestamp { +func (x *SandboxCommandExecutionEvent_StderrBytes) GetTimestamp() *timestamppb.Timestamp { if x != nil { return x.Timestamp } return nil } -type CommandEvent_Finished struct { +type SandboxCommandExecutionEvent_Finished struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1189,8 +1189,8 @@ type CommandEvent_Finished struct { FinishedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` } -func (x *CommandEvent_Finished) Reset() { - *x = CommandEvent_Finished{} +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)) @@ -1198,13 +1198,13 @@ func (x *CommandEvent_Finished) Reset() { } } -func (x *CommandEvent_Finished) String() string { +func (x *SandboxCommandExecutionEvent_Finished) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandEvent_Finished) ProtoMessage() {} +func (*SandboxCommandExecutionEvent_Finished) ProtoMessage() {} -func (x *CommandEvent_Finished) ProtoReflect() protoreflect.Message { +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)) @@ -1216,19 +1216,19 @@ func (x *CommandEvent_Finished) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandEvent_Finished.ProtoReflect.Descriptor instead. -func (*CommandEvent_Finished) Descriptor() ([]byte, []int) { +// 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 *CommandEvent_Finished) GetExitCode() int32 { +func (x *SandboxCommandExecutionEvent_Finished) GetExitCode() int32 { if x != nil { return x.ExitCode } return 0 } -func (x *CommandEvent_Finished) GetFinishedAt() *timestamppb.Timestamp { +func (x *SandboxCommandExecutionEvent_Finished) GetFinishedAt() *timestamppb.Timestamp { if x != nil { return x.FinishedAt } @@ -1239,7 +1239,7 @@ func (x *CommandEvent_Finished) GetFinishedAt() *timestamppb.Timestamp { // but more coming). Connect errors remain the primary error channel; this // payload is for partial-degradation cases. Bare string for v0; structured // codes are a follow-on if call sites need to discriminate. -type CommandEvent_Error struct { +type SandboxCommandExecutionEvent_Error struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1247,8 +1247,8 @@ type CommandEvent_Error struct { Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` } -func (x *CommandEvent_Error) Reset() { - *x = CommandEvent_Error{} +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)) @@ -1256,13 +1256,13 @@ func (x *CommandEvent_Error) Reset() { } } -func (x *CommandEvent_Error) String() string { +func (x *SandboxCommandExecutionEvent_Error) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandEvent_Error) ProtoMessage() {} +func (*SandboxCommandExecutionEvent_Error) ProtoMessage() {} -func (x *CommandEvent_Error) ProtoReflect() protoreflect.Message { +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)) @@ -1274,12 +1274,12 @@ func (x *CommandEvent_Error) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandEvent_Error.ProtoReflect.Descriptor instead. -func (*CommandEvent_Error) Descriptor() ([]byte, []int) { +// 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 *CommandEvent_Error) GetReason() string { +func (x *SandboxCommandExecutionEvent_Error) GetReason() string { if x != nil { return x.Reason } @@ -1289,7 +1289,7 @@ func (x *CommandEvent_Error) GetReason() string { // K-Streaming evicted head data before this consumer subscribed. Carries the // per-stream byte counts that were dropped so the consumer can reason about // the gap. Architecture §10. -type CommandEvent_EvictedEarlyData struct { +type SandboxCommandExecutionEvent_EvictedEarlyData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1298,8 +1298,8 @@ type CommandEvent_EvictedEarlyData struct { DroppedBytesStderr int64 `protobuf:"varint,2,opt,name=dropped_bytes_stderr,json=droppedBytesStderr,proto3" json:"dropped_bytes_stderr,omitempty"` } -func (x *CommandEvent_EvictedEarlyData) Reset() { - *x = CommandEvent_EvictedEarlyData{} +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)) @@ -1307,13 +1307,13 @@ func (x *CommandEvent_EvictedEarlyData) Reset() { } } -func (x *CommandEvent_EvictedEarlyData) String() string { +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandEvent_EvictedEarlyData) ProtoMessage() {} +func (*SandboxCommandExecutionEvent_EvictedEarlyData) ProtoMessage() {} -func (x *CommandEvent_EvictedEarlyData) ProtoReflect() protoreflect.Message { +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)) @@ -1325,19 +1325,19 @@ func (x *CommandEvent_EvictedEarlyData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandEvent_EvictedEarlyData.ProtoReflect.Descriptor instead. -func (*CommandEvent_EvictedEarlyData) Descriptor() ([]byte, []int) { +// 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 *CommandEvent_EvictedEarlyData) GetDroppedBytesStdout() int64 { +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) GetDroppedBytesStdout() int64 { if x != nil { return x.DroppedBytesStdout } return 0 } -func (x *CommandEvent_EvictedEarlyData) GetDroppedBytesStderr() int64 { +func (x *SandboxCommandExecutionEvent_EvictedEarlyData) GetDroppedBytesStderr() int64 { if x != nil { return x.DroppedBytesStderr } @@ -1354,7 +1354,8 @@ var file_depot_sandbox_v1_command_proto_rawDesc = []byte{ 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, 0xfc, 0x04, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x15, 0x0a, 0x06, + 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, @@ -1362,15 +1363,17 @@ var file_depot_sandbox_v1_command_proto_rawDesc = []byte{ 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, - 0x34, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, + 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, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, + 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, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, - 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 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, @@ -1394,32 +1397,39 @@ var file_depot_sandbox_v1_command_proto_rawDesc = []byte{ 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, - 0x91, 0x08, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x42, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, + 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, 0x44, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, - 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, + 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, 0x44, 0x0a, 0x06, 0x73, 0x74, - 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x65, 0x70, - 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x64, 0x65, 0x72, + 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, 0x45, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, - 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, + 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, 0x3c, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4b, 0x0a, 0x07, 0x65, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, 0x45, 0x61, + 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, @@ -1488,12 +1498,13 @@ var file_depot_sandbox_v1_command_proto_rawDesc = []byte{ 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, 0x49, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 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, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0xf6, - 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x52, + 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, @@ -1502,26 +1513,29 @@ var file_depot_sandbox_v1_command_proto_rawDesc = []byte{ 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, 0x44, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x64, 0x65, - 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x73, 0x74, + 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, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 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, 0x35, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, + 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, 0xa7, 0x01, 0x0a, 0x14, 0x41, 0x74, 0x74, + 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, 0x36, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, + 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, @@ -1543,31 +1557,39 @@ var file_depot_sandbox_v1_command_proto_rawDesc = []byte{ 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, 0xba, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4d, - 0x4d, 0x41, 0x4e, 0x44, 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, 0x43, 0x4f, 0x4d, - 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, - 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, - 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, - 0x4d, 0x41, 0x4e, 0x44, 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, + 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 ( @@ -1585,54 +1607,54 @@ func file_depot_sandbox_v1_command_proto_rawDescGZIP() []byte { 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{}{ - (CommandStatus)(0), // 0: depot.sandbox.v1.CommandStatus - (*Command)(nil), // 1: depot.sandbox.v1.Command - (*CommandEvent)(nil), // 2: depot.sandbox.v1.CommandEvent - (*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.Command.EnvEntry - (*CommandEvent_Started)(nil), // 13: depot.sandbox.v1.CommandEvent.Started - (*CommandEvent_StdoutBytes)(nil), // 14: depot.sandbox.v1.CommandEvent.StdoutBytes - (*CommandEvent_StderrBytes)(nil), // 15: depot.sandbox.v1.CommandEvent.StderrBytes - (*CommandEvent_Finished)(nil), // 16: depot.sandbox.v1.CommandEvent.Finished - (*CommandEvent_Error)(nil), // 17: depot.sandbox.v1.CommandEvent.Error - (*CommandEvent_EvictedEarlyData)(nil), // 18: depot.sandbox.v1.CommandEvent.EvictedEarlyData - nil, // 19: depot.sandbox.v1.RunCommandRequest.EnvEntry - (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp - (*SandboxRef)(nil), // 21: depot.sandbox.v1.SandboxRef - (*CommandRef)(nil), // 22: depot.sandbox.v1.CommandRef + (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.Command.env:type_name -> depot.sandbox.v1.Command.EnvEntry - 0, // 1: depot.sandbox.v1.Command.status:type_name -> depot.sandbox.v1.CommandStatus - 20, // 2: depot.sandbox.v1.Command.started_at:type_name -> google.protobuf.Timestamp - 20, // 3: depot.sandbox.v1.Command.finished_at:type_name -> google.protobuf.Timestamp - 13, // 4: depot.sandbox.v1.CommandEvent.started:type_name -> depot.sandbox.v1.CommandEvent.Started - 14, // 5: depot.sandbox.v1.CommandEvent.stdout:type_name -> depot.sandbox.v1.CommandEvent.StdoutBytes - 15, // 6: depot.sandbox.v1.CommandEvent.stderr:type_name -> depot.sandbox.v1.CommandEvent.StderrBytes - 16, // 7: depot.sandbox.v1.CommandEvent.finished:type_name -> depot.sandbox.v1.CommandEvent.Finished - 17, // 8: depot.sandbox.v1.CommandEvent.error:type_name -> depot.sandbox.v1.CommandEvent.Error - 18, // 9: depot.sandbox.v1.CommandEvent.evicted:type_name -> depot.sandbox.v1.CommandEvent.EvictedEarlyData + 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.Command + 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.CommandStatus - 1, // 16: depot.sandbox.v1.ListCommandsResponse.commands:type_name -> depot.sandbox.v1.Command - 22, // 17: depot.sandbox.v1.AttachCommandRequest.command:type_name -> depot.sandbox.v1.CommandRef + 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.CommandEvent.Started.started_at:type_name -> google.protobuf.Timestamp - 20, // 20: depot.sandbox.v1.CommandEvent.StdoutBytes.timestamp:type_name -> google.protobuf.Timestamp - 20, // 21: depot.sandbox.v1.CommandEvent.StderrBytes.timestamp:type_name -> google.protobuf.Timestamp - 20, // 22: depot.sandbox.v1.CommandEvent.Finished.finished_at:type_name -> google.protobuf.Timestamp + 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 @@ -1648,7 +1670,7 @@ func file_depot_sandbox_v1_command_proto_init() { 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.(*Command); i { + switch v := v.(*SandboxCommandExecution); i { case 0: return &v.state case 1: @@ -1660,7 +1682,7 @@ func file_depot_sandbox_v1_command_proto_init() { } } file_depot_sandbox_v1_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent); i { + switch v := v.(*SandboxCommandExecutionEvent); i { case 0: return &v.state case 1: @@ -1780,7 +1802,7 @@ func file_depot_sandbox_v1_command_proto_init() { } } file_depot_sandbox_v1_command_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent_Started); i { + switch v := v.(*SandboxCommandExecutionEvent_Started); i { case 0: return &v.state case 1: @@ -1792,7 +1814,7 @@ func file_depot_sandbox_v1_command_proto_init() { } } file_depot_sandbox_v1_command_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent_StdoutBytes); i { + switch v := v.(*SandboxCommandExecutionEvent_StdoutBytes); i { case 0: return &v.state case 1: @@ -1804,7 +1826,7 @@ func file_depot_sandbox_v1_command_proto_init() { } } file_depot_sandbox_v1_command_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent_StderrBytes); i { + switch v := v.(*SandboxCommandExecutionEvent_StderrBytes); i { case 0: return &v.state case 1: @@ -1816,7 +1838,7 @@ func file_depot_sandbox_v1_command_proto_init() { } } file_depot_sandbox_v1_command_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent_Finished); i { + switch v := v.(*SandboxCommandExecutionEvent_Finished); i { case 0: return &v.state case 1: @@ -1828,7 +1850,7 @@ func file_depot_sandbox_v1_command_proto_init() { } } file_depot_sandbox_v1_command_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent_Error); i { + switch v := v.(*SandboxCommandExecutionEvent_Error); i { case 0: return &v.state case 1: @@ -1840,7 +1862,7 @@ func file_depot_sandbox_v1_command_proto_init() { } } file_depot_sandbox_v1_command_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent_EvictedEarlyData); i { + switch v := v.(*SandboxCommandExecutionEvent_EvictedEarlyData); i { case 0: return &v.state case 1: @@ -1854,12 +1876,12 @@ func file_depot_sandbox_v1_command_proto_init() { } file_depot_sandbox_v1_command_proto_msgTypes[0].OneofWrappers = []interface{}{} file_depot_sandbox_v1_command_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*CommandEvent_Started_)(nil), - (*CommandEvent_Stdout)(nil), - (*CommandEvent_Stderr)(nil), - (*CommandEvent_Finished_)(nil), - (*CommandEvent_Error_)(nil), - (*CommandEvent_Evicted)(nil), + (*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{}{ diff --git a/pkg/proto/depot/sandbox/v1/hook.pb.go b/pkg/proto/depot/sandbox/v1/hook.pb.go index 904c4a86..a84e3578 100644 --- a/pkg/proto/depot/sandbox/v1/hook.pb.go +++ b/pkg/proto/depot/sandbox/v1/hook.pb.go @@ -182,7 +182,7 @@ func (x *HookSpec) GetTimeoutSeconds() int32 { } // RunHookRequest — DEP-4534 / P23. Server-streaming response is the same -// CommandEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> +// SandboxCommandExecutionEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> // Finished. Detached hooks (hook.detach=true) emit only Started + // Finished{exit_code=0} on the wire; the actual hook output lands in // /var/log/depot/hook--.log inside the sandbox (architecture diff --git a/pkg/proto/depot/sandbox/v1/logs.pb.go b/pkg/proto/depot/sandbox/v1/logs.pb.go index c65d35f2..dd3dcd84 100644 --- a/pkg/proto/depot/sandbox/v1/logs.pb.go +++ b/pkg/proto/depot/sandbox/v1/logs.pb.go @@ -27,7 +27,7 @@ const ( // // EvictedEarlyData fires when the K-Streaming ring (architecture §10) had to // drop head data before this consumer subscribed — analogous to -// CommandEvent.EvictedEarlyData. The dropped-bytes counter is single-rail +// SandboxCommandExecutionEvent.EvictedEarlyData. The dropped-bytes counter is single-rail // here (no per-stream split) because the boot-output buffer is keyed by // arrival across both stdout/stderr. type SandboxLogEvent struct { @@ -220,7 +220,7 @@ type SandboxLogEvent_BootStdout struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Cumulative byte index for the stdout rail as of the END of `data` - // (end-of-chunk semantics, mirroring CommandEvent.StdoutBytes.byte_offset + // (end-of-chunk semantics, mirroring SandboxCommandExecutionEvent.StdoutBytes.byte_offset // from command.proto). Useful for consumers that want to dedup across // resubscribes that they themselves coordinate at the byte rail; the // server-side replay watermark is the request's `since_offset`, which diff --git a/pkg/proto/depot/sandbox/v1/refs.pb.go b/pkg/proto/depot/sandbox/v1/refs.pb.go index a8f3293b..2777c9d2 100644 --- a/pkg/proto/depot/sandbox/v1/refs.pb.go +++ b/pkg/proto/depot/sandbox/v1/refs.pb.go @@ -87,19 +87,19 @@ type SandboxRef_Id struct { func (*SandboxRef_Id) isSandboxRef_Selector() {} -type CommandRef struct { +type SandboxCommandExecutionRef struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Selector: // - // *CommandRef_Id - Selector isCommandRef_Selector `protobuf_oneof:"selector"` + // *SandboxCommandExecutionRef_Id + Selector isSandboxCommandExecutionRef_Selector `protobuf_oneof:"selector"` } -func (x *CommandRef) Reset() { - *x = CommandRef{} +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)) @@ -107,13 +107,13 @@ func (x *CommandRef) Reset() { } } -func (x *CommandRef) String() string { +func (x *SandboxCommandExecutionRef) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandRef) ProtoMessage() {} +func (*SandboxCommandExecutionRef) ProtoMessage() {} -func (x *CommandRef) ProtoReflect() protoreflect.Message { +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)) @@ -125,34 +125,34 @@ func (x *CommandRef) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandRef.ProtoReflect.Descriptor instead. -func (*CommandRef) Descriptor() ([]byte, []int) { +// Deprecated: Use SandboxCommandExecutionRef.ProtoReflect.Descriptor instead. +func (*SandboxCommandExecutionRef) Descriptor() ([]byte, []int) { return file_depot_sandbox_v1_refs_proto_rawDescGZIP(), []int{1} } -func (m *CommandRef) GetSelector() isCommandRef_Selector { +func (m *SandboxCommandExecutionRef) GetSelector() isSandboxCommandExecutionRef_Selector { if m != nil { return m.Selector } return nil } -func (x *CommandRef) GetId() string { - if x, ok := x.GetSelector().(*CommandRef_Id); ok { +func (x *SandboxCommandExecutionRef) GetId() string { + if x, ok := x.GetSelector().(*SandboxCommandExecutionRef_Id); ok { return x.Id } return "" } -type isCommandRef_Selector interface { - isCommandRef_Selector() +type isSandboxCommandExecutionRef_Selector interface { + isSandboxCommandExecutionRef_Selector() } -type CommandRef_Id struct { +type SandboxCommandExecutionRef_Id struct { Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` } -func (*CommandRef_Id) isCommandRef_Selector() {} +func (*SandboxCommandExecutionRef_Id) isSandboxCommandExecutionRef_Selector() {} type SnapshotRef struct { state protoimpl.MessageState @@ -229,8 +229,9 @@ var file_depot_sandbox_v1_refs_proto_rawDesc = []byte{ 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, 0x2a, 0x0a, 0x0a, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, + 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, @@ -264,9 +265,9 @@ func file_depot_sandbox_v1_refs_proto_rawDescGZIP() []byte { 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 - (*CommandRef)(nil), // 1: depot.sandbox.v1.CommandRef - (*SnapshotRef)(nil), // 2: depot.sandbox.v1.SnapshotRef + (*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 @@ -295,7 +296,7 @@ func file_depot_sandbox_v1_refs_proto_init() { } } file_depot_sandbox_v1_refs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandRef); i { + switch v := v.(*SandboxCommandExecutionRef); i { case 0: return &v.state case 1: @@ -323,7 +324,7 @@ func file_depot_sandbox_v1_refs_proto_init() { (*SandboxRef_Id)(nil), } file_depot_sandbox_v1_refs_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*CommandRef_Id)(nil), + (*SandboxCommandExecutionRef_Id)(nil), } file_depot_sandbox_v1_refs_proto_msgTypes[2].OneofWrappers = []interface{}{ (*SnapshotRef_Id)(nil), diff --git a/pkg/proto/depot/sandbox/v1/sandbox.pb.go b/pkg/proto/depot/sandbox/v1/sandbox.pb.go index e9cf01cb..71633765 100644 --- a/pkg/proto/depot/sandbox/v1/sandbox.pb.go +++ b/pkg/proto/depot/sandbox/v1/sandbox.pb.go @@ -1192,7 +1192,7 @@ var file_depot_sandbox_v1_sandbox_proto_rawDesc = []byte{ 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, 0xd6, 0x15, 0x0a, 0x0e, 0x53, 0x61, 0x6e, + 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, @@ -1222,26 +1222,30 @@ var file_depot_sandbox_v1_sandbox_proto_rawDesc = []byte{ 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, 0x53, 0x0a, 0x0a, 0x52, 0x75, 0x6e, + 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, 0x1e, 0x2e, 0x64, + 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, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x5d, + 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, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, - 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4d, 0x0a, + 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, 0x1e, 0x2e, 0x64, 0x65, 0x70, - 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x50, 0x0a, 0x0a, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x64, 0x65, 0x70, - 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 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, @@ -1249,13 +1253,14 @@ var file_depot_sandbox_v1_sandbox_proto_rawDesc = []byte{ 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, 0x59, 0x0a, + 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, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x64, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, + 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, @@ -1396,76 +1401,76 @@ func file_depot_sandbox_v1_sandbox_proto_rawDescGZIP() []byte { 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 - (*CommandRef)(nil), // 22: depot.sandbox.v1.CommandRef - (*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 - (*CommandEvent)(nil), // 46: depot.sandbox.v1.CommandEvent - (*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 + (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 @@ -1499,7 +1504,7 @@ var file_depot_sandbox_v1_sandbox_proto_depIdxs = []int32{ 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.CommandRef + 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 @@ -1528,12 +1533,12 @@ var file_depot_sandbox_v1_sandbox_proto_depIdxs = []int32{ 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.CommandEvent - 46, // 61: depot.sandbox.v1.SandboxService.RunCommandPipe:output_type -> depot.sandbox.v1.CommandEvent - 46, // 62: depot.sandbox.v1.SandboxService.RunHook:output_type -> depot.sandbox.v1.CommandEvent + 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.CommandEvent + 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 diff --git a/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go b/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go index 448a861d..4dd5a79a 100644 --- a/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go +++ b/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go @@ -131,12 +131,12 @@ type SandboxServiceClient interface { // error). Persistence + the K-Streaming buffered-event-log + the vm3 // Execute proxy land with the next two slices (P10b/P10c); this RPC is // wire-reachable today but returns Unimplemented until those land. - RunCommand(context.Context, *connect.Request[v1.RunCommandRequest]) (*connect.ServerStreamForClient[v1.CommandEvent], error) + RunCommand(context.Context, *connect.Request[v1.RunCommandRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) // DEP-4519 — bidirectional-streaming command execution with stdin. The // first request on the stream MUST carry `init`; subsequent requests carry // `stdin` bytes. The response stream shape is identical to RunCommand. // stdin bytes flow through to the guest process and are NOT persisted. - RunCommandPipe(context.Context) *connect.BidiStreamForClient[v1.RunCommandPipeRequest, v1.CommandEvent] + RunCommandPipe(context.Context) *connect.BidiStreamForClient[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent] // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator // (P25b). NOT exposed as an SDK method. Wraps the hook command in @@ -146,14 +146,14 @@ type SandboxServiceClient interface { // /var/log/depot/hook--.log (detached). Stage label is // metadata-only — execution shape does NOT vary across the six HookStage // values. Architecture §12. Spec Cluster INTERIOR step 2/5. - RunHook(context.Context, *connect.Request[v1.RunHookRequest]) (*connect.ServerStreamForClient[v1.CommandEvent], error) - // DEP-4520 — read side of the Command surface. Get and List return persisted + RunHook(context.Context, *connect.Request[v1.RunHookRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) + // DEP-4520 — read side of the SandboxCommandExecution surface. Get and List return persisted // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when // the command is still running on the same replica) tails live output via // the process-local per-cmd BufferedEventLog. - GetCommand(context.Context, *connect.Request[v1.CommandRef]) (*connect.Response[v1.GetCommandResponse], error) + 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.CommandEvent], error) + AttachCommand(context.Context, *connect.Request[v1.AttachCommandRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits // SandboxLogEvent messages to the subscriber. v0 emits the four @@ -244,22 +244,22 @@ func NewSandboxServiceClient(httpClient connect.HTTPClient, baseURL string, opts baseURL+SandboxServiceKillSandboxProcedure, opts..., ), - runCommand: connect.NewClient[v1.RunCommandRequest, v1.CommandEvent]( + runCommand: connect.NewClient[v1.RunCommandRequest, v1.SandboxCommandExecutionEvent]( httpClient, baseURL+SandboxServiceRunCommandProcedure, opts..., ), - runCommandPipe: connect.NewClient[v1.RunCommandPipeRequest, v1.CommandEvent]( + runCommandPipe: connect.NewClient[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent]( httpClient, baseURL+SandboxServiceRunCommandPipeProcedure, opts..., ), - runHook: connect.NewClient[v1.RunHookRequest, v1.CommandEvent]( + runHook: connect.NewClient[v1.RunHookRequest, v1.SandboxCommandExecutionEvent]( httpClient, baseURL+SandboxServiceRunHookProcedure, opts..., ), - getCommand: connect.NewClient[v1.CommandRef, v1.GetCommandResponse]( + getCommand: connect.NewClient[v1.SandboxCommandExecutionRef, v1.GetCommandResponse]( httpClient, baseURL+SandboxServiceGetCommandProcedure, opts..., @@ -269,7 +269,7 @@ func NewSandboxServiceClient(httpClient connect.HTTPClient, baseURL string, opts baseURL+SandboxServiceListCommandsProcedure, opts..., ), - attachCommand: connect.NewClient[v1.AttachCommandRequest, v1.CommandEvent]( + attachCommand: connect.NewClient[v1.AttachCommandRequest, v1.SandboxCommandExecutionEvent]( httpClient, baseURL+SandboxServiceAttachCommandProcedure, opts..., @@ -389,12 +389,12 @@ type sandboxServiceClient struct { 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.CommandEvent] - runCommandPipe *connect.Client[v1.RunCommandPipeRequest, v1.CommandEvent] - runHook *connect.Client[v1.RunHookRequest, v1.CommandEvent] - getCommand *connect.Client[v1.CommandRef, v1.GetCommandResponse] + 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.CommandEvent] + 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] @@ -444,22 +444,22 @@ func (c *sandboxServiceClient) KillSandbox(ctx context.Context, req *connect.Req } // RunCommand calls depot.sandbox.v1.SandboxService.RunCommand. -func (c *sandboxServiceClient) RunCommand(ctx context.Context, req *connect.Request[v1.RunCommandRequest]) (*connect.ServerStreamForClient[v1.CommandEvent], error) { +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.CommandEvent] { +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.CommandEvent], error) { +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.CommandRef]) (*connect.Response[v1.GetCommandResponse], error) { +func (c *sandboxServiceClient) GetCommand(ctx context.Context, req *connect.Request[v1.SandboxCommandExecutionRef]) (*connect.Response[v1.GetCommandResponse], error) { return c.getCommand.CallUnary(ctx, req) } @@ -469,7 +469,7 @@ func (c *sandboxServiceClient) ListCommands(ctx context.Context, req *connect.Re } // AttachCommand calls depot.sandbox.v1.SandboxService.AttachCommand. -func (c *sandboxServiceClient) AttachCommand(ctx context.Context, req *connect.Request[v1.AttachCommandRequest]) (*connect.ServerStreamForClient[v1.CommandEvent], error) { +func (c *sandboxServiceClient) AttachCommand(ctx context.Context, req *connect.Request[v1.AttachCommandRequest]) (*connect.ServerStreamForClient[v1.SandboxCommandExecutionEvent], error) { return c.attachCommand.CallServerStream(ctx, req) } @@ -593,12 +593,12 @@ type SandboxServiceHandler interface { // error). Persistence + the K-Streaming buffered-event-log + the vm3 // Execute proxy land with the next two slices (P10b/P10c); this RPC is // wire-reachable today but returns Unimplemented until those land. - RunCommand(context.Context, *connect.Request[v1.RunCommandRequest], *connect.ServerStream[v1.CommandEvent]) error + RunCommand(context.Context, *connect.Request[v1.RunCommandRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error // DEP-4519 — bidirectional-streaming command execution with stdin. The // first request on the stream MUST carry `init`; subsequent requests carry // `stdin` bytes. The response stream shape is identical to RunCommand. // stdin bytes flow through to the guest process and are NOT persisted. - RunCommandPipe(context.Context, *connect.BidiStream[v1.RunCommandPipeRequest, v1.CommandEvent]) error + RunCommandPipe(context.Context, *connect.BidiStream[v1.RunCommandPipeRequest, v1.SandboxCommandExecutionEvent]) error // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator // (P25b). NOT exposed as an SDK method. Wraps the hook command in @@ -608,14 +608,14 @@ type SandboxServiceHandler interface { // /var/log/depot/hook--.log (detached). Stage label is // metadata-only — execution shape does NOT vary across the six HookStage // values. Architecture §12. Spec Cluster INTERIOR step 2/5. - RunHook(context.Context, *connect.Request[v1.RunHookRequest], *connect.ServerStream[v1.CommandEvent]) error - // DEP-4520 — read side of the Command surface. Get and List return persisted + RunHook(context.Context, *connect.Request[v1.RunHookRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error + // DEP-4520 — read side of the SandboxCommandExecution surface. Get and List return persisted // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when // the command is still running on the same replica) tails live output via // the process-local per-cmd BufferedEventLog. - GetCommand(context.Context, *connect.Request[v1.CommandRef]) (*connect.Response[v1.GetCommandResponse], error) + 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.CommandEvent]) error + AttachCommand(context.Context, *connect.Request[v1.AttachCommandRequest], *connect.ServerStream[v1.SandboxCommandExecutionEvent]) error // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits // SandboxLogEvent messages to the subscriber. v0 emits the four @@ -932,19 +932,19 @@ func (UnimplementedSandboxServiceHandler) KillSandbox(context.Context, *connect. 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.CommandEvent]) error { +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.CommandEvent]) error { +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.CommandEvent]) error { +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.CommandRef]) (*connect.Response[v1.GetCommandResponse], error) { +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")) } @@ -952,7 +952,7 @@ func (UnimplementedSandboxServiceHandler) ListCommands(context.Context, *connect 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.CommandEvent]) error { +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")) } diff --git a/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go b/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go index 6956ba7e..9584fc32 100644 --- a/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go +++ b/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go @@ -352,9 +352,9 @@ type CreateSandboxFromSpecEvent_HookEvent struct { 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 *CommandEvent `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` + 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() { @@ -403,7 +403,7 @@ func (x *CreateSandboxFromSpecEvent_HookEvent) GetHookName() string { return "" } -func (x *CreateSandboxFromSpecEvent_HookEvent) GetInner() *CommandEvent { +func (x *CreateSandboxFromSpecEvent_HookEvent) GetInner() *SandboxCommandExecutionEvent { if x != nil { return x.Inner } @@ -543,7 +543,7 @@ var file_depot_sandbox_v1_spec_rpc_proto_rawDesc = []byte{ 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, 0x84, 0x07, 0x0a, 0x1a, 0x43, 0x72, 0x65, + 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, @@ -571,15 +571,16 @@ var file_depot_sandbox_v1_spec_rpc_proto_rawDesc = []byte{ 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, 0x91, 0x01, 0x0a, 0x09, 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, + 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, 0x34, 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, + 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, @@ -650,7 +651,7 @@ var file_depot_sandbox_v1_spec_rpc_proto_goTypes = []interface{}{ (*SandboxSpec)(nil), // 8: depot.sandbox.v1.SandboxSpec (*Sandbox)(nil), // 9: depot.sandbox.v1.Sandbox (HookStage)(0), // 10: depot.sandbox.v1.HookStage - (*CommandEvent)(nil), // 11: depot.sandbox.v1.CommandEvent + (*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 @@ -661,7 +662,7 @@ var file_depot_sandbox_v1_spec_rpc_proto_depIdxs = []int32{ 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.CommandEvent + 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 diff --git a/proto/depot/sandbox/v1/command.proto b/proto/depot/sandbox/v1/command.proto index f4ae6c9d..66344136 100644 --- a/proto/depot/sandbox/v1/command.proto +++ b/proto/depot/sandbox/v1/command.proto @@ -5,7 +5,7 @@ package depot.sandbox.v1; import "depot/sandbox/v1/refs.proto"; import "google/protobuf/timestamp.proto"; -// Command surface for depot.sandbox.v1 (DEP-4517, DEP-4519, DEP-4520). +// SandboxCommandExecution surface for depot.sandbox.v1 (DEP-4517, DEP-4519, DEP-4520). // // RunCommand (DEP-4517) and RunCommandPipe (DEP-4519) shipped first. // GetCommand, ListCommands, and AttachCommand (DEP-4520) ship next. @@ -18,26 +18,26 @@ import "google/protobuf/timestamp.proto"; // Bytes-everywhere on the wire (DEP-4404): stdout/stderr chunks are `bytes`, // not `string`. UTF-8 decoding happens in the SDK adapter, not in the proto. -// CommandStatus mirrors the lifecycle stages a command transitions through. +// SandboxCommandExecutionStatus mirrors the lifecycle stages a command transitions through. // // PENDING: queued, not yet started in the guest. // RUNNING: started; bytes can be streaming. // FINISHED: process exited; exit_code populated. // FAILED: process never started, or the guest reported an error path. // KILLED: signaled mid-run (DEP-4522). -enum CommandStatus { - COMMAND_STATUS_UNSPECIFIED = 0; - COMMAND_STATUS_PENDING = 1; - COMMAND_STATUS_RUNNING = 2; - COMMAND_STATUS_FINISHED = 3; - COMMAND_STATUS_FAILED = 4; - COMMAND_STATUS_KILLED = 5; +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; } -// Command is the persisted metadata for a single RunCommand invocation. The +// SandboxCommandExecution is the persisted metadata for a single RunCommand invocation. The // row shape lives in src/sandbox/schema-additions.ts (CommandRow); this is its // wire projection. Populated by Get/List/Attach RPCs in follow-up slices. -message Command { +message SandboxCommandExecution { // Server-minted ULID. Architecture §7. string cmd_id = 1; string sandbox_id = 2; @@ -47,7 +47,7 @@ message Command { map env = 6; bool sudo = 7; bool detached = 8; - CommandStatus status = 9; + SandboxCommandExecutionStatus status = 9; google.protobuf.Timestamp started_at = 10; optional google.protobuf.Timestamp finished_at = 11; optional int32 exit_code = 12; @@ -56,14 +56,14 @@ message Command { int64 stderr_bytes_emitted = 14; } -// CommandEvent is the streamed event during RunCommand / RunCommandPipe / +// SandboxCommandExecutionEvent is the streamed event during RunCommand / RunCommandPipe / // AttachCommand. Bytes everywhere; the SDK decodes UTF-8 at the adapter layer. // // EvictedEarlyData fires only on reattach scenarios where the K-Streaming ring // (architecture §10) had to drop head data before the consumer subscribed. // It is part of the oneof from day one so the wire shape doesn't need a // reserved slot retrofit when the BufferedEventLog impl lands with P10b. -message CommandEvent { +message SandboxCommandExecutionEvent { oneof event { Started started = 1; StdoutBytes stdout = 2; @@ -153,7 +153,7 @@ message RunCommandPipeRequest { // by the caller's orgId, then enforces sandbox-level access on the resolved // sandbox row (api/CLAUDE.md authz convention). message GetCommandResponse { - Command command = 1; + SandboxCommandExecution command = 1; } // ListCommands enumerates commands within a single sandbox, newest first. @@ -165,25 +165,25 @@ message ListCommandsRequest { optional int32 page_size = 2; optional string page_token = 3; // If non-empty, only commands whose status is in this set are returned. - // UNSPECIFIED entries are ignored. The full CommandStatus enum is accepted. - repeated CommandStatus status_filter = 4; + // UNSPECIFIED entries are ignored. The full SandboxCommandExecutionStatus enum is accepted. + repeated SandboxCommandExecutionStatus status_filter = 4; } message ListCommandsResponse { - repeated Command commands = 1; + repeated SandboxCommandExecution commands = 1; optional string next_page_token = 2; } // AttachCommand re-subscribes to the output of a previously-issued -// RunCommand / RunCommandPipe. The response stream is the same CommandEvent +// RunCommand / RunCommandPipe. The response stream is the same SandboxCommandExecutionEvent // sequence those RPCs emit live: replay of persisted Stdout/Stderr chunks // followed (if the command is still running on the same replica) by live tail. // // Sandbox-level authz: cmd_id is resolved to its sandbox_id server-side, then -// the standard sandbox-row org check applies. CommandRef carries only the +// the standard sandbox-row org check applies. SandboxCommandExecutionRef carries only the // cmd_id today (refs.proto's selector pattern); a future sandbox-qualified // selector form can be added without a wire break. message AttachCommandRequest { - CommandRef command = 1; + SandboxCommandExecutionRef command = 1; // Per-stream WATERMARK: replay events whose byte_offset is STRICTLY GREATER // than the supplied offset. The wire field byte_offset is end-of-chunk // (cumulative bytes through the END of `data`), so a caller that replayed diff --git a/proto/depot/sandbox/v1/hook.proto b/proto/depot/sandbox/v1/hook.proto index a0637d48..c42bef70 100644 --- a/proto/depot/sandbox/v1/hook.proto +++ b/proto/depot/sandbox/v1/hook.proto @@ -51,7 +51,7 @@ enum HookStage { } // RunHookRequest — DEP-4534 / P23. Server-streaming response is the same -// CommandEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> +// SandboxCommandExecutionEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> // Finished. Detached hooks (hook.detach=true) emit only Started + // Finished{exit_code=0} on the wire; the actual hook output lands in // /var/log/depot/hook--.log inside the sandbox (architecture diff --git a/proto/depot/sandbox/v1/logs.proto b/proto/depot/sandbox/v1/logs.proto index 373ca475..203b5ee4 100644 --- a/proto/depot/sandbox/v1/logs.proto +++ b/proto/depot/sandbox/v1/logs.proto @@ -30,7 +30,7 @@ import "google/protobuf/timestamp.proto"; // // EvictedEarlyData fires when the K-Streaming ring (architecture §10) had to // drop head data before this consumer subscribed — analogous to -// CommandEvent.EvictedEarlyData. The dropped-bytes counter is single-rail +// SandboxCommandExecutionEvent.EvictedEarlyData. The dropped-bytes counter is single-rail // here (no per-stream split) because the boot-output buffer is keyed by // arrival across both stdout/stderr. message SandboxLogEvent { @@ -49,7 +49,7 @@ message SandboxLogEvent { message BootStdout { bytes data = 1; // Cumulative byte index for the stdout rail as of the END of `data` - // (end-of-chunk semantics, mirroring CommandEvent.StdoutBytes.byte_offset + // (end-of-chunk semantics, mirroring SandboxCommandExecutionEvent.StdoutBytes.byte_offset // from command.proto). Useful for consumers that want to dedup across // resubscribes that they themselves coordinate at the byte rail; the // server-side replay watermark is the request's `since_offset`, which diff --git a/proto/depot/sandbox/v1/refs.proto b/proto/depot/sandbox/v1/refs.proto index 6c217534..f537204f 100644 --- a/proto/depot/sandbox/v1/refs.proto +++ b/proto/depot/sandbox/v1/refs.proto @@ -20,7 +20,7 @@ message SandboxRef { } } -message CommandRef { +message SandboxCommandExecutionRef { oneof selector { string id = 1; } diff --git a/proto/depot/sandbox/v1/sandbox.proto b/proto/depot/sandbox/v1/sandbox.proto index 08cba38c..e61fa1ec 100644 --- a/proto/depot/sandbox/v1/sandbox.proto +++ b/proto/depot/sandbox/v1/sandbox.proto @@ -45,13 +45,13 @@ service SandboxService { // error). Persistence + the K-Streaming buffered-event-log + the vm3 // Execute proxy land with the next two slices (P10b/P10c); this RPC is // wire-reachable today but returns Unimplemented until those land. - rpc RunCommand(RunCommandRequest) returns (stream CommandEvent); + rpc RunCommand(RunCommandRequest) returns (stream SandboxCommandExecutionEvent); // DEP-4519 — bidirectional-streaming command execution with stdin. The // first request on the stream MUST carry `init`; subsequent requests carry // `stdin` bytes. The response stream shape is identical to RunCommand. // stdin bytes flow through to the guest process and are NOT persisted. - rpc RunCommandPipe(stream RunCommandPipeRequest) returns (stream CommandEvent); + rpc RunCommandPipe(stream RunCommandPipeRequest) returns (stream SandboxCommandExecutionEvent); // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator @@ -62,15 +62,15 @@ service SandboxService { // /var/log/depot/hook--.log (detached). Stage label is // metadata-only — execution shape does NOT vary across the six HookStage // values. Architecture §12. Spec Cluster INTERIOR step 2/5. - rpc RunHook(RunHookRequest) returns (stream CommandEvent); + rpc RunHook(RunHookRequest) returns (stream SandboxCommandExecutionEvent); - // DEP-4520 — read side of the Command surface. Get and List return persisted + // DEP-4520 — read side of the SandboxCommandExecution surface. Get and List return persisted // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when // the command is still running on the same replica) tails live output via // the process-local per-cmd BufferedEventLog. - rpc GetCommand(CommandRef) returns (GetCommandResponse); + rpc GetCommand(SandboxCommandExecutionRef) returns (GetCommandResponse); rpc ListCommands(ListCommandsRequest) returns (ListCommandsResponse); - rpc AttachCommand(AttachCommandRequest) returns (stream CommandEvent); + rpc AttachCommand(AttachCommandRequest) returns (stream SandboxCommandExecutionEvent); // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits @@ -132,7 +132,7 @@ service SandboxService { } // SandboxRef lives in refs.proto alongside the other cross-cutting selector -// messages (CommandRef, SnapshotRef). See the comment at the top of +// messages (SandboxCommandExecutionRef, SnapshotRef). See the comment at the top of // refs.proto for the selector-pattern rationale. // SandboxStatus is the lifecycle enum for a sandbox. diff --git a/proto/depot/sandbox/v1/spec_rpc.proto b/proto/depot/sandbox/v1/spec_rpc.proto index 04349b43..4bb973ed 100644 --- a/proto/depot/sandbox/v1/spec_rpc.proto +++ b/proto/depot/sandbox/v1/spec_rpc.proto @@ -64,7 +64,7 @@ message CreateSandboxFromSpecEvent { message HookEvent { HookStage stage = 1; string hook_name = 2; - CommandEvent inner = 3; + SandboxCommandExecutionEvent inner = 3; } message Done { From 024a0c71981214b0b9abab1577bf19e3300d32ef Mon Sep 17 00:00:00 2001 From: Rob Stolarz Date: Fri, 29 May 2026 10:16:21 -0700 Subject: [PATCH 4/7] sandbox/v1: reword proto and command comments as plain prose Rewrites the comments across the sandbox protos and the sandbox CLI commands so they explain the surface in full sentences rather than ticket IDs, milestone tags, and internal shorthand. Comments only; regenerated proto bindings pick up the new doc comments. DEP-4520 Co-Authored-By: Claude Opus 4.8 (1M context) --- pkg/cmd/sandbox/common_test.go | 6 +- pkg/cmd/sandbox/create.go | 11 +- pkg/cmd/sandbox/exec.go | 19 +- pkg/cmd/sandbox/hooks.go | 53 ++-- pkg/cmd/sandbox/sandbox.go | 17 +- pkg/cmd/sandbox/sandbox_test.go | 8 +- pkg/cmd/sandbox/stop.go | 17 +- pkg/proto/depot/sandbox/v1/command.pb.go | 256 ++++++++++-------- pkg/proto/depot/sandbox/v1/filesystem.pb.go | 83 +++--- pkg/proto/depot/sandbox/v1/hook.pb.go | 53 ++-- pkg/proto/depot/sandbox/v1/logs.pb.go | 64 ++--- pkg/proto/depot/sandbox/v1/pty.pb.go | 10 +- pkg/proto/depot/sandbox/v1/runtime.pb.go | 32 +-- pkg/proto/depot/sandbox/v1/sandbox.pb.go | 129 ++++----- .../v1/sandboxv1connect/sandbox.connect.go | 184 +++++-------- .../v1/sandboxv1connect/spec_rpc.connect.go | 23 +- pkg/proto/depot/sandbox/v1/snapshot.pb.go | 23 +- pkg/proto/depot/sandbox/v1/source.pb.go | 30 +- pkg/proto/depot/sandbox/v1/spec.pb.go | 72 +++-- pkg/proto/depot/sandbox/v1/spec_rpc.pb.go | 37 ++- proto/depot/sandbox/v1/command.proto | 216 ++++++++------- proto/depot/sandbox/v1/filesystem.proto | 87 +++--- proto/depot/sandbox/v1/hook.proto | 53 ++-- proto/depot/sandbox/v1/logs.proto | 92 +++---- proto/depot/sandbox/v1/pty.proto | 32 +-- proto/depot/sandbox/v1/refs.proto | 20 +- proto/depot/sandbox/v1/runtime.proto | 32 +-- proto/depot/sandbox/v1/sandbox.proto | 253 ++++++++--------- proto/depot/sandbox/v1/snapshot.proto | 23 +- proto/depot/sandbox/v1/source.proto | 35 +-- proto/depot/sandbox/v1/spec.proto | 87 +++--- proto/depot/sandbox/v1/spec_rpc.proto | 48 ++-- 32 files changed, 954 insertions(+), 1151 deletions(-) diff --git a/pkg/cmd/sandbox/common_test.go b/pkg/cmd/sandbox/common_test.go index 8ff74c44..68a51bba 100644 --- a/pkg/cmd/sandbox/common_test.go +++ b/pkg/cmd/sandbox/common_test.go @@ -6,9 +6,9 @@ import ( sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" ) -// Touch-test (D-M34-D): every on the v0 wire flows through -// sandboxRef(). Pin the wire shape so a future refactor can't silently -// regress to a bare string id without the oneof envelope. +// 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 { diff --git a/pkg/cmd/sandbox/create.go b/pkg/cmd/sandbox/create.go index 8f4a6a15..55bf4e68 100644 --- a/pkg/cmd/sandbox/create.go +++ b/pkg/cmd/sandbox/create.go @@ -9,13 +9,12 @@ import ( "github.com/spf13/cobra" ) -// newSandboxCreate wraps depot.sandbox.v1.SandboxService.CreateSandbox — the -// v0 customer-surface lifecycle entry point. Mirrors the @depot/sandbox TS -// SDK's `Sandbox.create({...})`: optional name + image ref, server-side -// defaults otherwise. +// 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. // -// For a declarative `sandbox.depot.yml`-driven flow, use `depot sandbox -// from-spec` (the M34 rename of `up`). +// For a declarative flow driven by a sandbox.depot.yml file, use +// `depot sandbox from-spec`. func newSandboxCreate() *cobra.Command { cmd := &cobra.Command{ Use: "create [flags]", diff --git a/pkg/cmd/sandbox/exec.go b/pkg/cmd/sandbox/exec.go index 3bf9ea62..3e4df93c 100644 --- a/pkg/cmd/sandbox/exec.go +++ b/pkg/cmd/sandbox/exec.go @@ -12,12 +12,11 @@ import ( "github.com/spf13/cobra" ) -// newSandboxExec wraps depot.sandbox.v1.SandboxService.RunCommand — execute -// one command in an existing sandbox and stream the CommandEvent rail. +// 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. // -// M34 retires the legacy --sess flag (D-M34-M) — sandboxv1 takes a SandboxRef only. -// M34 deprecates --timeout (MD-7); the flag is hidden + ignored, removed in a -// follow-on slice. +// 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] -- [args...]", @@ -78,8 +77,8 @@ parsing stops there.`, req.Detached = &detached } - // --timeout is deprecated (MD-7). Warn if anyone still sets it, - // but don't fail — the wire field is gone in v0. + // The --timeout flag is deprecated. Warn if it is still set, but + // do not fail, since the wire protocol no longer carries a timeout. 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)") } @@ -108,7 +107,7 @@ parsing stops there.`, cmd.Flags().StringArray("env", nil, "Environment variables to set (KEY=VALUE), repeatable") cmd.Flags().Bool("sudo", false, "Run as root") cmd.Flags().Bool("detached", false, "Return after Started; reattach later via AttachCommand") - // Deprecated — hidden + ignored. Removed in a follow-on slice (MD-7). + // 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") @@ -116,8 +115,8 @@ parsing stops there.`, return cmd } -// parseEnvSlice converts ["KEY=VALUE", ...] into a map; rejects entries with -// no '='. Shared by exec / exec-pipe / shell. +// 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 diff --git a/pkg/cmd/sandbox/hooks.go b/pkg/cmd/sandbox/hooks.go index cbd96afe..c5955d0e 100644 --- a/pkg/cmd/sandbox/hooks.go +++ b/pkg/cmd/sandbox/hooks.go @@ -16,13 +16,12 @@ import ( "github.com/spf13/cobra" ) -// hookWrapperScript is the shell stub that runs every CLI-side hook command -// (on.exec / on.shell / on.snapshot / on.down). The on.create / on.start -// stages run server-side now via CreateSandboxFromSpec's HookEvents (M34 / -// D-M34-I) so the wrapper here only covers the four stages that still wrap -// around the user's command on the client. +// hookWrapperScript is the shell stub that runs every hook command executed by +// the CLI (on.exec, on.shell, on.snapshot, on.down). The on.create and on.start +// stages run server-side, so this wrapper only covers the stages the CLI runs +// directly against a sandbox. // -// Positional args (filled in by hook caller): +// Positional args (filled in by the hook caller): // // $0 = "depot-hook" (script-name placeholder) // $1 = the user's hook command (single string, run via bash -lc) @@ -40,22 +39,19 @@ fi exec /bin/bash -lc "$1" ` -// addHookFlags declares the --file / --set / --no-hook triple every hook-aware -// command shares. stageLabel ("on.exec", "on.shell", …) is interpolated into -// the help text so `--help` reads naturally. +// 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 sandbox.depot.yml file for %s resolution (default: walk up from cwd)", 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 standard --file/--set/--no-hook flags, resolves the -// named stage from the local spec, and runs it against sandboxID. A --no-hook -// flag short-circuits to a no-op. pick selects which stage's hooks to fire -// out of the resolved HooksSpec. -// -// Sessions are gone in v0 (D-M34-M) — RunCommand on sandboxv1 takes a -// SandboxRef only. +// 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 run from +// the resolved HooksSpec. func runHookStage( ctx context.Context, cmd *cobra.Command, @@ -77,11 +73,10 @@ func runHookStage( return runHooks(ctx, client, token, orgID, sandboxID, label, pick(hooks), stdout, stderr) } -// resolveStageHooks loads the nearest sandbox.depot.yml (walking up from -// cwd, or honoring --file if non-empty) and returns the resolved hooks for -// every stage. Returns a zero-valued HooksSpec if no spec is found — that -// matches the behavior of `exec`/`shell`/`snapshot` against a raw sandbox -// id outside any project tree. +// resolveStageHooks loads the nearest sandbox.depot.yml (walking up from cwd, or +// using --file when it is set) and returns the resolved hooks for every stage. +// It returns a zero-valued HooksSpec when no spec is found, which lets commands +// run against a raw sandbox id outside any project directory. func resolveStageHooks(file string, setPairs []string) (sandbox.HooksSpec, error) { var path string if file != "" { @@ -108,11 +103,10 @@ func resolveStageHooks(file string, setPairs []string) (sandbox.HooksSpec, error return spec.ResolveHooks(inputs) } -// runHooks runs each hook sequentially against the given sandbox via -// RunCommand on the sandboxv1 wire. label is used in CLI output -// ("on.exec" / "on.shell" / "on.snapshot" / "on.down"). A non-zero exit -// from any foreground hook aborts and returns immediately. Detached hooks -// only fail if the spawn itself fails. +// 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, hooks []sandbox.HookSpec, stdout, stderr io.Writer) error { if len(hooks) == 0 { return nil @@ -149,9 +143,10 @@ func runHook(ctx context.Context, client sandboxv1connect.SandboxServiceClient, return fmt.Errorf("exec: %w", err) } - // Detached hooks finish at Started — the wrapper script forks the user - // command via setsid and exits 0, so the foreground hook stream sees a - // quick Finished too; either way, "until finished" semantics hold. + // A detached hook returns quickly: the wrapper script forks the user's + // command with setsid and exits 0, so the stream reaches Finished right + // away. Waiting until finished is correct for both detached and + // foreground hooks. exit, err := consumeCommandEventStream(stream, stdout, stderr, streamUntilFinished) if err != nil { return err diff --git a/pkg/cmd/sandbox/sandbox.go b/pkg/cmd/sandbox/sandbox.go index 6186eb28..3d46f8bf 100644 --- a/pkg/cmd/sandbox/sandbox.go +++ b/pkg/cmd/sandbox/sandbox.go @@ -4,14 +4,11 @@ import ( "github.com/spf13/cobra" ) -// NewCmdSandbox wires the `depot sandbox` verb tree. +// NewCmdSandbox wires up the `depot sandbox` verb tree. // -// Vertical-slice subset of the M34 "CLI v2 catches up to SDK v0" surface: -// the new depot.sandbox.v1 verbs (create / exec / stop / kill) ship in this -// PR alongside the pre-existing legacy verbs (exec-pipe / pty) which target -// CI-bastion sandboxes via depot.ci.v1. The remaining v0 surface -// (get / list / from-spec / shell / logs / fs / snapshot / build) lands in -// follow-ons. +// 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]", @@ -32,15 +29,15 @@ Command surface: cmd.PersistentFlags().String("token", "", "Depot API token") cmd.PersistentFlags().String("org", "", "Organization ID (required when user is a member of multiple organizations)") - // Lifecycle (depot.sandbox.v1) + // Lifecycle verbs. cmd.AddCommand(newSandboxCreate()) cmd.AddCommand(newSandboxStop()) cmd.AddCommand(newSandboxKill()) - // Command surface + // Command verbs. cmd.AddCommand(newSandboxExec()) - // Legacy CI-bastion verbs (depot.ci.v1) + // Legacy CI-bastion verbs. cmd.AddCommand(newSandboxExecPipe()) cmd.AddCommand(newSandboxPty()) diff --git a/pkg/cmd/sandbox/sandbox_test.go b/pkg/cmd/sandbox/sandbox_test.go index b79019f3..7b5af856 100644 --- a/pkg/cmd/sandbox/sandbox_test.go +++ b/pkg/cmd/sandbox/sandbox_test.go @@ -5,16 +5,16 @@ import ( "testing" ) -// Touch-test: every vertical-slice verb is registered on the root command. -// This catches the wiring regression where a verb file ships but sandbox.go -// forgets the AddCommand. +// 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() { - // cobra command Use can include "[flags] " suffix; the + // 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 { diff --git a/pkg/cmd/sandbox/stop.go b/pkg/cmd/sandbox/stop.go index a5b6cbd6..0c5a91fb 100644 --- a/pkg/cmd/sandbox/stop.go +++ b/pkg/cmd/sandbox/stop.go @@ -12,18 +12,15 @@ import ( "github.com/spf13/cobra" ) -// newSandboxStop wraps depot.sandbox.v1.SandboxService.StopSandbox — the -// graceful shutdown verb (terminated_by=GRACEFUL). M34 renames the legacy -// `down` to `stop` to match the SDK vocabulary; `down` survives as a cobra -// alias for script-compat (D-M34-O). +// newSandboxStop builds the `stop` command, which gracefully shuts down a +// sandbox. `down` is kept as an alias for backward compatibility. // -// With no positional args, walks up from cwd for a sandbox.depot.yml and -// resolves the most-recent sandbox started under that spec name (per -// ~/.depot/sandbox-state/.id). With one or more ids, stops each. +// With no positional args, it walks up from cwd for a sandbox.depot.yml and +// resolves the most recent sandbox started under that spec's name (recorded in +// ~/.depot/sandbox-state/.id). With one or more ids, it stops each. // -// Hook behavior: on.down hooks are still CLI-side (D-M34-I) — they run via -// RunCommand against the sandboxv1 wire before the StopSandbox call. Pass -// --no-hook to skip and stop immediately. +// The CLI runs on.down hooks against the sandbox before requesting the stop. +// Pass --no-hook to skip the hooks and stop immediately. func newSandboxStop() *cobra.Command { cmd := &cobra.Command{ Use: "stop [...]", diff --git a/pkg/proto/depot/sandbox/v1/command.pb.go b/pkg/proto/depot/sandbox/v1/command.pb.go index 50759f38..2fd1a246 100644 --- a/pkg/proto/depot/sandbox/v1/command.pb.go +++ b/pkg/proto/depot/sandbox/v1/command.pb.go @@ -21,13 +21,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// SandboxCommandExecutionStatus mirrors the lifecycle stages a command transitions through. +// 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: queued, not yet started in the guest. -// RUNNING: started; bytes can be streaming. -// FINISHED: process exited; exit_code populated. -// FAILED: process never started, or the guest reported an error path. -// KILLED: signaled mid-run (DEP-4522). +// 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 ( @@ -86,29 +87,40 @@ func (SandboxCommandExecutionStatus) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_command_proto_rawDescGZIP(), []int{0} } -// SandboxCommandExecution is the persisted metadata for a single RunCommand invocation. The -// row shape lives in src/sandbox/schema-additions.ts (CommandRow); this is its -// wire projection. Populated by Get/List/Attach RPCs in follow-up slices. +// 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 - // Server-minted ULID. Architecture §7. - CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` - SandboxId string `protobuf:"bytes,2,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` - Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` - Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` - Cwd *string `protobuf:"bytes,5,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` - 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"` - Sudo bool `protobuf:"varint,7,opt,name=sudo,proto3" json:"sudo,omitempty"` - Detached bool `protobuf:"varint,8,opt,name=detached,proto3" json:"detached,omitempty"` - Status SandboxCommandExecutionStatus `protobuf:"varint,9,opt,name=status,proto3,enum=depot.sandbox.v1.SandboxCommandExecutionStatus" json:"status,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - FinishedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=finished_at,json=finishedAt,proto3,oneof" json:"finished_at,omitempty"` - ExitCode *int32 `protobuf:"varint,12,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` - // Per-stream cumulative byte counts. Split per architecture §8. + // 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"` } @@ -242,13 +254,10 @@ func (x *SandboxCommandExecution) GetStderrBytesEmitted() int64 { return 0 } -// SandboxCommandExecutionEvent is the streamed event during RunCommand / RunCommandPipe / -// AttachCommand. Bytes everywhere; the SDK decodes UTF-8 at the adapter layer. -// -// EvictedEarlyData fires only on reattach scenarios where the K-Streaming ring -// (architecture §10) had to drop head data before the consumer subscribed. -// It is part of the oneof from day one so the wire shape doesn't need a -// reserved slot retrofit when the BufferedEventLog impl lands with P10b. +// 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 @@ -386,27 +395,29 @@ func (*SandboxCommandExecutionEvent_Error_) isSandboxCommandExecutionEvent_Event func (*SandboxCommandExecutionEvent_Evicted) isSandboxCommandExecutionEvent_Event() {} -// RunCommand — DEP-4517. Server-streaming RPC; the response stream is a -// sequence of CommandEvents starting with Started and ending with Finished -// (or terminating with a Connect error). +// 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 - // Sandbox to run the command in. Tag 1 was `string sandbox_id` in M6 (a - // workaround for the proto import cycle that refs.proto now resolves) — see - // the commit body for the wire-break audit. Safe to reuse tag 1 here because - // RunCommand is shipped Unimplemented; no client depends on the prior shape. - Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` - Cmd string `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"` - Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` - Cwd *string `protobuf:"bytes,4,opt,name=cwd,proto3,oneof" json:"cwd,omitempty"` - 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"` - Sudo *bool `protobuf:"varint,6,opt,name=sudo,proto3,oneof" json:"sudo,omitempty"` - // When true, the server returns the Started event and disconnects the - // stream; the command runs in the background and can be reattached via - // AttachCommand (DEP-4520). + // 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"` } @@ -491,17 +502,13 @@ func (x *RunCommandRequest) GetDetached() bool { return false } -// RunCommandPipe — DEP-4519. Client-side bidirectional streaming. The first -// request on the stream MUST carry `init` (the same RunCommandRequest the -// blocking RunCommand RPC uses). Every subsequent request carries `stdin` -// bytes; closing the request stream signals EOF on the command's stdin. -// -// The response stream is a sequence of CommandEvents identical in shape to -// RunCommand's: Started → Stdout/Stderr bytes → Finished (or Connect error). -// -// stdin bytes are NOT persisted in v0 — only stdout and stderr land in the -// ClickHouse log table. AttachCommand replay shows command OUTPUT regardless -// of whether the original command was Run or RunCommandPipe. +// 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 @@ -572,10 +579,12 @@ type isRunCommandPipeRequest_Input interface { } 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"` } @@ -583,15 +592,13 @@ func (*RunCommandPipeRequest_Init) isRunCommandPipeRequest_Input() {} func (*RunCommandPipeRequest_Stdin) isRunCommandPipeRequest_Input() {} -// GetCommand looks up command metadata by cmd_id. Authorization is sandbox- -// scoped: the server resolves cmd_id → sandbox_id via a Kysely select filtered -// by the caller's orgId, then enforces sandbox-level access on the resolved -// sandbox row (api/CLAUDE.md authz convention). +// 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"` } @@ -634,20 +641,22 @@ func (x *GetCommandResponse) GetCommand() *SandboxCommandExecution { return nil } -// ListCommands enumerates commands within a single sandbox, newest first. -// Pagination follows the ListSandboxes cursor convention: page_token is an -// opaque server-minted string that clients pass back verbatim to fetch the -// next page. +// 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 - Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` - PageSize *int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` - PageToken *string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` - // If non-empty, only commands whose status is in this set are returned. - // UNSPECIFIED entries are ignored. The full SandboxCommandExecutionStatus enum is accepted. + // 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"` } @@ -711,13 +720,17 @@ func (x *ListCommandsRequest) GetStatusFilter() []SandboxCommandExecutionStatus return nil } +// A page of command metadata. type ListCommandsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Commands []*SandboxCommandExecution `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` - NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` + // 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() { @@ -766,27 +779,20 @@ func (x *ListCommandsResponse) GetNextPageToken() string { return "" } -// AttachCommand re-subscribes to the output of a previously-issued -// RunCommand / RunCommandPipe. The response stream is the same SandboxCommandExecutionEvent -// sequence those RPCs emit live: replay of persisted Stdout/Stderr chunks -// followed (if the command is still running on the same replica) by live tail. -// -// Sandbox-level authz: cmd_id is resolved to its sandbox_id server-side, then -// the standard sandbox-row org check applies. SandboxCommandExecutionRef carries only the -// cmd_id today (refs.proto's selector pattern); a future sandbox-qualified -// selector form can be added without a wire break. +// 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"` - // Per-stream WATERMARK: replay events whose byte_offset is STRICTLY GREATER - // than the supplied offset. The wire field byte_offset is end-of-chunk - // (cumulative bytes through the END of `data`), so a caller that replayed - // up through "I last received stdout byteOffset = 100" supplies - // stdout_offset = 100 and receives the next event starting at >100. Unset - // fields default to 0 — start replay from the beginning of that stream. + // 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"` } @@ -836,14 +842,18 @@ func (x *AttachCommandRequest) GetSinceOffset() *AttachOffset { 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 - // Watermark on stdout: yield events whose byte_offset > stdout_offset. + // 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"` - // Watermark on stderr: yield events whose byte_offset > stderr_offset. + // 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"` } @@ -893,24 +903,20 @@ func (x *AttachOffset) GetStderrOffset() int64 { return 0 } -// KillCommand — DEP-4522. Targets a previously-issued command by cmd_id and -// asks the host to deliver `signal` (default SIGTERM) to the running process. -// Two-step authorization mirrors AttachCommand: resolve cmd_id → sandbox_id -// scoped to the caller's org, then enforce sandbox-level access on the -// resolved sandbox row. Signal is a string passthrough to vm3 SendSignal; -// unknown signal names propagate vm3's InvalidArgument. Killing a command -// the host registry no longer knows about (already-finished or never- -// registered) returns NotFound — this covers the kill-on-finished race -// without a separate code path. +// 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 name (e.g. "SIGTERM", "SIGINT"). Omit for SIGTERM. SIGKILL is - // rejected by vm3 in v0 to keep the abort path SIGKILL-free; that - // rejection surfaces here as a Connect InvalidArgument. + // 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"` } @@ -960,6 +966,7 @@ func (x *KillCommandRequest) GetSignal() string { return "" } +// Empty response returned when a command is successfully signaled. type KillCommandResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -998,12 +1005,15 @@ 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 - CmdId string `protobuf:"bytes,1,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"` + // 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"` } @@ -1053,15 +1063,18 @@ func (x *SandboxCommandExecutionEvent_Started) GetStartedAt() *timestamppb.Times 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 byte index for this stream as of the END of `data`. - 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"` + // 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() { @@ -1117,14 +1130,18 @@ func (x *SandboxCommandExecutionEvent_StdoutBytes) GetTimestamp() *timestamppb.T return nil } +// A chunk of standard error. type SandboxCommandExecutionEvent_StderrBytes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - 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"` + // 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() { @@ -1180,12 +1197,15 @@ func (x *SandboxCommandExecutionEvent_StderrBytes) GetTimestamp() *timestamppb.T return nil } +// Emitted once when the command exits. type SandboxCommandExecutionEvent_Finished 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"` + // 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"` } @@ -1235,15 +1255,16 @@ func (x *SandboxCommandExecutionEvent_Finished) GetFinishedAt() *timestamppb.Tim return nil } -// Mid-stream failure where the stream itself continues (e.g. one chunk lost -// but more coming). Connect errors remain the primary error channel; this -// payload is for partial-degradation cases. Bare string for v0; structured -// codes are a follow-on if call sites need to discriminate. +// 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"` } @@ -1286,15 +1307,18 @@ func (x *SandboxCommandExecutionEvent_Error) GetReason() string { return "" } -// K-Streaming evicted head data before this consumer subscribed. Carries the -// per-stream byte counts that were dropped so the consumer can reason about -// the gap. Architecture §10. +// 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"` } diff --git a/pkg/proto/depot/sandbox/v1/filesystem.pb.go b/pkg/proto/depot/sandbox/v1/filesystem.pb.go index 45505fe4..9d75ac15 100644 --- a/pkg/proto/depot/sandbox/v1/filesystem.pb.go +++ b/pkg/proto/depot/sandbox/v1/filesystem.pb.go @@ -1,16 +1,15 @@ -// depot.sandbox.v1 — FileSystem surface (DEP-4524). +// File system operations against a sandbox. // -// Covers the exec-first server-side first slice (P15) and the native vm3 swap -// (DEP-4525 / P17). Same proto surface across implementations; the server -// picks the active implementation per-org. +// The server may back these operations with different implementations, but the +// message surface is the same regardless of which one is active. // -// Errors travel as Connect errors with a `FileSystemErrorDetail` attached. -// The SDK adapter (sdk-sandbox/src/errors.ts) converts that into a Node-shape -// Error object carrying `{code, syscall, path, errno}` so customers can keep -// coding against node:fs/promises shape. +// 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 RPC declarations live on `service SandboxService` in sandbox.proto; -// this file only carries messages + enums. +// 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: @@ -34,13 +33,12 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// FileSystemErrorCode mirrors the Node fs error codes the SDK exposes. -// Server attaches one of these on a Connect error; client maps to Error.code. +// 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 when the exec-first classifier cannot pin a -// specific Node code (e.g. busybox-stderr phrasing the regex doesn't match); -// callers surface it as a generic FileSystemError without losing the syscall -// + path context. +// 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 ( @@ -123,8 +121,8 @@ func (FileSystemErrorCode) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{0} } -// FileType is the discriminator returned by Stat. SDK uses it to back -// `.isDirectory()`/`.isFile()`/... on a node:fs/promises-shape Stats object. +// 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 ( @@ -189,10 +187,8 @@ func (FileType) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_filesystem_proto_rawDescGZIP(), []int{1} } -// FileSystemErrorDetail is the proto message the server attaches to the -// Connect error (`ConnectError.details`). The SDK reads it back via -// `findDetails(FileSystemErrorDetailSchema)` and synthesizes a Node-shape -// `FileSystemError`. +// 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 @@ -271,9 +267,11 @@ type MkdirRequest struct { Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // mkdir -p semantics; default false → ENOENT on a missing parent. + // 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 mode (e.g. 0o755 = 0x1ED). Server applies the umask when unset. + // 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"` } @@ -382,7 +380,8 @@ type StatRequest struct { Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // Follow symlinks (stat) vs not (lstat). Default true. + // 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"` } @@ -541,8 +540,9 @@ type ReadDirRequest struct { Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // node:fs/promises.readdir({withFileTypes}) parity: when false the entries - // still carry name + type, but the SDK exposes a string[] surface. + // 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"` } @@ -708,9 +708,10 @@ type RemoveRequest struct { Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // rm -rf when true. + // When true, remove directories and their contents recursively (rm -rf). Recursive *bool `protobuf:"varint,3,opt,name=recursive,proto3,oneof" json:"recursive,omitempty"` - // node fs.rm({force: true}) parity — ENOENT is swallowed. + // 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"` } @@ -921,7 +922,8 @@ type CopyFileRequest struct { 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"` - // cp -p — preserve mode/owner/timestamps where the server can. + // 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"` } @@ -1131,7 +1133,8 @@ type ChmodRequest struct { Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // Octal int; the SDK accepts string ("755") or number (0o755) and converts. + // 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"` } @@ -1341,7 +1344,7 @@ type SymlinkRequest struct { unknownFields protoimpl.UnknownFields Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` - // ln -s target link_path + // 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"` } @@ -1546,7 +1549,8 @@ type AccessRequest struct { Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // F_OK / R_OK / W_OK / X_OK bitmask. Server defaults to F_OK when unset. + // 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"` } @@ -1696,9 +1700,8 @@ func (x *ReadFileRequest) GetPath() string { return "" } -// FileChunk is the streamed shape for ReadFile — chunks land in order, with -// the last carrying `eof = true` when the implementation knows. The stream -// closing also signals EOF. +// 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 @@ -1754,9 +1757,9 @@ func (x *FileChunk) GetEof() bool { return false } -// WriteFile — first request on the stream MUST carry `init`; subsequent -// requests carry `data` bytes. `append` selects O_APPEND semantics. `mode` -// is applied if the file is created. +// 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 @@ -1894,7 +1897,7 @@ type WriteFileRequest_Init struct { 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"` - // mkdir -p the parent path before opening the file. + // 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"` } diff --git a/pkg/proto/depot/sandbox/v1/hook.pb.go b/pkg/proto/depot/sandbox/v1/hook.pb.go index a84e3578..d8f4e074 100644 --- a/pkg/proto/depot/sandbox/v1/hook.pb.go +++ b/pkg/proto/depot/sandbox/v1/hook.pb.go @@ -1,24 +1,17 @@ -// depot.sandbox.v1 — Hook value-shapes + RunHook wire envelope (DEP-4534 / P23). +// Hook definitions and the request envelope for the RunHook RPC. // -// Spec Cluster INTERIOR (step 2 of 5). This file holds the hook-related -// messages: the value-shapes (HookSpec + HookStage) that the YAML spec uses -// and the wire envelope (RunHookRequest) that the RunHook RPC takes. +// 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. // -// HookSpec and HookStage originally shipped in spec.proto at S24 (P22). -// They moved here at P23 to break an import cycle that would otherwise form -// once sandbox.proto adopts the RunHook RPC: +// 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. // -// sandbox.proto -> hook.proto -> spec.proto -> sandbox.proto -// -// (spec.proto imports sandbox.proto for Resources + Runtime; sandbox.proto -// must import hook.proto for RunHookRequest; so hook.proto cannot transitively -// import sandbox.proto.) Wire shapes are unchanged — both messages remain in -// the depot.sandbox.v1 package; only their `.proto` home is different. -// -// RunHook is wire-reachable today but hidden from the public SDK surface -// (pattern F per architecture §15). The canonical consumer is the -// CreateSandboxFromSpec orchestrator that lands in P25b — no caller exists -// in trunk today. +// 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: @@ -42,10 +35,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// HookStage names a lifecycle stage. Used by the RunHook RPC + the future -// Hooks-replay surface (architecture §12). Stage label is metadata-only -// from the daemon's perspective — execution shape does NOT vary across the -// six stages; orchestrators decide which stages they fire. +// 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 ( @@ -107,9 +99,9 @@ func (HookStage) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_hook_proto_rawDescGZIP(), []int{0} } -// HookSpec — a single hook command within one lifecycle stage. The YAML -// bare-string form ("echo hi") parses into HookSpec{command: "echo hi"}; -// see src/sandbox/spec.ts for normalization. +// 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 @@ -181,12 +173,11 @@ func (x *HookSpec) GetTimeoutSeconds() int32 { return 0 } -// RunHookRequest — DEP-4534 / P23. Server-streaming response is the same -// SandboxCommandExecutionEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> -// Finished. Detached hooks (hook.detach=true) emit only Started + -// Finished{exit_code=0} on the wire; the actual hook output lands in -// /var/log/depot/hook--.log inside the sandbox (architecture -// §12). +// 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 diff --git a/pkg/proto/depot/sandbox/v1/logs.pb.go b/pkg/proto/depot/sandbox/v1/logs.pb.go index dd3dcd84..b3a322a0 100644 --- a/pkg/proto/depot/sandbox/v1/logs.pb.go +++ b/pkg/proto/depot/sandbox/v1/logs.pb.go @@ -21,15 +21,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// SandboxLogEvent is the streamed event the StreamSandboxLogs RPC emits. -// Bytes everywhere on the stdout/stderr rails (DEP-4404); the SDK decodes -// UTF-8 at the adapter layer. +// A single event emitted by the StreamSandboxLogs RPC. // -// EvictedEarlyData fires when the K-Streaming ring (architecture §10) had to -// drop head data before this consumer subscribed — analogous to -// SandboxCommandExecutionEvent.EvictedEarlyData. The dropped-bytes counter is single-rail -// here (no per-stream split) because the boot-output buffer is keyed by -// arrival across both stdout/stderr. +// 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 @@ -139,31 +139,23 @@ func (*SandboxLogEvent_BootFinished_) isSandboxLogEvent_Event() {} func (*SandboxLogEvent_EvictedEarlyData_) isSandboxLogEvent_Event() {} -// StreamSandboxLogs — DEP-4532. Server-streaming RPC; the response stream is -// a sequence of SandboxLogEvents drained from the per-sandbox boot-output -// BufferedEventLog (P27a). Terminates when the buffer ends (boot finished) -// or with a Connect error. -// -// `since_offset` is a BufferedEventLog ring offset (NOT a per-stream byte -// index). The server replays events whose ring offset is >= the supplied -// value, and any subscription that requests an offset older than the live -// ring head receives an EvictedEarlyData prefix once before the replay -// starts. +// 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. // -// Cross-replica caveat (MD-33-3 / Risk R1): if this RPC lands on a different -// replica than the CreateSandboxFromSpec orchestrator that minted the -// sandbox, the buffer lookup misses and — for non-terminal sandboxes — the -// stream closes cleanly with no events. The handler also surfaces -// FailedPrecondition for terminal sandboxes (no past-replay rail in v0). +// 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"` - // BufferedEventLog ring offset to start from. Replay events whose offset - // is >= since_offset. Unset (or 0) means "from the beginning of the - // resident buffer". + // 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"` } @@ -219,13 +211,10 @@ type SandboxLogEvent_BootStdout struct { unknownFields protoimpl.UnknownFields Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - // Cumulative byte index for the stdout rail as of the END of `data` - // (end-of-chunk semantics, mirroring SandboxCommandExecutionEvent.StdoutBytes.byte_offset - // from command.proto). Useful for consumers that want to dedup across - // resubscribes that they themselves coordinate at the byte rail; the - // server-side replay watermark is the request's `since_offset`, which - // is a BufferedEventLog ring offset rather than a per-stream byte - // index (MD-33-4). + // 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"` } @@ -289,7 +278,8 @@ type SandboxLogEvent_BootStderr struct { unknownFields protoimpl.UnknownFields Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - // Cumulative byte index for the stderr rail; see BootStdout.byte_offset. + // 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"` } @@ -402,9 +392,9 @@ func (x *SandboxLogEvent_BootFinished) GetFinishedAt() *timestamppb.Timestamp { return nil } -// K-Streaming evicted head data before this consumer subscribed. Carries -// the byte count that was dropped so the consumer can reason about the -// gap. Architecture §10. +// 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 diff --git a/pkg/proto/depot/sandbox/v1/pty.pb.go b/pkg/proto/depot/sandbox/v1/pty.pb.go index 29a450bc..6354887b 100644 --- a/pkg/proto/depot/sandbox/v1/pty.pb.go +++ b/pkg/proto/depot/sandbox/v1/pty.pb.go @@ -196,9 +196,9 @@ func (*OpenPtyResponse_Data) isOpenPtyResponse_Output() {} func (*OpenPtyResponse_Exit_) isOpenPtyResponse_Output() {} -// Start carries the per-session init parameters. Sent as the first message -// on the stream. Subsequent `start` messages on the same stream are a -// protocol violation and ignored by the handler. +// 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 @@ -278,8 +278,8 @@ func (x *OpenPtyRequest_Start) GetCwd() string { return "" } -// Resize is a window-size change. vm3 maps it to the OS pty Setsize ioctl -// which clamps out-of-range values; bounds are intentionally pass-through. +// 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 diff --git a/pkg/proto/depot/sandbox/v1/runtime.pb.go b/pkg/proto/depot/sandbox/v1/runtime.pb.go index a825958b..84ddc580 100644 --- a/pkg/proto/depot/sandbox/v1/runtime.pb.go +++ b/pkg/proto/depot/sandbox/v1/runtime.pb.go @@ -1,13 +1,5 @@ -// depot.sandbox.v1 — Resources + Runtime value-shapes. -// -// Extracted from sandbox.proto in P25b (M29) to break the -// sandbox.proto <-> spec.proto cycle that would otherwise form when the -// CreateSandboxFromSpec RPC's request/event types land in sandbox.proto -// (sandbox.proto needs to import spec.proto for SandboxSpec; spec.proto -// imported sandbox.proto for Resources + Runtime). Wire shape is -// unchanged — both messages remain in the depot.sandbox.v1 package; only -// their `.proto` home is different. Mirrors the hook.proto split-out -// pattern at P23. +// Value types describing the compute resources and runtime environment +// requested for a sandbox. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: @@ -31,12 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Resources caller may request for a sandbox (DEP-4512). -// -// All fields optional; unset means "use server-side default". TODO(policy): -// defaults are currently server-controlled and undocumented at the wire layer. -// A future slice will pin them either here in proto comments or in a published -// policy doc. +// 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 @@ -100,13 +88,7 @@ func (x *Resources) GetDiskGb() int32 { return 0 } -// Runtime selector for a sandbox (DEP-4512). Callers pick exactly one of: -// - `named`: a curated runtime identifier (e.g. "node24") resolved server-side -// - `image_ref`: an arbitrary OCI image reference -// -// TODO(open-question): the catalog of named runtimes is intentionally open in -// this slice — any string is accepted on the wire and the server may reject -// unknown names. A follow-up slice picks between a proto enum vs server config. +// Selects the runtime environment for a sandbox. Choose exactly one option. type Runtime struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -177,10 +159,14 @@ type isRuntime_Runtime interface { } 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"` } diff --git a/pkg/proto/depot/sandbox/v1/sandbox.pb.go b/pkg/proto/depot/sandbox/v1/sandbox.pb.go index 71633765..c783e043 100644 --- a/pkg/proto/depot/sandbox/v1/sandbox.pb.go +++ b/pkg/proto/depot/sandbox/v1/sandbox.pb.go @@ -21,22 +21,17 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// SandboxStatus is the lifecycle enum for a sandbox. +// SandboxStatus describes where a sandbox is in its lifecycle. // -// CREATED: row materialized, no compute backing assigned yet. -// ASSIGNED: compute backing assigned, VM not yet started. -// STARTING: VM boot in progress. -// RUNNING: VM booted, ready to accept commands. -// FINISHED: clean termination (graceful stop, normal exit). -// CANCELLED: forced termination (kill). -// FAILED: ended with an error (image pull fail, OOM, panic, etc.). +// 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, // -// Values mirror the orchestration-side ComputeSandbox.state vocabulary at v0 -// to minimize the projection layer. The proto is its own type — when v2 needs -// to diverge (e.g. surface a value the orchestration doesn't track, or hide -// a CI-only sub-state), it can do so without coordinating with the underlying -// schema. Terminal-state granularity today (FINISHED vs CANCELLED vs FAILED) -// carries the gross reason. +// out-of-memory, or a crash). type SandboxStatus int32 const ( @@ -101,14 +96,15 @@ func (SandboxStatus) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{0} } -// TerminationReason classifies how a sandbox ended (DEP-4518). Populated only -// on terminal status (FINISHED / CANCELLED / FAILED). UNSPECIFIED is the proto sentinel and -// is never written by the server; callers MUST treat it as "unknown". +// 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: StopSandbox path — clean shutdown the caller asked for. -// FORCED: KillSandbox path — caller asked for an immediate end. -// TIMED_OUT: TTL expired — server-initiated termination. -// SYSTEM_FAULT: host failure, OOM, panic, or any other server-side error. +// 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 ( @@ -164,11 +160,8 @@ func (TerminationReason) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{1} } -// Sandbox is the canonical message returned by the lifecycle RPCs. -// -// Field numbering — the 4..10 block was reserved-by-comment after M2; M4 -// consumes it fully along with 13..15 for the terminal metadata. 11/12 stay -// with Resources/Runtime (claimed by M2). No gaps remain. +// 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 @@ -177,29 +170,27 @@ type Sandbox struct { 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 (DEP-4518). created_at is always populated; the other - // two are populated once the sandbox reaches the corresponding state. + // 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"` - // TTL surface (DEP-4518). expires_at is authoritative storage when known; - // timeout_ms_remaining is recomputed on read against now(). Both are unset - // when the sandbox carries no timeout policy. + // 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 (DEP-4518). Populated only after terminal status, and only - // when a metering source is available. TODO(metering): wire to the - // SandboxUsage table populated by tasks/cron/createSandboxUsage.ts. Until - // wired, both fields remain unset even on terminal sandboxes. + // 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"` - // Effective resources + runtime echoed back from the request so callers see - // what the server actually resolved (DEP-4512). + // 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 (DEP-4518). All three are populated only on - // terminal status (FINISHED / CANCELLED / FAILED). exit_code uses int32 in the Unix range - // (0..255); negative values are reserved for future signal-coded use. + // 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"` @@ -343,9 +334,7 @@ func (x *Sandbox) GetErrorMessage() string { } // NetworkUsage records bytes transferred over the sandbox's primary network -// interface (DEP-4518). Split counters mirror typical cloud-vendor metering -// surfaces and keep ingress/egress visible separately even when one direction -// dominates. +// interface, with ingress and egress tracked separately. type NetworkUsage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -406,17 +395,15 @@ type CreateSandboxRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Human label for the sandbox, scoped to the organization. Optional. + // 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; server applies defaults for unset fields (DEP-4512). + // 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; server resolves `named` against its catalog or pulls - // `image_ref` directly (DEP-4512). + // 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"` - // Sandbox content source — git/snapshot/image/template variants. The v0 - // CreateSandbox handler does NOT read this field; it is wired by the - // closing slice of the Source/Git Cluster (DEP-4531) and consumed by - // DEP-4529 (snapshot). Unset == prior behavior. + // 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"` } @@ -574,9 +561,9 @@ func (x *GetSandboxResponse) GetSandbox() *Sandbox { return nil } -// ListSandboxes — DEP-4514. State + creation-time filter, cursor-based -// pagination (page_token encodes the last seen ComputeSandbox.createdAt; -// the cursor pattern mirrors src/domains/ci/service/list-runs.ts). +// 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 @@ -695,19 +682,18 @@ func (x *ListSandboxesResponse) GetNextPageToken() string { return "" } -// StopSandbox — DEP-4515. Graceful shutdown. The server records the termination -// request on the row immediately; when `blocking` is true the RPC waits up to a -// server-side cap for the VM to reach terminal status before returning. -// -// `signal` lives on KillSandbox, not here (architecture §5). +// 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 polls until the sandbox reaches a terminal state (or - // the server-side cap expires) before responding. If false (default), the + // 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"` } @@ -763,9 +749,9 @@ type StopSandboxResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The sandbox row after recording the termination request. Status is either - // either RUNNING (with terminationRequestedAt non-null) or a terminal status or a terminal status when - // the row transitioned before the read. + // 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"` } @@ -808,18 +794,17 @@ func (x *StopSandboxResponse) GetSandbox() *Sandbox { return nil } -// KillSandbox — DEP-4515. Forced termination. Fire-and-forget; no blocking -// option. `signal` is documented at the wire level but ignored by the v0 -// server (which always asks the VM scheduler to mark the row `cancelled`). -// A future slice wires this through to vm3 SendSignal. +// 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 (e.g. "SIGKILL"). Reserved for forward-compat; v0 ignores it - // and always issues a hard cancel. + // 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"` } @@ -921,9 +906,7 @@ type ListSandboxesRequest_Filter struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Status filter: if non-empty, only sandboxes whose status is in this set - // are returned. (Sketch uses the plural `states` for the field name; - // mirrored here.) + // 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"` diff --git a/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go b/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go index 4dd5a79a..48bf082b 100644 --- a/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go +++ b/pkg/proto/depot/sandbox/v1/sandboxv1connect/sandbox.connect.go @@ -121,67 +121,53 @@ 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) - // DEP-4515 — stop is graceful (terminated_by=GRACEFUL); kill is forced - // (terminated_by=FORCED). Both are idempotent on already-terminal sandboxes - // in the sense that they return FailedPrecondition rather than re-running. + // 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) - // DEP-4517 — server-streaming command execution. The response stream begins - // with a Started event and ends with Finished (or terminates with a Connect - // error). Persistence + the K-Streaming buffered-event-log + the vm3 - // Execute proxy land with the next two slices (P10b/P10c); this RPC is - // wire-reachable today but returns Unimplemented until those land. + // 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) - // DEP-4519 — bidirectional-streaming command execution with stdin. The - // first request on the stream MUST carry `init`; subsequent requests carry - // `stdin` bytes. The response stream shape is identical to RunCommand. - // stdin bytes flow through to the guest process and are NOT persisted. + // 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] - // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced - // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator - // (P25b). NOT exposed as an SDK method. Wraps the hook command in - // /bin/sh -lc, prepends /tmp/.depot-env sourcing, exports merged env, - // cd's to /workspace, and either streams CommandEvents (foreground) or - // detaches via setsid with log redirect to - // /var/log/depot/hook--.log (detached). Stage label is - // metadata-only — execution shape does NOT vary across the six HookStage - // values. Architecture §12. Spec Cluster INTERIOR step 2/5. + // 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) - // DEP-4520 — read side of the SandboxCommandExecution surface. Get and List return persisted - // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when - // the command is still running on the same replica) tails live output via - // the process-local per-cmd BufferedEventLog. + // 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) - // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the - // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits - // SandboxLogEvent messages to the subscriber. v0 emits the four - // boot-output kinds only (boot_stdout / boot_stderr / boot_finished / - // evicted_early_data); future event kinds use the reserved tags 5..15 on - // the SandboxLogEvent oneof. Cross-replica caveat (MD-33-3): if the - // sandbox's boot buffer is hosted on a different replica, the stream - // closes cleanly with no events. No past-replay rail in v0 — terminal - // sandboxes return FailedPrecondition. See logs.proto. + // 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) - // DEP-4522 — deliver a signal to a running command. Default signal is + // KillCommand delivers a signal to a running command. The default signal is // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with - // InvalidArgument in v0 (the abort path stays SIGKILL-free). Kills of - // commands that have already finished (or were never registered) return - // NotFound, which the SDK surfaces as Code.NotFound. + // 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) - // DEP-4527 — interactive pseudo-terminal. Bidi-streaming RPC; the first - // request carries `start`, subsequent requests carry stdin bytes or window + // 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, then a single `exit` carrying the exit code. v0 always runs - // /bin/sh; the shell is intentionally not selectable at the wire layer. - // Architecture §13: no reattach — closing the stream ends the pty. + // 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 (filesystem.proto, DEP-4524) ──────────────────────────── - // Same RPC surface across exec-first (P15) and native vm3 (P17) - // implementations; the server picks per-org behind a resolver. Errors - // travel as Connect errors with a FileSystemErrorDetail attached — see - // src/sandbox/fs-errors.ts for the remapper. + // 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) @@ -196,13 +182,9 @@ type SandboxServiceClient interface { 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] - // ─── Snapshot (snapshot.proto, DEP-4529) ──────────────────────────────── - // Durable filesystem snapshots of a sandbox. The wire surface + the SDK - // ergonomics ship here; the vm3-side snapshot/restore pipeline that backs - // these RPCs is a follow-on slice — v0 handlers return Unimplemented until - // that lands. CreateSnapshot will additionally fire a graceful StopSandbox - // on the source sandbox once the snapshot is durable (Vercel parity, - // architecture §6). + // 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) @@ -583,67 +565,53 @@ 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) - // DEP-4515 — stop is graceful (terminated_by=GRACEFUL); kill is forced - // (terminated_by=FORCED). Both are idempotent on already-terminal sandboxes - // in the sense that they return FailedPrecondition rather than re-running. + // 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) - // DEP-4517 — server-streaming command execution. The response stream begins - // with a Started event and ends with Finished (or terminates with a Connect - // error). Persistence + the K-Streaming buffered-event-log + the vm3 - // Execute proxy land with the next two slices (P10b/P10c); this RPC is - // wire-reachable today but returns Unimplemented until those land. + // 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 - // DEP-4519 — bidirectional-streaming command execution with stdin. The - // first request on the stream MUST carry `init`; subsequent requests carry - // `stdin` bytes. The response stream shape is identical to RunCommand. - // stdin bytes flow through to the guest process and are NOT persisted. + // 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 - // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced - // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator - // (P25b). NOT exposed as an SDK method. Wraps the hook command in - // /bin/sh -lc, prepends /tmp/.depot-env sourcing, exports merged env, - // cd's to /workspace, and either streams CommandEvents (foreground) or - // detaches via setsid with log redirect to - // /var/log/depot/hook--.log (detached). Stage label is - // metadata-only — execution shape does NOT vary across the six HookStage - // values. Architecture §12. Spec Cluster INTERIOR step 2/5. + // 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 - // DEP-4520 — read side of the SandboxCommandExecution surface. Get and List return persisted - // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when - // the command is still running on the same replica) tails live output via - // the process-local per-cmd BufferedEventLog. + // 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 - // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the - // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits - // SandboxLogEvent messages to the subscriber. v0 emits the four - // boot-output kinds only (boot_stdout / boot_stderr / boot_finished / - // evicted_early_data); future event kinds use the reserved tags 5..15 on - // the SandboxLogEvent oneof. Cross-replica caveat (MD-33-3): if the - // sandbox's boot buffer is hosted on a different replica, the stream - // closes cleanly with no events. No past-replay rail in v0 — terminal - // sandboxes return FailedPrecondition. See logs.proto. + // 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 - // DEP-4522 — deliver a signal to a running command. Default signal is + // KillCommand delivers a signal to a running command. The default signal is // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with - // InvalidArgument in v0 (the abort path stays SIGKILL-free). Kills of - // commands that have already finished (or were never registered) return - // NotFound, which the SDK surfaces as Code.NotFound. + // 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) - // DEP-4527 — interactive pseudo-terminal. Bidi-streaming RPC; the first - // request carries `start`, subsequent requests carry stdin bytes or window + // 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, then a single `exit` carrying the exit code. v0 always runs - // /bin/sh; the shell is intentionally not selectable at the wire layer. - // Architecture §13: no reattach — closing the stream ends the pty. + // 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 (filesystem.proto, DEP-4524) ──────────────────────────── - // Same RPC surface across exec-first (P15) and native vm3 (P17) - // implementations; the server picks per-org behind a resolver. Errors - // travel as Connect errors with a FileSystemErrorDetail attached — see - // src/sandbox/fs-errors.ts for the remapper. + // 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) @@ -658,13 +626,9 @@ type SandboxServiceHandler interface { 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) - // ─── Snapshot (snapshot.proto, DEP-4529) ──────────────────────────────── - // Durable filesystem snapshots of a sandbox. The wire surface + the SDK - // ergonomics ship here; the vm3-side snapshot/restore pipeline that backs - // these RPCs is a follow-on slice — v0 handlers return Unimplemented until - // that lands. CreateSnapshot will additionally fire a graceful StopSandbox - // on the source sandbox once the snapshot is durable (Vercel parity, - // architecture §6). + // 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) diff --git a/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go b/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go index c7e24766..e49fabae 100644 --- a/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go +++ b/pkg/proto/depot/sandbox/v1/sandboxv1connect/spec_rpc.connect.go @@ -1,19 +1,14 @@ -// depot.sandbox.v1 — CreateSandboxFromSpec RPC envelope + service -// (DEP-4534 / P25b, Spec Cluster CLOSING). +// The CreateSandboxFromSpec RPC, its request and event types, and the service +// that hosts it. // -// This file hosts the RPC for declarative sandbox creation from a SandboxSpec. -// It lives in its own service (SandboxSpecService) rather than on the existing -// SandboxService — the request/event types reference BOTH Sandbox (from -// sandbox.proto) AND SandboxSpec (from spec.proto), which sets up an import -// cycle if those types are added to sandbox.proto and sandbox.proto then has -// to import spec.proto in turn. Carving the RPC + envelope into a separate -// file with a separate service breaks that cycle cleanly (mirrors the -// hook.proto split-out done at P23 for the same kind of cycle). +// 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. // -// SDK consumes SandboxSpecService alongside SandboxService — same Connect -// transport, same auth surface. The orchestrator implementation lives in -// src/sandbox/spec-orchestrator.ts; the handler is a thin tokenAuth + -// authorizeAndEnterOrg + delegate. +// The SDK consumes SandboxSpecService alongside SandboxService over the same +// transport and auth surface. // Code generated by protoc-gen-connect-go. DO NOT EDIT. // diff --git a/pkg/proto/depot/sandbox/v1/snapshot.pb.go b/pkg/proto/depot/sandbox/v1/snapshot.pb.go index 7c4d29ee..814c4bf2 100644 --- a/pkg/proto/depot/sandbox/v1/snapshot.pb.go +++ b/pkg/proto/depot/sandbox/v1/snapshot.pb.go @@ -1,11 +1,11 @@ -// depot.sandbox.v1.Snapshot — durable filesystem snapshot of a sandbox. +// A durable filesystem snapshot of a sandbox, with the RPCs to create, get, +// list, and delete one. // -// DEP-4529 — Snapshot Cluster CRUD surface. The cluster ships the wire surface -// + the SDK ergonomics; the vm3-side snapshot/restore pipeline that backs the -// handlers is a follow-on. v0 handlers return Unimplemented until that lands. +// 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. // -// Storage reuses the legacy SandboxTemplate registry (one row per snapshot, -// soft-deleted via deletedAt). The cross-package selector SnapshotRef lives in +// The selector used to reference a snapshot, SnapshotRef, is defined in // refs.proto. // Code generated by protoc-gen-go. DO NOT EDIT. @@ -32,9 +32,10 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Snapshot is the canonical message returned by the Snapshot CRUD RPCs. +// A snapshot, as returned by the snapshot RPCs. // -// `expires_at` is reserved for a future TTL surface; v0 leaves it unset. +// 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 @@ -112,9 +113,9 @@ type CreateSnapshotRequest struct { unknownFields protoimpl.UnknownFields Sandbox *SandboxRef `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` - // Forward-compat TTL hint. The v0 server IGNORES this value; the field is - // reserved on the wire so the SDK option lands today and a future slice - // can wire it without a wire break. + // 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"` } diff --git a/pkg/proto/depot/sandbox/v1/source.pb.go b/pkg/proto/depot/sandbox/v1/source.pb.go index e1591b76..587ac2e6 100644 --- a/pkg/proto/depot/sandbox/v1/source.pb.go +++ b/pkg/proto/depot/sandbox/v1/source.pb.go @@ -1,15 +1,6 @@ -// depot.sandbox.v1.Source — shared sandbox-creation source descriptor. -// -// The `source` field on CreateSandboxRequest (and, in a later slice, -// CreateSandboxFromSpecRequest) accepts one of: git, snapshot, image, template. -// Tickets that reference this without introducing it: DEP-4529 (snapshot -// source consumer), DEP-4531 (git source consumer, the closing P20 slice of -// the Source/Git Cluster). -// -// Cluster boundary note: none of GitSource/SnapshotSource/ImageSource/ -// TemplateSource embed SandboxRef, so this file intentionally does NOT -// import refs.proto. If a future variant needs SandboxRef, import refs.proto -// here — NOT sandbox.proto (which would create a cycle). +// 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: @@ -119,19 +110,19 @@ type isSource_Variant interface { } type Source_Git struct { - Git *GitSource `protobuf:"bytes,1,opt,name=git,proto3,oneof"` // DEP-4531 — host-side fetch, ext4 layer mount + 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"` // DEP-4529 — create from snapshot + 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"` // raw OCI image (v1 carry-over) + 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"` // legacy template id (v1 carry-over) + Template *TemplateSource `protobuf:"bytes,4,opt,name=template,proto3,oneof"` // Start from a named template. } func (*Source_Git) isSource_Variant() {} @@ -150,10 +141,9 @@ type GitSource struct { 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"` - // Org secret name carrying credentials. Resolution rules: - // unset → public repo (no auth); set → looked up via org secret store. - // TODO(open-question): DEP-4531 leaves credential resolution underspecified; - // the closing slice picks the resolution semantics. + // 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"` } diff --git a/pkg/proto/depot/sandbox/v1/spec.pb.go b/pkg/proto/depot/sandbox/v1/spec.pb.go index 311d5f11..77ba16a2 100644 --- a/pkg/proto/depot/sandbox/v1/spec.pb.go +++ b/pkg/proto/depot/sandbox/v1/spec.pb.go @@ -1,26 +1,14 @@ -// depot.sandbox.v1.SandboxSpec — declarative spec messages (DEP-4534 / P22). +// Declarative spec messages for a sandbox. // -// Spec Cluster INTERIOR (step 1 of 5). This file lands ONLY the message types -// that describe a sandbox spec: SandboxSpec + nested SSHSpec / ContainerSpec / -// BuildSpec / Hooks. HookSpec + HookStage live in hook.proto (P23). The -// CreateSandboxFromSpec RPC + its request/event types live in spec_rpc.proto -// (M29 / P25b) — moved there to break the sandbox.proto <-> spec.proto cycle -// that would otherwise form. +// 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. // -// MCP support was removed from v0 in M30 (separate roadmap item); MCPSpec / -// MCPServer message types + SandboxSpec.mcp field are intentionally absent. -// -// SandboxSpec mirrors the YAML schema field-for-field per architecture §15. -// CLI shapes carry verbatim into the proto; the SDK adapter does any cosmetic -// renaming on the way out. Reference for the YAML schema: cli/pkg/sandbox/ -// spec.go on the unmerged rob/dep-4395 branch — read-only context, NOT a -// dependency. The server-side YAML parser lives in src/sandbox/spec.ts and is -// dormant in v0 (no RPC consumes it until the closing Spec Cluster slice). -// -// Cluster boundary note: SandboxSpec does NOT embed SandboxRef directly -// (only value-shapes — Source, Resources, Runtime — drawn from sibling proto -// files). This file therefore does NOT import refs.proto, matching the -// dependency rule established by source.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: @@ -44,37 +32,37 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// SandboxSpec mirrors the YAML schema field-for-field. Architecture §15: CLI -// shapes carry verbatim into the proto; the SDK adapter does any cosmetic -// renaming on the way out. +// 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 / lifecycle knobs. + // 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"` - // Source / image. Either `source` or `container.build` may be set; not both. - // v0 parser enforces this mutual exclusion. (The DEP-4526 ticket leaves open - // whether build-then-mount should also be allowed; the conservative v0 - // interpretation is "not both" — revisited in a later slice if customer - // demand emerges.) + // 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"` - // Pre-built image ref; bypasses `container.build`. + // A pre-built image reference to use directly, bypassing `container.build`. Image *string `protobuf:"bytes,8,opt,name=image,proto3,oneof" json:"image,omitempty"` - // Runtime. - 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"` - 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 config — retained for CLI parity even though the SDK does not surface - // SSH details directly. The legacy v1 ssh_config maps here. + // 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"` - // Hook lifecycle stages — `on.create`, `on.start`, etc. + // 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"` } @@ -201,6 +189,7 @@ func (x *SandboxSpec) GetOn() *Hooks { return nil } +// SSH access configuration for a sandbox. type SSHSpec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -256,6 +245,7 @@ func (x *SSHSpec) GetTimeoutMinutes() int32 { return 0 } +// How to obtain the sandbox image when building from a container definition. type ContainerSpec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -303,6 +293,7 @@ func (x *ContainerSpec) GetBuild() *BuildSpec { return nil } +// Instructions for building a container image for the sandbox. type BuildSpec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -391,9 +382,8 @@ func (x *BuildSpec) GetNoCache() bool { return false } -// Hooks per stage. Each stage holds an ordered list of HookSpec entries. -// Bare-string YAML form ("echo hi") parses into HookSpec{command: "echo hi"} -// — see src/sandbox/spec.ts for normalization. +// 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 diff --git a/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go b/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go index 9584fc32..e32a2d5f 100644 --- a/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go +++ b/pkg/proto/depot/sandbox/v1/spec_rpc.pb.go @@ -1,19 +1,14 @@ -// depot.sandbox.v1 — CreateSandboxFromSpec RPC envelope + service -// (DEP-4534 / P25b, Spec Cluster CLOSING). +// The CreateSandboxFromSpec RPC, its request and event types, and the service +// that hosts it. // -// This file hosts the RPC for declarative sandbox creation from a SandboxSpec. -// It lives in its own service (SandboxSpecService) rather than on the existing -// SandboxService — the request/event types reference BOTH Sandbox (from -// sandbox.proto) AND SandboxSpec (from spec.proto), which sets up an import -// cycle if those types are added to sandbox.proto and sandbox.proto then has -// to import spec.proto in turn. Carving the RPC + envelope into a separate -// file with a separate service breaks that cycle cleanly (mirrors the -// hook.proto split-out done at P23 for the same kind of cycle). +// 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. // -// SDK consumes SandboxSpecService alongside SandboxService — same Connect -// transport, same auth surface. The orchestrator implementation lives in -// src/sandbox/spec-orchestrator.ts; the handler is a thin tokenAuth + -// authorizeAndEnterOrg + delegate. +// The SDK consumes SandboxSpecService alongside SandboxService over the same +// transport and auth surface. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: @@ -95,9 +90,9 @@ func (CreateSandboxFromSpecEvent_Error_Stage) EnumDescriptor() ([]byte, []int) { return file_depot_sandbox_v1_spec_rpc_proto_rawDescGZIP(), []int{1, 3, 0} } -// CreateSandboxFromSpecRequest — carries a SandboxSpec (either pre-parsed -// proto or YAML string) plus the ${input.KEY} inputs map. The orchestrator -// applies inputs substitution, validates, then runs the create flow. +// 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 @@ -187,10 +182,10 @@ func (*CreateSandboxFromSpecRequest_SpecYaml) isCreateSandboxFromSpecRequest_Spe func (*CreateSandboxFromSpecRequest_SandboxSpec) isCreateSandboxFromSpecRequest_Spec() {} -// CreateSandboxFromSpecEvent — server-streamed event frames. The orchestrator -// yields SandboxStarted once the VM reaches running state and any post-boot -// source delivery completes; then HookEvent frames per CREATE-stage hook; -// the stream ends with exactly one terminal frame (Done OR Error). +// 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 diff --git a/proto/depot/sandbox/v1/command.proto b/proto/depot/sandbox/v1/command.proto index 66344136..799d0717 100644 --- a/proto/depot/sandbox/v1/command.proto +++ b/proto/depot/sandbox/v1/command.proto @@ -5,26 +5,23 @@ package depot.sandbox.v1; import "depot/sandbox/v1/refs.proto"; import "google/protobuf/timestamp.proto"; -// SandboxCommandExecution surface for depot.sandbox.v1 (DEP-4517, DEP-4519, DEP-4520). +// 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. // -// RunCommand (DEP-4517) and RunCommandPipe (DEP-4519) shipped first. -// GetCommand, ListCommands, and AttachCommand (DEP-4520) ship next. -// KillCommand (DEP-4522) lands in this slice. -// -// SandboxRef is imported from refs.proto (introduced in M7). The previous -// import-cycle workaround — passing `string sandbox_id` on RunCommandRequest — -// is gone now that refs.proto exists as a neutral home for the Ref types. -// -// Bytes-everywhere on the wire (DEP-4404): stdout/stderr chunks are `bytes`, -// not `string`. UTF-8 decoding happens in the SDK adapter, not in the proto. +// 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. -// SandboxCommandExecutionStatus mirrors the lifecycle stages a command transitions through. +// 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: queued, not yet started in the guest. -// RUNNING: started; bytes can be streaming. -// FINISHED: process exited; exit_code populated. -// FAILED: process never started, or the guest reported an error path. -// KILLED: signaled mid-run (DEP-4522). +// 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; @@ -34,35 +31,43 @@ enum SandboxCommandExecutionStatus { SANDBOX_COMMAND_EXECUTION_STATUS_KILLED = 5; } -// SandboxCommandExecution is the persisted metadata for a single RunCommand invocation. The -// row shape lives in src/sandbox/schema-additions.ts (CommandRow); this is its -// wire projection. Populated by Get/List/Attach RPCs in follow-up slices. +// Metadata describing a single command that was run in a sandbox. Returned by +// the lookup, list, and attach calls. message SandboxCommandExecution { - // Server-minted ULID. Architecture §7. + // 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; - // Per-stream cumulative byte counts. Split per architecture §8. + // 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; } -// SandboxCommandExecutionEvent is the streamed event during RunCommand / RunCommandPipe / -// AttachCommand. Bytes everywhere; the SDK decodes UTF-8 at the adapter layer. -// -// EvictedEarlyData fires only on reattach scenarios where the K-Streaming ring -// (architecture §10) had to drop head data before the consumer subscribed. -// It is part of the oneof from day one so the wire shape doesn't need a -// reserved slot retrofit when the BufferedEventLog impl lands with P10b. +// 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; @@ -73,146 +78,159 @@ message SandboxCommandExecutionEvent { 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 byte index for this stream as of the END of `data`. + // 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; } - // Mid-stream failure where the stream itself continues (e.g. one chunk lost - // but more coming). Connect errors remain the primary error channel; this - // payload is for partial-degradation cases. Bare string for v0; structured - // codes are a follow-on if call sites need to discriminate. + // 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; } - // K-Streaming evicted head data before this consumer subscribed. Carries the - // per-stream byte counts that were dropped so the consumer can reason about - // the gap. Architecture §10. + // 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; } } -// RunCommand — DEP-4517. Server-streaming RPC; the response stream is a -// sequence of CommandEvents starting with Started and ending with Finished -// (or terminating with a Connect error). +// 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 { - // Sandbox to run the command in. Tag 1 was `string sandbox_id` in M6 (a - // workaround for the proto import cycle that refs.proto now resolves) — see - // the commit body for the wire-break audit. Safe to reuse tag 1 here because - // RunCommand is shipped Unimplemented; no client depends on the prior shape. + // 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; - // When true, the server returns the Started event and disconnects the - // stream; the command runs in the background and can be reattached via - // AttachCommand (DEP-4520). + // 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; } -// RunCommandPipe — DEP-4519. Client-side bidirectional streaming. The first -// request on the stream MUST carry `init` (the same RunCommandRequest the -// blocking RunCommand RPC uses). Every subsequent request carries `stdin` -// bytes; closing the request stream signals EOF on the command's stdin. -// -// The response stream is a sequence of CommandEvents identical in shape to -// RunCommand's: Started → Stdout/Stderr bytes → Finished (or Connect error). -// -// stdin bytes are NOT persisted in v0 — only stdout and stderr land in the -// ClickHouse log table. AttachCommand replay shows command OUTPUT regardless -// of whether the original command was Run or RunCommandPipe. +// 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; } } -// GetCommand / ListCommands / AttachCommand — DEP-4520. - -// GetCommand looks up command metadata by cmd_id. Authorization is sandbox- -// scoped: the server resolves cmd_id → sandbox_id via a Kysely select filtered -// by the caller's orgId, then enforces sandbox-level access on the resolved -// sandbox row (api/CLAUDE.md authz convention). +// Response containing the metadata for a single command looked up by its id. message GetCommandResponse { + // The command's metadata. SandboxCommandExecution command = 1; } -// ListCommands enumerates commands within a single sandbox, newest first. -// Pagination follows the ListSandboxes cursor convention: page_token is an -// opaque server-minted string that clients pass back verbatim to fetch the -// next page. +// 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 is in this set are returned. - // UNSPECIFIED entries are ignored. The full SandboxCommandExecutionStatus enum is accepted. + // 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; } -// AttachCommand re-subscribes to the output of a previously-issued -// RunCommand / RunCommandPipe. The response stream is the same SandboxCommandExecutionEvent -// sequence those RPCs emit live: replay of persisted Stdout/Stderr chunks -// followed (if the command is still running on the same replica) by live tail. -// -// Sandbox-level authz: cmd_id is resolved to its sandbox_id server-side, then -// the standard sandbox-row org check applies. SandboxCommandExecutionRef carries only the -// cmd_id today (refs.proto's selector pattern); a future sandbox-qualified -// selector form can be added without a wire break. +// 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; - // Per-stream WATERMARK: replay events whose byte_offset is STRICTLY GREATER - // than the supplied offset. The wire field byte_offset is end-of-chunk - // (cumulative bytes through the END of `data`), so a caller that replayed - // up through "I last received stdout byteOffset = 100" supplies - // stdout_offset = 100 and receives the next event starting at >100. Unset - // fields default to 0 — start replay from the beginning of that stream. + // 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 { - // Watermark on stdout: yield events whose byte_offset > stdout_offset. + // Replay only stdout past this cumulative byte offset. optional int64 stdout_offset = 1; - // Watermark on stderr: yield events whose byte_offset > stderr_offset. + // Replay only stderr past this cumulative byte offset. optional int64 stderr_offset = 2; } -// KillCommand — DEP-4522. Targets a previously-issued command by cmd_id and -// asks the host to deliver `signal` (default SIGTERM) to the running process. -// Two-step authorization mirrors AttachCommand: resolve cmd_id → sandbox_id -// scoped to the caller's org, then enforce sandbox-level access on the -// resolved sandbox row. Signal is a string passthrough to vm3 SendSignal; -// unknown signal names propagate vm3's InvalidArgument. Killing a command -// the host registry no longer knows about (already-finished or never- -// registered) returns NotFound — this covers the kill-on-finished race -// without a separate code path. +// 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 name (e.g. "SIGTERM", "SIGINT"). Omit for SIGTERM. SIGKILL is - // rejected by vm3 in v0 to keep the abort path SIGKILL-free; that - // rejection surfaces here as a Connect InvalidArgument. + // 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 index 22995e52..429cca0c 100644 --- a/proto/depot/sandbox/v1/filesystem.proto +++ b/proto/depot/sandbox/v1/filesystem.proto @@ -1,16 +1,15 @@ -// depot.sandbox.v1 — FileSystem surface (DEP-4524). +// File system operations against a sandbox. // -// Covers the exec-first server-side first slice (P15) and the native vm3 swap -// (DEP-4525 / P17). Same proto surface across implementations; the server -// picks the active implementation per-org. +// The server may back these operations with different implementations, but the +// message surface is the same regardless of which one is active. // -// Errors travel as Connect errors with a `FileSystemErrorDetail` attached. -// The SDK adapter (sdk-sandbox/src/errors.ts) converts that into a Node-shape -// Error object carrying `{code, syscall, path, errno}` so customers can keep -// coding against node:fs/promises shape. +// 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 RPC declarations live on `service SandboxService` in sandbox.proto; -// this file only carries messages + enums. +// The RPCs themselves are declared on the sandbox service; this file only +// defines the messages and enums they use. syntax = "proto3"; @@ -18,13 +17,12 @@ package depot.sandbox.v1; import "depot/sandbox/v1/refs.proto"; -// FileSystemErrorCode mirrors the Node fs error codes the SDK exposes. -// Server attaches one of these on a Connect error; client maps to Error.code. +// 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 when the exec-first classifier cannot pin a -// specific Node code (e.g. busybox-stderr phrasing the regex doesn't match); -// callers surface it as a generic FileSystemError without losing the syscall -// + path context. +// 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; @@ -42,10 +40,8 @@ enum FileSystemErrorCode { FILESYSTEM_ERROR_CODE_OTHER = 99; } -// FileSystemErrorDetail is the proto message the server attaches to the -// Connect error (`ConnectError.details`). The SDK reads it back via -// `findDetails(FileSystemErrorDetailSchema)` and synthesizes a Node-shape -// `FileSystemError`. +// 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; @@ -53,8 +49,8 @@ message FileSystemErrorDetail { optional string message = 4; } -// FileType is the discriminator returned by Stat. SDK uses it to back -// `.isDirectory()`/`.isFile()`/... on a node:fs/promises-shape Stats object. +// 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; @@ -66,14 +62,16 @@ enum FileType { FILE_TYPE_SOCKET = 7; } -// ─── Unary RPCs ────────────────────────────────────────────────────────── +// Messages for the unary file system RPCs. message MkdirRequest { SandboxRef sandbox = 1; string path = 2; - // mkdir -p semantics; default false → ENOENT on a missing parent. + // 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 mode (e.g. 0o755 = 0x1ED). Server applies the umask when unset. + // Octal permission mode for the new directory. When unset, the server applies + // its umask. optional uint32 mode = 4; } message MkdirResponse {} @@ -81,7 +79,8 @@ message MkdirResponse {} message StatRequest { SandboxRef sandbox = 1; string path = 2; - // Follow symlinks (stat) vs not (lstat). Default true. + // When true (the default), follow symlinks like stat. When false, report on + // the link itself like lstat. optional bool follow_symlinks = 3; } message StatResponse { @@ -97,8 +96,9 @@ message StatResponse { message ReadDirRequest { SandboxRef sandbox = 1; string path = 2; - // node:fs/promises.readdir({withFileTypes}) parity: when false the entries - // still carry name + type, but the SDK exposes a string[] surface. + // 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 { @@ -112,9 +112,10 @@ message DirEntry { message RemoveRequest { SandboxRef sandbox = 1; string path = 2; - // rm -rf when true. + // When true, remove directories and their contents recursively (rm -rf). optional bool recursive = 3; - // node fs.rm({force: true}) parity — ENOENT is swallowed. + // 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 {} @@ -130,7 +131,8 @@ message CopyFileRequest { SandboxRef sandbox = 1; string from_path = 2; string to_path = 3; - // cp -p — preserve mode/owner/timestamps where the server can. + // When true, preserve the file's mode, owner, and timestamps where the server + // can (cp -p). optional bool preserve_metadata = 4; } message CopyFileResponse {} @@ -145,7 +147,8 @@ message TruncateResponse {} message ChmodRequest { SandboxRef sandbox = 1; string path = 2; - // Octal int; the SDK accepts string ("755") or number (0o755) and converts. + // 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 {} @@ -160,7 +163,7 @@ message ChownResponse {} message SymlinkRequest { SandboxRef sandbox = 1; - // ln -s target link_path + // Create link_path as a symlink pointing at target (ln -s target link_path). string target = 2; string link_path = 3; } @@ -177,29 +180,29 @@ message ReadlinkResponse { message AccessRequest { SandboxRef sandbox = 1; string path = 2; - // F_OK / R_OK / W_OK / X_OK bitmask. Server defaults to F_OK when unset. + // 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 {} -// ─── Streaming RPCs ────────────────────────────────────────────────────── +// Messages for the streaming file system RPCs. message ReadFileRequest { SandboxRef sandbox = 1; string path = 2; } -// FileChunk is the streamed shape for ReadFile — chunks land in order, with -// the last carrying `eof = true` when the implementation knows. The stream -// closing also signals EOF. +// 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; } -// WriteFile — first request on the stream MUST carry `init`; subsequent -// requests carry `data` bytes. `append` selects O_APPEND semantics. `mode` -// is applied if the file is created. +// 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; @@ -210,7 +213,7 @@ message WriteFileRequest { string path = 2; optional uint32 mode = 3; optional bool append = 4; - // mkdir -p the parent path before opening the file. + // When true, create the parent directories before opening the file. optional bool create_directories = 5; } } diff --git a/proto/depot/sandbox/v1/hook.proto b/proto/depot/sandbox/v1/hook.proto index c42bef70..6459a299 100644 --- a/proto/depot/sandbox/v1/hook.proto +++ b/proto/depot/sandbox/v1/hook.proto @@ -1,24 +1,17 @@ -// depot.sandbox.v1 — Hook value-shapes + RunHook wire envelope (DEP-4534 / P23). +// Hook definitions and the request envelope for the RunHook RPC. // -// Spec Cluster INTERIOR (step 2 of 5). This file holds the hook-related -// messages: the value-shapes (HookSpec + HookStage) that the YAML spec uses -// and the wire envelope (RunHookRequest) that the RunHook RPC takes. +// 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. // -// HookSpec and HookStage originally shipped in spec.proto at S24 (P22). -// They moved here at P23 to break an import cycle that would otherwise form -// once sandbox.proto adopts the RunHook RPC: +// 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. // -// sandbox.proto -> hook.proto -> spec.proto -> sandbox.proto -// -// (spec.proto imports sandbox.proto for Resources + Runtime; sandbox.proto -// must import hook.proto for RunHookRequest; so hook.proto cannot transitively -// import sandbox.proto.) Wire shapes are unchanged — both messages remain in -// the depot.sandbox.v1 package; only their `.proto` home is different. -// -// RunHook is wire-reachable today but hidden from the public SDK surface -// (pattern F per architecture §15). The canonical consumer is the -// CreateSandboxFromSpec orchestrator that lands in P25b — no caller exists -// in trunk today. +// 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"; @@ -26,9 +19,9 @@ package depot.sandbox.v1; import "depot/sandbox/v1/refs.proto"; -// HookSpec — a single hook command within one lifecycle stage. The YAML -// bare-string form ("echo hi") parses into HookSpec{command: "echo hi"}; -// see src/sandbox/spec.ts for normalization. +// 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; @@ -36,10 +29,9 @@ message HookSpec { optional int32 timeout_seconds = 4; } -// HookStage names a lifecycle stage. Used by the RunHook RPC + the future -// Hooks-replay surface (architecture §12). Stage label is metadata-only -// from the daemon's perspective — execution shape does NOT vary across the -// six stages; orchestrators decide which stages they fire. +// 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; @@ -50,12 +42,11 @@ enum HookStage { HOOK_STAGE_DOWN = 6; } -// RunHookRequest — DEP-4534 / P23. Server-streaming response is the same -// SandboxCommandExecutionEvent shape RunCommand emits: Started -> Stdout/Stderr bytes -> -// Finished. Detached hooks (hook.detach=true) emit only Started + -// Finished{exit_code=0} on the wire; the actual hook output lands in -// /var/log/depot/hook--.log inside the sandbox (architecture -// §12). +// 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; diff --git a/proto/depot/sandbox/v1/logs.proto b/proto/depot/sandbox/v1/logs.proto index 203b5ee4..a99f94ce 100644 --- a/proto/depot/sandbox/v1/logs.proto +++ b/proto/depot/sandbox/v1/logs.proto @@ -5,34 +5,25 @@ package depot.sandbox.v1; import "depot/sandbox/v1/refs.proto"; import "google/protobuf/timestamp.proto"; -// Logs surface for depot.sandbox.v1 (DEP-4532, M33 — Logs Cluster CLOSING). +// Log streaming for sandboxes. // -// StreamSandboxLogs is the customer-facing read surface that fans the -// per-sandbox boot-output BufferedEventLog (P27a, capture-side -// internal TS type) out to subscribers as proto SandboxLogEvent messages. +// 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. // -// v0 scope (MD-33-1): the four boot-output kinds — `boot_stdout`, `boot_stderr`, -// `boot_finished`, `evicted_early_data`. Wire tags 5..15 are reserved-by-comment -// for follow-on event kinds (metrics, lifecycle, hook_event, command_event_relay -// per Logs Cluster meta-pattern #11) so adding them in subsequent slices does -// not force a wire-shape bump on this oneof. -// -// Replay rail OUT OF SCOPE for v0 (MD-33-3): the per-sandbox buffer is -// process-local on the replica that hosts the CreateSandboxFromSpec -// orchestrator. If StreamSandboxLogs lands on a different replica than the -// one that minted the buffer, the lookup misses and the stream closes -// cleanly with no events. Persistence + cross-replica replay land via a -// follow-on slice (CRR-013 candidate). +// 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. -// SandboxLogEvent is the streamed event the StreamSandboxLogs RPC emits. -// Bytes everywhere on the stdout/stderr rails (DEP-4404); the SDK decodes -// UTF-8 at the adapter layer. +// 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 fires when the K-Streaming ring (architecture §10) had to -// drop head data before this consumer subscribed — analogous to -// SandboxCommandExecutionEvent.EvictedEarlyData. The dropped-bytes counter is single-rail -// here (no per-stream split) because the boot-output buffer is keyed by -// arrival across both stdout/stderr. +// 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; @@ -41,26 +32,23 @@ message SandboxLogEvent { EvictedEarlyData evicted_early_data = 4; } - // Tags 5..15 reserved for future event kinds (metrics, lifecycle, - // hook_event, command_event_relay) so adding them does not force a wire - // bump on this oneof. Logs Cluster meta-pattern #11. + // 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; - // Cumulative byte index for the stdout rail as of the END of `data` - // (end-of-chunk semantics, mirroring SandboxCommandExecutionEvent.StdoutBytes.byte_offset - // from command.proto). Useful for consumers that want to dedup across - // resubscribes that they themselves coordinate at the byte rail; the - // server-side replay watermark is the request's `since_offset`, which - // is a BufferedEventLog ring offset rather than a per-stream byte - // index (MD-33-4). + // 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; - // Cumulative byte index for the stderr rail; see BootStdout.byte_offset. + // 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; } @@ -68,34 +56,26 @@ message SandboxLogEvent { int32 exit_code = 1; google.protobuf.Timestamp finished_at = 2; } - // K-Streaming evicted head data before this consumer subscribed. Carries - // the byte count that was dropped so the consumer can reason about the - // gap. Architecture §10. + // 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; } } -// StreamSandboxLogs — DEP-4532. Server-streaming RPC; the response stream is -// a sequence of SandboxLogEvents drained from the per-sandbox boot-output -// BufferedEventLog (P27a). Terminates when the buffer ends (boot finished) -// or with a Connect error. -// -// `since_offset` is a BufferedEventLog ring offset (NOT a per-stream byte -// index). The server replays events whose ring offset is >= the supplied -// value, and any subscription that requests an offset older than the live -// ring head receives an EvictedEarlyData prefix once before the replay -// starts. +// 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. // -// Cross-replica caveat (MD-33-3 / Risk R1): if this RPC lands on a different -// replica than the CreateSandboxFromSpec orchestrator that minted the -// sandbox, the buffer lookup misses and — for non-terminal sandboxes — the -// stream closes cleanly with no events. The handler also surfaces -// FailedPrecondition for terminal sandboxes (no past-replay rail in v0). +// 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; - // BufferedEventLog ring offset to start from. Replay events whose offset - // is >= since_offset. Unset (or 0) means "from the beginning of the - // resident buffer". + // 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 index 7231615e..4d12c3c5 100644 --- a/proto/depot/sandbox/v1/pty.proto +++ b/proto/depot/sandbox/v1/pty.proto @@ -4,21 +4,19 @@ package depot.sandbox.v1; import "depot/sandbox/v1/refs.proto"; -// Pty surface for depot.sandbox.v1 (DEP-4527 / P18). +// Interactive pseudo-terminal session in a sandbox. // -// Single bidi RPC: SandboxService.OpenPty. The first request on the stream -// MUST carry `start`; subsequent requests carry `stdin` bytes or `resize` -// window changes. Response stream is `data` byte chunks terminated by an -// `Exit` carrying the exit code. +// 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. // -// Implementation passes through to vm3 ProxyService.PtySession (same wire path -// as the legacy ci.v1.OpenPtySession); vm3 hardcodes /bin/sh, so no `shell` -// selector exists at the wire layer. Architecture §13: no reattach in v0; -// closing the stream ends the pty. +// 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. // -// Bytes-everywhere on the wire: pty output is binary-safe (often includes -// ANSI control sequences and other non-UTF-8 bytes); the SDK exposes it as -// Buffer rather than decoding to string at the adapter. +// 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 { @@ -27,9 +25,9 @@ message OpenPtyRequest { Resize resize = 3; } - // Start carries the per-session init parameters. Sent as the first message - // on the stream. Subsequent `start` messages on the same stream are a - // protocol violation and ignored by the handler. + // 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; @@ -38,8 +36,8 @@ message OpenPtyRequest { optional string cwd = 5; } - // Resize is a window-size change. vm3 maps it to the OS pty Setsize ioctl - // which clamps out-of-range values; bounds are intentionally pass-through. + // 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; diff --git a/proto/depot/sandbox/v1/refs.proto b/proto/depot/sandbox/v1/refs.proto index f537204f..2eb1bea0 100644 --- a/proto/depot/sandbox/v1/refs.proto +++ b/proto/depot/sandbox/v1/refs.proto @@ -2,17 +2,17 @@ syntax = "proto3"; package depot.sandbox.v1; -// Cross-cutting selector messages for depot.sandbox.v1. The three Ref types -// live here so sandbox.proto and command.proto can both import them without -// closing a sandbox -> command -> sandbox cycle, and so future surfaces -// (snapshot, spec, pty, filesystem, logs) reach the same shapes without -// having to extract or duplicate them. +// 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. // -// Watts selector pattern (DEP-4343/4426/4356/4485): each Ref is a oneof so -// alt-id forms (org-scoped name, idempotency key) can be added at higher -// field numbers without a wire break. The lone selector today is `id`; per -// the M7 open-question answer, future selectors are NOT pre-declared — a -// slice that needs one adds it then. +// 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 { diff --git a/proto/depot/sandbox/v1/runtime.proto b/proto/depot/sandbox/v1/runtime.proto index 457fc700..331bc7ba 100644 --- a/proto/depot/sandbox/v1/runtime.proto +++ b/proto/depot/sandbox/v1/runtime.proto @@ -1,40 +1,26 @@ -// depot.sandbox.v1 — Resources + Runtime value-shapes. -// -// Extracted from sandbox.proto in P25b (M29) to break the -// sandbox.proto <-> spec.proto cycle that would otherwise form when the -// CreateSandboxFromSpec RPC's request/event types land in sandbox.proto -// (sandbox.proto needs to import spec.proto for SandboxSpec; spec.proto -// imported sandbox.proto for Resources + Runtime). Wire shape is -// unchanged — both messages remain in the depot.sandbox.v1 package; only -// their `.proto` home is different. Mirrors the hook.proto split-out -// pattern at P23. +// Value types describing the compute resources and runtime environment +// requested for a sandbox. syntax = "proto3"; package depot.sandbox.v1; -// Resources caller may request for a sandbox (DEP-4512). -// -// All fields optional; unset means "use server-side default". TODO(policy): -// defaults are currently server-controlled and undocumented at the wire layer. -// A future slice will pin them either here in proto comments or in a published -// policy doc. +// 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; } -// Runtime selector for a sandbox (DEP-4512). Callers pick exactly one of: -// - `named`: a curated runtime identifier (e.g. "node24") resolved server-side -// - `image_ref`: an arbitrary OCI image reference -// -// TODO(open-question): the catalog of named runtimes is intentionally open in -// this slice — any string is accepted on the wire and the server may reject -// unknown names. A follow-up slice picks between a proto enum vs server config. +// 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 index e61fa1ec..1349e750 100644 --- a/proto/depot/sandbox/v1/sandbox.proto +++ b/proto/depot/sandbox/v1/sandbox.proto @@ -13,96 +13,78 @@ import "depot/sandbox/v1/snapshot.proto"; import "depot/sandbox/v1/source.proto"; import "google/protobuf/timestamp.proto"; -// Cold-start scaffold for the v1 sandbox surface (DEP-4511, DEP-4512, DEP-4514, -// DEP-4518). +// 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. // -// This package is the home for the v2 sandbox API that will eventually replace -// depot.agent.v1.SandboxService. The legacy service remains in place; this -// service starts with Create + Get + List, with a SandboxStatus lifecycle enum -// + lifecycle metadata (timestamps, usage block, terminated_by) covering the -// read surface. Stop/Kill/Extend, command/filesystem/pty/snapshot/logs surfaces -// all land in follow-up slices. +// 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); - // CreateSandboxFromSpec (DEP-4534 / P25b) lives on SandboxSpecService in - // spec_rpc.proto, NOT this service, to break the sandbox.proto <-> - // spec.proto cycle. The SDK consumes the new service alongside this one; - // wire shape is independent so existing SandboxService callers are not - // affected. See spec_rpc.proto header. + // 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. - // DEP-4515 — stop is graceful (terminated_by=GRACEFUL); kill is forced - // (terminated_by=FORCED). Both are idempotent on already-terminal sandboxes - // in the sense that they return FailedPrecondition rather than re-running. + // 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); - // DEP-4517 — server-streaming command execution. The response stream begins - // with a Started event and ends with Finished (or terminates with a Connect - // error). Persistence + the K-Streaming buffered-event-log + the vm3 - // Execute proxy land with the next two slices (P10b/P10c); this RPC is - // wire-reachable today but returns Unimplemented until those land. + // 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); - // DEP-4519 — bidirectional-streaming command execution with stdin. The - // first request on the stream MUST carry `init`; subsequent requests carry - // `stdin` bytes. The response stream shape is identical to RunCommand. - // stdin bytes flow through to the guest process and are NOT persisted. + // 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); - // DEP-4534 / P23 — execute a lifecycle hook. Hidden / pattern F: surfaced - // for non-TS callers and consumed by the CreateSandboxFromSpec orchestrator - // (P25b). NOT exposed as an SDK method. Wraps the hook command in - // /bin/sh -lc, prepends /tmp/.depot-env sourcing, exports merged env, - // cd's to /workspace, and either streams CommandEvents (foreground) or - // detaches via setsid with log redirect to - // /var/log/depot/hook--.log (detached). Stage label is - // metadata-only — execution shape does NOT vary across the six HookStage - // values. Architecture §12. Spec Cluster INTERIOR step 2/5. + // 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); - // DEP-4520 — read side of the SandboxCommandExecution surface. Get and List return persisted - // metadata. Attach replays persisted stdout/stderr from ClickHouse and (when - // the command is still running on the same replica) tails live output via - // the process-local per-cmd BufferedEventLog. + // 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); - // DEP-4532 — server-streaming sandbox-scoped log surface. Drains the - // per-sandbox boot-output BufferedEventLog (P27a capture-side) and emits - // SandboxLogEvent messages to the subscriber. v0 emits the four - // boot-output kinds only (boot_stdout / boot_stderr / boot_finished / - // evicted_early_data); future event kinds use the reserved tags 5..15 on - // the SandboxLogEvent oneof. Cross-replica caveat (MD-33-3): if the - // sandbox's boot buffer is hosted on a different replica, the stream - // closes cleanly with no events. No past-replay rail in v0 — terminal - // sandboxes return FailedPrecondition. See logs.proto. + // 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); - // DEP-4522 — deliver a signal to a running command. Default signal is + // KillCommand delivers a signal to a running command. The default signal is // SIGTERM; SIGINT is also accepted. SIGKILL is rejected with - // InvalidArgument in v0 (the abort path stays SIGKILL-free). Kills of - // commands that have already finished (or were never registered) return - // NotFound, which the SDK surfaces as Code.NotFound. + // InvalidArgument. If the command has already finished or was never + // registered, this returns NotFound. rpc KillCommand(KillCommandRequest) returns (KillCommandResponse); - // DEP-4527 — interactive pseudo-terminal. Bidi-streaming RPC; the first - // request carries `start`, subsequent requests carry stdin bytes or window + // 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, then a single `exit` carrying the exit code. v0 always runs - // /bin/sh; the shell is intentionally not selectable at the wire layer. - // Architecture §13: no reattach — closing the stream ends the pty. + // 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 (filesystem.proto, DEP-4524) ──────────────────────────── - // Same RPC surface across exec-first (P15) and native vm3 (P17) - // implementations; the server picks per-org behind a resolver. Errors - // travel as Connect errors with a FileSystemErrorDetail attached — see - // src/sandbox/fs-errors.ts for the remapper. + // 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); @@ -118,39 +100,29 @@ service SandboxService { rpc ReadFile(ReadFileRequest) returns (stream FileChunk); rpc WriteFile(stream WriteFileRequest) returns (WriteFileResponse); - // ─── Snapshot (snapshot.proto, DEP-4529) ──────────────────────────────── - // Durable filesystem snapshots of a sandbox. The wire surface + the SDK - // ergonomics ship here; the vm3-side snapshot/restore pipeline that backs - // these RPCs is a follow-on slice — v0 handlers return Unimplemented until - // that lands. CreateSnapshot will additionally fire a graceful StopSandbox - // on the source sandbox once the snapshot is durable (Vercel parity, - // architecture §6). + // 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 lives in refs.proto alongside the other cross-cutting selector -// messages (SandboxCommandExecutionRef, SnapshotRef). See the comment at the top of -// refs.proto for the selector-pattern rationale. +// SandboxRef, the selector used to identify a sandbox, lives in refs.proto +// alongside the other selector messages (SandboxCommandExecutionRef, +// SnapshotRef). -// SandboxStatus is the lifecycle enum for a sandbox. +// SandboxStatus describes where a sandbox is in its lifecycle. // -// CREATED: row materialized, no compute backing assigned yet. -// ASSIGNED: compute backing assigned, VM not yet started. -// STARTING: VM boot in progress. -// RUNNING: VM booted, ready to accept commands. -// FINISHED: clean termination (graceful stop, normal exit). -// CANCELLED: forced termination (kill). -// FAILED: ended with an error (image pull fail, OOM, panic, etc.). -// -// Values mirror the orchestration-side ComputeSandbox.state vocabulary at v0 -// to minimize the projection layer. The proto is its own type — when v2 needs -// to diverge (e.g. surface a value the orchestration doesn't track, or hide -// a CI-only sub-state), it can do so without coordinating with the underlying -// schema. Terminal-state granularity today (FINISHED vs CANCELLED vs FAILED) -// carries the gross reason. +// 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; @@ -162,14 +134,15 @@ enum SandboxStatus { SANDBOX_STATUS_FAILED = 7; } -// TerminationReason classifies how a sandbox ended (DEP-4518). Populated only -// on terminal status (FINISHED / CANCELLED / FAILED). UNSPECIFIED is the proto sentinel and -// is never written by the server; callers MUST treat it as "unknown". +// 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: StopSandbox path — clean shutdown the caller asked for. -// FORCED: KillSandbox path — caller asked for an immediate end. -// TIMED_OUT: TTL expired — server-initiated termination. -// SYSTEM_FAULT: host failure, OOM, panic, or any other server-side error. +// 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; @@ -178,72 +151,62 @@ enum TerminationReason { TERMINATION_REASON_SYSTEM_FAULT = 4; } -// Resources + Runtime extracted to runtime.proto (M29 / P25b) to break the -// sandbox.proto <-> spec.proto cycle. See runtime.proto header. +// The Resources and Runtime messages are defined in runtime.proto. -// Sandbox is the canonical message returned by the lifecycle RPCs. -// -// Field numbering — the 4..10 block was reserved-by-comment after M2; M4 -// consumes it fully along with 13..15 for the terminal metadata. 11/12 stay -// with Resources/Runtime (claimed by M2). No gaps remain. +// 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 (DEP-4518). created_at is always populated; the other - // two are populated once the sandbox reaches the corresponding state. + // 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; - // TTL surface (DEP-4518). expires_at is authoritative storage when known; - // timeout_ms_remaining is recomputed on read against now(). Both are unset - // when the sandbox carries no timeout policy. + // 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 (DEP-4518). Populated only after terminal status, and only - // when a metering source is available. TODO(metering): wire to the - // SandboxUsage table populated by tasks/cron/createSandboxUsage.ts. Until - // wired, both fields remain unset even on terminal sandboxes. + // 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; - // Effective resources + runtime echoed back from the request so callers see - // what the server actually resolved (DEP-4512). + // 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 (DEP-4518). All three are populated only on - // terminal status (FINISHED / CANCELLED / FAILED). exit_code uses int32 in the Unix range - // (0..255); negative values are reserved for future signal-coded use. + // 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; } // NetworkUsage records bytes transferred over the sandbox's primary network -// interface (DEP-4518). Split counters mirror typical cloud-vendor metering -// surfaces and keep ingress/egress visible separately even when one direction -// dominates. +// interface, with ingress and egress tracked separately. message NetworkUsage { int64 ingress_bytes = 1; int64 egress_bytes = 2; } message CreateSandboxRequest { - // Human label for the sandbox, scoped to the organization. Optional. + // Optional human-readable label for the sandbox, scoped to the organization. optional string name = 1; - // Requested resources; server applies defaults for unset fields (DEP-4512). + // Requested resources. The server applies defaults for any unset fields. optional Resources resources = 2; - // Requested runtime; server resolves `named` against its catalog or pulls - // `image_ref` directly (DEP-4512). + // Requested runtime. The server resolves a `named` runtime against its + // catalog or pulls an `image_ref` directly. optional Runtime runtime = 3; - // Sandbox content source — git/snapshot/image/template variants. The v0 - // CreateSandbox handler does NOT read this field; it is wired by the - // closing slice of the Source/Git Cluster (DEP-4531) and consumed by - // DEP-4529 (snapshot). Unset == prior behavior. + // 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; } @@ -255,16 +218,14 @@ message GetSandboxResponse { Sandbox sandbox = 1; } -// ListSandboxes — DEP-4514. State + creation-time filter, cursor-based -// pagination (page_token encodes the last seen ComputeSandbox.createdAt; -// the cursor pattern mirrors src/domains/ci/service/list-runs.ts). +// 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 { - // Status filter: if non-empty, only sandboxes whose status is in this set - // are returned. (Sketch uses the plural `states` for the field name; - // mirrored here.) + // 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; @@ -277,34 +238,32 @@ message ListSandboxesResponse { optional string next_page_token = 2; } -// StopSandbox — DEP-4515. Graceful shutdown. The server records the termination -// request on the row immediately; when `blocking` is true the RPC waits up to a -// server-side cap for the VM to reach terminal status before returning. -// -// `signal` lives on KillSandbox, not here (architecture §5). +// 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 polls until the sandbox reaches a terminal state (or - // the server-side cap expires) before responding. If false (default), the + // 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 row after recording the termination request. Status is either - // either RUNNING (with terminationRequestedAt non-null) or a terminal status or a terminal status when - // the row transitioned before the read. + // 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; } -// KillSandbox — DEP-4515. Forced termination. Fire-and-forget; no blocking -// option. `signal` is documented at the wire level but ignored by the v0 -// server (which always asks the VM scheduler to mark the row `cancelled`). -// A future slice wires this through to vm3 SendSignal. +// 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 (e.g. "SIGKILL"). Reserved for forward-compat; v0 ignores it - // and always issues a hard cancel. + // Signal name (for example "SIGKILL"). Reserved for forward compatibility; + // it is currently ignored and a hard cancel is always issued. optional string signal = 2; } diff --git a/proto/depot/sandbox/v1/snapshot.proto b/proto/depot/sandbox/v1/snapshot.proto index fcf4d3d8..72d84c91 100644 --- a/proto/depot/sandbox/v1/snapshot.proto +++ b/proto/depot/sandbox/v1/snapshot.proto @@ -1,11 +1,11 @@ -// depot.sandbox.v1.Snapshot — durable filesystem snapshot of a sandbox. +// A durable filesystem snapshot of a sandbox, with the RPCs to create, get, +// list, and delete one. // -// DEP-4529 — Snapshot Cluster CRUD surface. The cluster ships the wire surface -// + the SDK ergonomics; the vm3-side snapshot/restore pipeline that backs the -// handlers is a follow-on. v0 handlers return Unimplemented until that lands. +// 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. // -// Storage reuses the legacy SandboxTemplate registry (one row per snapshot, -// soft-deleted via deletedAt). The cross-package selector SnapshotRef lives in +// The selector used to reference a snapshot, SnapshotRef, is defined in // refs.proto. syntax = "proto3"; @@ -16,9 +16,10 @@ import "depot/sandbox/v1/refs.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -// Snapshot is the canonical message returned by the Snapshot CRUD RPCs. +// A snapshot, as returned by the snapshot RPCs. // -// `expires_at` is reserved for a future TTL surface; v0 leaves it unset. +// 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; @@ -28,9 +29,9 @@ message Snapshot { message CreateSnapshotRequest { SandboxRef sandbox = 1; - // Forward-compat TTL hint. The v0 server IGNORES this value; the field is - // reserved on the wire so the SDK option lands today and a future slice - // can wire it without a wire break. + // 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; } diff --git a/proto/depot/sandbox/v1/source.proto b/proto/depot/sandbox/v1/source.proto index 36bd4d5c..722e142b 100644 --- a/proto/depot/sandbox/v1/source.proto +++ b/proto/depot/sandbox/v1/source.proto @@ -1,15 +1,6 @@ -// depot.sandbox.v1.Source — shared sandbox-creation source descriptor. -// -// The `source` field on CreateSandboxRequest (and, in a later slice, -// CreateSandboxFromSpecRequest) accepts one of: git, snapshot, image, template. -// Tickets that reference this without introducing it: DEP-4529 (snapshot -// source consumer), DEP-4531 (git source consumer, the closing P20 slice of -// the Source/Git Cluster). -// -// Cluster boundary note: none of GitSource/SnapshotSource/ImageSource/ -// TemplateSource embed SandboxRef, so this file intentionally does NOT -// import refs.proto. If a future variant needs SandboxRef, import refs.proto -// here — NOT sandbox.proto (which would create a cycle). +// 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"; @@ -17,10 +8,10 @@ package depot.sandbox.v1; message Source { oneof variant { - GitSource git = 1; // DEP-4531 — host-side fetch, ext4 layer mount - SnapshotSource snapshot = 2; // DEP-4529 — create from snapshot - ImageSource image = 3; // raw OCI image (v1 carry-over) - TemplateSource template = 4; // legacy template id (v1 carry-over) + 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. } } @@ -28,10 +19,9 @@ message GitSource { string url = 1; optional string branch = 2; optional string commit = 3; - // Org secret name carrying credentials. Resolution rules: - // unset → public repo (no auth); set → looked up via org secret store. - // TODO(open-question): DEP-4531 leaves credential resolution underspecified; - // the closing slice picks the resolution semantics. + // 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; } @@ -41,9 +31,8 @@ message SnapshotSource { message ImageSource { string image_ref = 1; - // Future: optional auth handle. v0 assumes the registry is public or - // covered by the host-side credentials helper. Reserved for follow-on - // tickets in the Public Beta milestone (external OCI image support). + // The registry must be either public or reachable using credentials the + // host already provides; per-image authentication is not yet supported. } message TemplateSource { diff --git a/proto/depot/sandbox/v1/spec.proto b/proto/depot/sandbox/v1/spec.proto index e1a479af..41fdd967 100644 --- a/proto/depot/sandbox/v1/spec.proto +++ b/proto/depot/sandbox/v1/spec.proto @@ -1,26 +1,14 @@ -// depot.sandbox.v1.SandboxSpec — declarative spec messages (DEP-4534 / P22). +// Declarative spec messages for a sandbox. // -// Spec Cluster INTERIOR (step 1 of 5). This file lands ONLY the message types -// that describe a sandbox spec: SandboxSpec + nested SSHSpec / ContainerSpec / -// BuildSpec / Hooks. HookSpec + HookStage live in hook.proto (P23). The -// CreateSandboxFromSpec RPC + its request/event types live in spec_rpc.proto -// (M29 / P25b) — moved there to break the sandbox.proto <-> spec.proto cycle -// that would otherwise form. +// 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. // -// MCP support was removed from v0 in M30 (separate roadmap item); MCPSpec / -// MCPServer message types + SandboxSpec.mcp field are intentionally absent. -// -// SandboxSpec mirrors the YAML schema field-for-field per architecture §15. -// CLI shapes carry verbatim into the proto; the SDK adapter does any cosmetic -// renaming on the way out. Reference for the YAML schema: cli/pkg/sandbox/ -// spec.go on the unmerged rob/dep-4395 branch — read-only context, NOT a -// dependency. The server-side YAML parser lives in src/sandbox/spec.ts and is -// dormant in v0 (no RPC consumes it until the closing Spec Cluster slice). -// -// Cluster boundary note: SandboxSpec does NOT embed SandboxRef directly -// (only value-shapes — Source, Resources, Runtime — drawn from sibling proto -// files). This file therefore does NOT import refs.proto, matching the -// dependency rule established by source.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"; @@ -30,55 +18,57 @@ import "depot/sandbox/v1/hook.proto"; import "depot/sandbox/v1/runtime.proto"; import "depot/sandbox/v1/source.proto"; -// SandboxSpec mirrors the YAML schema field-for-field. Architecture §15: CLI -// shapes carry verbatim into the proto; the SDK adapter does any cosmetic -// renaming on the way out. +// 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 / lifecycle knobs. + // 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; - // Source / image. Either `source` or `container.build` may be set; not both. - // v0 parser enforces this mutual exclusion. (The DEP-4526 ticket leaves open - // whether build-then-mount should also be allowed; the conservative v0 - // interpretation is "not both" — revisited in a later slice if customer - // demand emerges.) + // 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; - // Pre-built image ref; bypasses `container.build`. + // A pre-built image reference to use directly, bypassing `container.build`. optional string image = 8; - // Runtime. + // 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 config — retained for CLI parity even though the SDK does not surface - // SSH details directly. The legacy v1 ssh_config maps here. + // SSH configuration. Retained for parity with the CLI even though the SDK does + // not surface SSH details directly. optional SSHSpec ssh = 12; - // Field tag 13 was previously MCPSpec mcp; MCP support removed from v0 in - // M30 (separate roadmap item). Tag remains reserved so a follow-on slice - // can reintroduce the field without wire-shape ambiguity. + // Tag 13 is reserved so that an MCP field can be added later without wire-shape + // ambiguity. reserved 13; reserved "mcp"; - // Hook lifecycle stages — `on.create`, `on.start`, etc. + // 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; @@ -89,9 +79,8 @@ message BuildSpec { optional bool no_cache = 6; } -// Hooks per stage. Each stage holds an ordered list of HookSpec entries. -// Bare-string YAML form ("echo hi") parses into HookSpec{command: "echo hi"} -// — see src/sandbox/spec.ts for normalization. +// 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; @@ -101,14 +90,10 @@ message Hooks { repeated HookSpec down = 6; } -// HookSpec + HookStage moved to hook.proto in P23 to break the import cycle -// that would otherwise form when sandbox.proto adopts the RunHook RPC -// (sandbox.proto -> hook.proto -> spec.proto -> sandbox.proto). The wire -// shapes are unchanged — both remain in the depot.sandbox.v1 package — and -// spec.proto now imports hook.proto for the Hooks{HookSpec[]} fields above. +// 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. // -// CreateSandboxFromSpec request/event envelopes live in spec_rpc.proto (not -// here). spec_rpc.proto imports both sandbox.proto (for Sandbox in the -// SandboxStarted/Done events) and this file (for SandboxSpec). Resources + -// Runtime moved out of sandbox.proto into runtime.proto in M29 so spec.proto -// no longer needs to import sandbox.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 index 4bb973ed..697c0dc2 100644 --- a/proto/depot/sandbox/v1/spec_rpc.proto +++ b/proto/depot/sandbox/v1/spec_rpc.proto @@ -1,19 +1,14 @@ -// depot.sandbox.v1 — CreateSandboxFromSpec RPC envelope + service -// (DEP-4534 / P25b, Spec Cluster CLOSING). +// The CreateSandboxFromSpec RPC, its request and event types, and the service +// that hosts it. // -// This file hosts the RPC for declarative sandbox creation from a SandboxSpec. -// It lives in its own service (SandboxSpecService) rather than on the existing -// SandboxService — the request/event types reference BOTH Sandbox (from -// sandbox.proto) AND SandboxSpec (from spec.proto), which sets up an import -// cycle if those types are added to sandbox.proto and sandbox.proto then has -// to import spec.proto in turn. Carving the RPC + envelope into a separate -// file with a separate service breaks that cycle cleanly (mirrors the -// hook.proto split-out done at P23 for the same kind of cycle). +// 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. // -// SDK consumes SandboxSpecService alongside SandboxService — same Connect -// transport, same auth surface. The orchestrator implementation lives in -// src/sandbox/spec-orchestrator.ts; the handler is a thin tokenAuth + -// authorizeAndEnterOrg + delegate. +// The SDK consumes SandboxSpecService alongside SandboxService over the same +// transport and auth surface. syntax = "proto3"; @@ -24,17 +19,16 @@ import "depot/sandbox/v1/hook.proto"; import "depot/sandbox/v1/sandbox.proto"; import "depot/sandbox/v1/spec.proto"; -// SandboxSpecService — DEP-4534 / P25b. Single RPC for now; -// CreateSandboxFromSpec is the closing slice of the Spec Cluster and -// composes the dormant helpers (parse, source resolution, createComputeSandbox, -// boot-delivery, hook-runner) into one server-streamed flow. +// 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); } -// CreateSandboxFromSpecRequest — carries a SandboxSpec (either pre-parsed -// proto or YAML string) plus the ${input.KEY} inputs map. The orchestrator -// applies inputs substitution, validates, then runs the create flow. +// 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; @@ -43,18 +37,18 @@ message CreateSandboxFromSpecRequest { map inputs = 3; } -// CreateSandboxFromSpecEvent — server-streamed event frames. The orchestrator -// yields SandboxStarted once the VM reaches running state and any post-boot -// source delivery completes; then HookEvent frames per CREATE-stage hook; -// the stream ends with exactly one terminal frame (Done OR Error). +// 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; - // Numbers 5,6 reserved for BuildLog / ConvertLog when TIER 1 of the - // build helper unlocks; see src/sandbox/build.ts header (TIER LADDER). + // Tags 5 and 6 are reserved for build and convert log events to be added + // later. } message SandboxStarted { From b109a5e4a682ebac4844c45717bdac4c9d338d20 Mon Sep 17 00:00:00 2001 From: Rob Stolarz Date: Fri, 29 May 2026 11:55:07 -0700 Subject: [PATCH 5/7] sandbox: surface the sandbox name returned by the API The Sandbox message now carries the create-time label, so add it to the vendored proto and show it in `depot sandbox create` output when set. Co-Authored-By: Claude Opus 4.8 (1M context) --- pkg/cmd/sandbox/create.go | 8 +- pkg/cmd/sandbox/state.go | 8 +- pkg/proto/depot/sandbox/v1/sandbox.pb.go | 635 ++++++++++++----------- proto/depot/sandbox/v1/sandbox.proto | 5 + 4 files changed, 339 insertions(+), 317 deletions(-) diff --git a/pkg/cmd/sandbox/create.go b/pkg/cmd/sandbox/create.go index 55bf4e68..62b147ff 100644 --- a/pkg/cmd/sandbox/create.go +++ b/pkg/cmd/sandbox/create.go @@ -61,8 +61,12 @@ The runtime image defaults to the server-side default when --image is omitted.`, if sb == nil { return fmt.Errorf("create sandbox: server returned no sandbox") } - fmt.Fprintf(cmd.OutOrStdout(), "Sandbox %s created (org %s, status %s)\n", - sb.SandboxId, sb.OrganizationId, sb.Status.String()) + 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(), "Shell: depot sandbox shell %s\n", sb.SandboxId) fmt.Fprintf(cmd.OutOrStdout(), "Kill: depot sandbox kill %s\n", sb.SandboxId) return nil diff --git a/pkg/cmd/sandbox/state.go b/pkg/cmd/sandbox/state.go index a5f160af..19dc981a 100644 --- a/pkg/cmd/sandbox/state.go +++ b/pkg/cmd/sandbox/state.go @@ -11,10 +11,10 @@ import ( // We track the most recent sandbox_id per spec name in // ~/.depot/sandbox-state/.id so `depot sandbox from-spec` can // refuse to launch a duplicate while one is already alive. This is a pure -// local convenience — the API doesn't carry a spec-name surface yet -// (sandbox.v1.Sandbox has no name field beyond the optional create-time -// label), so cross-machine collisions still slip through. Once the proto -// gains a name field, this lookup should move server-side. +// local convenience: the sandbox's create-time label is now returned on reads, +// but the API still has no server-side registry that maps a spec name to its +// live sandbox, so cross-machine collisions slip through. Once that exists, +// this lookup should move server-side. func sandboxStateDir() (string, error) { home, err := os.UserHomeDir() diff --git a/pkg/proto/depot/sandbox/v1/sandbox.pb.go b/pkg/proto/depot/sandbox/v1/sandbox.pb.go index c783e043..cad26a8b 100644 --- a/pkg/proto/depot/sandbox/v1/sandbox.pb.go +++ b/pkg/proto/depot/sandbox/v1/sandbox.pb.go @@ -194,6 +194,10 @@ type Sandbox struct { 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() { @@ -333,6 +337,13 @@ func (x *Sandbox) GetErrorMessage() string { 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 { @@ -990,7 +1001,7 @@ var file_depot_sandbox_v1_sandbox_proto_rawDesc = []byte{ 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, 0xe7, 0x07, 0x0a, 0x07, 0x53, 0x61, + 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, @@ -1043,330 +1054,332 @@ var file_depot_sandbox_v1_sandbox_proto_rawDesc = []byte{ 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, 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, 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, + 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, 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, + 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, 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, + 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, 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, + 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, 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, + 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, - 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, + 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, - 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, + 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, 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, + 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, 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, + 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, 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, + 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, 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, + 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, 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, + 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 ( diff --git a/proto/depot/sandbox/v1/sandbox.proto b/proto/depot/sandbox/v1/sandbox.proto index 1349e750..5107a547 100644 --- a/proto/depot/sandbox/v1/sandbox.proto +++ b/proto/depot/sandbox/v1/sandbox.proto @@ -188,6 +188,11 @@ message Sandbox { 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 From 89e56c4b8c0215790cb95be4d15afc45634ae2e6 Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Mon, 8 Jun 2026 14:14:10 -0700 Subject: [PATCH 6/7] fix: address sandbox PR feedback --- pkg/cmd/sandbox/common.go | 34 ---------------------------------- pkg/cmd/sandbox/common_test.go | 28 ---------------------------- pkg/cmd/sandbox/exec.go | 11 +---------- pkg/cmd/sandbox/hooks.go | 2 +- 4 files changed, 2 insertions(+), 73 deletions(-) diff --git a/pkg/cmd/sandbox/common.go b/pkg/cmd/sandbox/common.go index 52188777..a312f48c 100644 --- a/pkg/cmd/sandbox/common.go +++ b/pkg/cmd/sandbox/common.go @@ -38,22 +38,6 @@ func sandboxRef(id string) *sandboxv1.SandboxRef { } } -// commandRef wraps a command id in the depot.sandbox.v1 selector oneof. -// Used by AttachCommand / KillCommand callers. -func commandRef(id string) *sandboxv1.SandboxCommandExecutionRef { - return &sandboxv1.SandboxCommandExecutionRef{ - Selector: &sandboxv1.SandboxCommandExecutionRef_Id{Id: id}, - } -} - -// snapshotRef wraps a snapshot id in the depot.sandbox.v1 selector oneof. -// Used by GetSnapshot / DeleteSnapshot. -func snapshotRef(id string) *sandboxv1.SnapshotRef { - return &sandboxv1.SnapshotRef{ - Selector: &sandboxv1.SnapshotRef_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 / @@ -63,19 +47,9 @@ func snapshotRef(id string) *sandboxv1.SnapshotRef { // see the gap; the stream continues afterward. Error frames are surfaced the // same way and do not abort the loop (the server is signalling partial // degradation, not a fatal end — Connect transport errors are the fatal path). -// detachedMode flags a RunCommand stream that the server will close after -// Started — no Finished event will arrive, and that's not an error. -type detachedMode bool - -const ( - streamUntilFinished detachedMode = false - streamUntilStarted detachedMode = true -) - func consumeCommandEventStream( stream *connect.ServerStreamForClient[sandboxv1.SandboxCommandExecutionEvent], stdout, stderr io.Writer, - mode detachedMode, ) (exitCode int32, err error) { defer func() { _ = stream.Close() }() for stream.Receive() { @@ -109,13 +83,5 @@ func consumeCommandEventStream( if err := stream.Err(); err != nil && !errors.Is(err, io.EOF) { return 0, fmt.Errorf("command stream: %w", err) } - // In detached mode the server hangs up after Started — no Finished is - // expected and "exit 0, no error" is the right success signal. For - // non-detached commands, end-of-stream without Finished means the server - // disconnected mid-run; surface that as an error so callers don't conflate - // a clean disconnect with a real exit-0 completion. - if mode == streamUntilStarted { - return 0, nil - } 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 index 68a51bba..17db8440 100644 --- a/pkg/cmd/sandbox/common_test.go +++ b/pkg/cmd/sandbox/common_test.go @@ -22,31 +22,3 @@ func TestSandboxRef_PinnedShape(t *testing.T) { t.Errorf("id = %q, want cs-abc123", sel.Id) } } - -func TestCommandRef_PinnedShape(t *testing.T) { - r := commandRef("cmd-xyz789") - if r == nil { - t.Fatal("commandRef returned nil") - } - sel, ok := r.Selector.(*sandboxv1.SandboxCommandExecutionRef_Id) - if !ok { - t.Fatalf("expected CommandRef_Id selector, got %T", r.Selector) - } - if sel.Id != "cmd-xyz789" { - t.Errorf("id = %q, want cmd-xyz789", sel.Id) - } -} - -func TestSnapshotRef_PinnedShape(t *testing.T) { - r := snapshotRef("snap-456") - if r == nil { - t.Fatal("snapshotRef returned nil") - } - sel, ok := r.Selector.(*sandboxv1.SnapshotRef_Id) - if !ok { - t.Fatalf("expected SnapshotRef_Id selector, got %T", r.Selector) - } - if sel.Id != "snap-456" { - t.Errorf("id = %q, want snap-456", sel.Id) - } -} diff --git a/pkg/cmd/sandbox/exec.go b/pkg/cmd/sandbox/exec.go index 3e4df93c..3d34b465 100644 --- a/pkg/cmd/sandbox/exec.go +++ b/pkg/cmd/sandbox/exec.go @@ -54,7 +54,6 @@ parsing stops there.`, cwd, _ := cmd.Flags().GetString("cwd") envSlice, _ := cmd.Flags().GetStringArray("env") sudo, _ := cmd.Flags().GetBool("sudo") - detached, _ := cmd.Flags().GetBool("detached") envMap, err := parseEnvSlice(envSlice) if err != nil { @@ -73,9 +72,6 @@ parsing stops there.`, if sudo { req.Sudo = &sudo } - if detached { - req.Detached = &detached - } // The --timeout flag is deprecated. Warn if it is still set, but // do not fail, since the wire protocol no longer carries a timeout. @@ -88,11 +84,7 @@ parsing stops there.`, return fmt.Errorf("run command: %w", err) } - mode := streamUntilFinished - if detached { - mode = streamUntilStarted - } - exit, err := consumeCommandEventStream(stream, os.Stdout, os.Stderr, mode) + exit, err := consumeCommandEventStream(stream, os.Stdout, os.Stderr) if err != nil { return err } @@ -106,7 +98,6 @@ parsing stops there.`, 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().Bool("detached", false, "Return after Started; reattach later via AttachCommand") // 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") diff --git a/pkg/cmd/sandbox/hooks.go b/pkg/cmd/sandbox/hooks.go index c5955d0e..44cb1047 100644 --- a/pkg/cmd/sandbox/hooks.go +++ b/pkg/cmd/sandbox/hooks.go @@ -147,7 +147,7 @@ func runHook(ctx context.Context, client sandboxv1connect.SandboxServiceClient, // command with setsid and exits 0, so the stream reaches Finished right // away. Waiting until finished is correct for both detached and // foreground hooks. - exit, err := consumeCommandEventStream(stream, stdout, stderr, streamUntilFinished) + exit, err := consumeCommandEventStream(stream, stdout, stderr) if err != nil { return err } From 7032eb4511df562ede44538b8503114f62f7e2c9 Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Mon, 8 Jun 2026 15:59:30 -0700 Subject: [PATCH 7/7] fix: address sandbox reviewer feedback --- pkg/cmd/sandbox/common.go | 24 +- pkg/cmd/sandbox/common_test.go | 162 + pkg/cmd/sandbox/create.go | 5 +- pkg/cmd/sandbox/exec.go | 83 +- pkg/cmd/sandbox/hooks.go | 111 +- pkg/cmd/sandbox/kill.go | 56 +- pkg/cmd/sandbox/sandbox_test.go | 114 + pkg/cmd/sandbox/state.go | 66 - pkg/cmd/sandbox/stop.go | 50 +- .../v1/agentv1connect/sandbox.connect.go | 184 +- pkg/proto/depot/agent/v1/sandbox.pb.go | 2781 ++++------------- pkg/pty/resize_unix.go | 43 - pkg/pty/resize_windows.go | 10 - pkg/pty/session.go | 25 +- pkg/pty/session_sandboxv1.go | 143 - pkg/sandbox/spec.go | 281 +- pkg/sandbox/spec_test.go | 99 + proto/depot/agent/v1/sandbox.proto | 136 - 18 files changed, 1310 insertions(+), 3063 deletions(-) delete mode 100644 pkg/cmd/sandbox/state.go delete mode 100644 pkg/pty/session_sandboxv1.go create mode 100644 pkg/sandbox/spec_test.go diff --git a/pkg/cmd/sandbox/common.go b/pkg/cmd/sandbox/common.go index a312f48c..03ce9eb4 100644 --- a/pkg/cmd/sandbox/common.go +++ b/pkg/cmd/sandbox/common.go @@ -44,9 +44,8 @@ func sandboxRef(id string) *sandboxv1.SandboxRef { // 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 are surfaced the -// same way and do not abort the loop (the server is signalling partial -// degradation, not a fatal end — Connect transport errors are the fatal path). +// 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, @@ -59,11 +58,15 @@ func consumeCommandEventStream( // metadata only — nothing to print case *sandboxv1.SandboxCommandExecutionEvent_Stdout: if ev.Stdout != nil && len(ev.Stdout.Data) > 0 { - _, _ = stdout.Write(ev.Stdout.Data) + 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 { - _, _ = stderr.Write(ev.Stderr.Data) + 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 { @@ -71,12 +74,17 @@ func consumeCommandEventStream( } case *sandboxv1.SandboxCommandExecutionEvent_Error_: if ev.Error != nil { - fmt.Fprintf(stderr, "[command-error] %s\n", ev.Error.Reason) + 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 { - fmt.Fprintf(stderr, "[evicted-early-data] dropped %d bytes stdout / %d bytes stderr\n", - ev.Evicted.DroppedBytesStdout, ev.Evicted.DroppedBytesStderr) + 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) + } } } } diff --git a/pkg/cmd/sandbox/common_test.go b/pkg/cmd/sandbox/common_test.go index 17db8440..21e596e9 100644 --- a/pkg/cmd/sandbox/common_test.go +++ b/pkg/cmd/sandbox/common_test.go @@ -1,8 +1,16 @@ 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" ) @@ -22,3 +30,157 @@ func TestSandboxRef_PinnedShape(t *testing.T) { 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 index 62b147ff..8fd2b32d 100644 --- a/pkg/cmd/sandbox/create.go +++ b/pkg/cmd/sandbox/create.go @@ -12,9 +12,6 @@ import ( // 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. -// -// For a declarative flow driven by a sandbox.depot.yml file, use -// `depot sandbox from-spec`. func newSandboxCreate() *cobra.Command { cmd := &cobra.Command{ Use: "create [flags]", @@ -67,7 +64,7 @@ The runtime image defaults to the server-side default when --image is omitted.`, } 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(), "Shell: depot sandbox shell %s\n", sb.SandboxId) + 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 }, diff --git a/pkg/cmd/sandbox/exec.go b/pkg/cmd/sandbox/exec.go index 3d34b465..0a5ebd9a 100644 --- a/pkg/cmd/sandbox/exec.go +++ b/pkg/cmd/sandbox/exec.go @@ -1,12 +1,14 @@ package sandbox import ( + "context" "fmt" "os" "strings" "connectrpc.com/connect" "github.com/depot/cli/pkg/api" + 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" @@ -32,7 +34,10 @@ parsing stops there.`, # Streaming loop depot sandbox exec cs-abc123 -- /bin/bash -lc 'for i in {1..10}; do echo $i; sleep 1; done' `, - Args: cobra.MinimumNArgs(2), + 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() @@ -41,13 +46,20 @@ parsing stops there.`, return err } - sandboxID := args[0] - cmdArgs := args[1:] + if legacySandboxID, _ := cmd.Flags().GetString("sandbox-id"); legacySandboxID != "" { + return runLegacySandboxExec(ctx, cmd, args, token, orgID, legacySandboxID) + } + + sandboxID, cmdArgs, err := sandboxExecTarget(cmd, args) + if err != nil { + return err + } client := api.NewSandboxV0Client() if err := runHookStage(ctx, cmd, client, token, orgID, sandboxID, "on.exec", - func(h sandbox.HooksSpec) []sandbox.HookSpec { return h.Exec }, os.Stdout, os.Stderr); err != nil { + sandboxv1.HookStage_HOOK_STAGE_EXEC, + func(s *sandbox.Spec) []sandbox.HookSpec { return s.On.Exec }, os.Stdout, os.Stderr); err != nil { return err } @@ -73,8 +85,8 @@ parsing stops there.`, req.Sudo = &sudo } - // The --timeout flag is deprecated. Warn if it is still set, but - // do not fail, since the wire protocol no longer carries a timeout. + // 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)") } @@ -98,6 +110,8 @@ parsing stops there.`, 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") // 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") @@ -106,6 +120,63 @@ parsing stops there.`, 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) { diff --git a/pkg/cmd/sandbox/hooks.go b/pkg/cmd/sandbox/hooks.go index 44cb1047..c8d2bbe6 100644 --- a/pkg/cmd/sandbox/hooks.go +++ b/pkg/cmd/sandbox/hooks.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "io" - "os" "regexp" "strings" @@ -16,48 +15,25 @@ import ( "github.com/spf13/cobra" ) -// hookWrapperScript is the shell stub that runs every hook command executed by -// the CLI (on.exec, on.shell, on.snapshot, on.down). The on.create and on.start -// stages run server-side, so this wrapper only covers the stages the CLI runs -// directly against a sandbox. -// -// Positional args (filled in by the hook caller): -// -// $0 = "depot-hook" (script-name placeholder) -// $1 = the user's hook command (single string, run via bash -lc) -// $2 = log file path (used only when detached) -// $3 = "1" if the hook should be detached, "0" otherwise -// -// /tmp/.depot-env is sourced when present so detached processes inherit the -// same env that the API's exec wrapper would normally set up. -const hookWrapperScript = `[ -f /tmp/.depot-env ] && . /tmp/.depot-env -if [ "$3" = "1" ]; then - mkdir -p "$(dirname "$2")" - setsid nohup /bin/bash -lc "$1" >"$2" 2>&1 & - exit 0 -fi -exec /bin/bash -lc "$1" -` - // 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 sandbox.depot.yml file for %s resolution (default: walk up from cwd)", stageLabel)) + 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 run from -// the resolved HooksSpec. +// 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, - pick func(sandbox.HooksSpec) []sandbox.HookSpec, + stage sandboxv1.HookStage, + pick func(*sandbox.Spec) []sandbox.HookSpec, stdout, stderr io.Writer, ) error { noHook, _ := cmd.Flags().GetBool("no-hook") @@ -66,48 +42,41 @@ func runHookStage( } file, _ := cmd.Flags().GetString("file") setPairs, _ := cmd.Flags().GetStringArray("set") - hooks, err := resolveStageHooks(file, setPairs) + 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, pick(hooks), stdout, stderr) + return runHooks(ctx, client, token, orgID, sandboxID, label, stage, hooks, stdout, stderr) } -// resolveStageHooks loads the nearest sandbox.depot.yml (walking up from cwd, or -// using --file when it is set) and returns the resolved hooks for every stage. -// It returns a zero-valued HooksSpec when no spec is found, which lets commands -// run against a raw sandbox id outside any project directory. -func resolveStageHooks(file string, setPairs []string) (sandbox.HooksSpec, error) { - var path string - if file != "" { - path = file - } else { - cwd, err := os.Getwd() - if err != nil { - return sandbox.HooksSpec{}, err - } - p, err := sandbox.FindSpec(cwd) - if err != nil { - return sandbox.HooksSpec{}, nil //nolint:nilerr // no spec, no hooks - } - path = p +// 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(path) + spec, err := sandbox.Load(file) if err != nil { - return sandbox.HooksSpec{}, err + return nil, err } inputs, err := sandbox.ParseInputs(setPairs) if err != nil { - return sandbox.HooksSpec{}, err + return nil, err } - return spec.ResolveHooks(inputs) + 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, hooks []sandbox.HookSpec, stdout, stderr io.Writer) error { +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 } @@ -117,36 +86,40 @@ func runHooks(ctx context.Context, client sandboxv1connect.SandboxServiceClient, for i, h := range hooks { name := hookDisplayName(h, i) - fmt.Fprintf(stdout, "[%s %s] %s\n", label, name, h.Command) - if err := runHook(ctx, client, token, orgID, sandboxID, name, h, stdout, stderr); err != nil { + 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, h sandbox.HookSpec, stdout, stderr io.Writer) error { - logFile := fmt.Sprintf("/tmp/depot-hook-%s.log", name) - detachFlag := "0" +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 { - detachFlag = "1" + hook.Detach = &h.Detach + } + if h.Name != "" { + hook.Name = &h.Name + } + if h.TimeoutSeconds > 0 { + timeout := int32(h.TimeoutSeconds) + hook.TimeoutSeconds = &timeout } - req := &sandboxv1.RunCommandRequest{ + req := &sandboxv1.RunHookRequest{ Sandbox: sandboxRef(sandboxID), - Cmd: "/bin/sh", - Args: []string{"-c", hookWrapperScript, "depot-hook", h.Command, logFile, detachFlag}, + Stage: stage, + Hook: hook, } - stream, err := client.RunCommand(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + stream, err := client.RunHook(ctx, api.WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) if err != nil { - return fmt.Errorf("exec: %w", err) + return fmt.Errorf("hook: %w", err) } - // A detached hook returns quickly: the wrapper script forks the user's - // command with setsid and exits 0, so the stream reaches Finished right - // away. Waiting until finished is correct for both detached and - // foreground hooks. exit, err := consumeCommandEventStream(stream, stdout, stderr) if err != nil { return err @@ -155,7 +128,7 @@ func runHook(ctx context.Context, client sandboxv1connect.SandboxServiceClient, return fmt.Errorf("exit %d", exit) } if h.Detach { - fmt.Fprintf(stdout, "[%s detached, log: %s]\n", name, logFile) + fmt.Fprintf(stdout, "[%s detached]\n", name) } return nil } diff --git a/pkg/cmd/sandbox/kill.go b/pkg/cmd/sandbox/kill.go index 6922f5fa..ce9378a9 100644 --- a/pkg/cmd/sandbox/kill.go +++ b/pkg/cmd/sandbox/kill.go @@ -2,35 +2,25 @@ 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" ) // newSandboxKill wraps depot.sandbox.v1.SandboxService.KillSandbox — the // forced-termination verb (terminated_by=FORCED). No hooks; if you need // hooks, use `depot sandbox stop`. -// -// With no positional args, walks up from cwd for a sandbox.depot.yml and -// resolves the most-recent sandbox started under that spec name. 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. -With no arguments, walks up from the cwd for a sandbox.depot.yml and kills -the sandbox last started under that spec's name (per -~/.depot/sandbox-state/.id). Useful inside a demo dir where you just -want to undo the last "from-spec". - For a graceful shutdown that fires on.down hooks first, use 'depot sandbox stop'.`, - Args: cobra.ArbitraryArgs, + Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() token, orgID, err := resolveAuthAndOrg(ctx, cmd) @@ -39,14 +29,6 @@ For a graceful shutdown that fires on.down hooks first, use 'depot sandbox stop' } ids := args - if len(ids) == 0 { - file, _ := cmd.Flags().GetString("file") - id, err := sandboxIDFromLocalSpec(file) - if err != nil { - return err - } - ids = []string{id} - } client := api.NewSandboxV0Client() var failures []string @@ -65,41 +47,5 @@ For a graceful shutdown that fires on.down hooks first, use 'depot sandbox stop' return nil }, } - cmd.Flags().StringP("file", "f", "", "Path to a sandbox.depot.yml file when resolving by spec (default: walk up from cwd)") return cmd } - -// sandboxIDFromLocalSpec resolves the most recent sandbox id launched -// from the spec at `file` (or the nearest sandbox.depot.yml if file is -// empty). Errors if no spec is found or no state record exists yet. -func sandboxIDFromLocalSpec(file string) (string, error) { - var path string - if file != "" { - path = file - } else { - cwd, err := os.Getwd() - if err != nil { - return "", err - } - p, err := sandbox.FindSpec(cwd) - if err != nil { - return "", fmt.Errorf("no sandbox-id given and no sandbox.depot.yml found from cwd; pass an id or run from inside a spec dir") - } - path = p - } - spec, err := sandbox.Load(path) - if err != nil { - return "", err - } - if spec.Name == "" { - return "", fmt.Errorf("spec %s has no name; can't resolve a state file without one", path) - } - id, err := loadSandboxState(spec.Name) - if err != nil { - return "", fmt.Errorf("read state for %q: %w", spec.Name, err) - } - if id == "" { - return "", fmt.Errorf("no recorded sandbox for spec %q (no ~/.depot/sandbox-state/.id); pass an id explicitly", spec.Name) - } - return id, nil -} diff --git a/pkg/cmd/sandbox/sandbox_test.go b/pkg/cmd/sandbox/sandbox_test.go index 7b5af856..23af0ee9 100644 --- a/pkg/cmd/sandbox/sandbox_test.go +++ b/pkg/cmd/sandbox/sandbox_test.go @@ -1,8 +1,13 @@ 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 @@ -28,3 +33,112 @@ func TestSandboxVerbTree(t *testing.T) { } } } + +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/state.go b/pkg/cmd/sandbox/state.go deleted file mode 100644 index 19dc981a..00000000 --- a/pkg/cmd/sandbox/state.go +++ /dev/null @@ -1,66 +0,0 @@ -package sandbox - -import ( - "errors" - "io/fs" - "os" - "path/filepath" - "strings" -) - -// We track the most recent sandbox_id per spec name in -// ~/.depot/sandbox-state/.id so `depot sandbox from-spec` can -// refuse to launch a duplicate while one is already alive. This is a pure -// local convenience: the sandbox's create-time label is now returned on reads, -// but the API still has no server-side registry that maps a spec name to its -// live sandbox, so cross-machine collisions slip through. Once that exists, -// this lookup should move server-side. - -func sandboxStateDir() (string, error) { - home, err := os.UserHomeDir() - if err != nil { - return "", err - } - return filepath.Join(home, ".depot", "sandbox-state"), nil -} - -func sandboxStatePath(name string) (string, error) { - dir, err := sandboxStateDir() - if err != nil { - return "", err - } - return filepath.Join(dir, sanitizeStateName(name)+".id"), nil -} - -// sanitizeStateName keeps only safe characters so a spec name with slashes -// or dots can't escape the state dir. -func sanitizeStateName(name string) string { - if name == "" { - return "_unnamed" - } - return strings.Map(func(r rune) rune { - switch { - case r >= 'a' && r <= 'z', r >= 'A' && r <= 'Z', r >= '0' && r <= '9', r == '-', r == '_': - return r - } - return '_' - }, name) -} - -func loadSandboxState(name string) (string, error) { - if name == "" { - return "", nil - } - path, err := sandboxStatePath(name) - if err != nil { - return "", err - } - data, err := os.ReadFile(path) - if errors.Is(err, fs.ErrNotExist) { - return "", nil - } - if err != nil { - return "", err - } - return strings.TrimSpace(string(data)), nil -} diff --git a/pkg/cmd/sandbox/stop.go b/pkg/cmd/sandbox/stop.go index 0c5a91fb..9c9dad04 100644 --- a/pkg/cmd/sandbox/stop.go +++ b/pkg/cmd/sandbox/stop.go @@ -15,33 +15,20 @@ import ( // newSandboxStop builds the `stop` command, which gracefully shuts down a // sandbox. `down` is kept as an alias for backward compatibility. // -// With no positional args, it walks up from cwd for a sandbox.depot.yml and -// resolves the most recent sandbox started under that spec's name (recorded in -// ~/.depot/sandbox-state/.id). With one or more ids, it stops each. -// -// The CLI runs on.down hooks against the sandbox before requesting the stop. -// Pass --no-hook to skip the hooks and stop immediately. +// 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 (runs on.down hooks first)", + Short: "Gracefully stop a sandbox", Long: `Stop a sandbox via depot.sandbox.v1.StopSandbox (terminated_by=GRACEFUL). -With no arguments, walks up from cwd for a sandbox.depot.yml, picks up the -sandbox last started under that spec's name, runs on.down hooks, then asks -the server to stop it. - -With one or more sandbox ids, runs on.down (resolved from the local spec, if -one is found) against each, then stops each. Pass --no-hook to skip the -hooks and stop immediately.`, - Args: cobra.ArbitraryArgs, +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() - token, orgID, err := resolveAuthAndOrg(ctx, cmd) - if err != nil { - return err - } file, _ := cmd.Flags().GetString("file") setPairs, _ := cmd.Flags().GetStringArray("set") @@ -49,28 +36,31 @@ hooks and stop immediately.`, blocking, _ := cmd.Flags().GetBool("blocking") ids := args - if len(ids) == 0 { - id, err := sandboxIDFromLocalSpec(file) - if err != nil { - return err - } - ids = []string{id} - } var downHooks []sandbox.HookSpec - if !noHook { - hooks, err := resolveStageHooks(file, setPairs) + 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.Down + 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", downHooks, os.Stdout, os.Stderr); err != nil { + 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 } diff --git a/pkg/proto/depot/agent/v1/agentv1connect/sandbox.connect.go b/pkg/proto/depot/agent/v1/agentv1connect/sandbox.connect.go index 07265f1a..b36203f5 100644 --- a/pkg/proto/depot/agent/v1/agentv1connect/sandbox.connect.go +++ b/pkg/proto/depot/agent/v1/agentv1connect/sandbox.connect.go @@ -36,9 +36,6 @@ const ( // SandboxServiceStartSandboxProcedure is the fully-qualified name of the SandboxService's // StartSandbox RPC. SandboxServiceStartSandboxProcedure = "/depot.agent.v1.SandboxService/StartSandbox" - // SandboxServiceExecInSandboxProcedure is the fully-qualified name of the SandboxService's - // ExecInSandbox RPC. - SandboxServiceExecInSandboxProcedure = "/depot.agent.v1.SandboxService/ExecInSandbox" // SandboxServiceGetSandboxProcedure is the fully-qualified name of the SandboxService's GetSandbox // RPC. SandboxServiceGetSandboxProcedure = "/depot.agent.v1.SandboxService/GetSandbox" @@ -62,27 +59,11 @@ const ( SandboxServiceListSecretsProcedure = "/depot.agent.v1.SandboxService/ListSecrets" // SandboxServiceShutdownProcedure is the fully-qualified name of the SandboxService's Shutdown RPC. SandboxServiceShutdownProcedure = "/depot.agent.v1.SandboxService/Shutdown" - // SandboxServiceGetSSHConnectionProcedure is the fully-qualified name of the SandboxService's - // GetSSHConnection RPC. - SandboxServiceGetSSHConnectionProcedure = "/depot.agent.v1.SandboxService/GetSSHConnection" - // SandboxServiceCreateSandboxTemplateProcedure is the fully-qualified name of the SandboxService's - // CreateSandboxTemplate RPC. - SandboxServiceCreateSandboxTemplateProcedure = "/depot.agent.v1.SandboxService/CreateSandboxTemplate" - // SandboxServiceGetSandboxTemplateProcedure is the fully-qualified name of the SandboxService's - // GetSandboxTemplate RPC. - SandboxServiceGetSandboxTemplateProcedure = "/depot.agent.v1.SandboxService/GetSandboxTemplate" - // SandboxServiceListSandboxTemplatesProcedure is the fully-qualified name of the SandboxService's - // ListSandboxTemplates RPC. - SandboxServiceListSandboxTemplatesProcedure = "/depot.agent.v1.SandboxService/ListSandboxTemplates" - // SandboxServiceDeleteSandboxTemplateProcedure is the fully-qualified name of the SandboxService's - // DeleteSandboxTemplate RPC. - SandboxServiceDeleteSandboxTemplateProcedure = "/depot.agent.v1.SandboxService/DeleteSandboxTemplate" ) // SandboxServiceClient is a client for the depot.agent.v1.SandboxService service. type SandboxServiceClient interface { StartSandbox(context.Context, *connect.Request[v1.StartSandboxRequest]) (*connect.Response[v1.StartSandboxResponse], error) - ExecInSandbox(context.Context, *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) GetSandbox(context.Context, *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) ListSandboxs(context.Context, *connect.Request[v1.ListSandboxsRequest]) (*connect.Response[v1.ListSandboxsResponse], error) KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) @@ -92,13 +73,6 @@ type SandboxServiceClient interface { ListSecrets(context.Context, *connect.Request[v1.ListSecretsRequest]) (*connect.Response[v1.ListSecretsResponse], error) // Shutdown is called from within the sandbox to gracefully terminate Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error) - // GetSSHConnection returns the SSH connection info for a running sandbox - GetSSHConnection(context.Context, *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) - // Template management - save and reuse pre-configured sandbox filesystems - CreateSandboxTemplate(context.Context, *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) - GetSandboxTemplate(context.Context, *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) - ListSandboxTemplates(context.Context, *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) - DeleteSandboxTemplate(context.Context, *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) } // NewSandboxServiceClient constructs a client for the depot.agent.v1.SandboxService service. By @@ -116,11 +90,6 @@ func NewSandboxServiceClient(httpClient connect.HTTPClient, baseURL string, opts baseURL+SandboxServiceStartSandboxProcedure, opts..., ), - execInSandbox: connect.NewClient[v1.ExecInSandboxRequest, v1.ExecInSandboxResponse]( - httpClient, - baseURL+SandboxServiceExecInSandboxProcedure, - opts..., - ), getSandbox: connect.NewClient[v1.GetSandboxRequest, v1.GetSandboxResponse]( httpClient, baseURL+SandboxServiceGetSandboxProcedure, @@ -161,51 +130,20 @@ func NewSandboxServiceClient(httpClient connect.HTTPClient, baseURL string, opts baseURL+SandboxServiceShutdownProcedure, opts..., ), - getSSHConnection: connect.NewClient[v1.GetSSHConnectionRequest, v1.GetSSHConnectionResponse]( - httpClient, - baseURL+SandboxServiceGetSSHConnectionProcedure, - opts..., - ), - createSandboxTemplate: connect.NewClient[v1.CreateSandboxTemplateRequest, v1.CreateSandboxTemplateResponse]( - httpClient, - baseURL+SandboxServiceCreateSandboxTemplateProcedure, - opts..., - ), - getSandboxTemplate: connect.NewClient[v1.GetSandboxTemplateRequest, v1.GetSandboxTemplateResponse]( - httpClient, - baseURL+SandboxServiceGetSandboxTemplateProcedure, - opts..., - ), - listSandboxTemplates: connect.NewClient[v1.ListSandboxTemplatesRequest, v1.ListSandboxTemplatesResponse]( - httpClient, - baseURL+SandboxServiceListSandboxTemplatesProcedure, - opts..., - ), - deleteSandboxTemplate: connect.NewClient[v1.DeleteSandboxTemplateRequest, v1.DeleteSandboxTemplateResponse]( - httpClient, - baseURL+SandboxServiceDeleteSandboxTemplateProcedure, - opts..., - ), } } // sandboxServiceClient implements SandboxServiceClient. type sandboxServiceClient struct { - startSandbox *connect.Client[v1.StartSandboxRequest, v1.StartSandboxResponse] - execInSandbox *connect.Client[v1.ExecInSandboxRequest, v1.ExecInSandboxResponse] - getSandbox *connect.Client[v1.GetSandboxRequest, v1.GetSandboxResponse] - listSandboxs *connect.Client[v1.ListSandboxsRequest, v1.ListSandboxsResponse] - killSandbox *connect.Client[v1.KillSandboxRequest, v1.KillSandboxResponse] - streamSandboxLogs *connect.Client[v1.StreamSandboxLogsRequest, v1.StreamSandboxLogsResponse] - addSecret *connect.Client[v1.AddSecretRequest, v1.AddSecretResponse] - removeSecret *connect.Client[v1.RemoveSecretRequest, v1.RemoveSecretResponse] - listSecrets *connect.Client[v1.ListSecretsRequest, v1.ListSecretsResponse] - shutdown *connect.Client[v1.ShutdownRequest, v1.ShutdownResponse] - getSSHConnection *connect.Client[v1.GetSSHConnectionRequest, v1.GetSSHConnectionResponse] - createSandboxTemplate *connect.Client[v1.CreateSandboxTemplateRequest, v1.CreateSandboxTemplateResponse] - getSandboxTemplate *connect.Client[v1.GetSandboxTemplateRequest, v1.GetSandboxTemplateResponse] - listSandboxTemplates *connect.Client[v1.ListSandboxTemplatesRequest, v1.ListSandboxTemplatesResponse] - deleteSandboxTemplate *connect.Client[v1.DeleteSandboxTemplateRequest, v1.DeleteSandboxTemplateResponse] + startSandbox *connect.Client[v1.StartSandboxRequest, v1.StartSandboxResponse] + getSandbox *connect.Client[v1.GetSandboxRequest, v1.GetSandboxResponse] + listSandboxs *connect.Client[v1.ListSandboxsRequest, v1.ListSandboxsResponse] + killSandbox *connect.Client[v1.KillSandboxRequest, v1.KillSandboxResponse] + streamSandboxLogs *connect.Client[v1.StreamSandboxLogsRequest, v1.StreamSandboxLogsResponse] + addSecret *connect.Client[v1.AddSecretRequest, v1.AddSecretResponse] + removeSecret *connect.Client[v1.RemoveSecretRequest, v1.RemoveSecretResponse] + listSecrets *connect.Client[v1.ListSecretsRequest, v1.ListSecretsResponse] + shutdown *connect.Client[v1.ShutdownRequest, v1.ShutdownResponse] } // StartSandbox calls depot.agent.v1.SandboxService.StartSandbox. @@ -213,11 +151,6 @@ func (c *sandboxServiceClient) StartSandbox(ctx context.Context, req *connect.Re return c.startSandbox.CallUnary(ctx, req) } -// ExecInSandbox calls depot.agent.v1.SandboxService.ExecInSandbox. -func (c *sandboxServiceClient) ExecInSandbox(ctx context.Context, req *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) { - return c.execInSandbox.CallUnary(ctx, req) -} - // GetSandbox calls depot.agent.v1.SandboxService.GetSandbox. func (c *sandboxServiceClient) GetSandbox(ctx context.Context, req *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) { return c.getSandbox.CallUnary(ctx, req) @@ -258,35 +191,9 @@ func (c *sandboxServiceClient) Shutdown(ctx context.Context, req *connect.Reques return c.shutdown.CallUnary(ctx, req) } -// GetSSHConnection calls depot.agent.v1.SandboxService.GetSSHConnection. -func (c *sandboxServiceClient) GetSSHConnection(ctx context.Context, req *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) { - return c.getSSHConnection.CallUnary(ctx, req) -} - -// CreateSandboxTemplate calls depot.agent.v1.SandboxService.CreateSandboxTemplate. -func (c *sandboxServiceClient) CreateSandboxTemplate(ctx context.Context, req *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) { - return c.createSandboxTemplate.CallUnary(ctx, req) -} - -// GetSandboxTemplate calls depot.agent.v1.SandboxService.GetSandboxTemplate. -func (c *sandboxServiceClient) GetSandboxTemplate(ctx context.Context, req *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) { - return c.getSandboxTemplate.CallUnary(ctx, req) -} - -// ListSandboxTemplates calls depot.agent.v1.SandboxService.ListSandboxTemplates. -func (c *sandboxServiceClient) ListSandboxTemplates(ctx context.Context, req *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) { - return c.listSandboxTemplates.CallUnary(ctx, req) -} - -// DeleteSandboxTemplate calls depot.agent.v1.SandboxService.DeleteSandboxTemplate. -func (c *sandboxServiceClient) DeleteSandboxTemplate(ctx context.Context, req *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) { - return c.deleteSandboxTemplate.CallUnary(ctx, req) -} - // SandboxServiceHandler is an implementation of the depot.agent.v1.SandboxService service. type SandboxServiceHandler interface { StartSandbox(context.Context, *connect.Request[v1.StartSandboxRequest]) (*connect.Response[v1.StartSandboxResponse], error) - ExecInSandbox(context.Context, *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) GetSandbox(context.Context, *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) ListSandboxs(context.Context, *connect.Request[v1.ListSandboxsRequest]) (*connect.Response[v1.ListSandboxsResponse], error) KillSandbox(context.Context, *connect.Request[v1.KillSandboxRequest]) (*connect.Response[v1.KillSandboxResponse], error) @@ -296,13 +203,6 @@ type SandboxServiceHandler interface { ListSecrets(context.Context, *connect.Request[v1.ListSecretsRequest]) (*connect.Response[v1.ListSecretsResponse], error) // Shutdown is called from within the sandbox to gracefully terminate Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error) - // GetSSHConnection returns the SSH connection info for a running sandbox - GetSSHConnection(context.Context, *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) - // Template management - save and reuse pre-configured sandbox filesystems - CreateSandboxTemplate(context.Context, *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) - GetSandboxTemplate(context.Context, *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) - ListSandboxTemplates(context.Context, *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) - DeleteSandboxTemplate(context.Context, *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) } // NewSandboxServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -316,11 +216,6 @@ func NewSandboxServiceHandler(svc SandboxServiceHandler, opts ...connect.Handler svc.StartSandbox, opts..., ) - sandboxServiceExecInSandboxHandler := connect.NewUnaryHandler( - SandboxServiceExecInSandboxProcedure, - svc.ExecInSandbox, - opts..., - ) sandboxServiceGetSandboxHandler := connect.NewUnaryHandler( SandboxServiceGetSandboxProcedure, svc.GetSandbox, @@ -361,37 +256,10 @@ func NewSandboxServiceHandler(svc SandboxServiceHandler, opts ...connect.Handler svc.Shutdown, opts..., ) - sandboxServiceGetSSHConnectionHandler := connect.NewUnaryHandler( - SandboxServiceGetSSHConnectionProcedure, - svc.GetSSHConnection, - opts..., - ) - sandboxServiceCreateSandboxTemplateHandler := connect.NewUnaryHandler( - SandboxServiceCreateSandboxTemplateProcedure, - svc.CreateSandboxTemplate, - opts..., - ) - sandboxServiceGetSandboxTemplateHandler := connect.NewUnaryHandler( - SandboxServiceGetSandboxTemplateProcedure, - svc.GetSandboxTemplate, - opts..., - ) - sandboxServiceListSandboxTemplatesHandler := connect.NewUnaryHandler( - SandboxServiceListSandboxTemplatesProcedure, - svc.ListSandboxTemplates, - opts..., - ) - sandboxServiceDeleteSandboxTemplateHandler := connect.NewUnaryHandler( - SandboxServiceDeleteSandboxTemplateProcedure, - svc.DeleteSandboxTemplate, - opts..., - ) return "/depot.agent.v1.SandboxService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case SandboxServiceStartSandboxProcedure: sandboxServiceStartSandboxHandler.ServeHTTP(w, r) - case SandboxServiceExecInSandboxProcedure: - sandboxServiceExecInSandboxHandler.ServeHTTP(w, r) case SandboxServiceGetSandboxProcedure: sandboxServiceGetSandboxHandler.ServeHTTP(w, r) case SandboxServiceListSandboxsProcedure: @@ -408,16 +276,6 @@ func NewSandboxServiceHandler(svc SandboxServiceHandler, opts ...connect.Handler sandboxServiceListSecretsHandler.ServeHTTP(w, r) case SandboxServiceShutdownProcedure: sandboxServiceShutdownHandler.ServeHTTP(w, r) - case SandboxServiceGetSSHConnectionProcedure: - sandboxServiceGetSSHConnectionHandler.ServeHTTP(w, r) - case SandboxServiceCreateSandboxTemplateProcedure: - sandboxServiceCreateSandboxTemplateHandler.ServeHTTP(w, r) - case SandboxServiceGetSandboxTemplateProcedure: - sandboxServiceGetSandboxTemplateHandler.ServeHTTP(w, r) - case SandboxServiceListSandboxTemplatesProcedure: - sandboxServiceListSandboxTemplatesHandler.ServeHTTP(w, r) - case SandboxServiceDeleteSandboxTemplateProcedure: - sandboxServiceDeleteSandboxTemplateHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -431,10 +289,6 @@ func (UnimplementedSandboxServiceHandler) StartSandbox(context.Context, *connect return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.StartSandbox is not implemented")) } -func (UnimplementedSandboxServiceHandler) ExecInSandbox(context.Context, *connect.Request[v1.ExecInSandboxRequest]) (*connect.Response[v1.ExecInSandboxResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.ExecInSandbox is not implemented")) -} - func (UnimplementedSandboxServiceHandler) GetSandbox(context.Context, *connect.Request[v1.GetSandboxRequest]) (*connect.Response[v1.GetSandboxResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.GetSandbox is not implemented")) } @@ -466,23 +320,3 @@ func (UnimplementedSandboxServiceHandler) ListSecrets(context.Context, *connect. func (UnimplementedSandboxServiceHandler) Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.ShutdownResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.Shutdown is not implemented")) } - -func (UnimplementedSandboxServiceHandler) GetSSHConnection(context.Context, *connect.Request[v1.GetSSHConnectionRequest]) (*connect.Response[v1.GetSSHConnectionResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.GetSSHConnection is not implemented")) -} - -func (UnimplementedSandboxServiceHandler) CreateSandboxTemplate(context.Context, *connect.Request[v1.CreateSandboxTemplateRequest]) (*connect.Response[v1.CreateSandboxTemplateResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.CreateSandboxTemplate is not implemented")) -} - -func (UnimplementedSandboxServiceHandler) GetSandboxTemplate(context.Context, *connect.Request[v1.GetSandboxTemplateRequest]) (*connect.Response[v1.GetSandboxTemplateResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.GetSandboxTemplate is not implemented")) -} - -func (UnimplementedSandboxServiceHandler) ListSandboxTemplates(context.Context, *connect.Request[v1.ListSandboxTemplatesRequest]) (*connect.Response[v1.ListSandboxTemplatesResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.ListSandboxTemplates is not implemented")) -} - -func (UnimplementedSandboxServiceHandler) DeleteSandboxTemplate(context.Context, *connect.Request[v1.DeleteSandboxTemplateRequest]) (*connect.Response[v1.DeleteSandboxTemplateResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.agent.v1.SandboxService.DeleteSandboxTemplate is not implemented")) -} diff --git a/pkg/proto/depot/agent/v1/sandbox.pb.go b/pkg/proto/depot/agent/v1/sandbox.pb.go index 8ce48bfc..dfd44271 100644 --- a/pkg/proto/depot/agent/v1/sandbox.pb.go +++ b/pkg/proto/depot/agent/v1/sandbox.pb.go @@ -67,7 +67,7 @@ func (x StreamSandboxLogsResponse_LogEvent_LogType) Number() protoreflect.EnumNu // Deprecated: Use StreamSandboxLogsResponse_LogEvent_LogType.Descriptor instead. func (StreamSandboxLogsResponse_LogEvent_LogType) EnumDescriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{23, 0, 0} + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17, 0, 0} } type StartSandboxRequest struct { @@ -75,26 +75,12 @@ type StartSandboxRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AgentType AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` - SessionId *string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` - ResumeSessionId *string `protobuf:"bytes,3,opt,name=resume_session_id,json=resumeSessionId,proto3,oneof" json:"resume_session_id,omitempty"` - Argv string `protobuf:"bytes,4,opt,name=argv,proto3" json:"argv,omitempty"` - EnvironmentVariables map[string]string `protobuf:"bytes,5,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Context *StartSandboxRequest_Context `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` - SshConfig *StartSandboxRequest_SSHConfig `protobuf:"bytes,7,opt,name=ssh_config,json=sshConfig,proto3,oneof" json:"ssh_config,omitempty"` - // Start sandbox from a saved template (pre-configured filesystem) - // When set, creates a fresh session with the template's filesystem state - TemplateId *string `protobuf:"bytes,8,opt,name=template_id,json=templateId,proto3,oneof" json:"template_id,omitempty"` - // Optional command to execute inside the sandbox after it starts. - // If not provided, the sandbox starts as usual. - Command *string `protobuf:"bytes,9,opt,name=command,proto3,oneof" json:"command,omitempty"` - // When true, wait for the command to finish and return its exit code, - // stdout, and stderr in command_result. When false (default), the command - // is started but the response returns immediately without waiting. - WaitForCommand *bool `protobuf:"varint,10,opt,name=wait_for_command,json=waitForCommand,proto3,oneof" json:"wait_for_command,omitempty"` - // Optional image reference used as the sandbox base image. - // When omitted, the default Depot sandbox image is used. - Image *string `protobuf:"bytes,11,opt,name=image,proto3,oneof" json:"image,omitempty"` + AgentType AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` + SessionId *string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` + ResumeSessionId *string `protobuf:"bytes,3,opt,name=resume_session_id,json=resumeSessionId,proto3,oneof" json:"resume_session_id,omitempty"` + Argv string `protobuf:"bytes,4,opt,name=argv,proto3" json:"argv,omitempty"` + EnvironmentVariables map[string]string `protobuf:"bytes,5,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Context *StartSandboxRequest_Context `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` } func (x *StartSandboxRequest) Reset() { @@ -171,52 +157,14 @@ func (x *StartSandboxRequest) GetContext() *StartSandboxRequest_Context { return nil } -func (x *StartSandboxRequest) GetSshConfig() *StartSandboxRequest_SSHConfig { - if x != nil { - return x.SshConfig - } - return nil -} - -func (x *StartSandboxRequest) GetTemplateId() string { - if x != nil && x.TemplateId != nil { - return *x.TemplateId - } - return "" -} - -func (x *StartSandboxRequest) GetCommand() string { - if x != nil && x.Command != nil { - return *x.Command - } - return "" -} - -func (x *StartSandboxRequest) GetWaitForCommand() bool { - if x != nil && x.WaitForCommand != nil { - return *x.WaitForCommand - } - return false -} - -func (x *StartSandboxRequest) GetImage() string { - if x != nil && x.Image != nil { - return *x.Image - } - return "" -} - type StartSandboxResponse 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"` - SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` - SshConnection *SSHConnection `protobuf:"bytes,4,opt,name=ssh_connection,json=sshConnection,proto3,oneof" json:"ssh_connection,omitempty"` - // Result of the command execution, if a command was provided in the request - CommandResult *CommandResult `protobuf:"bytes,5,opt,name=command_result,json=commandResult,proto3,oneof" json:"command_result,omitempty"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` } func (x *StartSandboxResponse) Reset() { @@ -272,34 +220,16 @@ func (x *StartSandboxResponse) GetOrganizationId() string { return "" } -func (x *StartSandboxResponse) GetSshConnection() *SSHConnection { - if x != nil { - return x.SshConnection - } - return nil -} - -func (x *StartSandboxResponse) GetCommandResult() *CommandResult { - if x != nil { - return x.CommandResult - } - return nil -} - -type ExecInSandboxRequest struct { +type GetSandboxRequest 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"` - Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` - // When true (default), wait for command completion and return output. - // When false, start command and return immediately. - WaitForCommand *bool `protobuf:"varint,3,opt,name=wait_for_command,json=waitForCommand,proto3,oneof" json:"wait_for_command,omitempty"` } -func (x *ExecInSandboxRequest) Reset() { - *x = ExecInSandboxRequest{} +func (x *GetSandboxRequest) Reset() { + *x = GetSandboxRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -307,13 +237,13 @@ func (x *ExecInSandboxRequest) Reset() { } } -func (x *ExecInSandboxRequest) String() string { +func (x *GetSandboxRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecInSandboxRequest) ProtoMessage() {} +func (*GetSandboxRequest) ProtoMessage() {} -func (x *ExecInSandboxRequest) ProtoReflect() protoreflect.Message { +func (x *GetSandboxRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -325,42 +255,28 @@ func (x *ExecInSandboxRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecInSandboxRequest.ProtoReflect.Descriptor instead. -func (*ExecInSandboxRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSandboxRequest.ProtoReflect.Descriptor instead. +func (*GetSandboxRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{2} } -func (x *ExecInSandboxRequest) GetSandboxId() string { +func (x *GetSandboxRequest) GetSandboxId() string { if x != nil { return x.SandboxId } return "" } -func (x *ExecInSandboxRequest) GetCommand() string { - if x != nil { - return x.Command - } - return "" -} - -func (x *ExecInSandboxRequest) GetWaitForCommand() bool { - if x != nil && x.WaitForCommand != nil { - return *x.WaitForCommand - } - return false -} - -type ExecInSandboxResponse struct { +type GetSandboxResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CommandResult *CommandResult `protobuf:"bytes,1,opt,name=command_result,json=commandResult,proto3,oneof" json:"command_result,omitempty"` + Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` } -func (x *ExecInSandboxResponse) Reset() { - *x = ExecInSandboxResponse{} +func (x *GetSandboxResponse) Reset() { + *x = GetSandboxResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -368,13 +284,13 @@ func (x *ExecInSandboxResponse) Reset() { } } -func (x *ExecInSandboxResponse) String() string { +func (x *GetSandboxResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecInSandboxResponse) ProtoMessage() {} +func (*GetSandboxResponse) ProtoMessage() {} -func (x *ExecInSandboxResponse) ProtoReflect() protoreflect.Message { +func (x *GetSandboxResponse) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -386,31 +302,31 @@ func (x *ExecInSandboxResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecInSandboxResponse.ProtoReflect.Descriptor instead. -func (*ExecInSandboxResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSandboxResponse.ProtoReflect.Descriptor instead. +func (*GetSandboxResponse) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{3} } -func (x *ExecInSandboxResponse) GetCommandResult() *CommandResult { +func (x *GetSandboxResponse) GetSandbox() *Sandbox { if x != nil { - return x.CommandResult + return x.Sandbox } return nil } -// CommandResult contains the output from executing a command inside a sandbox -type CommandResult struct { +type AddSecretRequest 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"` - Stdout string `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"` - Stderr string `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"` + SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` + SecretDescription *string `protobuf:"bytes,2,opt,name=secret_description,json=secretDescription,proto3,oneof" json:"secret_description,omitempty"` + SecretValue string `protobuf:"bytes,3,opt,name=secret_value,json=secretValue,proto3" json:"secret_value,omitempty"` + AgentType *AgentType `protobuf:"varint,4,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` } -func (x *CommandResult) Reset() { - *x = CommandResult{} +func (x *AddSecretRequest) Reset() { + *x = AddSecretRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -418,13 +334,13 @@ func (x *CommandResult) Reset() { } } -func (x *CommandResult) String() string { +func (x *AddSecretRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommandResult) ProtoMessage() {} +func (*AddSecretRequest) ProtoMessage() {} -func (x *CommandResult) ProtoReflect() protoreflect.Message { +func (x *AddSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -436,46 +352,47 @@ func (x *CommandResult) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommandResult.ProtoReflect.Descriptor instead. -func (*CommandResult) Descriptor() ([]byte, []int) { +// Deprecated: Use AddSecretRequest.ProtoReflect.Descriptor instead. +func (*AddSecretRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{4} } -func (x *CommandResult) GetExitCode() int32 { +func (x *AddSecretRequest) GetSecretName() string { if x != nil { - return x.ExitCode + return x.SecretName } - return 0 + return "" } -func (x *CommandResult) GetStdout() string { - if x != nil { - return x.Stdout +func (x *AddSecretRequest) GetSecretDescription() string { + if x != nil && x.SecretDescription != nil { + return *x.SecretDescription } return "" } -func (x *CommandResult) GetStderr() string { +func (x *AddSecretRequest) GetSecretValue() string { if x != nil { - return x.Stderr + return x.SecretValue } return "" } -// SSHConnection contains the connection details for direct SSH access to a sandbox -type SSHConnection struct { +func (x *AddSecretRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType + } + return AgentType_AGENT_TYPE_UNSPECIFIED +} + +type AddSecretResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` // Always "depot" - PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // PEM format, base64 encoded } -func (x *SSHConnection) Reset() { - *x = SSHConnection{} +func (x *AddSecretResponse) Reset() { + *x = AddSecretResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -483,13 +400,13 @@ func (x *SSHConnection) Reset() { } } -func (x *SSHConnection) String() string { +func (x *AddSecretResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SSHConnection) ProtoMessage() {} +func (*AddSecretResponse) ProtoMessage() {} -func (x *SSHConnection) ProtoReflect() protoreflect.Message { +func (x *AddSecretResponse) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -501,49 +418,22 @@ func (x *SSHConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SSHConnection.ProtoReflect.Descriptor instead. -func (*SSHConnection) Descriptor() ([]byte, []int) { +// Deprecated: Use AddSecretResponse.ProtoReflect.Descriptor instead. +func (*AddSecretResponse) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{5} } -func (x *SSHConnection) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *SSHConnection) GetPort() int32 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *SSHConnection) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *SSHConnection) GetPrivateKey() string { - if x != nil { - return x.PrivateKey - } - return "" -} - -type GetSSHConnectionRequest struct { +type RemoveSecretRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` + AgentType *AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` } -func (x *GetSSHConnectionRequest) Reset() { - *x = GetSSHConnectionRequest{} +func (x *RemoveSecretRequest) Reset() { + *x = RemoveSecretRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -551,13 +441,13 @@ func (x *GetSSHConnectionRequest) Reset() { } } -func (x *GetSSHConnectionRequest) String() string { +func (x *RemoveSecretRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSSHConnectionRequest) ProtoMessage() {} +func (*RemoveSecretRequest) ProtoMessage() {} -func (x *GetSSHConnectionRequest) ProtoReflect() protoreflect.Message { +func (x *RemoveSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -569,28 +459,33 @@ func (x *GetSSHConnectionRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSSHConnectionRequest.ProtoReflect.Descriptor instead. -func (*GetSSHConnectionRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use RemoveSecretRequest.ProtoReflect.Descriptor instead. +func (*RemoveSecretRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{6} } -func (x *GetSSHConnectionRequest) GetSessionId() string { +func (x *RemoveSecretRequest) GetSecretName() string { if x != nil { - return x.SessionId + return x.SecretName } return "" } -type GetSSHConnectionResponse struct { +func (x *RemoveSecretRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType + } + return AgentType_AGENT_TYPE_UNSPECIFIED +} + +type RemoveSecretResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - SshConnection *SSHConnection `protobuf:"bytes,1,opt,name=ssh_connection,json=sshConnection,proto3" json:"ssh_connection,omitempty"` } -func (x *GetSSHConnectionResponse) Reset() { - *x = GetSSHConnectionResponse{} +func (x *RemoveSecretResponse) Reset() { + *x = RemoveSecretResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -598,13 +493,13 @@ func (x *GetSSHConnectionResponse) Reset() { } } -func (x *GetSSHConnectionResponse) String() string { +func (x *RemoveSecretResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSSHConnectionResponse) ProtoMessage() {} +func (*RemoveSecretResponse) ProtoMessage() {} -func (x *GetSSHConnectionResponse) ProtoReflect() protoreflect.Message { +func (x *RemoveSecretResponse) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -616,28 +511,21 @@ func (x *GetSSHConnectionResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSSHConnectionResponse.ProtoReflect.Descriptor instead. -func (*GetSSHConnectionResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use RemoveSecretResponse.ProtoReflect.Descriptor instead. +func (*RemoveSecretResponse) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{7} } -func (x *GetSSHConnectionResponse) GetSshConnection() *SSHConnection { - if x != nil { - return x.SshConnection - } - return nil -} - -type GetSandboxRequest struct { +type ListSecretsRequest 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"` + AgentType *AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` } -func (x *GetSandboxRequest) Reset() { - *x = GetSandboxRequest{} +func (x *ListSecretsRequest) Reset() { + *x = ListSecretsRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -645,13 +533,13 @@ func (x *GetSandboxRequest) Reset() { } } -func (x *GetSandboxRequest) String() string { +func (x *ListSecretsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSandboxRequest) ProtoMessage() {} +func (*ListSecretsRequest) ProtoMessage() {} -func (x *GetSandboxRequest) ProtoReflect() protoreflect.Message { +func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -663,28 +551,28 @@ func (x *GetSandboxRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSandboxRequest.ProtoReflect.Descriptor instead. -func (*GetSandboxRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListSecretsRequest.ProtoReflect.Descriptor instead. +func (*ListSecretsRequest) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{8} } -func (x *GetSandboxRequest) GetSandboxId() string { - if x != nil { - return x.SandboxId +func (x *ListSecretsRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType } - return "" + return AgentType_AGENT_TYPE_UNSPECIFIED } -type GetSandboxResponse struct { +type ListSecretsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Sandbox *Sandbox `protobuf:"bytes,1,opt,name=sandbox,proto3" json:"sandbox,omitempty"` + Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` } -func (x *GetSandboxResponse) Reset() { - *x = GetSandboxResponse{} +func (x *ListSecretsResponse) Reset() { + *x = ListSecretsResponse{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -692,13 +580,13 @@ func (x *GetSandboxResponse) Reset() { } } -func (x *GetSandboxResponse) String() string { +func (x *ListSecretsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSandboxResponse) ProtoMessage() {} +func (*ListSecretsResponse) ProtoMessage() {} -func (x *GetSandboxResponse) ProtoReflect() protoreflect.Message { +func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -710,31 +598,30 @@ func (x *GetSandboxResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSandboxResponse.ProtoReflect.Descriptor instead. -func (*GetSandboxResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListSecretsResponse.ProtoReflect.Descriptor instead. +func (*ListSecretsResponse) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{9} } -func (x *GetSandboxResponse) GetSandbox() *Sandbox { +func (x *ListSecretsResponse) GetSecrets() []*Secret { if x != nil { - return x.Sandbox + return x.Secrets } return nil } -type AddSecretRequest struct { +type Secret struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` - SecretDescription *string `protobuf:"bytes,2,opt,name=secret_description,json=secretDescription,proto3,oneof" json:"secret_description,omitempty"` - SecretValue string `protobuf:"bytes,3,opt,name=secret_value,json=secretValue,proto3" json:"secret_value,omitempty"` - AgentType *AgentType `protobuf:"varint,4,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` + LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` } -func (x *AddSecretRequest) Reset() { - *x = AddSecretRequest{} +func (x *Secret) Reset() { + *x = Secret{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -742,13 +629,13 @@ func (x *AddSecretRequest) Reset() { } } -func (x *AddSecretRequest) String() string { +func (x *Secret) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddSecretRequest) ProtoMessage() {} +func (*Secret) ProtoMessage() {} -func (x *AddSecretRequest) ProtoReflect() protoreflect.Message { +func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -760,47 +647,44 @@ func (x *AddSecretRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddSecretRequest.ProtoReflect.Descriptor instead. -func (*AddSecretRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use Secret.ProtoReflect.Descriptor instead. +func (*Secret) Descriptor() ([]byte, []int) { return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{10} } -func (x *AddSecretRequest) GetSecretName() string { +func (x *Secret) GetName() string { if x != nil { - return x.SecretName + return x.Name } return "" } -func (x *AddSecretRequest) GetSecretDescription() string { - if x != nil && x.SecretDescription != nil { - return *x.SecretDescription +func (x *Secret) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description } return "" } -func (x *AddSecretRequest) GetSecretValue() string { +func (x *Secret) GetLastModified() *timestamppb.Timestamp { if x != nil { - return x.SecretValue - } - return "" -} - -func (x *AddSecretRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType + return x.LastModified } - return AgentType_AGENT_TYPE_UNSPECIFIED + return nil } -type AddSecretResponse struct { +type ListSandboxsRequest 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"` + AgentType *AgentType `protobuf:"varint,3,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` // Filter by agent type } -func (x *AddSecretResponse) Reset() { - *x = AddSecretResponse{} +func (x *ListSandboxsRequest) Reset() { + *x = ListSandboxsRequest{} if protoimpl.UnsafeEnabled { mi := &file_depot_agent_v1_sandbox_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -808,841 +692,14 @@ func (x *AddSecretResponse) Reset() { } } -func (x *AddSecretResponse) String() string { +func (x *ListSandboxsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddSecretResponse) ProtoMessage() {} - -func (x *AddSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_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 AddSecretResponse.ProtoReflect.Descriptor instead. -func (*AddSecretResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{11} -} - -type RemoveSecretRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` - AgentType *AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` -} - -func (x *RemoveSecretRequest) Reset() { - *x = RemoveSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveSecretRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveSecretRequest) ProtoMessage() {} - -func (x *RemoveSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 RemoveSecretRequest.ProtoReflect.Descriptor instead. -func (*RemoveSecretRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{12} -} - -func (x *RemoveSecretRequest) GetSecretName() string { - if x != nil { - return x.SecretName - } - return "" -} - -func (x *RemoveSecretRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType - } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -type RemoveSecretResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveSecretResponse) Reset() { - *x = RemoveSecretResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveSecretResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveSecretResponse) ProtoMessage() {} - -func (x *RemoveSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 RemoveSecretResponse.ProtoReflect.Descriptor instead. -func (*RemoveSecretResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{13} -} - -type ListSecretsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AgentType *AgentType `protobuf:"varint,1,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` -} - -func (x *ListSecretsRequest) Reset() { - *x = ListSecretsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSecretsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSecretsRequest) ProtoMessage() {} - -func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 ListSecretsRequest.ProtoReflect.Descriptor instead. -func (*ListSecretsRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{14} -} - -func (x *ListSecretsRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType - } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -type ListSecretsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` -} - -func (x *ListSecretsResponse) Reset() { - *x = ListSecretsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSecretsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSecretsResponse) ProtoMessage() {} - -func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 ListSecretsResponse.ProtoReflect.Descriptor instead. -func (*ListSecretsResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{15} -} - -func (x *ListSecretsResponse) GetSecrets() []*Secret { - if x != nil { - return x.Secrets - } - return nil -} - -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` - LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` -} - -func (x *Secret) Reset() { - *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Secret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Secret) ProtoMessage() {} - -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{16} -} - -func (x *Secret) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Secret) GetDescription() string { - if x != nil && x.Description != nil { - return *x.Description - } - return "" -} - -func (x *Secret) GetLastModified() *timestamppb.Timestamp { - if x != nil { - return x.LastModified - } - return nil -} - -type ListSandboxsRequest 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"` - AgentType *AgentType `protobuf:"varint,3,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType,oneof" json:"agent_type,omitempty"` // Filter by agent type -} - -func (x *ListSandboxsRequest) Reset() { - *x = ListSandboxsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSandboxsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSandboxsRequest) ProtoMessage() {} - -func (x *ListSandboxsRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 ListSandboxsRequest.ProtoReflect.Descriptor instead. -func (*ListSandboxsRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17} -} - -func (x *ListSandboxsRequest) GetPageSize() int32 { - if x != nil && x.PageSize != nil { - return *x.PageSize - } - return 0 -} - -func (x *ListSandboxsRequest) GetPageToken() string { - if x != nil && x.PageToken != nil { - return *x.PageToken - } - return "" -} - -func (x *ListSandboxsRequest) GetAgentType() AgentType { - if x != nil && x.AgentType != nil { - return *x.AgentType - } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -type ListSandboxsResponse 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 *ListSandboxsResponse) Reset() { - *x = ListSandboxsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSandboxsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSandboxsResponse) ProtoMessage() {} - -func (x *ListSandboxsResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 ListSandboxsResponse.ProtoReflect.Descriptor instead. -func (*ListSandboxsResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{18} -} - -func (x *ListSandboxsResponse) GetSandboxes() []*Sandbox { - if x != nil { - return x.Sandboxes - } - return nil -} - -func (x *ListSandboxsResponse) GetNextPageToken() string { - if x != nil && x.NextPageToken != nil { - return *x.NextPageToken - } - return "" -} - -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"` - AgentType AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` - OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` - SessionId string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=started_at,json=startedAt,proto3,oneof" json:"started_at,omitempty"` - CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=completed_at,json=completedAt,proto3,oneof" json:"completed_at,omitempty"` - ExitCode *int32 `protobuf:"varint,8,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` - DurationSeconds *float64 `protobuf:"fixed64,9,opt,name=duration_seconds,json=durationSeconds,proto3,oneof" json:"duration_seconds,omitempty"` - ErrorMessage *string `protobuf:"bytes,10,opt,name=error_message,json=errorMessage,proto3,oneof" json:"error_message,omitempty"` - SshEnabled *bool `protobuf:"varint,11,opt,name=ssh_enabled,json=sshEnabled,proto3,oneof" json:"ssh_enabled,omitempty"` - SshHost *string `protobuf:"bytes,12,opt,name=ssh_host,json=sshHost,proto3,oneof" json:"ssh_host,omitempty"` - SshPort *int32 `protobuf:"varint,13,opt,name=ssh_port,json=sshPort,proto3,oneof" json:"ssh_port,omitempty"` -} - -func (x *Sandbox) Reset() { - *x = Sandbox{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[19] - 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_agent_v1_sandbox_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 Sandbox.ProtoReflect.Descriptor instead. -func (*Sandbox) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{19} -} - -func (x *Sandbox) GetSandboxId() string { - if x != nil { - return x.SandboxId - } - return "" -} - -func (x *Sandbox) GetAgentType() AgentType { - if x != nil { - return x.AgentType - } - return AgentType_AGENT_TYPE_UNSPECIFIED -} - -func (x *Sandbox) GetOrganizationId() string { - if x != nil { - return x.OrganizationId - } - return "" -} - -func (x *Sandbox) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -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) GetCompletedAt() *timestamppb.Timestamp { - if x != nil { - return x.CompletedAt - } - return nil -} - -func (x *Sandbox) GetExitCode() int32 { - if x != nil && x.ExitCode != nil { - return *x.ExitCode - } - return 0 -} - -func (x *Sandbox) GetDurationSeconds() float64 { - if x != nil && x.DurationSeconds != nil { - return *x.DurationSeconds - } - return 0 -} - -func (x *Sandbox) GetErrorMessage() string { - if x != nil && x.ErrorMessage != nil { - return *x.ErrorMessage - } - return "" -} - -func (x *Sandbox) GetSshEnabled() bool { - if x != nil && x.SshEnabled != nil { - return *x.SshEnabled - } - return false -} - -func (x *Sandbox) GetSshHost() string { - if x != nil && x.SshHost != nil { - return *x.SshHost - } - return "" -} - -func (x *Sandbox) GetSshPort() int32 { - if x != nil && x.SshPort != nil { - return *x.SshPort - } - return 0 -} - -type KillSandboxRequest 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"` -} - -func (x *KillSandboxRequest) Reset() { - *x = KillSandboxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[20] - 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_agent_v1_sandbox_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 KillSandboxRequest.ProtoReflect.Descriptor instead. -func (*KillSandboxRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{20} -} - -func (x *KillSandboxRequest) GetSandboxId() string { - if x != nil { - return x.SandboxId - } - return "" -} - -type KillSandboxResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *KillSandboxResponse) Reset() { - *x = KillSandboxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[21] - 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_agent_v1_sandbox_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 KillSandboxResponse.ProtoReflect.Descriptor instead. -func (*KillSandboxResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{21} -} - -type StreamSandboxLogsRequest 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"` -} - -func (x *StreamSandboxLogsRequest) Reset() { - *x = StreamSandboxLogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[22] - 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_agent_v1_sandbox_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 StreamSandboxLogsRequest.ProtoReflect.Descriptor instead. -func (*StreamSandboxLogsRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{22} -} - -func (x *StreamSandboxLogsRequest) GetSandboxId() string { - if x != nil { - return x.SandboxId - } - return "" -} - -type StreamSandboxLogsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *StreamSandboxLogsResponse_LogEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *StreamSandboxLogsResponse) Reset() { - *x = StreamSandboxLogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamSandboxLogsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamSandboxLogsResponse) ProtoMessage() {} - -func (x *StreamSandboxLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 StreamSandboxLogsResponse.ProtoReflect.Descriptor instead. -func (*StreamSandboxLogsResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{23} -} - -func (x *StreamSandboxLogsResponse) GetEvent() *StreamSandboxLogsResponse_LogEvent { - if x != nil { - return x.Event - } - return nil -} - -type ShutdownRequest 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"` -} - -func (x *ShutdownRequest) Reset() { - *x = ShutdownRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ShutdownRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ShutdownRequest) ProtoMessage() {} - -func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 ShutdownRequest.ProtoReflect.Descriptor instead. -func (*ShutdownRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{24} -} - -func (x *ShutdownRequest) GetSandboxId() string { - if x != nil { - return x.SandboxId - } - return "" -} - -type ShutdownResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ShutdownResponse) Reset() { - *x = ShutdownResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ShutdownResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ShutdownResponse) ProtoMessage() {} - -func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_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 ShutdownResponse.ProtoReflect.Descriptor instead. -func (*ShutdownResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{25} -} - -// SandboxTemplate represents a saved filesystem state that can be used to create new sandboxes -type SandboxTemplate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` - // Source information (from the sandbox that was used to create this template) - SourceRepository *string `protobuf:"bytes,5,opt,name=source_repository,json=sourceRepository,proto3,oneof" json:"source_repository,omitempty"` - SourceBranch *string `protobuf:"bytes,6,opt,name=source_branch,json=sourceBranch,proto3,oneof" json:"source_branch,omitempty"` - SourceCommitHash *string `protobuf:"bytes,7,opt,name=source_commit_hash,json=sourceCommitHash,proto3,oneof" json:"source_commit_hash,omitempty"` - // Whether this template can be used with SSH mode - // Only templates created from SSH-enabled sandboxes have tmate installed - SshCompatible bool `protobuf:"varint,8,opt,name=ssh_compatible,json=sshCompatible,proto3" json:"ssh_compatible,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` -} - -func (x *SandboxTemplate) Reset() { - *x = SandboxTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SandboxTemplate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SandboxTemplate) ProtoMessage() {} +func (*ListSandboxsRequest) ProtoMessage() {} -func (x *SandboxTemplate) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[26] +func (x *ListSandboxsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1653,105 +710,121 @@ func (x *SandboxTemplate) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SandboxTemplate.ProtoReflect.Descriptor instead. -func (*SandboxTemplate) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{26} +// Deprecated: Use ListSandboxsRequest.ProtoReflect.Descriptor instead. +func (*ListSandboxsRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{11} } -func (x *SandboxTemplate) GetId() string { - if x != nil { - return x.Id +func (x *ListSandboxsRequest) GetPageSize() int32 { + if x != nil && x.PageSize != nil { + return *x.PageSize } - return "" + return 0 } -func (x *SandboxTemplate) GetOrganizationId() string { - if x != nil { - return x.OrganizationId +func (x *ListSandboxsRequest) GetPageToken() string { + if x != nil && x.PageToken != nil { + return *x.PageToken } return "" } -func (x *SandboxTemplate) GetName() string { - if x != nil { - return x.Name +func (x *ListSandboxsRequest) GetAgentType() AgentType { + if x != nil && x.AgentType != nil { + return *x.AgentType } - return "" + return AgentType_AGENT_TYPE_UNSPECIFIED } -func (x *SandboxTemplate) GetDescription() string { - if x != nil && x.Description != nil { - return *x.Description - } - return "" +type ListSandboxsResponse 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 *SandboxTemplate) GetSourceRepository() string { - if x != nil && x.SourceRepository != nil { - return *x.SourceRepository +func (x *ListSandboxsResponse) Reset() { + *x = ListSandboxsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (x *SandboxTemplate) GetSourceBranch() string { - if x != nil && x.SourceBranch != nil { - return *x.SourceBranch - } - return "" +func (x *ListSandboxsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *SandboxTemplate) GetSourceCommitHash() string { - if x != nil && x.SourceCommitHash != nil { - return *x.SourceCommitHash +func (*ListSandboxsResponse) ProtoMessage() {} + +func (x *ListSandboxsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_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 "" + return mi.MessageOf(x) } -func (x *SandboxTemplate) GetSshCompatible() bool { - if x != nil { - return x.SshCompatible - } - return false +// Deprecated: Use ListSandboxsResponse.ProtoReflect.Descriptor instead. +func (*ListSandboxsResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{12} } -func (x *SandboxTemplate) GetCreatedAt() *timestamppb.Timestamp { +func (x *ListSandboxsResponse) GetSandboxes() []*Sandbox { if x != nil { - return x.CreatedAt + return x.Sandboxes } return nil } -// CreateSandboxTemplate creates a new template from a running sandbox's filesystem -type CreateSandboxTemplateRequest struct { +func (x *ListSandboxsResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +type Sandbox struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The running sandbox to snapshot - SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` - // Unique name for the template within the organization - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Optional description - Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + AgentType AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=depot.agent.v1.AgentType" json:"agent_type,omitempty"` + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + SessionId string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=started_at,json=startedAt,proto3,oneof" json:"started_at,omitempty"` + CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=completed_at,json=completedAt,proto3,oneof" json:"completed_at,omitempty"` + ExitCode *int32 `protobuf:"varint,8,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` + DurationSeconds *float64 `protobuf:"fixed64,9,opt,name=duration_seconds,json=durationSeconds,proto3,oneof" json:"duration_seconds,omitempty"` + ErrorMessage *string `protobuf:"bytes,10,opt,name=error_message,json=errorMessage,proto3,oneof" json:"error_message,omitempty"` } -func (x *CreateSandboxTemplateRequest) Reset() { - *x = CreateSandboxTemplateRequest{} +func (x *Sandbox) Reset() { + *x = Sandbox{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[27] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CreateSandboxTemplateRequest) String() string { +func (x *Sandbox) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateSandboxTemplateRequest) ProtoMessage() {} +func (*Sandbox) ProtoMessage() {} -func (x *CreateSandboxTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[27] +func (x *Sandbox) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1762,105 +835,106 @@ func (x *CreateSandboxTemplateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateSandboxTemplateRequest.ProtoReflect.Descriptor instead. -func (*CreateSandboxTemplateRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{27} +// Deprecated: Use Sandbox.ProtoReflect.Descriptor instead. +func (*Sandbox) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{13} } -func (x *CreateSandboxTemplateRequest) GetSandboxId() string { +func (x *Sandbox) GetSandboxId() string { if x != nil { return x.SandboxId } return "" } -func (x *CreateSandboxTemplateRequest) GetName() string { +func (x *Sandbox) GetAgentType() AgentType { if x != nil { - return x.Name + return x.AgentType } - return "" + return AgentType_AGENT_TYPE_UNSPECIFIED } -func (x *CreateSandboxTemplateRequest) GetDescription() string { - if x != nil && x.Description != nil { - return *x.Description +func (x *Sandbox) GetOrganizationId() string { + if x != nil { + return x.OrganizationId } return "" } -type CreateSandboxTemplateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Template *SandboxTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` +func (x *Sandbox) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" } -func (x *CreateSandboxTemplateResponse) Reset() { - *x = CreateSandboxTemplateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Sandbox) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt } + return nil } -func (x *CreateSandboxTemplateResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Sandbox) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil } -func (*CreateSandboxTemplateResponse) ProtoMessage() {} +func (x *Sandbox) GetCompletedAt() *timestamppb.Timestamp { + if x != nil { + return x.CompletedAt + } + return nil +} -func (x *CreateSandboxTemplateResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Sandbox) GetExitCode() int32 { + if x != nil && x.ExitCode != nil { + return *x.ExitCode } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use CreateSandboxTemplateResponse.ProtoReflect.Descriptor instead. -func (*CreateSandboxTemplateResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{28} +func (x *Sandbox) GetDurationSeconds() float64 { + if x != nil && x.DurationSeconds != nil { + return *x.DurationSeconds + } + return 0 } -func (x *CreateSandboxTemplateResponse) GetTemplate() *SandboxTemplate { - if x != nil { - return x.Template +func (x *Sandbox) GetErrorMessage() string { + if x != nil && x.ErrorMessage != nil { + return *x.ErrorMessage } - return nil + return "" } -// GetSandboxTemplate retrieves a template by ID -type GetSandboxTemplateRequest struct { +type KillSandboxRequest 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"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` } -func (x *GetSandboxTemplateRequest) Reset() { - *x = GetSandboxTemplateRequest{} +func (x *KillSandboxRequest) Reset() { + *x = KillSandboxRequest{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[29] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetSandboxTemplateRequest) String() string { +func (x *KillSandboxRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSandboxTemplateRequest) ProtoMessage() {} +func (*KillSandboxRequest) ProtoMessage() {} -func (x *GetSandboxTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[29] +func (x *KillSandboxRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1871,43 +945,41 @@ func (x *GetSandboxTemplateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSandboxTemplateRequest.ProtoReflect.Descriptor instead. -func (*GetSandboxTemplateRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{29} +// Deprecated: Use KillSandboxRequest.ProtoReflect.Descriptor instead. +func (*KillSandboxRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{14} } -func (x *GetSandboxTemplateRequest) GetTemplateId() string { +func (x *KillSandboxRequest) GetSandboxId() string { if x != nil { - return x.TemplateId + return x.SandboxId } return "" } -type GetSandboxTemplateResponse struct { +type KillSandboxResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Template *SandboxTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` } -func (x *GetSandboxTemplateResponse) Reset() { - *x = GetSandboxTemplateResponse{} +func (x *KillSandboxResponse) Reset() { + *x = KillSandboxResponse{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[30] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetSandboxTemplateResponse) String() string { +func (x *KillSandboxResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSandboxTemplateResponse) ProtoMessage() {} +func (*KillSandboxResponse) ProtoMessage() {} -func (x *GetSandboxTemplateResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[30] +func (x *KillSandboxResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1918,45 +990,36 @@ func (x *GetSandboxTemplateResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSandboxTemplateResponse.ProtoReflect.Descriptor instead. -func (*GetSandboxTemplateResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{30} -} - -func (x *GetSandboxTemplateResponse) GetTemplate() *SandboxTemplate { - if x != nil { - return x.Template - } - return nil +// Deprecated: Use KillSandboxResponse.ProtoReflect.Descriptor instead. +func (*KillSandboxResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{15} } -// ListSandboxTemplates lists all templates for an organization -type ListSandboxTemplatesRequest struct { +type StreamSandboxLogsRequest 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"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` } -func (x *ListSandboxTemplatesRequest) Reset() { - *x = ListSandboxTemplatesRequest{} +func (x *StreamSandboxLogsRequest) Reset() { + *x = StreamSandboxLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[31] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListSandboxTemplatesRequest) String() string { +func (x *StreamSandboxLogsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListSandboxTemplatesRequest) ProtoMessage() {} +func (*StreamSandboxLogsRequest) ProtoMessage() {} -func (x *ListSandboxTemplatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[31] +func (x *StreamSandboxLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1967,51 +1030,43 @@ func (x *ListSandboxTemplatesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListSandboxTemplatesRequest.ProtoReflect.Descriptor instead. -func (*ListSandboxTemplatesRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{31} -} - -func (x *ListSandboxTemplatesRequest) GetPageSize() int32 { - if x != nil && x.PageSize != nil { - return *x.PageSize - } - return 0 +// Deprecated: Use StreamSandboxLogsRequest.ProtoReflect.Descriptor instead. +func (*StreamSandboxLogsRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{16} } -func (x *ListSandboxTemplatesRequest) GetPageToken() string { - if x != nil && x.PageToken != nil { - return *x.PageToken +func (x *StreamSandboxLogsRequest) GetSandboxId() string { + if x != nil { + return x.SandboxId } return "" } -type ListSandboxTemplatesResponse struct { +type StreamSandboxLogsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Templates []*SandboxTemplate `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"` - NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` + Event *StreamSandboxLogsResponse_LogEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` } -func (x *ListSandboxTemplatesResponse) Reset() { - *x = ListSandboxTemplatesResponse{} +func (x *StreamSandboxLogsResponse) Reset() { + *x = StreamSandboxLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[32] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListSandboxTemplatesResponse) String() string { +func (x *StreamSandboxLogsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListSandboxTemplatesResponse) ProtoMessage() {} +func (*StreamSandboxLogsResponse) ProtoMessage() {} -func (x *ListSandboxTemplatesResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[32] +func (x *StreamSandboxLogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2022,51 +1077,43 @@ func (x *ListSandboxTemplatesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListSandboxTemplatesResponse.ProtoReflect.Descriptor instead. -func (*ListSandboxTemplatesResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{32} +// Deprecated: Use StreamSandboxLogsResponse.ProtoReflect.Descriptor instead. +func (*StreamSandboxLogsResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17} } -func (x *ListSandboxTemplatesResponse) GetTemplates() []*SandboxTemplate { +func (x *StreamSandboxLogsResponse) GetEvent() *StreamSandboxLogsResponse_LogEvent { if x != nil { - return x.Templates + return x.Event } return nil } -func (x *ListSandboxTemplatesResponse) GetNextPageToken() string { - if x != nil && x.NextPageToken != nil { - return *x.NextPageToken - } - return "" -} - -// DeleteSandboxTemplate soft-deletes a template -type DeleteSandboxTemplateRequest struct { +type ShutdownRequest 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"` + SandboxId string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` } -func (x *DeleteSandboxTemplateRequest) Reset() { - *x = DeleteSandboxTemplateRequest{} +func (x *ShutdownRequest) Reset() { + *x = ShutdownRequest{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[33] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeleteSandboxTemplateRequest) String() string { +func (x *ShutdownRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteSandboxTemplateRequest) ProtoMessage() {} +func (*ShutdownRequest) ProtoMessage() {} -func (x *DeleteSandboxTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[33] +func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2077,41 +1124,41 @@ func (x *DeleteSandboxTemplateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteSandboxTemplateRequest.ProtoReflect.Descriptor instead. -func (*DeleteSandboxTemplateRequest) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{33} +// Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead. +func (*ShutdownRequest) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{18} } -func (x *DeleteSandboxTemplateRequest) GetTemplateId() string { +func (x *ShutdownRequest) GetSandboxId() string { if x != nil { - return x.TemplateId + return x.SandboxId } return "" } -type DeleteSandboxTemplateResponse struct { +type ShutdownResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *DeleteSandboxTemplateResponse) Reset() { - *x = DeleteSandboxTemplateResponse{} +func (x *ShutdownResponse) Reset() { + *x = ShutdownResponse{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[34] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeleteSandboxTemplateResponse) String() string { +func (x *ShutdownResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteSandboxTemplateResponse) ProtoMessage() {} +func (*ShutdownResponse) ProtoMessage() {} -func (x *DeleteSandboxTemplateResponse) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[34] +func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2122,9 +1169,9 @@ func (x *DeleteSandboxTemplateResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteSandboxTemplateResponse.ProtoReflect.Descriptor instead. -func (*DeleteSandboxTemplateResponse) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{34} +// Deprecated: Use ShutdownResponse.ProtoReflect.Descriptor instead. +func (*ShutdownResponse) Descriptor() ([]byte, []int) { + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{19} } type StartSandboxRequest_Context struct { @@ -2141,7 +1188,7 @@ type StartSandboxRequest_Context struct { func (x *StartSandboxRequest_Context) Reset() { *x = StartSandboxRequest_Context{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[36] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2154,7 +1201,7 @@ func (x *StartSandboxRequest_Context) String() string { func (*StartSandboxRequest_Context) ProtoMessage() {} func (x *StartSandboxRequest_Context) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[36] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2194,61 +1241,6 @@ type StartSandboxRequest_Context_Git struct { func (*StartSandboxRequest_Context_Git) isStartSandboxRequest_Context_Context() {} -type StartSandboxRequest_SSHConfig 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 *StartSandboxRequest_SSHConfig) Reset() { - *x = StartSandboxRequest_SSHConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartSandboxRequest_SSHConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartSandboxRequest_SSHConfig) ProtoMessage() {} - -func (x *StartSandboxRequest_SSHConfig) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[37] - 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 StartSandboxRequest_SSHConfig.ProtoReflect.Descriptor instead. -func (*StartSandboxRequest_SSHConfig) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *StartSandboxRequest_SSHConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *StartSandboxRequest_SSHConfig) GetTimeoutMinutes() int32 { - if x != nil && x.TimeoutMinutes != nil { - return *x.TimeoutMinutes - } - return 0 -} - type StartSandboxRequest_Context_GitContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2263,7 +1255,7 @@ type StartSandboxRequest_Context_GitContext struct { func (x *StartSandboxRequest_Context_GitContext) Reset() { *x = StartSandboxRequest_Context_GitContext{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[38] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2276,7 +1268,7 @@ func (x *StartSandboxRequest_Context_GitContext) String() string { func (*StartSandboxRequest_Context_GitContext) ProtoMessage() {} func (x *StartSandboxRequest_Context_GitContext) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[38] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2333,7 +1325,7 @@ type StreamSandboxLogsResponse_LogEvent struct { func (x *StreamSandboxLogsResponse_LogEvent) Reset() { *x = StreamSandboxLogsResponse_LogEvent{} if protoimpl.UnsafeEnabled { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[39] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2346,7 +1338,7 @@ func (x *StreamSandboxLogsResponse_LogEvent) String() string { func (*StreamSandboxLogsResponse_LogEvent) ProtoMessage() {} func (x *StreamSandboxLogsResponse_LogEvent) ProtoReflect() protoreflect.Message { - mi := &file_depot_agent_v1_sandbox_proto_msgTypes[39] + mi := &file_depot_agent_v1_sandbox_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2359,7 +1351,7 @@ func (x *StreamSandboxLogsResponse_LogEvent) ProtoReflect() protoreflect.Message // Deprecated: Use StreamSandboxLogsResponse_LogEvent.ProtoReflect.Descriptor instead. func (*StreamSandboxLogsResponse_LogEvent) Descriptor() ([]byte, []int) { - return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{23, 0} + return file_depot_agent_v1_sandbox_proto_rawDescGZIP(), []int{17, 0} } func (x *StreamSandboxLogsResponse_LogEvent) GetData() []byte { @@ -2392,7 +1384,7 @@ var file_depot_agent_v1_sandbox_proto_rawDesc = []byte{ 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0xa3, 0x09, 0x0a, 0x13, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x06, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, @@ -2416,443 +1408,239 @@ var file_depot_agent_v1_sandbox_proto_rawDesc = []byte{ 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x51, 0x0a, 0x0a, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, - 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x53, 0x48, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x02, 0x52, 0x09, 0x73, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0a, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x77, 0x61, 0x69, - 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0e, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x88, 0x01, 0x01, 0x1a, 0x47, 0x0a, 0x19, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 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, 0x1a, 0xaa, 0x02, 0x0a, - 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x4a, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, - 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, - 0x03, 0x67, 0x69, 0x74, 0x1a, 0xc7, 0x01, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, - 0x12, 0x1b, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, - 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x09, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x67, 0x0a, 0x09, 0x53, 0x53, 0x48, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x73, 0x68, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x22, 0xb9, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, - 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, + 0x74, 0x1a, 0x47, 0x0a, 0x19, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 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, 0x1a, 0xaa, 0x02, 0x0a, 0x07, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x4a, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x03, 0x67, + 0x69, 0x74, 0x1a, 0xc7, 0x01, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x1b, + 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x09, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x7d, 0x0a, 0x14, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 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, 0x22, + 0x47, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x22, 0xef, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, + 0x0a, 0x12, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x64, + 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x84, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, + 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x22, 0x47, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x06, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x64, 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, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 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, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 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, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x73, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0xba, 0x04, 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, 0x38, + 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, - 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x53, 0x48, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x73, 0x68, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x0e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x48, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x73, 0x68, 0x5f, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x93, 0x01, - 0x0a, 0x14, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 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, + 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, 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, 0x00, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x0c, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 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, 0x01, 0x52, + 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x20, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x02, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x48, 0x03, 0x52, 0x0f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x33, 0x0a, 0x12, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, - 0x2d, 0x0a, 0x10, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x61, 0x69, - 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x22, 0x75, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, - 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 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, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, - 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0x74, 0x0a, 0x0d, 0x53, 0x53, 0x48, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x38, - 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, - 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, - 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x53, - 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x73, 0x68, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x47, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x07, - 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x22, 0xef, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, - 0x12, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x64, 0x64, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, - 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, - 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, - 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, - 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x47, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x65, 0x70, 0x6f, - 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x06, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, - 0x64, 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, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 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, 0x3d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, - 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 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, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x73, 0x61, - 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0xca, 0x05, 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, 0x38, 0x0a, - 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x19, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, + 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 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, 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, 0x22, 0xdf, 0x02, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, + 0xf7, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x74, - 0x61, 0x72, 0x74, 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, 0x00, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x0c, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 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, 0x01, 0x52, 0x0b, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x20, - 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x05, 0x48, 0x02, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x48, 0x03, 0x52, 0x0f, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x73, - 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x05, 0x52, 0x0a, 0x73, 0x73, 0x68, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x06, 0x52, 0x07, 0x73, 0x73, 0x68, 0x48, 0x6f, 0x73, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x05, 0x48, 0x07, 0x52, 0x07, 0x73, 0x73, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, - 0x0f, 0x0a, 0x0d, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x22, - 0x33, 0x0a, 0x12, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x15, 0x0a, 0x13, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, - 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 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, 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, 0x22, 0xdf, 0x02, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, - 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, - 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0xf7, - 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x07, 0x4c, 0x6f, 0x67, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, - 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x4f, 0x55, - 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x54, 0x44, 0x45, 0x52, 0x52, 0x10, 0x02, 0x22, 0x30, 0x0a, 0x0f, 0x53, 0x68, 0x75, 0x74, - 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x68, - 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc5, - 0x03, 0x0a, 0x0f, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 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, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, - 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, - 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, - 0x73, 0x68, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 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, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x10, 0x0a, - 0x0e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, - 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x22, 0x88, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x5c, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, - 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, - 0x3c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x59, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 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, 0x1c, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 0x3f, 0x0a, 0x1c, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x1f, 0x0a, - 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc4, - 0x0b, 0x0a, 0x0e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, - 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0d, - 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x24, 0x2e, - 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, - 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, - 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x65, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x67, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x07, 0x4c, 0x6f, + 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x4f, + 0x55, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x53, 0x54, 0x44, 0x45, 0x52, 0x52, 0x10, 0x02, 0x22, 0x30, 0x0a, 0x0f, 0x53, 0x68, 0x75, + 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x12, 0x0a, 0x10, 0x53, + 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xb3, 0x06, 0x0a, 0x0e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, + 0x6f, 0x78, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, + 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, + 0x0a, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x59, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x73, 0x12, - 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x4b, 0x69, - 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x22, 0x2e, 0x64, 0x65, 0x70, 0x6f, - 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x53, - 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4b, - 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, - 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x50, - 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x64, 0x65, - 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x64, 0x65, 0x70, - 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, + 0x78, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, + 0x64, 0x62, 0x6f, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, + 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x22, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, + 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, + 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 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, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x61, 0x6e, 0x64, + 0x62, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, + 0x01, 0x12, 0x50, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, - 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x53, 0x48, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x15, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x6b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x14, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, - 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x74, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x61, - 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, + 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x22, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, + 0x77, 0x6e, 0x12, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb3, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, @@ -2881,116 +1669,79 @@ func file_depot_agent_v1_sandbox_proto_rawDescGZIP() []byte { } var file_depot_agent_v1_sandbox_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_depot_agent_v1_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_depot_agent_v1_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_depot_agent_v1_sandbox_proto_goTypes = []interface{}{ (StreamSandboxLogsResponse_LogEvent_LogType)(0), // 0: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.LogType (*StartSandboxRequest)(nil), // 1: depot.agent.v1.StartSandboxRequest (*StartSandboxResponse)(nil), // 2: depot.agent.v1.StartSandboxResponse - (*ExecInSandboxRequest)(nil), // 3: depot.agent.v1.ExecInSandboxRequest - (*ExecInSandboxResponse)(nil), // 4: depot.agent.v1.ExecInSandboxResponse - (*CommandResult)(nil), // 5: depot.agent.v1.CommandResult - (*SSHConnection)(nil), // 6: depot.agent.v1.SSHConnection - (*GetSSHConnectionRequest)(nil), // 7: depot.agent.v1.GetSSHConnectionRequest - (*GetSSHConnectionResponse)(nil), // 8: depot.agent.v1.GetSSHConnectionResponse - (*GetSandboxRequest)(nil), // 9: depot.agent.v1.GetSandboxRequest - (*GetSandboxResponse)(nil), // 10: depot.agent.v1.GetSandboxResponse - (*AddSecretRequest)(nil), // 11: depot.agent.v1.AddSecretRequest - (*AddSecretResponse)(nil), // 12: depot.agent.v1.AddSecretResponse - (*RemoveSecretRequest)(nil), // 13: depot.agent.v1.RemoveSecretRequest - (*RemoveSecretResponse)(nil), // 14: depot.agent.v1.RemoveSecretResponse - (*ListSecretsRequest)(nil), // 15: depot.agent.v1.ListSecretsRequest - (*ListSecretsResponse)(nil), // 16: depot.agent.v1.ListSecretsResponse - (*Secret)(nil), // 17: depot.agent.v1.Secret - (*ListSandboxsRequest)(nil), // 18: depot.agent.v1.ListSandboxsRequest - (*ListSandboxsResponse)(nil), // 19: depot.agent.v1.ListSandboxsResponse - (*Sandbox)(nil), // 20: depot.agent.v1.Sandbox - (*KillSandboxRequest)(nil), // 21: depot.agent.v1.KillSandboxRequest - (*KillSandboxResponse)(nil), // 22: depot.agent.v1.KillSandboxResponse - (*StreamSandboxLogsRequest)(nil), // 23: depot.agent.v1.StreamSandboxLogsRequest - (*StreamSandboxLogsResponse)(nil), // 24: depot.agent.v1.StreamSandboxLogsResponse - (*ShutdownRequest)(nil), // 25: depot.agent.v1.ShutdownRequest - (*ShutdownResponse)(nil), // 26: depot.agent.v1.ShutdownResponse - (*SandboxTemplate)(nil), // 27: depot.agent.v1.SandboxTemplate - (*CreateSandboxTemplateRequest)(nil), // 28: depot.agent.v1.CreateSandboxTemplateRequest - (*CreateSandboxTemplateResponse)(nil), // 29: depot.agent.v1.CreateSandboxTemplateResponse - (*GetSandboxTemplateRequest)(nil), // 30: depot.agent.v1.GetSandboxTemplateRequest - (*GetSandboxTemplateResponse)(nil), // 31: depot.agent.v1.GetSandboxTemplateResponse - (*ListSandboxTemplatesRequest)(nil), // 32: depot.agent.v1.ListSandboxTemplatesRequest - (*ListSandboxTemplatesResponse)(nil), // 33: depot.agent.v1.ListSandboxTemplatesResponse - (*DeleteSandboxTemplateRequest)(nil), // 34: depot.agent.v1.DeleteSandboxTemplateRequest - (*DeleteSandboxTemplateResponse)(nil), // 35: depot.agent.v1.DeleteSandboxTemplateResponse - nil, // 36: depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry - (*StartSandboxRequest_Context)(nil), // 37: depot.agent.v1.StartSandboxRequest.Context - (*StartSandboxRequest_SSHConfig)(nil), // 38: depot.agent.v1.StartSandboxRequest.SSHConfig - (*StartSandboxRequest_Context_GitContext)(nil), // 39: depot.agent.v1.StartSandboxRequest.Context.GitContext - (*StreamSandboxLogsResponse_LogEvent)(nil), // 40: depot.agent.v1.StreamSandboxLogsResponse.LogEvent - (AgentType)(0), // 41: depot.agent.v1.AgentType - (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp + (*GetSandboxRequest)(nil), // 3: depot.agent.v1.GetSandboxRequest + (*GetSandboxResponse)(nil), // 4: depot.agent.v1.GetSandboxResponse + (*AddSecretRequest)(nil), // 5: depot.agent.v1.AddSecretRequest + (*AddSecretResponse)(nil), // 6: depot.agent.v1.AddSecretResponse + (*RemoveSecretRequest)(nil), // 7: depot.agent.v1.RemoveSecretRequest + (*RemoveSecretResponse)(nil), // 8: depot.agent.v1.RemoveSecretResponse + (*ListSecretsRequest)(nil), // 9: depot.agent.v1.ListSecretsRequest + (*ListSecretsResponse)(nil), // 10: depot.agent.v1.ListSecretsResponse + (*Secret)(nil), // 11: depot.agent.v1.Secret + (*ListSandboxsRequest)(nil), // 12: depot.agent.v1.ListSandboxsRequest + (*ListSandboxsResponse)(nil), // 13: depot.agent.v1.ListSandboxsResponse + (*Sandbox)(nil), // 14: depot.agent.v1.Sandbox + (*KillSandboxRequest)(nil), // 15: depot.agent.v1.KillSandboxRequest + (*KillSandboxResponse)(nil), // 16: depot.agent.v1.KillSandboxResponse + (*StreamSandboxLogsRequest)(nil), // 17: depot.agent.v1.StreamSandboxLogsRequest + (*StreamSandboxLogsResponse)(nil), // 18: depot.agent.v1.StreamSandboxLogsResponse + (*ShutdownRequest)(nil), // 19: depot.agent.v1.ShutdownRequest + (*ShutdownResponse)(nil), // 20: depot.agent.v1.ShutdownResponse + nil, // 21: depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry + (*StartSandboxRequest_Context)(nil), // 22: depot.agent.v1.StartSandboxRequest.Context + (*StartSandboxRequest_Context_GitContext)(nil), // 23: depot.agent.v1.StartSandboxRequest.Context.GitContext + (*StreamSandboxLogsResponse_LogEvent)(nil), // 24: depot.agent.v1.StreamSandboxLogsResponse.LogEvent + (AgentType)(0), // 25: depot.agent.v1.AgentType + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp } var file_depot_agent_v1_sandbox_proto_depIdxs = []int32{ - 41, // 0: depot.agent.v1.StartSandboxRequest.agent_type:type_name -> depot.agent.v1.AgentType - 36, // 1: depot.agent.v1.StartSandboxRequest.environment_variables:type_name -> depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry - 37, // 2: depot.agent.v1.StartSandboxRequest.context:type_name -> depot.agent.v1.StartSandboxRequest.Context - 38, // 3: depot.agent.v1.StartSandboxRequest.ssh_config:type_name -> depot.agent.v1.StartSandboxRequest.SSHConfig - 6, // 4: depot.agent.v1.StartSandboxResponse.ssh_connection:type_name -> depot.agent.v1.SSHConnection - 5, // 5: depot.agent.v1.StartSandboxResponse.command_result:type_name -> depot.agent.v1.CommandResult - 5, // 6: depot.agent.v1.ExecInSandboxResponse.command_result:type_name -> depot.agent.v1.CommandResult - 6, // 7: depot.agent.v1.GetSSHConnectionResponse.ssh_connection:type_name -> depot.agent.v1.SSHConnection - 20, // 8: depot.agent.v1.GetSandboxResponse.sandbox:type_name -> depot.agent.v1.Sandbox - 41, // 9: depot.agent.v1.AddSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType - 41, // 10: depot.agent.v1.RemoveSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType - 41, // 11: depot.agent.v1.ListSecretsRequest.agent_type:type_name -> depot.agent.v1.AgentType - 17, // 12: depot.agent.v1.ListSecretsResponse.secrets:type_name -> depot.agent.v1.Secret - 42, // 13: depot.agent.v1.Secret.last_modified:type_name -> google.protobuf.Timestamp - 41, // 14: depot.agent.v1.ListSandboxsRequest.agent_type:type_name -> depot.agent.v1.AgentType - 20, // 15: depot.agent.v1.ListSandboxsResponse.sandboxes:type_name -> depot.agent.v1.Sandbox - 41, // 16: depot.agent.v1.Sandbox.agent_type:type_name -> depot.agent.v1.AgentType - 42, // 17: depot.agent.v1.Sandbox.created_at:type_name -> google.protobuf.Timestamp - 42, // 18: depot.agent.v1.Sandbox.started_at:type_name -> google.protobuf.Timestamp - 42, // 19: depot.agent.v1.Sandbox.completed_at:type_name -> google.protobuf.Timestamp - 40, // 20: depot.agent.v1.StreamSandboxLogsResponse.event:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent - 42, // 21: depot.agent.v1.SandboxTemplate.created_at:type_name -> google.protobuf.Timestamp - 27, // 22: depot.agent.v1.CreateSandboxTemplateResponse.template:type_name -> depot.agent.v1.SandboxTemplate - 27, // 23: depot.agent.v1.GetSandboxTemplateResponse.template:type_name -> depot.agent.v1.SandboxTemplate - 27, // 24: depot.agent.v1.ListSandboxTemplatesResponse.templates:type_name -> depot.agent.v1.SandboxTemplate - 39, // 25: depot.agent.v1.StartSandboxRequest.Context.git:type_name -> depot.agent.v1.StartSandboxRequest.Context.GitContext - 42, // 26: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.timestamp:type_name -> google.protobuf.Timestamp - 0, // 27: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.type:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent.LogType - 1, // 28: depot.agent.v1.SandboxService.StartSandbox:input_type -> depot.agent.v1.StartSandboxRequest - 3, // 29: depot.agent.v1.SandboxService.ExecInSandbox:input_type -> depot.agent.v1.ExecInSandboxRequest - 9, // 30: depot.agent.v1.SandboxService.GetSandbox:input_type -> depot.agent.v1.GetSandboxRequest - 18, // 31: depot.agent.v1.SandboxService.ListSandboxs:input_type -> depot.agent.v1.ListSandboxsRequest - 21, // 32: depot.agent.v1.SandboxService.KillSandbox:input_type -> depot.agent.v1.KillSandboxRequest - 23, // 33: depot.agent.v1.SandboxService.StreamSandboxLogs:input_type -> depot.agent.v1.StreamSandboxLogsRequest - 11, // 34: depot.agent.v1.SandboxService.AddSecret:input_type -> depot.agent.v1.AddSecretRequest - 13, // 35: depot.agent.v1.SandboxService.RemoveSecret:input_type -> depot.agent.v1.RemoveSecretRequest - 15, // 36: depot.agent.v1.SandboxService.ListSecrets:input_type -> depot.agent.v1.ListSecretsRequest - 25, // 37: depot.agent.v1.SandboxService.Shutdown:input_type -> depot.agent.v1.ShutdownRequest - 7, // 38: depot.agent.v1.SandboxService.GetSSHConnection:input_type -> depot.agent.v1.GetSSHConnectionRequest - 28, // 39: depot.agent.v1.SandboxService.CreateSandboxTemplate:input_type -> depot.agent.v1.CreateSandboxTemplateRequest - 30, // 40: depot.agent.v1.SandboxService.GetSandboxTemplate:input_type -> depot.agent.v1.GetSandboxTemplateRequest - 32, // 41: depot.agent.v1.SandboxService.ListSandboxTemplates:input_type -> depot.agent.v1.ListSandboxTemplatesRequest - 34, // 42: depot.agent.v1.SandboxService.DeleteSandboxTemplate:input_type -> depot.agent.v1.DeleteSandboxTemplateRequest - 2, // 43: depot.agent.v1.SandboxService.StartSandbox:output_type -> depot.agent.v1.StartSandboxResponse - 4, // 44: depot.agent.v1.SandboxService.ExecInSandbox:output_type -> depot.agent.v1.ExecInSandboxResponse - 10, // 45: depot.agent.v1.SandboxService.GetSandbox:output_type -> depot.agent.v1.GetSandboxResponse - 19, // 46: depot.agent.v1.SandboxService.ListSandboxs:output_type -> depot.agent.v1.ListSandboxsResponse - 22, // 47: depot.agent.v1.SandboxService.KillSandbox:output_type -> depot.agent.v1.KillSandboxResponse - 24, // 48: depot.agent.v1.SandboxService.StreamSandboxLogs:output_type -> depot.agent.v1.StreamSandboxLogsResponse - 12, // 49: depot.agent.v1.SandboxService.AddSecret:output_type -> depot.agent.v1.AddSecretResponse - 14, // 50: depot.agent.v1.SandboxService.RemoveSecret:output_type -> depot.agent.v1.RemoveSecretResponse - 16, // 51: depot.agent.v1.SandboxService.ListSecrets:output_type -> depot.agent.v1.ListSecretsResponse - 26, // 52: depot.agent.v1.SandboxService.Shutdown:output_type -> depot.agent.v1.ShutdownResponse - 8, // 53: depot.agent.v1.SandboxService.GetSSHConnection:output_type -> depot.agent.v1.GetSSHConnectionResponse - 29, // 54: depot.agent.v1.SandboxService.CreateSandboxTemplate:output_type -> depot.agent.v1.CreateSandboxTemplateResponse - 31, // 55: depot.agent.v1.SandboxService.GetSandboxTemplate:output_type -> depot.agent.v1.GetSandboxTemplateResponse - 33, // 56: depot.agent.v1.SandboxService.ListSandboxTemplates:output_type -> depot.agent.v1.ListSandboxTemplatesResponse - 35, // 57: depot.agent.v1.SandboxService.DeleteSandboxTemplate:output_type -> depot.agent.v1.DeleteSandboxTemplateResponse - 43, // [43:58] is the sub-list for method output_type - 28, // [28:43] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 25, // 0: depot.agent.v1.StartSandboxRequest.agent_type:type_name -> depot.agent.v1.AgentType + 21, // 1: depot.agent.v1.StartSandboxRequest.environment_variables:type_name -> depot.agent.v1.StartSandboxRequest.EnvironmentVariablesEntry + 22, // 2: depot.agent.v1.StartSandboxRequest.context:type_name -> depot.agent.v1.StartSandboxRequest.Context + 14, // 3: depot.agent.v1.GetSandboxResponse.sandbox:type_name -> depot.agent.v1.Sandbox + 25, // 4: depot.agent.v1.AddSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType + 25, // 5: depot.agent.v1.RemoveSecretRequest.agent_type:type_name -> depot.agent.v1.AgentType + 25, // 6: depot.agent.v1.ListSecretsRequest.agent_type:type_name -> depot.agent.v1.AgentType + 11, // 7: depot.agent.v1.ListSecretsResponse.secrets:type_name -> depot.agent.v1.Secret + 26, // 8: depot.agent.v1.Secret.last_modified:type_name -> google.protobuf.Timestamp + 25, // 9: depot.agent.v1.ListSandboxsRequest.agent_type:type_name -> depot.agent.v1.AgentType + 14, // 10: depot.agent.v1.ListSandboxsResponse.sandboxes:type_name -> depot.agent.v1.Sandbox + 25, // 11: depot.agent.v1.Sandbox.agent_type:type_name -> depot.agent.v1.AgentType + 26, // 12: depot.agent.v1.Sandbox.created_at:type_name -> google.protobuf.Timestamp + 26, // 13: depot.agent.v1.Sandbox.started_at:type_name -> google.protobuf.Timestamp + 26, // 14: depot.agent.v1.Sandbox.completed_at:type_name -> google.protobuf.Timestamp + 24, // 15: depot.agent.v1.StreamSandboxLogsResponse.event:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent + 23, // 16: depot.agent.v1.StartSandboxRequest.Context.git:type_name -> depot.agent.v1.StartSandboxRequest.Context.GitContext + 26, // 17: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.timestamp:type_name -> google.protobuf.Timestamp + 0, // 18: depot.agent.v1.StreamSandboxLogsResponse.LogEvent.type:type_name -> depot.agent.v1.StreamSandboxLogsResponse.LogEvent.LogType + 1, // 19: depot.agent.v1.SandboxService.StartSandbox:input_type -> depot.agent.v1.StartSandboxRequest + 3, // 20: depot.agent.v1.SandboxService.GetSandbox:input_type -> depot.agent.v1.GetSandboxRequest + 12, // 21: depot.agent.v1.SandboxService.ListSandboxs:input_type -> depot.agent.v1.ListSandboxsRequest + 15, // 22: depot.agent.v1.SandboxService.KillSandbox:input_type -> depot.agent.v1.KillSandboxRequest + 17, // 23: depot.agent.v1.SandboxService.StreamSandboxLogs:input_type -> depot.agent.v1.StreamSandboxLogsRequest + 5, // 24: depot.agent.v1.SandboxService.AddSecret:input_type -> depot.agent.v1.AddSecretRequest + 7, // 25: depot.agent.v1.SandboxService.RemoveSecret:input_type -> depot.agent.v1.RemoveSecretRequest + 9, // 26: depot.agent.v1.SandboxService.ListSecrets:input_type -> depot.agent.v1.ListSecretsRequest + 19, // 27: depot.agent.v1.SandboxService.Shutdown:input_type -> depot.agent.v1.ShutdownRequest + 2, // 28: depot.agent.v1.SandboxService.StartSandbox:output_type -> depot.agent.v1.StartSandboxResponse + 4, // 29: depot.agent.v1.SandboxService.GetSandbox:output_type -> depot.agent.v1.GetSandboxResponse + 13, // 30: depot.agent.v1.SandboxService.ListSandboxs:output_type -> depot.agent.v1.ListSandboxsResponse + 16, // 31: depot.agent.v1.SandboxService.KillSandbox:output_type -> depot.agent.v1.KillSandboxResponse + 18, // 32: depot.agent.v1.SandboxService.StreamSandboxLogs:output_type -> depot.agent.v1.StreamSandboxLogsResponse + 6, // 33: depot.agent.v1.SandboxService.AddSecret:output_type -> depot.agent.v1.AddSecretResponse + 8, // 34: depot.agent.v1.SandboxService.RemoveSecret:output_type -> depot.agent.v1.RemoveSecretResponse + 10, // 35: depot.agent.v1.SandboxService.ListSecrets:output_type -> depot.agent.v1.ListSecretsResponse + 20, // 36: depot.agent.v1.SandboxService.Shutdown:output_type -> depot.agent.v1.ShutdownResponse + 28, // [28:37] is the sub-list for method output_type + 19, // [19:28] 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_agent_v1_sandbox_proto_init() } @@ -3025,78 +1776,6 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecInSandboxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecInSandboxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SSHConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSSHConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSSHConnectionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSandboxRequest); i { case 0: return &v.state @@ -3108,7 +1787,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSandboxResponse); i { case 0: return &v.state @@ -3120,7 +1799,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddSecretRequest); i { case 0: return &v.state @@ -3132,7 +1811,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddSecretResponse); i { case 0: return &v.state @@ -3144,7 +1823,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveSecretRequest); i { case 0: return &v.state @@ -3156,7 +1835,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveSecretResponse); i { case 0: return &v.state @@ -3168,7 +1847,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSecretsRequest); i { case 0: return &v.state @@ -3180,7 +1859,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSecretsResponse); i { case 0: return &v.state @@ -3192,7 +1871,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Secret); i { case 0: return &v.state @@ -3204,7 +1883,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSandboxsRequest); i { case 0: return &v.state @@ -3216,7 +1895,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSandboxsResponse); i { case 0: return &v.state @@ -3228,7 +1907,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Sandbox); i { case 0: return &v.state @@ -3240,7 +1919,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KillSandboxRequest); i { case 0: return &v.state @@ -3252,7 +1931,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KillSandboxResponse); i { case 0: return &v.state @@ -3264,7 +1943,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamSandboxLogsRequest); i { case 0: return &v.state @@ -3276,7 +1955,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamSandboxLogsResponse); i { case 0: return &v.state @@ -3288,7 +1967,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ShutdownRequest); i { case 0: return &v.state @@ -3300,7 +1979,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ShutdownResponse); i { case 0: return &v.state @@ -3312,115 +1991,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SandboxTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSandboxTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSandboxTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSandboxTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSandboxTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSandboxTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSandboxTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSandboxTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSandboxTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartSandboxRequest_Context); i { case 0: return &v.state @@ -3432,19 +2003,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartSandboxRequest_SSHConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_depot_agent_v1_sandbox_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartSandboxRequest_Context_GitContext); i { case 0: return &v.state @@ -3456,7 +2015,7 @@ func file_depot_agent_v1_sandbox_proto_init() { return nil } } - file_depot_agent_v1_sandbox_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_depot_agent_v1_sandbox_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamSandboxLogsResponse_LogEvent); i { case 0: return &v.state @@ -3470,32 +2029,24 @@ func file_depot_agent_v1_sandbox_proto_init() { } } file_depot_agent_v1_sandbox_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[8].OneofWrappers = []interface{}{} file_depot_agent_v1_sandbox_proto_msgTypes[10].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[11].OneofWrappers = []interface{}{} file_depot_agent_v1_sandbox_proto_msgTypes[12].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[14].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[16].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[17].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[18].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[19].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[26].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[27].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[31].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[32].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[36].OneofWrappers = []interface{}{ + file_depot_agent_v1_sandbox_proto_msgTypes[13].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[21].OneofWrappers = []interface{}{ (*StartSandboxRequest_Context_Git)(nil), } - file_depot_agent_v1_sandbox_proto_msgTypes[37].OneofWrappers = []interface{}{} - file_depot_agent_v1_sandbox_proto_msgTypes[38].OneofWrappers = []interface{}{} + file_depot_agent_v1_sandbox_proto_msgTypes[22].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_depot_agent_v1_sandbox_proto_rawDesc, NumEnums: 1, - NumMessages: 40, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/pty/resize_unix.go b/pkg/pty/resize_unix.go index cab4abc1..67d26f07 100644 --- a/pkg/pty/resize_unix.go +++ b/pkg/pty/resize_unix.go @@ -9,7 +9,6 @@ import ( "syscall" civ1 "github.com/depot/cli/pkg/proto/depot/ci/v1" - sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" "golang.org/x/term" ) @@ -54,45 +53,3 @@ func watchTerminalResize( return func() { signal.Stop(sigwinch) } } - -// watchTerminalResizeSandboxV0 is the M34 counterpart that sends -// depot.sandbox.v1.OpenPtyRequest.Resize messages. Used by RunSandboxV0. -func watchTerminalResizeSandboxV0( - ctx context.Context, - fd int, - sendCh chan<- *sandboxv1.OpenPtyRequest, -) func() { - sigwinch := make(chan os.Signal, 1) - signal.Notify(sigwinch, syscall.SIGWINCH) - - go func() { - for { - select { - case <-ctx.Done(): - return - case _, ok := <-sigwinch: - if !ok { - return - } - w, h, err := term.GetSize(fd) - if err != nil { - continue - } - select { - case sendCh <- &sandboxv1.OpenPtyRequest{ - Input: &sandboxv1.OpenPtyRequest_Resize_{ - Resize: &sandboxv1.OpenPtyRequest_Resize{ - Rows: uint32(h), - Cols: uint32(w), - }, - }, - }: - case <-ctx.Done(): - return - } - } - } - }() - - return func() { signal.Stop(sigwinch) } -} diff --git a/pkg/pty/resize_windows.go b/pkg/pty/resize_windows.go index 5e802140..8de4bc1f 100644 --- a/pkg/pty/resize_windows.go +++ b/pkg/pty/resize_windows.go @@ -4,7 +4,6 @@ import ( "context" civ1 "github.com/depot/cli/pkg/proto/depot/ci/v1" - sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" ) // watchTerminalResize is a no-op on Windows since SIGWINCH is not available. @@ -15,12 +14,3 @@ func watchTerminalResize( ) func() { return func() {} } - -// watchTerminalResizeSandboxV0 — Windows no-op for the sandboxv1 PTY path. -func watchTerminalResizeSandboxV0( - _ context.Context, - _ int, - _ chan<- *sandboxv1.OpenPtyRequest, -) func() { - return func() {} -} diff --git a/pkg/pty/session.go b/pkg/pty/session.go index 881e379f..8a5e683f 100644 --- a/pkg/pty/session.go +++ b/pkg/pty/session.go @@ -20,31 +20,18 @@ import ( // - pty.Run (legacy): civ1.DepotComputeService.OpenPtySession — the CI // bastion path used by `depot run --ssh` / `depot ssh`. Carries // SessionID + SandboxID. -// - pty.RunSandboxV0 (M34): depot.sandbox.v1.SandboxService.OpenPty — -// the new sandboxv1 wire used by `depot sandbox shell`. Session-id is -// gone (D-M34-M); RunSandboxV0 ignores it. -// -// Once the CI bastion verbs migrate to sandboxv1 (Theme 3 follow-on), the -// legacy Run can be retired and SessionID dropped from this struct. type SessionOptions struct { Token string OrgID string // sent as x-depot-org header for multi-org users SandboxID string - SessionID string // legacy CI bastion only; ignored by RunSandboxV0 (D-M34-M) + SessionID string Cwd string Env map[string]string - - // StdinPrefix is sent as the first stdin chunk after the pty session is - // open, before forwarding os.Stdin. Used by `depot sandbox shell` to - // inject on.shell entries into the login shell. Must be terminated with - // "\n" so the shell's line discipline flushes it. - StdinPrefix []byte } // Run opens an interactive PTY session against the legacy CI bastion wire // (civ1.DepotComputeService.OpenPtySession). Consumed by `depot run --ssh` -// and `depot ssh`. Sandbox v0 callers (`depot sandbox shell`) use -// RunSandboxV0 instead. +// and `depot ssh`. func Run(ctx context.Context, opts SessionOptions) error { fd := int(os.Stdin.Fd()) rows, cols := 24, 80 //nolint:mnd @@ -109,14 +96,6 @@ func Run(ctx context.Context, opts SessionOptions) error { stopResize := watchTerminalResize(ctx, fd, sendCh) defer stopResize() - if len(opts.StdinPrefix) > 0 { - if err := stream.Send(&civ1.OpenPtySessionRequest{ - Message: &civ1.OpenPtySessionRequest_Stdin{Stdin: opts.StdinPrefix}, - }); err != nil { - return fmt.Errorf("send on.shell prefix: %w", err) - } - } - go func() { buf := make([]byte, 4096) //nolint:mnd for { diff --git a/pkg/pty/session_sandboxv1.go b/pkg/pty/session_sandboxv1.go deleted file mode 100644 index a3eb373c..00000000 --- a/pkg/pty/session_sandboxv1.go +++ /dev/null @@ -1,143 +0,0 @@ -package pty - -import ( - "context" - "errors" - "fmt" - "io" - "os" - "os/signal" - "syscall" - - "github.com/depot/cli/pkg/api" - sandboxv1 "github.com/depot/cli/pkg/proto/depot/sandbox/v1" - "golang.org/x/term" -) - -// RunSandboxV0 opens an interactive PTY session against the depot.sandbox.v1 -// SandboxService.OpenPty bidi-streaming RPC. M34 (D-M34-L) consumer of the -// v0 sandbox surface; called by `depot sandbox shell`. Session-id is gone — -// the wire takes a SandboxRef only. -// -// Wire shape (pty.proto): -// - First request MUST carry Start{sandbox, env, rows, cols, cwd} -// - Subsequent requests carry Stdin bytes or Resize{rows, cols} -// - Response stream emits Data bytes terminated by a single Exit{exit_code} -func RunSandboxV0(ctx context.Context, opts SessionOptions) error { - fd := int(os.Stdin.Fd()) - rows, cols := 24, 80 //nolint:mnd - if w, h, err := term.GetSize(fd); err == nil { - cols, rows = w, h - } - - oldState, err := term.MakeRaw(fd) - if err != nil { - return fmt.Errorf("make raw: %w", err) - } - defer term.Restore(fd, oldState) //nolint:errcheck - - sigCh := make(chan os.Signal, 1) - signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM) - go func() { - <-sigCh - term.Restore(fd, oldState) //nolint:errcheck - os.Exit(1) - }() - defer signal.Stop(sigCh) - - client := api.NewSandboxV0Client() - stream := client.OpenPty(ctx) - stream.RequestHeader().Set("Authorization", "Bearer "+opts.Token) - if opts.OrgID != "" { - stream.RequestHeader().Set("x-depot-org", opts.OrgID) - } - - startRows := uint32(rows) - startCols := uint32(cols) - start := &sandboxv1.OpenPtyRequest_Start{ - Sandbox: &sandboxv1.SandboxRef{Selector: &sandboxv1.SandboxRef_Id{Id: opts.SandboxID}}, - Env: opts.Env, - Rows: &startRows, - Cols: &startCols, - } - if opts.Cwd != "" { - start.Cwd = &opts.Cwd - } - if err := stream.Send(&sandboxv1.OpenPtyRequest{ - Input: &sandboxv1.OpenPtyRequest_Start_{Start: start}, - }); err != nil { - return fmt.Errorf("send pty start: %w", err) - } - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - sendCh := make(chan *sandboxv1.OpenPtyRequest, 1) - - go func() { - for { - select { - case msg := <-sendCh: - _ = stream.Send(msg) - case <-ctx.Done(): - _ = stream.CloseRequest() - return - } - } - }() - - stopResize := watchTerminalResizeSandboxV0(ctx, fd, sendCh) - defer stopResize() - - if len(opts.StdinPrefix) > 0 { - if err := stream.Send(&sandboxv1.OpenPtyRequest{ - Input: &sandboxv1.OpenPtyRequest_Stdin{Stdin: opts.StdinPrefix}, - }); err != nil { - return fmt.Errorf("send on.shell prefix: %w", err) - } - } - - go func() { - buf := make([]byte, 4096) //nolint:mnd - for { - n, err := os.Stdin.Read(buf) - if n > 0 { - data := make([]byte, n) - copy(data, buf[:n]) - select { - case sendCh <- &sandboxv1.OpenPtyRequest{ - Input: &sandboxv1.OpenPtyRequest_Stdin{Stdin: data}, - }: - case <-ctx.Done(): - return - } - } - if err != nil { - return - } - } - }() - - for { - resp, err := stream.Receive() - if err != nil { - if errors.Is(err, io.EOF) { - return nil - } - return fmt.Errorf("recv: %w", err) - } - switch m := resp.Output.(type) { - case *sandboxv1.OpenPtyResponse_Data: - _, _ = os.Stdout.Write(m.Data) - case *sandboxv1.OpenPtyResponse_Exit_: - if m.Exit != nil { - fmt.Fprintf(os.Stderr, "\r\n[exit %d]\r\n", m.Exit.ExitCode) - if m.Exit.ExitCode != 0 { - term.Restore(fd, oldState) //nolint:errcheck - os.Exit(int(m.Exit.ExitCode)) - } - } - return nil - } - } -} diff --git a/pkg/sandbox/spec.go b/pkg/sandbox/spec.go index 7c2b41f2..ca1c65e9 100644 --- a/pkg/sandbox/spec.go +++ b/pkg/sandbox/spec.go @@ -1,114 +1,31 @@ -// Package sandbox provides parsing and translation of the declarative -// `sandbox.depot.yml` spec into StartSandboxRequest messages. The spec is -// inspired by fly.toml: one file declares everything about a sandbox so the -// caller does not have to assemble flags or JSON for each StartSandbox call. +// Package sandbox parses the trusted sandbox.depot.yml hook subset consumed by +// sandbox CLI commands. package sandbox import ( "fmt" "os" - "path/filepath" "regexp" "strings" "gopkg.in/yaml.v3" ) -// MCPEnvVar is the environment variable the boot process inside the sandbox -// reads to materialize MCP server configs. The value is JSON-encoded MCPSpec. -const MCPEnvVar = "DEPOT_AGENT_MCP_CONFIG" +const maxHookTimeoutSeconds = 1<<31 - 1 -// DefaultSpecFilenames are the names searched in directory walk-up order. -var DefaultSpecFilenames = []string{"sandbox.depot.yml", "sandbox.depot.yaml"} - -// Spec is the on-disk schema for a sandbox. +// Spec is the supported local hook subset of sandbox.depot.yml. type Spec struct { - Name string `yaml:"name"` - AgentType string `yaml:"agent_type,omitempty"` - Argv string `yaml:"argv,omitempty"` - Command string `yaml:"command,omitempty"` - Detach *bool `yaml:"detach,omitempty"` - Template string `yaml:"template,omitempty"` - Env map[string]string `yaml:"env,omitempty"` - Git *GitSpec `yaml:"git,omitempty"` - SSH *SSHSpec `yaml:"ssh,omitempty"` - MCP *MCPSpec `yaml:"mcp,omitempty"` - Container *ContainerSpec `yaml:"container,omitempty"` - - // On groups every lifecycle hook stage under one key. Stages: - // create — once after the sandbox first boots (one-shot setup). - // start — every boot (fresh up, plus future resume flows). - // exec — before each `depot sandbox exec` user command. - // shell — installed at up time as /etc/profile.d/99-depot-on-shell.sh - // so it replaces the login shell when `depot sandbox shell` - // opens a pty. - // snapshot — before `depot sandbox snapshot` runs the tar pipeline. - // All stages are sequential; a non-zero exit from a foreground hook - // aborts the surrounding command. On HooksSpec `yaml:"on,omitempty"` - - // Image is the rootfs image ref handed to StartSandbox. Two ways it - // gets set: - // 1. User pins a prebuilt ref via the YAML `image:` key (e.g., the - // output of `depot sandbox build` or `depot sandbox snapshot`). - // 2. The CLI's build/convert pipeline derives one from spec.Name + - // project + org and overwrites whatever the YAML had. - // - // When [container.build] is set, (2) wins — the build product is - // always preferred over a stale YAML ref. With no build section, the - // YAML ref is used verbatim. With neither, the API picks a default. - Image string `yaml:"image,omitempty"` -} - -// ContainerSpec describes how to produce the sandbox's rootfs. -// -// Today only Build is supported: the CLI runs `depot build --save` (saves to -// .registry.depot.dev/:), runs an ext4 convert -// CI run against it, and hands StartSandbox the bare-host form -// registry.depot.dev/:-ext4 (the API does the org-tenant -// routing internally). -// -// The build/convert destinations are CLI-derived from spec.Name, the build -// project, and the current org — there's no Tag field to override them yet. -type ContainerSpec struct { - Build *BuildSpec `yaml:"build,omitempty"` } -// BuildSpec describes how to produce the sandbox's container image when -// `depot sandbox up` runs from a directory holding a Dockerfile. It mirrors -// the relevant `depot build` flags so users can read the yml and predict what -// shells out. -type BuildSpec struct { - Context string `yaml:"context,omitempty"` // default "." - Dockerfile string `yaml:"dockerfile,omitempty"` // default "Dockerfile" - Target string `yaml:"target,omitempty"` // multistage target - BuildArgs map[string]string `yaml:"build_args,omitempty"` // --build-arg - Push *PushSpec `yaml:"push,omitempty"` // when nil, defaults are filled in - NoCache bool `yaml:"no_cache,omitempty"` -} - -// PushSpec controls where the built image is pushed. Both fields default -// (Project from the nearest depot.json, Tag from the spec name + git short sha -// or "latest") so most specs leave this section empty. -type PushSpec struct { - Project string `yaml:"project,omitempty"` - Tag string `yaml:"tag,omitempty"` -} - -// HooksSpec groups the lifecycle hook stages. Each list runs sequentially. -// See Spec.On for stage semantics. +// HooksSpec groups the currently supported lifecycle hook stages. type HooksSpec struct { - Create []HookSpec `yaml:"create,omitempty"` - Start []HookSpec `yaml:"start,omitempty"` - Exec []HookSpec `yaml:"exec,omitempty"` - Shell []HookSpec `yaml:"shell,omitempty"` - Snapshot []HookSpec `yaml:"snapshot,omitempty"` - Down []HookSpec `yaml:"down,omitempty"` + Exec []HookSpec `yaml:"exec,omitempty"` + Down []HookSpec `yaml:"down,omitempty"` } -// HookSpec is one entry in any On.* list. Command is a shell string -// run via `bash -lc`; Detach=true backgrounds it with setsid so it outlives -// the exec stream (use for long-running processes like an agent loop). +// 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 @@ -116,17 +33,12 @@ type HooksSpec struct { type HookSpec struct { // Command is the shell line to execute. Required. Command string `yaml:"command"` - // Detach=true backgrounds the command (setsid + redirect stdio) so the - // caller's exec stream returns once the process has been spawned, not - // when it exits. Stdio is captured to /tmp/depot-hook-.log - // inside the sandbox. + // 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 a foreground hook. Ignored when Detach=true - // (the spawn itself is fast; the backgrounded process has no timeout). - // Zero means no timeout. + // TimeoutSeconds bounds foreground hook execution. Zero means no timeout. TimeoutSeconds int `yaml:"timeout_seconds,omitempty"` } @@ -149,41 +61,7 @@ func (h *HookSpec) UnmarshalYAML(node *yaml.Node) error { return nil } -type GitSpec struct { - URL string `yaml:"url"` - Branch string `yaml:"branch,omitempty"` - Commit string `yaml:"commit,omitempty"` - Secret string `yaml:"secret,omitempty"` -} - -type SSHSpec struct { - Enabled bool `yaml:"enabled"` - TimeoutMinutes int32 `yaml:"timeout_minutes,omitempty"` -} - -type MCPSpec struct { - Servers map[string]MCPServer `yaml:"servers" json:"servers"` -} - -// MCPServer covers both Claude Code MCP transports: -// - stdio: `command: ["bin", "arg"]` (subprocess MCP servers, e.g. Plain) -// - http: `type: http`, `url: "..."` (hosted MCP servers, e.g. Linear) -// -// The bootstrap script in the agent image translates this into the schema -// `claude --mcp-config` expects. -type MCPServer struct { - // http transport - Type string `yaml:"type,omitempty" json:"type,omitempty"` - URL string `yaml:"url,omitempty" json:"url,omitempty"` - // stdio transport - Command []string `yaml:"command,omitempty" json:"command,omitempty"` - Args []string `yaml:"args,omitempty" json:"args,omitempty"` - Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"` - // optional headers for http transport (e.g., Authorization) - Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"` -} - -// Load reads a spec from an explicit path. Use FindSpec for walk-up discovery. +// Load reads a spec from an explicit path. func Load(path string) (*Spec, error) { data, err := os.ReadFile(path) if err != nil { @@ -196,69 +74,101 @@ func Load(path string) (*Spec, error) { return &s, nil } -// FindSpec walks up from cwd looking for one of DefaultSpecFilenames and -// returns its absolute path. Mirrors pkg/project.FindConfigFileUp. -func FindSpec(cwd string) (string, error) { - current, err := filepath.Abs(cwd) - if err != nil { - return "", err - } - for { - for _, name := range DefaultSpecFilenames { - p := filepath.Join(current, name) - if _, err := os.Stat(p); err == nil { - return p, nil - } - } - next := filepath.Dir(current) - if next == current { - break - } - current = next - } - return "", fmt.Errorf("no %s found from %s upward", DefaultSpecFilenames[0], cwd) -} - // 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 values from inputs. An -// unknown reference returns an error unless the trailing `?` makes it -// optional (then the substitution is the empty string). +// 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 - out := inputRefRe.ReplaceAllStringFunc(s, func(match string) 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 { - return "" + last = end + continue } missing = append(missing, key) - return match + out.WriteString(match) + last = end + continue } - return v - }) + 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, nil + return out.String(), nil } -// MarshalSpec re-serializes the in-memory Spec back to YAML, used by the -// from-spec CLI verb after it patches spec.Image with a build-then-convert -// result. Round-trip is structural — comments / formatting from the on-disk -// file are lost, so call sites should prefer reading the original bytes when -// no in-memory edits have been made (D-M34-G Path B). -func MarshalSpec(s *Spec) ([]byte, error) { - b, err := yaml.Marshal(s) - if err != nil { - return nil, fmt.Errorf("marshal spec: %w", err) +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 "" } - return b, nil } // ResolveHooks returns the spec's hook stages with ${input.KEY} substitution @@ -275,11 +185,7 @@ func (s *Spec) ResolveHooks(inputs map[string]string) (HooksSpec, error) { dst *[]HookSpec } for _, st := range []stage{ - {"on.create", s.On.Create, &out.Create}, - {"on.start", s.On.Start, &out.Start}, {"on.exec", s.On.Exec, &out.Exec}, - {"on.shell", s.On.Shell, &out.Shell}, - {"on.snapshot", s.On.Snapshot, &out.Snapshot}, {"on.down", s.On.Down, &out.Down}, } { resolved, err := resolveHookList(st.src, st.label, inputs) @@ -291,6 +197,15 @@ func (s *Spec) ResolveHooks(inputs map[string]string) (HooksSpec, error) { 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 @@ -300,6 +215,12 @@ func resolveHookList(hooks []HookSpec, label string, inputs map[string]string) ( 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) 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 545fe1f2..66363ae1 100644 --- a/proto/depot/agent/v1/sandbox.proto +++ b/proto/depot/agent/v1/sandbox.proto @@ -7,7 +7,6 @@ import "google/protobuf/timestamp.proto"; service SandboxService { rpc StartSandbox(StartSandboxRequest) returns (StartSandboxResponse); - rpc ExecInSandbox(ExecInSandboxRequest) returns (ExecInSandboxResponse); rpc GetSandbox(GetSandboxRequest) returns (GetSandboxResponse); rpc ListSandboxs(ListSandboxsRequest) returns (ListSandboxsResponse); rpc KillSandbox(KillSandboxRequest) returns (KillSandboxResponse); @@ -19,15 +18,6 @@ service SandboxService { // Shutdown is called from within the sandbox to gracefully terminate rpc Shutdown(ShutdownRequest) returns (ShutdownResponse); - - // GetSSHConnection returns the SSH connection info for a running sandbox - rpc GetSSHConnection(GetSSHConnectionRequest) returns (GetSSHConnectionResponse); - - // Template management - save and reuse pre-configured sandbox filesystems - rpc CreateSandboxTemplate(CreateSandboxTemplateRequest) returns (CreateSandboxTemplateResponse); - rpc GetSandboxTemplate(GetSandboxTemplateRequest) returns (GetSandboxTemplateResponse); - rpc ListSandboxTemplates(ListSandboxTemplatesRequest) returns (ListSandboxTemplatesResponse); - rpc DeleteSandboxTemplate(DeleteSandboxTemplateRequest) returns (DeleteSandboxTemplateResponse); } message StartSandboxRequest { @@ -37,22 +27,6 @@ message StartSandboxRequest { string argv = 4; map environment_variables = 5; Context context = 6; - optional SSHConfig ssh_config = 7; - // Start sandbox from a saved template (pre-configured filesystem) - // When set, creates a fresh session with the template's filesystem state - optional string template_id = 8; - - // Optional command to execute inside the sandbox after it starts. - // If not provided, the sandbox starts as usual. - optional string command = 9; - // When true, wait for the command to finish and return its exit code, - // stdout, and stderr in command_result. When false (default), the command - // is started but the response returns immediately without waiting. - optional bool wait_for_command = 10; - - // Optional image reference used as the sandbox base image. - // When omitted, the default Depot sandbox image is used. - optional string image = 11; message Context { oneof context { @@ -65,55 +39,12 @@ message StartSandboxRequest { optional string commit_hash = 4; } } - - message SSHConfig { - bool enabled = 1; - optional int32 timeout_minutes = 2; - } } message StartSandboxResponse { string sandbox_id = 1; string session_id = 2; string organization_id = 3; - optional SSHConnection ssh_connection = 4; - // Result of the command execution, if a command was provided in the request - optional CommandResult command_result = 5; -} - -message ExecInSandboxRequest { - string sandbox_id = 1; - string command = 2; - // When true (default), wait for command completion and return output. - // When false, start command and return immediately. - optional bool wait_for_command = 3; -} - -message ExecInSandboxResponse { - optional CommandResult command_result = 1; -} - -// CommandResult contains the output from executing a command inside a sandbox -message CommandResult { - int32 exit_code = 1; - string stdout = 2; - string stderr = 3; -} - -// SSHConnection contains the connection details for direct SSH access to a sandbox -message SSHConnection { - string host = 1; - int32 port = 2; - string username = 3; // Always "depot" - string private_key = 4; // PEM format, base64 encoded -} - -message GetSSHConnectionRequest { - string session_id = 1; -} - -message GetSSHConnectionResponse { - SSHConnection ssh_connection = 1; } message GetSandboxRequest { @@ -176,9 +107,6 @@ message Sandbox { optional int32 exit_code = 8; optional double duration_seconds = 9; optional string error_message = 10; - optional bool ssh_enabled = 11; - optional string ssh_host = 12; - optional int32 ssh_port = 13; } message KillSandboxRequest { @@ -212,67 +140,3 @@ message ShutdownRequest { } message ShutdownResponse {} - -// ============================================================================ -// Sandbox Template Messages -// ============================================================================ - -// SandboxTemplate represents a saved filesystem state that can be used to create new sandboxes -message SandboxTemplate { - string id = 1; - string organization_id = 2; - string name = 3; - optional string description = 4; - - // Source information (from the sandbox that was used to create this template) - optional string source_repository = 5; - optional string source_branch = 6; - optional string source_commit_hash = 7; - - // Whether this template can be used with SSH mode - // Only templates created from SSH-enabled sandboxes have tmate installed - bool ssh_compatible = 8; - - google.protobuf.Timestamp created_at = 9; -} - -// CreateSandboxTemplate creates a new template from a running sandbox's filesystem -message CreateSandboxTemplateRequest { - // The running sandbox to snapshot - string sandbox_id = 1; - // Unique name for the template within the organization - string name = 2; - // Optional description - optional string description = 3; -} - -message CreateSandboxTemplateResponse { - SandboxTemplate template = 1; -} - -// GetSandboxTemplate retrieves a template by ID -message GetSandboxTemplateRequest { - string template_id = 1; -} - -message GetSandboxTemplateResponse { - SandboxTemplate template = 1; -} - -// ListSandboxTemplates lists all templates for an organization -message ListSandboxTemplatesRequest { - optional int32 page_size = 1; - optional string page_token = 2; -} - -message ListSandboxTemplatesResponse { - repeated SandboxTemplate templates = 1; - optional string next_page_token = 2; -} - -// DeleteSandboxTemplate soft-deletes a template -message DeleteSandboxTemplateRequest { - string template_id = 1; -} - -message DeleteSandboxTemplateResponse {}