From 3cbbc8314fb134e3cce1fc84033882133b8fce14 Mon Sep 17 00:00:00 2001
From: Cristian Maglie <c.maglie@arduino.cc>
Date: Tue, 19 Dec 2023 13:11:44 +0100
Subject: [PATCH 1/2] Refactored gRPC CompilerResponse

---
 commands/compile/compile.go                   |   4 +-
 commands/daemon/daemon.go                     |  29 +-
 docs/UPGRADING.md                             |  68 +++
 internal/cli/compile/compile.go               |  14 +-
 internal/cli/feedback/result/rpc.go           |  10 +-
 internal/cli/feedback/result/rpc_test.go      |   6 +-
 .../compile_3/compile_show_properties_test.go |   4 +-
 rpc/cc/arduino/cli/commands/v1/compile.pb.go  | 442 +++++++++++-------
 rpc/cc/arduino/cli/commands/v1/compile.proto  |  33 +-
 9 files changed, 404 insertions(+), 206 deletions(-)

diff --git a/commands/compile/compile.go b/commands/compile/compile.go
index 92382b3e939..739acad05fb 100644
--- a/commands/compile/compile.go
+++ b/commands/compile/compile.go
@@ -42,7 +42,7 @@ import (
 var tr = i18n.Tr
 
 // Compile FIXMEDOC
-func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream io.Writer, progressCB rpc.TaskProgressCB) (r *rpc.CompileResponse, e error) {
+func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream io.Writer, progressCB rpc.TaskProgressCB) (r *rpc.BuilderResult, e error) {
 
 	// There is a binding between the export binaries setting and the CLI flag to explicitly set it,
 	// since we want this binding to work also for the gRPC interface we must read it here in this
@@ -105,7 +105,7 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream
 		return nil, &cmderrors.InvalidFQBNError{Cause: err}
 	}
 
-	r = &rpc.CompileResponse{}
+	r = &rpc.BuilderResult{}
 	r.BoardPlatform = targetPlatform.ToRPCPlatformReference()
 	r.BuildPlatform = buildPlatform.ToRPCPlatformReference()
 
diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go
index be212073eeb..b99e715fa10 100644
--- a/commands/daemon/daemon.go
+++ b/commands/daemon/daemon.go
@@ -181,16 +181,31 @@ func (s *ArduinoCoreServerImpl) SetSketchDefaults(ctx context.Context, req *rpc.
 // Compile FIXMEDOC
 func (s *ArduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.ArduinoCoreService_CompileServer) error {
 	syncSend := NewSynchronizedSend(stream.Send)
-	outStream := feedStreamTo(func(data []byte) { syncSend.Send(&rpc.CompileResponse{OutStream: data}) })
-	errStream := feedStreamTo(func(data []byte) { syncSend.Send(&rpc.CompileResponse{ErrStream: data}) })
-	compileResp, compileErr := compile.Compile(
-		stream.Context(), req, outStream, errStream,
-		func(p *rpc.TaskProgress) { syncSend.Send(&rpc.CompileResponse{Progress: p}) })
+	outStream := feedStreamTo(func(data []byte) {
+		syncSend.Send(&rpc.CompileResponse{
+			Message: &rpc.CompileResponse_OutStream{OutStream: data},
+		})
+	})
+	errStream := feedStreamTo(func(data []byte) {
+		syncSend.Send(&rpc.CompileResponse{
+			Message: &rpc.CompileResponse_ErrStream{ErrStream: data},
+		})
+	})
+	progressStream := func(p *rpc.TaskProgress) {
+		syncSend.Send(&rpc.CompileResponse{
+			Message: &rpc.CompileResponse_Progress{Progress: p},
+		})
+	}
+	compileRes, compileErr := compile.Compile(stream.Context(), req, outStream, errStream, progressStream)
 	outStream.Close()
 	errStream.Close()
 	var compileRespSendErr error
-	if compileResp != nil {
-		compileRespSendErr = syncSend.Send(compileResp)
+	if compileRes != nil {
+		compileRespSendErr = syncSend.Send(&rpc.CompileResponse{
+			Message: &rpc.CompileResponse_Result{
+				Result: compileRes,
+			},
+		})
 	}
 	if compileErr != nil {
 		return convertErrorToRPCStatus(compileErr)
diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md
index 5f46b42f90a..730c72dce0c 100644
--- a/docs/UPGRADING.md
+++ b/docs/UPGRADING.md
@@ -72,6 +72,74 @@ breaking changes as needed.
   { "sketch_path": "/tmp/my_sketch" }
   ```
 
+### The gRPC response `cc.arduino.cli.commands.v1.CompileResponse` has been changed.
+
+The `CompilerResponse` message has been refactored to made explicit which fields are intended for streaming the build
+process and which fields are part of the build result.
+
+The old `CompilerResposne`:
+
+```protoc
+message CompileResponse {
+  // The output of the compilation process (stream)
+  bytes out_stream = 1;
+  // The error output of the compilation process (stream)
+  bytes err_stream = 2;
+  // The compiler build path
+  string build_path = 3;
+  // The libraries used in the build
+  repeated Library used_libraries = 4;
+  // The size of the executable split by sections
+  repeated ExecutableSectionSize executable_sections_size = 5;
+  // The platform where the board is defined
+  InstalledPlatformReference board_platform = 6;
+  // The platform used for the build (if referenced from the board platform)
+  InstalledPlatformReference build_platform = 7;
+  // Completions reports of the compilation process (stream)
+  TaskProgress progress = 8;
+  // Build properties used for compiling
+  repeated string build_properties = 9;
+  // Compiler errors and warnings
+  repeated CompileDiagnostic diagnostics = 10;
+}
+```
+
+has been split into a `CompilerResponse` and a `BuilderResult`:
+
+```protoc
+message CompileResponse {
+  oneof message {
+    // The output of the compilation process (stream)
+    bytes out_stream = 1;
+    // The error output of the compilation process (stream)
+    bytes err_stream = 2;
+    // Completions reports of the compilation process (stream)
+    TaskProgress progress = 3;
+    // The compilation result
+    BuilderResult result = 4;
+  }
+}
+
+message BuilderResult {
+  // The compiler build path
+  string build_path = 1;
+  // The libraries used in the build
+  repeated Library used_libraries = 2;
+  // The size of the executable split by sections
+  repeated ExecutableSectionSize executable_sections_size = 3;
+  // The platform where the board is defined
+  InstalledPlatformReference board_platform = 4;
+  // The platform used for the build (if referenced from the board platform)
+  InstalledPlatformReference build_platform = 5;
+  // Build properties used for compiling
+  repeated string build_properties = 7;
+  // Compiler errors and warnings
+  repeated CompileDiagnostic diagnostics = 8;
+}
+```
+
+with a clear distinction on which fields are streamed.
+
 ### The gRPC `cc.arduino.cli.commands.v1.PlatformRelease` has been changed.
 
 We've added a new field called `compatible`. This field indicates if the current platform release is installable or not.
diff --git a/internal/cli/compile/compile.go b/internal/cli/compile/compile.go
index 3d2f5b84f72..154777f3c1d 100644
--- a/internal/cli/compile/compile.go
+++ b/internal/cli/compile/compile.go
@@ -245,7 +245,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
 		SkipLibrariesDiscovery:        skipLibrariesDiscovery,
 		DoNotExpandBuildProperties:    showProperties == arguments.ShowPropertiesUnexpanded,
 	}
-	compileRes, compileError := compile.Compile(context.Background(), compileRequest, stdOut, stdErr, nil)
+	builderRes, compileError := compile.Compile(context.Background(), compileRequest, stdOut, stdErr, nil)
 
 	var uploadRes *rpc.UploadResult
 	if compileError == nil && uploadAfterCompile {
@@ -300,7 +300,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
 
 		libs := ""
 		hasVendoredLibs := false
-		for _, lib := range compileRes.GetUsedLibraries() {
+		for _, lib := range builderRes.GetUsedLibraries() {
 			if lib.GetLocation() != rpc.LibraryLocation_LIBRARY_LOCATION_USER && lib.GetLocation() != rpc.LibraryLocation_LIBRARY_LOCATION_UNMANAGED {
 				continue
 			}
@@ -325,13 +325,13 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
 		profileOut += fmt.Sprintln("  " + newProfileName + ":")
 		profileOut += fmt.Sprintln("    fqbn: " + compileRequest.GetFqbn())
 		profileOut += fmt.Sprintln("    platforms:")
-		boardPlatform := compileRes.GetBoardPlatform()
+		boardPlatform := builderRes.GetBoardPlatform()
 		profileOut += fmt.Sprintln("      - platform: " + boardPlatform.GetId() + " (" + boardPlatform.GetVersion() + ")")
 		if url := boardPlatform.GetPackageUrl(); url != "" {
 			profileOut += fmt.Sprintln("        platform_index_url: " + url)
 		}
 
-		if buildPlatform := compileRes.GetBuildPlatform(); buildPlatform != nil &&
+		if buildPlatform := builderRes.GetBuildPlatform(); buildPlatform != nil &&
 			buildPlatform.GetId() != boardPlatform.GetId() &&
 			buildPlatform.GetVersion() != boardPlatform.GetVersion() {
 			profileOut += fmt.Sprintln("      - platform: " + buildPlatform.GetId() + " (" + buildPlatform.GetVersion() + ")")
@@ -350,12 +350,12 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
 	res := &compileResult{
 		CompilerOut:   stdIO.Stdout,
 		CompilerErr:   stdIO.Stderr,
-		BuilderResult: result.NewCompileResponse(compileRes),
+		BuilderResult: result.NewBuilderResult(builderRes),
 		UploadResult: updatedUploadPortResult{
 			UpdatedUploadPort: result.NewPort(uploadRes.GetUpdatedUploadPort()),
 		},
 		ProfileOut:         profileOut,
-		Diagnostics:        result.NewCompileDiagnostics(compileRes.GetDiagnostics()),
+		Diagnostics:        result.NewCompileDiagnostics(builderRes.GetDiagnostics()),
 		Success:            compileError == nil,
 		showPropertiesMode: showProperties,
 		hideStats:          preprocess,
@@ -401,7 +401,7 @@ type updatedUploadPortResult struct {
 type compileResult struct {
 	CompilerOut        string                      `json:"compiler_out"`
 	CompilerErr        string                      `json:"compiler_err"`
-	BuilderResult      *result.CompileResponse     `json:"builder_result"`
+	BuilderResult      *result.BuilderResult       `json:"builder_result"`
 	UploadResult       updatedUploadPortResult     `json:"upload_result"`
 	Success            bool                        `json:"success"`
 	ProfileOut         string                      `json:"profile_out,omitempty"`
diff --git a/internal/cli/feedback/result/rpc.go b/internal/cli/feedback/result/rpc.go
index a96ccbb02c6..c03ad699852 100644
--- a/internal/cli/feedback/result/rpc.go
+++ b/internal/cli/feedback/result/rpc.go
@@ -909,9 +909,7 @@ func NewMonitorPortSettingDescriptor(m *rpc.MonitorPortSettingDescriptor) *Monit
 	}
 }
 
-type CompileResponse struct {
-	OutStream              []byte                      `json:"out_stream,omitempty"`
-	ErrStream              []byte                      `json:"err_stream,omitempty"`
+type BuilderResult struct {
 	BuildPath              string                      `json:"build_path,omitempty"`
 	UsedLibraries          []*Library                  `json:"used_libraries,omitempty"`
 	ExecutableSectionsSize []*ExecutableSectionSize    `json:"executable_sections_size,omitempty"`
@@ -921,7 +919,7 @@ type CompileResponse struct {
 	Diagnostics            []*CompileDiagnostic        `json:"diagnostics,omitempty"`
 }
 
-func NewCompileResponse(c *rpc.CompileResponse) *CompileResponse {
+func NewBuilderResult(c *rpc.BuilderResult) *BuilderResult {
 	if c == nil {
 		return nil
 	}
@@ -934,9 +932,7 @@ func NewCompileResponse(c *rpc.CompileResponse) *CompileResponse {
 		executableSectionsSizes[i] = NewExecutableSectionSize(v)
 	}
 
-	return &CompileResponse{
-		OutStream:              c.GetOutStream(),
-		ErrStream:              c.GetErrStream(),
+	return &BuilderResult{
 		BuildPath:              c.GetBuildPath(),
 		UsedLibraries:          usedLibs,
 		ExecutableSectionsSize: executableSectionsSizes,
diff --git a/internal/cli/feedback/result/rpc_test.go b/internal/cli/feedback/result/rpc_test.go
index 08f596b03ee..3c7e9cff670 100644
--- a/internal/cli/feedback/result/rpc_test.go
+++ b/internal/cli/feedback/result/rpc_test.go
@@ -190,9 +190,9 @@ func TestAllFieldAreMapped(t *testing.T) {
 	monitorPortSettingDescriptorResult := result.NewMonitorPortSettingDescriptor(monitorPortSettingDescriptorRpc)
 	mustContainsAllPropertyOfRpcStruct(t, monitorPortSettingDescriptorRpc, monitorPortSettingDescriptorResult)
 
-	compileResponseRpc := &rpc.CompileResponse{}
-	compileResponseResult := result.NewCompileResponse(compileResponseRpc)
-	mustContainsAllPropertyOfRpcStruct(t, compileResponseRpc, compileResponseResult, "progress")
+	builderResultRpc := &rpc.BuilderResult{}
+	builderResultResult := result.NewBuilderResult(builderResultRpc)
+	mustContainsAllPropertyOfRpcStruct(t, builderResultRpc, builderResultResult)
 
 	executableSectionSizeRpc := &rpc.ExecutableSectionSize{}
 	executableSectionSizeResult := result.NewExecutableSectionSize(executableSectionSizeRpc)
diff --git a/internal/integrationtest/compile_3/compile_show_properties_test.go b/internal/integrationtest/compile_3/compile_show_properties_test.go
index 1c17ef63d47..01ebc382d9a 100644
--- a/internal/integrationtest/compile_3/compile_show_properties_test.go
+++ b/internal/integrationtest/compile_3/compile_show_properties_test.go
@@ -20,13 +20,13 @@ import (
 	"testing"
 
 	"github.com/arduino/arduino-cli/internal/integrationtest"
-	"github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
+	rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
 	"github.com/arduino/go-properties-orderedmap"
 	"github.com/stretchr/testify/require"
 )
 
 type cliCompileResponse struct {
-	BuilderResult *commands.CompileResponse `json:"builder_result"`
+	BuilderResult *rpc.BuilderResult `json:"builder_result"`
 }
 
 func TestCompileShowProperties(t *testing.T) {
diff --git a/rpc/cc/arduino/cli/commands/v1/compile.pb.go b/rpc/cc/arduino/cli/commands/v1/compile.pb.go
index d5564454b25..959b2c2639f 100644
--- a/rpc/cc/arduino/cli/commands/v1/compile.pb.go
+++ b/rpc/cc/arduino/cli/commands/v1/compile.pb.go
@@ -325,26 +325,13 @@ type CompileResponse struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	// The output of the compilation process (stream)
-	OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3" json:"out_stream,omitempty"`
-	// The error output of the compilation process (stream)
-	ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3" json:"err_stream,omitempty"`
-	// The compiler build path
-	BuildPath string `protobuf:"bytes,3,opt,name=build_path,json=buildPath,proto3" json:"build_path,omitempty"`
-	// The libraries used in the build
-	UsedLibraries []*Library `protobuf:"bytes,4,rep,name=used_libraries,json=usedLibraries,proto3" json:"used_libraries,omitempty"`
-	// The size of the executable split by sections
-	ExecutableSectionsSize []*ExecutableSectionSize `protobuf:"bytes,5,rep,name=executable_sections_size,json=executableSectionsSize,proto3" json:"executable_sections_size,omitempty"`
-	// The platform where the board is defined
-	BoardPlatform *InstalledPlatformReference `protobuf:"bytes,6,opt,name=board_platform,json=boardPlatform,proto3" json:"board_platform,omitempty"`
-	// The platform used for the build (if referenced from the board platform)
-	BuildPlatform *InstalledPlatformReference `protobuf:"bytes,7,opt,name=build_platform,json=buildPlatform,proto3" json:"build_platform,omitempty"`
-	// Completions reports of the compilation process (stream)
-	Progress *TaskProgress `protobuf:"bytes,8,opt,name=progress,proto3" json:"progress,omitempty"`
-	// Build properties used for compiling
-	BuildProperties []string `protobuf:"bytes,9,rep,name=build_properties,json=buildProperties,proto3" json:"build_properties,omitempty"`
-	// Compiler errors and warnings
-	Diagnostics []*CompileDiagnostic `protobuf:"bytes,10,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+	// Types that are assignable to Message:
+	//
+	//	*CompileResponse_OutStream
+	//	*CompileResponse_ErrStream
+	//	*CompileResponse_Progress
+	//	*CompileResponse_Result
+	Message isCompileResponse_Message `protobuf_oneof:"message"`
 }
 
 func (x *CompileResponse) Reset() {
@@ -379,70 +366,169 @@ func (*CompileResponse) Descriptor() ([]byte, []int) {
 	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{1}
 }
 
+func (m *CompileResponse) GetMessage() isCompileResponse_Message {
+	if m != nil {
+		return m.Message
+	}
+	return nil
+}
+
 func (x *CompileResponse) GetOutStream() []byte {
-	if x != nil {
+	if x, ok := x.GetMessage().(*CompileResponse_OutStream); ok {
 		return x.OutStream
 	}
 	return nil
 }
 
 func (x *CompileResponse) GetErrStream() []byte {
-	if x != nil {
+	if x, ok := x.GetMessage().(*CompileResponse_ErrStream); ok {
 		return x.ErrStream
 	}
 	return nil
 }
 
-func (x *CompileResponse) GetBuildPath() string {
+func (x *CompileResponse) GetProgress() *TaskProgress {
+	if x, ok := x.GetMessage().(*CompileResponse_Progress); ok {
+		return x.Progress
+	}
+	return nil
+}
+
+func (x *CompileResponse) GetResult() *BuilderResult {
+	if x, ok := x.GetMessage().(*CompileResponse_Result); ok {
+		return x.Result
+	}
+	return nil
+}
+
+type isCompileResponse_Message interface {
+	isCompileResponse_Message()
+}
+
+type CompileResponse_OutStream struct {
+	// The output of the compilation process (stream)
+	OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3,oneof"`
+}
+
+type CompileResponse_ErrStream struct {
+	// The error output of the compilation process (stream)
+	ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3,oneof"`
+}
+
+type CompileResponse_Progress struct {
+	// Completions reports of the compilation process (stream)
+	Progress *TaskProgress `protobuf:"bytes,3,opt,name=progress,proto3,oneof"`
+}
+
+type CompileResponse_Result struct {
+	// The compilation result
+	Result *BuilderResult `protobuf:"bytes,4,opt,name=result,proto3,oneof"`
+}
+
+func (*CompileResponse_OutStream) isCompileResponse_Message() {}
+
+func (*CompileResponse_ErrStream) isCompileResponse_Message() {}
+
+func (*CompileResponse_Progress) isCompileResponse_Message() {}
+
+func (*CompileResponse_Result) isCompileResponse_Message() {}
+
+type BuilderResult struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// The compiler build path
+	BuildPath string `protobuf:"bytes,1,opt,name=build_path,json=buildPath,proto3" json:"build_path,omitempty"`
+	// The libraries used in the build
+	UsedLibraries []*Library `protobuf:"bytes,2,rep,name=used_libraries,json=usedLibraries,proto3" json:"used_libraries,omitempty"`
+	// The size of the executable split by sections
+	ExecutableSectionsSize []*ExecutableSectionSize `protobuf:"bytes,3,rep,name=executable_sections_size,json=executableSectionsSize,proto3" json:"executable_sections_size,omitempty"`
+	// The platform where the board is defined
+	BoardPlatform *InstalledPlatformReference `protobuf:"bytes,4,opt,name=board_platform,json=boardPlatform,proto3" json:"board_platform,omitempty"`
+	// The platform used for the build (if referenced from the board platform)
+	BuildPlatform *InstalledPlatformReference `protobuf:"bytes,5,opt,name=build_platform,json=buildPlatform,proto3" json:"build_platform,omitempty"`
+	// Build properties used for compiling
+	BuildProperties []string `protobuf:"bytes,7,rep,name=build_properties,json=buildProperties,proto3" json:"build_properties,omitempty"`
+	// Compiler errors and warnings
+	Diagnostics []*CompileDiagnostic `protobuf:"bytes,8,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+}
+
+func (x *BuilderResult) Reset() {
+	*x = BuilderResult{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BuilderResult) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BuilderResult) ProtoMessage() {}
+
+func (x *BuilderResult) ProtoReflect() protoreflect.Message {
+	mi := &file_cc_arduino_cli_commands_v1_compile_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 BuilderResult.ProtoReflect.Descriptor instead.
+func (*BuilderResult) Descriptor() ([]byte, []int) {
+	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *BuilderResult) GetBuildPath() string {
 	if x != nil {
 		return x.BuildPath
 	}
 	return ""
 }
 
-func (x *CompileResponse) GetUsedLibraries() []*Library {
+func (x *BuilderResult) GetUsedLibraries() []*Library {
 	if x != nil {
 		return x.UsedLibraries
 	}
 	return nil
 }
 
-func (x *CompileResponse) GetExecutableSectionsSize() []*ExecutableSectionSize {
+func (x *BuilderResult) GetExecutableSectionsSize() []*ExecutableSectionSize {
 	if x != nil {
 		return x.ExecutableSectionsSize
 	}
 	return nil
 }
 
-func (x *CompileResponse) GetBoardPlatform() *InstalledPlatformReference {
+func (x *BuilderResult) GetBoardPlatform() *InstalledPlatformReference {
 	if x != nil {
 		return x.BoardPlatform
 	}
 	return nil
 }
 
-func (x *CompileResponse) GetBuildPlatform() *InstalledPlatformReference {
+func (x *BuilderResult) GetBuildPlatform() *InstalledPlatformReference {
 	if x != nil {
 		return x.BuildPlatform
 	}
 	return nil
 }
 
-func (x *CompileResponse) GetProgress() *TaskProgress {
-	if x != nil {
-		return x.Progress
-	}
-	return nil
-}
-
-func (x *CompileResponse) GetBuildProperties() []string {
+func (x *BuilderResult) GetBuildProperties() []string {
 	if x != nil {
 		return x.BuildProperties
 	}
 	return nil
 }
 
-func (x *CompileResponse) GetDiagnostics() []*CompileDiagnostic {
+func (x *BuilderResult) GetDiagnostics() []*CompileDiagnostic {
 	if x != nil {
 		return x.Diagnostics
 	}
@@ -462,7 +548,7 @@ type ExecutableSectionSize struct {
 func (x *ExecutableSectionSize) Reset() {
 	*x = ExecutableSectionSize{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[2]
+		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[3]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -475,7 +561,7 @@ func (x *ExecutableSectionSize) String() string {
 func (*ExecutableSectionSize) ProtoMessage() {}
 
 func (x *ExecutableSectionSize) ProtoReflect() protoreflect.Message {
-	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[2]
+	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[3]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -488,7 +574,7 @@ func (x *ExecutableSectionSize) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ExecutableSectionSize.ProtoReflect.Descriptor instead.
 func (*ExecutableSectionSize) Descriptor() ([]byte, []int) {
-	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{2}
+	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{3}
 }
 
 func (x *ExecutableSectionSize) GetName() string {
@@ -538,7 +624,7 @@ type CompileDiagnostic struct {
 func (x *CompileDiagnostic) Reset() {
 	*x = CompileDiagnostic{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[3]
+		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[4]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -551,7 +637,7 @@ func (x *CompileDiagnostic) String() string {
 func (*CompileDiagnostic) ProtoMessage() {}
 
 func (x *CompileDiagnostic) ProtoReflect() protoreflect.Message {
-	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[3]
+	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[4]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -564,7 +650,7 @@ func (x *CompileDiagnostic) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use CompileDiagnostic.ProtoReflect.Descriptor instead.
 func (*CompileDiagnostic) Descriptor() ([]byte, []int) {
-	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{3}
+	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{4}
 }
 
 func (x *CompileDiagnostic) GetSeverity() string {
@@ -634,7 +720,7 @@ type CompileDiagnosticContext struct {
 func (x *CompileDiagnosticContext) Reset() {
 	*x = CompileDiagnosticContext{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[4]
+		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[5]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -647,7 +733,7 @@ func (x *CompileDiagnosticContext) String() string {
 func (*CompileDiagnosticContext) ProtoMessage() {}
 
 func (x *CompileDiagnosticContext) ProtoReflect() protoreflect.Message {
-	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[4]
+	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[5]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -660,7 +746,7 @@ func (x *CompileDiagnosticContext) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use CompileDiagnosticContext.ProtoReflect.Descriptor instead.
 func (*CompileDiagnosticContext) Descriptor() ([]byte, []int) {
-	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{4}
+	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{5}
 }
 
 func (x *CompileDiagnosticContext) GetMessage() string {
@@ -709,7 +795,7 @@ type CompileDiagnosticNote struct {
 func (x *CompileDiagnosticNote) Reset() {
 	*x = CompileDiagnosticNote{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[5]
+		mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[6]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -722,7 +808,7 @@ func (x *CompileDiagnosticNote) String() string {
 func (*CompileDiagnosticNote) ProtoMessage() {}
 
 func (x *CompileDiagnosticNote) ProtoReflect() protoreflect.Message {
-	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[5]
+	mi := &file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[6]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -735,7 +821,7 @@ func (x *CompileDiagnosticNote) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use CompileDiagnosticNote.ProtoReflect.Descriptor instead.
 func (*CompileDiagnosticNote) Descriptor() ([]byte, []int) {
-	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{5}
+	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP(), []int{6}
 }
 
 func (x *CompileDiagnosticNote) GetMessage() string {
@@ -850,93 +936,99 @@ var file_cc_arduino_cli_commands_v1_compile_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,
-	0x22, 0xa7, 0x05, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70,
-	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65,
-	0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x72,
-	0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61,
-	0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x65, 0x72, 0x72, 0x53, 0x74, 0x72, 0x65,
-	0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x74,
-	0x68, 0x12, 0x4a, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72,
-	0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x63, 0x2e, 0x61,
-	0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61,
-	0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x0d,
-	0x75, 0x73, 0x65, 0x64, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x6b, 0x0a,
-	0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x74,
-	0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
-	0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69,
-	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65,
-	0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69,
-	0x7a, 0x65, 0x52, 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65,
-	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x6f,
-	0x61, 0x72, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x06, 0x20, 0x01,
-	0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e,
-	0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e,
-	0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
-	0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x62, 0x6f, 0x61, 0x72,
-	0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x75, 0x69,
-	0x6c, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28,
-	0x0b, 0x32, 0x36, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
-	0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49,
-	0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
-	0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64,
-	0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67,
-	0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x63, 0x2e,
-	0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
-	0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67,
-	0x72, 0x65, 0x73, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29,
-	0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
-	0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50,
-	0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x64, 0x69, 0x61,
-	0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d,
+	0x22, 0xeb, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70,
+	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65,
+	0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x53,
+	0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x73, 0x74, 0x72,
+	0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, 0x65, 0x72, 0x72,
+	0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x46, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
+	0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72,
+	0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
+	0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65,
+	0x73, 0x73, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43,
+	0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29,
 	0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e,
-	0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70,
-	0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64,
-	0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x5a, 0x0a, 0x15, 0x45, 0x78,
-	0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53,
-	0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d,
-	0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d,
-	0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x69,
-	0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08,
-	0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
-	0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f,
-	0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75,
-	0x6d, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20,
-	0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f,
-	0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31,
-	0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74,
-	0x69, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
-	0x78, 0x74, 0x12, 0x47, 0x0a, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,
-	0x0b, 0x32, 0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
-	0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43,
-	0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
-	0x4e, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x18, 0x43,
-	0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
-	0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c,
-	0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d,
-	0x6e, 0x22, 0x71, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67,
-	0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06,
-	0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f,
-	0x6c, 0x75, 0x6d, 0x6e, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
-	0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69,
-	0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72,
-	0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
-	0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06,
-	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c,
+	0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73,
+	0x75, 0x6c, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa1,
+	0x04, 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
+	0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12,
+	0x4a, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65,
+	0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64,
+	0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
+	0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x0d, 0x75, 0x73,
+	0x65, 0x64, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x18, 0x65,
+	0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f,
+	0x6e, 0x73, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e,
+	0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63,
+	0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75,
+	0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65,
+	0x52, 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74,
+	0x69, 0x6f, 0x6e, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x6f, 0x61, 0x72,
+	0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x36, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c,
+	0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e,
+	0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52,
+	0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50,
+	0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64,
+	0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x36, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69,
+	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73,
+	0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65,
+	0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x6c,
+	0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x29, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f,
+	0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09,
+	0x52, 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
+	0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73,
+	0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75,
+	0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73,
+	0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e,
+	0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
+	0x63, 0x73, 0x22, 0x5a, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65,
+	0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+	0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+	0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73,
+	0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa2,
+	0x02, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f,
+	0x73, 0x74, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79,
+	0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69,
+	0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12,
+	0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69,
+	0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x63, 0x6f,
+	0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x63,
+	0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d,
+	0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
+	0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+	0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x47, 0x0a, 0x05, 0x6e, 0x6f,
+	0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61,
+	0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61,
+	0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69,
+	0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x6e, 0x6f,
+	0x74, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69,
+	0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12,
+	0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a,
+	0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e,
+	0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x71, 0x0a, 0x15, 0x43, 0x6f, 0x6d,
+	0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x6f,
+	0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04,
+	0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65,
+	0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+	0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x42, 0x48, 0x5a, 0x46,
+	0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69,
+	0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72,
+	0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c,
+	0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f,
+	0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -951,38 +1043,40 @@ func file_cc_arduino_cli_commands_v1_compile_proto_rawDescGZIP() []byte {
 	return file_cc_arduino_cli_commands_v1_compile_proto_rawDescData
 }
 
-var file_cc_arduino_cli_commands_v1_compile_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_cc_arduino_cli_commands_v1_compile_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
 var file_cc_arduino_cli_commands_v1_compile_proto_goTypes = []interface{}{
 	(*CompileRequest)(nil),             // 0: cc.arduino.cli.commands.v1.CompileRequest
 	(*CompileResponse)(nil),            // 1: cc.arduino.cli.commands.v1.CompileResponse
-	(*ExecutableSectionSize)(nil),      // 2: cc.arduino.cli.commands.v1.ExecutableSectionSize
-	(*CompileDiagnostic)(nil),          // 3: cc.arduino.cli.commands.v1.CompileDiagnostic
-	(*CompileDiagnosticContext)(nil),   // 4: cc.arduino.cli.commands.v1.CompileDiagnosticContext
-	(*CompileDiagnosticNote)(nil),      // 5: cc.arduino.cli.commands.v1.CompileDiagnosticNote
-	nil,                                // 6: cc.arduino.cli.commands.v1.CompileRequest.SourceOverrideEntry
-	(*Instance)(nil),                   // 7: cc.arduino.cli.commands.v1.Instance
-	(*wrapperspb.BoolValue)(nil),       // 8: google.protobuf.BoolValue
-	(*Library)(nil),                    // 9: cc.arduino.cli.commands.v1.Library
-	(*InstalledPlatformReference)(nil), // 10: cc.arduino.cli.commands.v1.InstalledPlatformReference
-	(*TaskProgress)(nil),               // 11: cc.arduino.cli.commands.v1.TaskProgress
+	(*BuilderResult)(nil),              // 2: cc.arduino.cli.commands.v1.BuilderResult
+	(*ExecutableSectionSize)(nil),      // 3: cc.arduino.cli.commands.v1.ExecutableSectionSize
+	(*CompileDiagnostic)(nil),          // 4: cc.arduino.cli.commands.v1.CompileDiagnostic
+	(*CompileDiagnosticContext)(nil),   // 5: cc.arduino.cli.commands.v1.CompileDiagnosticContext
+	(*CompileDiagnosticNote)(nil),      // 6: cc.arduino.cli.commands.v1.CompileDiagnosticNote
+	nil,                                // 7: cc.arduino.cli.commands.v1.CompileRequest.SourceOverrideEntry
+	(*Instance)(nil),                   // 8: cc.arduino.cli.commands.v1.Instance
+	(*wrapperspb.BoolValue)(nil),       // 9: google.protobuf.BoolValue
+	(*TaskProgress)(nil),               // 10: cc.arduino.cli.commands.v1.TaskProgress
+	(*Library)(nil),                    // 11: cc.arduino.cli.commands.v1.Library
+	(*InstalledPlatformReference)(nil), // 12: cc.arduino.cli.commands.v1.InstalledPlatformReference
 }
 var file_cc_arduino_cli_commands_v1_compile_proto_depIdxs = []int32{
-	7,  // 0: cc.arduino.cli.commands.v1.CompileRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance
-	6,  // 1: cc.arduino.cli.commands.v1.CompileRequest.source_override:type_name -> cc.arduino.cli.commands.v1.CompileRequest.SourceOverrideEntry
-	8,  // 2: cc.arduino.cli.commands.v1.CompileRequest.export_binaries:type_name -> google.protobuf.BoolValue
-	9,  // 3: cc.arduino.cli.commands.v1.CompileResponse.used_libraries:type_name -> cc.arduino.cli.commands.v1.Library
-	2,  // 4: cc.arduino.cli.commands.v1.CompileResponse.executable_sections_size:type_name -> cc.arduino.cli.commands.v1.ExecutableSectionSize
-	10, // 5: cc.arduino.cli.commands.v1.CompileResponse.board_platform:type_name -> cc.arduino.cli.commands.v1.InstalledPlatformReference
-	10, // 6: cc.arduino.cli.commands.v1.CompileResponse.build_platform:type_name -> cc.arduino.cli.commands.v1.InstalledPlatformReference
-	11, // 7: cc.arduino.cli.commands.v1.CompileResponse.progress:type_name -> cc.arduino.cli.commands.v1.TaskProgress
-	3,  // 8: cc.arduino.cli.commands.v1.CompileResponse.diagnostics:type_name -> cc.arduino.cli.commands.v1.CompileDiagnostic
-	4,  // 9: cc.arduino.cli.commands.v1.CompileDiagnostic.context:type_name -> cc.arduino.cli.commands.v1.CompileDiagnosticContext
-	5,  // 10: cc.arduino.cli.commands.v1.CompileDiagnostic.notes:type_name -> cc.arduino.cli.commands.v1.CompileDiagnosticNote
-	11, // [11:11] is the sub-list for method output_type
-	11, // [11:11] 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
+	8,  // 0: cc.arduino.cli.commands.v1.CompileRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance
+	7,  // 1: cc.arduino.cli.commands.v1.CompileRequest.source_override:type_name -> cc.arduino.cli.commands.v1.CompileRequest.SourceOverrideEntry
+	9,  // 2: cc.arduino.cli.commands.v1.CompileRequest.export_binaries:type_name -> google.protobuf.BoolValue
+	10, // 3: cc.arduino.cli.commands.v1.CompileResponse.progress:type_name -> cc.arduino.cli.commands.v1.TaskProgress
+	2,  // 4: cc.arduino.cli.commands.v1.CompileResponse.result:type_name -> cc.arduino.cli.commands.v1.BuilderResult
+	11, // 5: cc.arduino.cli.commands.v1.BuilderResult.used_libraries:type_name -> cc.arduino.cli.commands.v1.Library
+	3,  // 6: cc.arduino.cli.commands.v1.BuilderResult.executable_sections_size:type_name -> cc.arduino.cli.commands.v1.ExecutableSectionSize
+	12, // 7: cc.arduino.cli.commands.v1.BuilderResult.board_platform:type_name -> cc.arduino.cli.commands.v1.InstalledPlatformReference
+	12, // 8: cc.arduino.cli.commands.v1.BuilderResult.build_platform:type_name -> cc.arduino.cli.commands.v1.InstalledPlatformReference
+	4,  // 9: cc.arduino.cli.commands.v1.BuilderResult.diagnostics:type_name -> cc.arduino.cli.commands.v1.CompileDiagnostic
+	5,  // 10: cc.arduino.cli.commands.v1.CompileDiagnostic.context:type_name -> cc.arduino.cli.commands.v1.CompileDiagnosticContext
+	6,  // 11: cc.arduino.cli.commands.v1.CompileDiagnostic.notes:type_name -> cc.arduino.cli.commands.v1.CompileDiagnosticNote
+	12, // [12:12] is the sub-list for method output_type
+	12, // [12:12] is the sub-list for method input_type
+	12, // [12:12] is the sub-list for extension type_name
+	12, // [12:12] is the sub-list for extension extendee
+	0,  // [0:12] is the sub-list for field type_name
 }
 
 func init() { file_cc_arduino_cli_commands_v1_compile_proto_init() }
@@ -1018,7 +1112,7 @@ func file_cc_arduino_cli_commands_v1_compile_proto_init() {
 			}
 		}
 		file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*ExecutableSectionSize); i {
+			switch v := v.(*BuilderResult); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1030,7 +1124,7 @@ func file_cc_arduino_cli_commands_v1_compile_proto_init() {
 			}
 		}
 		file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*CompileDiagnostic); i {
+			switch v := v.(*ExecutableSectionSize); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1042,7 +1136,7 @@ func file_cc_arduino_cli_commands_v1_compile_proto_init() {
 			}
 		}
 		file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*CompileDiagnosticContext); i {
+			switch v := v.(*CompileDiagnostic); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1054,6 +1148,18 @@ func file_cc_arduino_cli_commands_v1_compile_proto_init() {
 			}
 		}
 		file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CompileDiagnosticContext); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*CompileDiagnosticNote); i {
 			case 0:
 				return &v.state
@@ -1066,13 +1172,19 @@ func file_cc_arduino_cli_commands_v1_compile_proto_init() {
 			}
 		}
 	}
+	file_cc_arduino_cli_commands_v1_compile_proto_msgTypes[1].OneofWrappers = []interface{}{
+		(*CompileResponse_OutStream)(nil),
+		(*CompileResponse_ErrStream)(nil),
+		(*CompileResponse_Progress)(nil),
+		(*CompileResponse_Result)(nil),
+	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_cc_arduino_cli_commands_v1_compile_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   7,
+			NumMessages:   8,
 			NumExtensions: 0,
 			NumServices:   0,
 		},
diff --git a/rpc/cc/arduino/cli/commands/v1/compile.proto b/rpc/cc/arduino/cli/commands/v1/compile.proto
index 57c6ca9d23d..b53a124b6b8 100644
--- a/rpc/cc/arduino/cli/commands/v1/compile.proto
+++ b/rpc/cc/arduino/cli/commands/v1/compile.proto
@@ -97,26 +97,33 @@ message CompileRequest {
 }
 
 message CompileResponse {
-  // The output of the compilation process (stream)
-  bytes out_stream = 1;
-  // The error output of the compilation process (stream)
-  bytes err_stream = 2;
+  oneof message {
+    // The output of the compilation process (stream)
+    bytes out_stream = 1;
+    // The error output of the compilation process (stream)
+    bytes err_stream = 2;
+    // Completions reports of the compilation process (stream)
+    TaskProgress progress = 3;
+    // The compilation result
+    BuilderResult result = 4;
+  }
+}
+
+message BuilderResult {
   // The compiler build path
-  string build_path = 3;
+  string build_path = 1;
   // The libraries used in the build
-  repeated Library used_libraries = 4;
+  repeated Library used_libraries = 2;
   // The size of the executable split by sections
-  repeated ExecutableSectionSize executable_sections_size = 5;
+  repeated ExecutableSectionSize executable_sections_size = 3;
   // The platform where the board is defined
-  InstalledPlatformReference board_platform = 6;
+  InstalledPlatformReference board_platform = 4;
   // The platform used for the build (if referenced from the board platform)
-  InstalledPlatformReference build_platform = 7;
-  // Completions reports of the compilation process (stream)
-  TaskProgress progress = 8;
+  InstalledPlatformReference build_platform = 5;
   // Build properties used for compiling
-  repeated string build_properties = 9;
+  repeated string build_properties = 7;
   // Compiler errors and warnings
-  repeated CompileDiagnostic diagnostics = 10;
+  repeated CompileDiagnostic diagnostics = 8;
 }
 
 message ExecutableSectionSize {

From 0305e5e8678b46e04345a1f7972284967f3cbbf7 Mon Sep 17 00:00:00 2001
From: Cristian Maglie <c.maglie@arduino.cc>
Date: Tue, 19 Dec 2023 13:20:16 +0100
Subject: [PATCH 2/2] Refactored gRPC UploadUsingProgrammerResponse and
 BurnBootloaderResponse

---
 commands/daemon/daemon.go                   |  32 ++-
 docs/UPGRADING.md                           |  42 ++++
 rpc/cc/arduino/cli/commands/v1/upload.pb.go | 234 +++++++++++++-------
 rpc/cc/arduino/cli/commands/v1/upload.proto |  20 +-
 4 files changed, 230 insertions(+), 98 deletions(-)

diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go
index b99e715fa10..88b0420ff27 100644
--- a/commands/daemon/daemon.go
+++ b/commands/daemon/daemon.go
@@ -302,8 +302,20 @@ func (s *ArduinoCoreServerImpl) Upload(req *rpc.UploadRequest, stream rpc.Arduin
 // UploadUsingProgrammer FIXMEDOC
 func (s *ArduinoCoreServerImpl) UploadUsingProgrammer(req *rpc.UploadUsingProgrammerRequest, stream rpc.ArduinoCoreService_UploadUsingProgrammerServer) error {
 	syncSend := NewSynchronizedSend(stream.Send)
-	outStream := feedStreamTo(func(data []byte) { syncSend.Send(&rpc.UploadUsingProgrammerResponse{OutStream: data}) })
-	errStream := feedStreamTo(func(data []byte) { syncSend.Send(&rpc.UploadUsingProgrammerResponse{ErrStream: data}) })
+	outStream := feedStreamTo(func(data []byte) {
+		syncSend.Send(&rpc.UploadUsingProgrammerResponse{
+			Message: &rpc.UploadUsingProgrammerResponse_OutStream{
+				OutStream: data,
+			},
+		})
+	})
+	errStream := feedStreamTo(func(data []byte) {
+		syncSend.Send(&rpc.UploadUsingProgrammerResponse{
+			Message: &rpc.UploadUsingProgrammerResponse_ErrStream{
+				ErrStream: data,
+			},
+		})
+	})
 	err := upload.UsingProgrammer(stream.Context(), req, outStream, errStream)
 	outStream.Close()
 	errStream.Close()
@@ -322,8 +334,20 @@ func (s *ArduinoCoreServerImpl) SupportedUserFields(ctx context.Context, req *rp
 // BurnBootloader FIXMEDOC
 func (s *ArduinoCoreServerImpl) BurnBootloader(req *rpc.BurnBootloaderRequest, stream rpc.ArduinoCoreService_BurnBootloaderServer) error {
 	syncSend := NewSynchronizedSend(stream.Send)
-	outStream := feedStreamTo(func(data []byte) { syncSend.Send(&rpc.BurnBootloaderResponse{OutStream: data}) })
-	errStream := feedStreamTo(func(data []byte) { syncSend.Send(&rpc.BurnBootloaderResponse{ErrStream: data}) })
+	outStream := feedStreamTo(func(data []byte) {
+		syncSend.Send(&rpc.BurnBootloaderResponse{
+			Message: &rpc.BurnBootloaderResponse_OutStream{
+				OutStream: data,
+			},
+		})
+	})
+	errStream := feedStreamTo(func(data []byte) {
+		syncSend.Send(&rpc.BurnBootloaderResponse{
+			Message: &rpc.BurnBootloaderResponse_ErrStream{
+				ErrStream: data,
+			},
+		})
+	})
 	resp, err := upload.BurnBootloader(stream.Context(), req, outStream, errStream)
 	outStream.Close()
 	errStream.Close()
diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md
index 730c72dce0c..6b9b95b7f3f 100644
--- a/docs/UPGRADING.md
+++ b/docs/UPGRADING.md
@@ -140,6 +140,48 @@ message BuilderResult {
 
 with a clear distinction on which fields are streamed.
 
+### The gRPC response `cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse` and `cc.arduino.cli.commands.v1.BurnBootloaderResponse` has been changed.
+
+The old messages:
+
+```protoc
+message UploadUsingProgrammerResponse {
+  // The output of the upload process.
+  bytes out_stream = 1;
+  // The error output of the upload process.
+  bytes err_stream = 2;
+}
+
+message BurnBootloaderResponse {
+  // The output of the burn bootloader process.
+  bytes out_stream = 1;
+  // The error output of the burn bootloader process.
+  bytes err_stream = 2;
+}
+```
+
+now have the `oneof` clause that makes explicit the streaming nature of the response:
+
+```protoc
+message UploadUsingProgrammerResponse {
+  oneof message {
+    // The output of the upload process.
+    bytes out_stream = 1;
+    // The error output of the upload process.
+    bytes err_stream = 2;
+  }
+}
+
+message BurnBootloaderResponse {
+  oneof message {
+    // The output of the burn bootloader process.
+    bytes out_stream = 1;
+    // The error output of the burn bootloader process.
+    bytes err_stream = 2;
+  }
+}
+```
+
 ### The gRPC `cc.arduino.cli.commands.v1.PlatformRelease` has been changed.
 
 We've added a new field called `compatible`. This field indicates if the current platform release is installable or not.
diff --git a/rpc/cc/arduino/cli/commands/v1/upload.pb.go b/rpc/cc/arduino/cli/commands/v1/upload.pb.go
index 6e544c62d0c..f7a4dd72b14 100644
--- a/rpc/cc/arduino/cli/commands/v1/upload.pb.go
+++ b/rpc/cc/arduino/cli/commands/v1/upload.pb.go
@@ -527,10 +527,11 @@ type UploadUsingProgrammerResponse struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	// The output of the upload process.
-	OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3" json:"out_stream,omitempty"`
-	// The error output of the upload process.
-	ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3" json:"err_stream,omitempty"`
+	// Types that are assignable to Message:
+	//
+	//	*UploadUsingProgrammerResponse_OutStream
+	//	*UploadUsingProgrammerResponse_ErrStream
+	Message isUploadUsingProgrammerResponse_Message `protobuf_oneof:"message"`
 }
 
 func (x *UploadUsingProgrammerResponse) Reset() {
@@ -565,20 +566,45 @@ func (*UploadUsingProgrammerResponse) Descriptor() ([]byte, []int) {
 	return file_cc_arduino_cli_commands_v1_upload_proto_rawDescGZIP(), []int{5}
 }
 
+func (m *UploadUsingProgrammerResponse) GetMessage() isUploadUsingProgrammerResponse_Message {
+	if m != nil {
+		return m.Message
+	}
+	return nil
+}
+
 func (x *UploadUsingProgrammerResponse) GetOutStream() []byte {
-	if x != nil {
+	if x, ok := x.GetMessage().(*UploadUsingProgrammerResponse_OutStream); ok {
 		return x.OutStream
 	}
 	return nil
 }
 
 func (x *UploadUsingProgrammerResponse) GetErrStream() []byte {
-	if x != nil {
+	if x, ok := x.GetMessage().(*UploadUsingProgrammerResponse_ErrStream); ok {
 		return x.ErrStream
 	}
 	return nil
 }
 
+type isUploadUsingProgrammerResponse_Message interface {
+	isUploadUsingProgrammerResponse_Message()
+}
+
+type UploadUsingProgrammerResponse_OutStream struct {
+	// The output of the upload process.
+	OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3,oneof"`
+}
+
+type UploadUsingProgrammerResponse_ErrStream struct {
+	// The error output of the upload process.
+	ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3,oneof"`
+}
+
+func (*UploadUsingProgrammerResponse_OutStream) isUploadUsingProgrammerResponse_Message() {}
+
+func (*UploadUsingProgrammerResponse_ErrStream) isUploadUsingProgrammerResponse_Message() {}
+
 type BurnBootloaderRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -701,10 +727,11 @@ type BurnBootloaderResponse struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	// The output of the burn bootloader process.
-	OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3" json:"out_stream,omitempty"`
-	// The error output of the burn bootloader process.
-	ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3" json:"err_stream,omitempty"`
+	// Types that are assignable to Message:
+	//
+	//	*BurnBootloaderResponse_OutStream
+	//	*BurnBootloaderResponse_ErrStream
+	Message isBurnBootloaderResponse_Message `protobuf_oneof:"message"`
 }
 
 func (x *BurnBootloaderResponse) Reset() {
@@ -739,20 +766,45 @@ func (*BurnBootloaderResponse) Descriptor() ([]byte, []int) {
 	return file_cc_arduino_cli_commands_v1_upload_proto_rawDescGZIP(), []int{7}
 }
 
+func (m *BurnBootloaderResponse) GetMessage() isBurnBootloaderResponse_Message {
+	if m != nil {
+		return m.Message
+	}
+	return nil
+}
+
 func (x *BurnBootloaderResponse) GetOutStream() []byte {
-	if x != nil {
+	if x, ok := x.GetMessage().(*BurnBootloaderResponse_OutStream); ok {
 		return x.OutStream
 	}
 	return nil
 }
 
 func (x *BurnBootloaderResponse) GetErrStream() []byte {
-	if x != nil {
+	if x, ok := x.GetMessage().(*BurnBootloaderResponse_ErrStream); ok {
 		return x.ErrStream
 	}
 	return nil
 }
 
+type isBurnBootloaderResponse_Message interface {
+	isBurnBootloaderResponse_Message()
+}
+
+type BurnBootloaderResponse_OutStream struct {
+	// The output of the burn bootloader process.
+	OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3,oneof"`
+}
+
+type BurnBootloaderResponse_ErrStream struct {
+	// The error output of the burn bootloader process.
+	ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3,oneof"`
+}
+
+func (*BurnBootloaderResponse_OutStream) isBurnBootloaderResponse_Message() {}
+
+func (*BurnBootloaderResponse_ErrStream) isBurnBootloaderResponse_Message() {}
+
 type ListProgrammersAvailableForUploadRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1143,88 +1195,90 @@ var file_cc_arduino_cli_commands_v1_upload_proto_rawDesc = []byte{
 	0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x22, 0x5d, 0x0a, 0x1d, 0x55, 0x70, 0x6c,
+	0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x1d, 0x55, 0x70, 0x6c,
 	0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d,
-	0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75,
-	0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09,
-	0x6f, 0x75, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72,
-	0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x65,
-	0x72, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0xb1, 0x03, 0x0a, 0x15, 0x42, 0x75, 0x72,
-	0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e,
-	0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76,
-	0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74,
-	0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x12, 0x34, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75,
-	0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73,
-	0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18,
-	0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
-	0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x72, 0x69,
-	0x66, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79,
-	0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x18, 0x06,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72,
-	0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28,
-	0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x62, 0x0a, 0x0b, 0x75, 0x73, 0x65,
-	0x72, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41,
-	0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e,
-	0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x72, 0x6e,
+	0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6f, 0x75,
+	0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00,
+	0x52, 0x09, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x65,
+	0x72, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48,
+	0x00, 0x52, 0x09, 0x65, 0x72, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x09, 0x0a, 0x07,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb1, 0x03, 0x0a, 0x15, 0x42, 0x75, 0x72, 0x6e,
 	0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72,
-	0x79, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x3d, 0x0a,
-	0x0f, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x22, 0x56, 0x0a, 0x16,
-	0x42, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74,
-	0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x53,
-	0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x73, 0x74, 0x72,
-	0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x65, 0x72, 0x72, 0x53, 0x74,
-	0x72, 0x65, 0x61, 0x6d, 0x22, 0x80, 0x01, 0x0a, 0x28, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f,
-	0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,
-	0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
 	0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20,
 	0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f,
 	0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31,
 	0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61,
 	0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x22, 0x75, 0x0a, 0x29, 0x4c, 0x69, 0x73, 0x74, 0x50,
-	0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61,
-	0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70,
-	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d,
-	0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x63, 0x2e, 0x61,
+	0x09, 0x52, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x12, 0x34, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69,
+	0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e,
+	0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a,
+	0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
+	0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x72, 0x69, 0x66,
+	0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12,
+	0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x12,
+	0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08,
+	0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x62, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72,
+	0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e,
+	0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63,
+	0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x42,
+	0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
+	0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x3d, 0x0a, 0x0f,
+	0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x22, 0x65, 0x0a, 0x16, 0x42,
+	0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x72,
+	0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x75, 0x74,
+	0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x73, 0x74,
+	0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, 0x65, 0x72,
+	0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x28, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72,
+	0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46,
+	0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
+	0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49,
+	0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+	0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x04, 0x66, 0x71, 0x62, 0x6e, 0x22, 0x75, 0x0a, 0x29, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f,
+	0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,
+	0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+	0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72,
+	0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64,
+	0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
+	0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x52,
+	0x0b, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x22, 0x8e, 0x01, 0x0a,
+	0x1a, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69,
+	0x65, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69,
+	0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
+	0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63,
+	0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61,
+	0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a,
+	0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x62,
+	0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x66, 0x0a,
+	0x09, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f,
+	0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x6f,
+	0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x16, 0x0a,
+	0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73,
+	0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x65, 0x0a, 0x1b, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
+	0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70,
+	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x65,
+	0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x63, 0x2e, 0x61,
 	0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61,
-	0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65,
-	0x72, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x22, 0x8e,
-	0x01, 0x0a, 0x1a, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72,
-	0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a,
-	0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
-	0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69,
-	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73,
-	0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,
-	0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66,
-	0x71, 0x62, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22,
-	0x66, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x07,
-	0x74, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74,
-	0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62,
-	0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12,
-	0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
-	0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x65, 0x0a, 0x1b, 0x53, 0x75, 0x70, 0x70, 0x6f,
-	0x72, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66,
-	0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x63,
-	0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d,
-	0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65,
-	0x6c, 0x64, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x48,
-	0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64,
-	0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69,
-	0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f,
-	0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b,
-	0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64,
+	0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x48, 0x5a, 0x46,
+	0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69,
+	0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72,
+	0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c,
+	0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f,
+	0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1454,6 +1508,14 @@ func file_cc_arduino_cli_commands_v1_upload_proto_init() {
 		(*UploadResponse_ErrStream)(nil),
 		(*UploadResponse_Result)(nil),
 	}
+	file_cc_arduino_cli_commands_v1_upload_proto_msgTypes[5].OneofWrappers = []interface{}{
+		(*UploadUsingProgrammerResponse_OutStream)(nil),
+		(*UploadUsingProgrammerResponse_ErrStream)(nil),
+	}
+	file_cc_arduino_cli_commands_v1_upload_proto_msgTypes[7].OneofWrappers = []interface{}{
+		(*BurnBootloaderResponse_OutStream)(nil),
+		(*BurnBootloaderResponse_ErrStream)(nil),
+	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
diff --git a/rpc/cc/arduino/cli/commands/v1/upload.proto b/rpc/cc/arduino/cli/commands/v1/upload.proto
index 8a2b6b0215d..b2d3d5bc93f 100644
--- a/rpc/cc/arduino/cli/commands/v1/upload.proto
+++ b/rpc/cc/arduino/cli/commands/v1/upload.proto
@@ -118,10 +118,12 @@ message UploadUsingProgrammerRequest {
 }
 
 message UploadUsingProgrammerResponse {
-  // The output of the upload process.
-  bytes out_stream = 1;
-  // The error output of the upload process.
-  bytes err_stream = 2;
+  oneof message {
+    // The output of the upload process.
+    bytes out_stream = 1;
+    // The error output of the upload process.
+    bytes err_stream = 2;
+  }
 }
 
 message BurnBootloaderRequest {
@@ -150,10 +152,12 @@ message BurnBootloaderRequest {
 }
 
 message BurnBootloaderResponse {
-  // The output of the burn bootloader process.
-  bytes out_stream = 1;
-  // The error output of the burn bootloader process.
-  bytes err_stream = 2;
+  oneof message {
+    // The output of the burn bootloader process.
+    bytes out_stream = 1;
+    // The error output of the burn bootloader process.
+    bytes err_stream = 2;
+  }
 }
 
 message ListProgrammersAvailableForUploadRequest {