mirror of
https://github.com/amir20/dozzle.git
synced 2026-08-07 11:44:45 +00:00
chore: Send Dozzle version in cloud tool registration (#4599)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
"github.com/amir20/dozzle/internal/container"
|
||||
"github.com/amir20/dozzle/internal/notification/dispatcher"
|
||||
"github.com/amir20/dozzle/internal/support/cli"
|
||||
pb "github.com/amir20/dozzle/proto/cloud"
|
||||
"github.com/rs/zerolog/log"
|
||||
"golang.org/x/sync/semaphore"
|
||||
@@ -264,7 +265,8 @@ func (c *Client) handleRequest(ctx context.Context, req *pb.ToolRequest) *pb.Too
|
||||
log.Debug().Str("request_id", req.RequestId).Msg("cloud requested tool list")
|
||||
resp.Type = &pb.ToolResponse_ListTools{
|
||||
ListTools: &pb.ListToolsResponse{
|
||||
Tools: c.tools(),
|
||||
Tools: c.tools(),
|
||||
Version: cli.Version,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
+11
-2
@@ -240,6 +240,7 @@ func (*ListToolsRequest) Descriptor() ([]byte, []int) {
|
||||
type ListToolsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Tools []*ToolDefinition `protobuf:"bytes,1,rep,name=tools,proto3" json:"tools,omitempty"`
|
||||
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -281,6 +282,13 @@ func (x *ListToolsResponse) GetTools() []*ToolDefinition {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListToolsResponse) GetVersion() string {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ToolDefinition struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
@@ -1420,9 +1428,10 @@ const file_cloud_proto_rawDesc = "" +
|
||||
"list_tools\x18\x02 \x01(\v2\x18.cloud.ListToolsResponseH\x00R\tlistTools\x126\n" +
|
||||
"\tcall_tool\x18\x03 \x01(\v2\x17.cloud.CallToolResponseH\x00R\bcallToolB\x06\n" +
|
||||
"\x04type\"\x12\n" +
|
||||
"\x10ListToolsRequest\"@\n" +
|
||||
"\x10ListToolsRequest\"Z\n" +
|
||||
"\x11ListToolsResponse\x12+\n" +
|
||||
"\x05tools\x18\x01 \x03(\v2\x15.cloud.ToolDefinitionR\x05tools\"o\n" +
|
||||
"\x05tools\x18\x01 \x03(\v2\x15.cloud.ToolDefinitionR\x05tools\x12\x18\n" +
|
||||
"\aversion\x18\x02 \x01(\tR\aversion\"o\n" +
|
||||
"\x0eToolDefinition\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12 \n" +
|
||||
"\vdescription\x18\x02 \x01(\tR\vdescription\x12'\n" +
|
||||
|
||||
@@ -29,6 +29,7 @@ message ListToolsRequest {}
|
||||
|
||||
message ListToolsResponse {
|
||||
repeated ToolDefinition tools = 1;
|
||||
string version = 2;
|
||||
}
|
||||
|
||||
message ToolDefinition {
|
||||
|
||||
Reference in New Issue
Block a user