aigentv1connect

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ChatServiceName is the fully-qualified name of the ChatService service.
	ChatServiceName = "madsrc.aigent.v1.ChatService"
	// AgentServiceName is the fully-qualified name of the AgentService service.
	AgentServiceName = "madsrc.aigent.v1.AgentService"
)
View Source
const (
	// ChatServiceConverseProcedure is the fully-qualified name of the ChatService's Converse RPC.
	ChatServiceConverseProcedure = "/madsrc.aigent.v1.ChatService/Converse"
	// ChatServiceListConversationsProcedure is the fully-qualified name of the ChatService's
	// ListConversations RPC.
	ChatServiceListConversationsProcedure = "/madsrc.aigent.v1.ChatService/ListConversations"
	// ChatServiceRemoveConversationProcedure is the fully-qualified name of the ChatService's
	// RemoveConversation RPC.
	ChatServiceRemoveConversationProcedure = "/madsrc.aigent.v1.ChatService/RemoveConversation"
	// ChatServiceGetConversationProcedure is the fully-qualified name of the ChatService's
	// GetConversation RPC.
	ChatServiceGetConversationProcedure = "/madsrc.aigent.v1.ChatService/GetConversation"
	// AgentServiceConfigureAgentProcedure is the fully-qualified name of the AgentService's
	// ConfigureAgent RPC.
	AgentServiceConfigureAgentProcedure = "/madsrc.aigent.v1.AgentService/ConfigureAgent"
	// AgentServiceGetAgentStatusProcedure is the fully-qualified name of the AgentService's
	// GetAgentStatus RPC.
	AgentServiceGetAgentStatusProcedure = "/madsrc.aigent.v1.AgentService/GetAgentStatus"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

Variables

This section is empty.

Functions

func NewAgentServiceHandler

func NewAgentServiceHandler(svc AgentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewAgentServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewChatServiceHandler

func NewChatServiceHandler(svc ChatServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewChatServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type AgentServiceClient

type AgentServiceClient interface {
	// ConfigureAgent allows configuring various agent parameters like log level, persona, temperature, etc.
	ConfigureAgent(context.Context, *connect.Request[v1.ConfigureAgentRequest]) (*connect.Response[v1.ConfigureAgentResponse], error)
	// GetAgentStatus retrieves the current operational status and configuration of the agent.
	GetAgentStatus(context.Context, *connect.Request[v1.GetAgentStatusRequest]) (*connect.Response[v1.GetAgentStatusResponse], error)
}

AgentServiceClient is a client for the madsrc.aigent.v1.AgentService service.

func NewAgentServiceClient

func NewAgentServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AgentServiceClient

NewAgentServiceClient constructs a client for the madsrc.aigent.v1.AgentService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type AgentServiceHandler

type AgentServiceHandler interface {
	// ConfigureAgent allows configuring various agent parameters like log level, persona, temperature, etc.
	ConfigureAgent(context.Context, *connect.Request[v1.ConfigureAgentRequest]) (*connect.Response[v1.ConfigureAgentResponse], error)
	// GetAgentStatus retrieves the current operational status and configuration of the agent.
	GetAgentStatus(context.Context, *connect.Request[v1.GetAgentStatusRequest]) (*connect.Response[v1.GetAgentStatusResponse], error)
}

AgentServiceHandler is an implementation of the madsrc.aigent.v1.AgentService service.

type ChatServiceClient

type ChatServiceClient interface {
	// Converse handles the primary bidirectional communication for an interactive chat session.
	// This includes sending user messages, receiving streamed LLM responses, handling tool calls and approvals.
	Converse(context.Context) *connect.BidiStreamForClient[v1.ConverseRequest, v1.ConverseResponse]
	// ListConversations retrieves a list of all available conversations.
	ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error)
	// RemoveConversation deletes a specified conversation.
	RemoveConversation(context.Context, *connect.Request[v1.RemoveConversationRequest]) (*connect.Response[v1.RemoveConversationResponse], error)
	// GetConversation retrieves the details and message history of a specific conversation.
	GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error)
}

ChatServiceClient is a client for the madsrc.aigent.v1.ChatService service.

func NewChatServiceClient

func NewChatServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ChatServiceClient

NewChatServiceClient constructs a client for the madsrc.aigent.v1.ChatService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type ChatServiceHandler

type ChatServiceHandler interface {
	// Converse handles the primary bidirectional communication for an interactive chat session.
	// This includes sending user messages, receiving streamed LLM responses, handling tool calls and approvals.
	Converse(context.Context, *connect.BidiStream[v1.ConverseRequest, v1.ConverseResponse]) error
	// ListConversations retrieves a list of all available conversations.
	ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error)
	// RemoveConversation deletes a specified conversation.
	RemoveConversation(context.Context, *connect.Request[v1.RemoveConversationRequest]) (*connect.Response[v1.RemoveConversationResponse], error)
	// GetConversation retrieves the details and message history of a specific conversation.
	GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error)
}

ChatServiceHandler is an implementation of the madsrc.aigent.v1.ChatService service.

type UnimplementedAgentServiceHandler

type UnimplementedAgentServiceHandler struct{}

UnimplementedAgentServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedChatServiceHandler

type UnimplementedChatServiceHandler struct{}

UnimplementedChatServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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