From 7a60295bc1080242439a647995710b3998b45387 Mon Sep 17 00:00:00 2001 From: mrhid6 Date: Mon, 20 Jul 2026 12:34:32 +0100 Subject: [PATCH] feat(proto): add StepOutputChunk streaming message --- agent/internal/grpc/pb/vantage.pb.go | 18 +++++++++++++----- proto/vantage/v1/vantage.proto | 8 ++++++++ server/internal/grpc/pb/vantage.pb.go | 18 +++++++++++++----- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/agent/internal/grpc/pb/vantage.pb.go b/agent/internal/grpc/pb/vantage.pb.go index 42441f9..6064354 100644 --- a/agent/internal/grpc/pb/vantage.pb.go +++ b/agent/internal/grpc/pb/vantage.pb.go @@ -89,11 +89,12 @@ type GenerateKeyCmd struct { } type AgentMessage struct { - ServerId string `json:"server_id"` - AgentToken string `json:"agent_token"` - Ready *AgentReady `json:"ready,omitempty"` - Result *CommandResult `json:"result,omitempty"` - StepResult *StepResult `json:"step_result,omitempty"` + ServerId string `json:"server_id"` + AgentToken string `json:"agent_token"` + Ready *AgentReady `json:"ready,omitempty"` + Result *CommandResult `json:"result,omitempty"` + StepResult *StepResult `json:"step_result,omitempty"` + StepOutput *StepOutputChunk `json:"step_output,omitempty"` } type AgentReady struct{} @@ -119,6 +120,13 @@ type StepResult struct { OutputEnv map[string]string `json:"output_env,omitempty"` } +type StepOutputChunk struct { + CommandId string `json:"command_id"` + Seq uint64 `json:"seq"` + Data []byte `json:"data,omitempty"` + Eof bool `json:"eof,omitempty"` +} + // CommandStream client-side interface type Vantage_CommandStreamClient interface { diff --git a/proto/vantage/v1/vantage.proto b/proto/vantage/v1/vantage.proto index f65b425..32935c5 100644 --- a/proto/vantage/v1/vantage.proto +++ b/proto/vantage/v1/vantage.proto @@ -56,6 +56,7 @@ message AgentMessage { AgentReady ready = 3; CommandResult result = 4; StepResult step_result = 5; + StepOutputChunk step_output = 6; } } @@ -125,3 +126,10 @@ message StepResult { string stderr = 4; map output_env = 5; } + +message StepOutputChunk { + string command_id = 1; + uint64 seq = 2; + bytes data = 3; + bool eof = 4; +} diff --git a/server/internal/grpc/pb/vantage.pb.go b/server/internal/grpc/pb/vantage.pb.go index 758ed73..7ceec4a 100644 --- a/server/internal/grpc/pb/vantage.pb.go +++ b/server/internal/grpc/pb/vantage.pb.go @@ -92,11 +92,12 @@ type GenerateKeyCmd struct { } type AgentMessage struct { - ServerId string `json:"server_id"` - AgentToken string `json:"agent_token"` - Ready *AgentReady `json:"ready,omitempty"` - Result *CommandResult `json:"result,omitempty"` - StepResult *StepResult `json:"step_result,omitempty"` + ServerId string `json:"server_id"` + AgentToken string `json:"agent_token"` + Ready *AgentReady `json:"ready,omitempty"` + Result *CommandResult `json:"result,omitempty"` + StepResult *StepResult `json:"step_result,omitempty"` + StepOutput *StepOutputChunk `json:"step_output,omitempty"` } type AgentReady struct{} @@ -122,6 +123,13 @@ type StepResult struct { OutputEnv map[string]string `json:"output_env,omitempty"` } +type StepOutputChunk struct { + CommandId string `json:"command_id"` + Seq uint64 `json:"seq"` + Data []byte `json:"data,omitempty"` + Eof bool `json:"eof,omitempty"` +} + // CommandStream server-side interface type Vantage_CommandStreamServer interface {