proto

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolPlugin_Configure_FullMethodName   = "/plugin.ToolPlugin/Configure"
	ToolPlugin_Call_FullMethodName        = "/plugin.ToolPlugin/Call"
	ToolPlugin_GetToolInfo_FullMethodName = "/plugin.ToolPlugin/GetToolInfo"
	ToolPlugin_ListTools_FullMethodName   = "/plugin.ToolPlugin/ListTools"
)

Variables

View Source
var File_proto_plugin_proto protoreflect.FileDescriptor
View Source
var ToolPlugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "plugin.ToolPlugin",
	HandlerType: (*ToolPluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Configure",
			Handler:    _ToolPlugin_Configure_Handler,
		},
		{
			MethodName: "Call",
			Handler:    _ToolPlugin_Call_Handler,
		},
		{
			MethodName: "GetToolInfo",
			Handler:    _ToolPlugin_GetToolInfo_Handler,
		},
		{
			MethodName: "ListTools",
			Handler:    _ToolPlugin_ListTools_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/plugin.proto",
}

ToolPlugin_ServiceDesc is the grpc.ServiceDesc for ToolPlugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterToolPluginServer

func RegisterToolPluginServer(s grpc.ServiceRegistrar, srv ToolPluginServer)

Types

type CallRequest

type CallRequest struct {
	ToolName string `protobuf:"bytes,1,opt,name=tool_name,json=toolName,proto3" json:"tool_name,omitempty"`
	Payload  string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*CallRequest) Descriptor deprecated

func (*CallRequest) Descriptor() ([]byte, []int)

Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.

func (*CallRequest) GetPayload

func (x *CallRequest) GetPayload() string

func (*CallRequest) GetToolName

func (x *CallRequest) GetToolName() string

func (*CallRequest) ProtoMessage

func (*CallRequest) ProtoMessage()

func (*CallRequest) ProtoReflect

func (x *CallRequest) ProtoReflect() protoreflect.Message

func (*CallRequest) Reset

func (x *CallRequest) Reset()

func (*CallRequest) String

func (x *CallRequest) String() string

type CallResponse

type CallResponse struct {
	Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*CallResponse) Descriptor deprecated

func (*CallResponse) Descriptor() ([]byte, []int)

Deprecated: Use CallResponse.ProtoReflect.Descriptor instead.

func (*CallResponse) GetResult

func (x *CallResponse) GetResult() string

func (*CallResponse) ProtoMessage

func (*CallResponse) ProtoMessage()

func (*CallResponse) ProtoReflect

func (x *CallResponse) ProtoReflect() protoreflect.Message

func (*CallResponse) Reset

func (x *CallResponse) Reset()

func (*CallResponse) String

func (x *CallResponse) String() string

type ConfigureRequest

type ConfigureRequest struct {
	Settings map[string]string `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigureRequest) Descriptor deprecated

func (*ConfigureRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConfigureRequest.ProtoReflect.Descriptor instead.

func (*ConfigureRequest) GetSettings

func (x *ConfigureRequest) GetSettings() map[string]string

func (*ConfigureRequest) ProtoMessage

func (*ConfigureRequest) ProtoMessage()

func (*ConfigureRequest) ProtoReflect

func (x *ConfigureRequest) ProtoReflect() protoreflect.Message

func (*ConfigureRequest) Reset

func (x *ConfigureRequest) Reset()

func (*ConfigureRequest) String

func (x *ConfigureRequest) String() string

type ConfigureResponse

type ConfigureResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigureResponse) Descriptor deprecated

func (*ConfigureResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConfigureResponse.ProtoReflect.Descriptor instead.

func (*ConfigureResponse) GetError

func (x *ConfigureResponse) GetError() string

func (*ConfigureResponse) GetSuccess

func (x *ConfigureResponse) GetSuccess() bool

func (*ConfigureResponse) ProtoMessage

func (*ConfigureResponse) ProtoMessage()

func (*ConfigureResponse) ProtoReflect

func (x *ConfigureResponse) ProtoReflect() protoreflect.Message

func (*ConfigureResponse) Reset

func (x *ConfigureResponse) Reset()

func (*ConfigureResponse) String

func (x *ConfigureResponse) String() string

type GetToolInfoRequest

type GetToolInfoRequest struct {
	ToolName string `protobuf:"bytes,1,opt,name=tool_name,json=toolName,proto3" json:"tool_name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetToolInfoRequest) Descriptor deprecated

func (*GetToolInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetToolInfoRequest.ProtoReflect.Descriptor instead.

func (*GetToolInfoRequest) GetToolName

func (x *GetToolInfoRequest) GetToolName() string

func (*GetToolInfoRequest) ProtoMessage

func (*GetToolInfoRequest) ProtoMessage()

func (*GetToolInfoRequest) ProtoReflect

func (x *GetToolInfoRequest) ProtoReflect() protoreflect.Message

func (*GetToolInfoRequest) Reset

func (x *GetToolInfoRequest) Reset()

func (*GetToolInfoRequest) String

func (x *GetToolInfoRequest) String() string

type GetToolInfoResponse

type GetToolInfoResponse struct {
	Tool *ToolInfo `protobuf:"bytes,1,opt,name=tool,proto3" json:"tool,omitempty"`
	// contains filtered or unexported fields
}

func (*GetToolInfoResponse) Descriptor deprecated

func (*GetToolInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetToolInfoResponse.ProtoReflect.Descriptor instead.

func (*GetToolInfoResponse) GetTool

func (x *GetToolInfoResponse) GetTool() *ToolInfo

func (*GetToolInfoResponse) ProtoMessage

func (*GetToolInfoResponse) ProtoMessage()

func (*GetToolInfoResponse) ProtoReflect

func (x *GetToolInfoResponse) ProtoReflect() protoreflect.Message

func (*GetToolInfoResponse) Reset

func (x *GetToolInfoResponse) Reset()

func (*GetToolInfoResponse) String

func (x *GetToolInfoResponse) String() string

type ListToolsRequest

type ListToolsRequest struct {
	// contains filtered or unexported fields
}

func (*ListToolsRequest) Descriptor deprecated

func (*ListToolsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListToolsRequest.ProtoReflect.Descriptor instead.

func (*ListToolsRequest) ProtoMessage

func (*ListToolsRequest) ProtoMessage()

func (*ListToolsRequest) ProtoReflect

func (x *ListToolsRequest) ProtoReflect() protoreflect.Message

func (*ListToolsRequest) Reset

func (x *ListToolsRequest) Reset()

func (*ListToolsRequest) String

func (x *ListToolsRequest) String() string

type ListToolsResponse

type ListToolsResponse struct {
	Tools []*ToolInfo `protobuf:"bytes,1,rep,name=tools,proto3" json:"tools,omitempty"`
	// contains filtered or unexported fields
}

func (*ListToolsResponse) Descriptor deprecated

func (*ListToolsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListToolsResponse.ProtoReflect.Descriptor instead.

func (*ListToolsResponse) GetTools

func (x *ListToolsResponse) GetTools() []*ToolInfo

func (*ListToolsResponse) ProtoMessage

func (*ListToolsResponse) ProtoMessage()

func (*ListToolsResponse) ProtoReflect

func (x *ListToolsResponse) ProtoReflect() protoreflect.Message

func (*ListToolsResponse) Reset

func (x *ListToolsResponse) Reset()

func (*ListToolsResponse) String

func (x *ListToolsResponse) String() string

type ToolInfo

type ToolInfo struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	SchemaJson  string `protobuf:"bytes,3,opt,name=schema_json,json=schemaJson,proto3" json:"schema_json,omitempty"` // JSON schema for the tool's input parameters
	// contains filtered or unexported fields
}

ToolInfo contains the metadata for a tool

func (*ToolInfo) Descriptor deprecated

func (*ToolInfo) Descriptor() ([]byte, []int)

Deprecated: Use ToolInfo.ProtoReflect.Descriptor instead.

func (*ToolInfo) GetDescription

func (x *ToolInfo) GetDescription() string

func (*ToolInfo) GetName

func (x *ToolInfo) GetName() string

func (*ToolInfo) GetSchemaJson

func (x *ToolInfo) GetSchemaJson() string

func (*ToolInfo) ProtoMessage

func (*ToolInfo) ProtoMessage()

func (*ToolInfo) ProtoReflect

func (x *ToolInfo) ProtoReflect() protoreflect.Message

func (*ToolInfo) Reset

func (x *ToolInfo) Reset()

func (*ToolInfo) String

func (x *ToolInfo) String() string

type ToolPluginClient

type ToolPluginClient interface {
	// Configure passes plugin settings from HCL config
	Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error)
	// Call invokes a tool on the plugin with the given payload
	Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
	// GetToolInfo returns metadata about a specific tool
	GetToolInfo(ctx context.Context, in *GetToolInfoRequest, opts ...grpc.CallOption) (*GetToolInfoResponse, error)
	// ListTools returns info for all tools this plugin provides
	ListTools(ctx context.Context, in *ListToolsRequest, opts ...grpc.CallOption) (*ListToolsResponse, error)
}

ToolPluginClient is the client API for ToolPlugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

ToolPlugin is the service that all tool plugins must implement

func NewToolPluginClient

func NewToolPluginClient(cc grpc.ClientConnInterface) ToolPluginClient

type ToolPluginServer

type ToolPluginServer interface {
	// Configure passes plugin settings from HCL config
	Configure(context.Context, *ConfigureRequest) (*ConfigureResponse, error)
	// Call invokes a tool on the plugin with the given payload
	Call(context.Context, *CallRequest) (*CallResponse, error)
	// GetToolInfo returns metadata about a specific tool
	GetToolInfo(context.Context, *GetToolInfoRequest) (*GetToolInfoResponse, error)
	// ListTools returns info for all tools this plugin provides
	ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
	// contains filtered or unexported methods
}

ToolPluginServer is the server API for ToolPlugin service. All implementations must embed UnimplementedToolPluginServer for forward compatibility.

ToolPlugin is the service that all tool plugins must implement

type UnimplementedToolPluginServer

type UnimplementedToolPluginServer struct{}

UnimplementedToolPluginServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedToolPluginServer) Call

func (UnimplementedToolPluginServer) Configure

func (UnimplementedToolPluginServer) GetToolInfo

func (UnimplementedToolPluginServer) ListTools

type UnsafeToolPluginServer

type UnsafeToolPluginServer interface {
	// contains filtered or unexported methods
}

UnsafeToolPluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ToolPluginServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL