Documentation
¶
Index ¶
- Constants
- Variables
- type RemoteAgentClient
- func (r *RemoteAgentClient) ApproveExecutionPlan(ctx context.Context, planID string, approved bool, modifications string) (*pb.ApprovalResponse, error)
- func (r *RemoteAgentClient) Connect() error
- func (r *RemoteAgentClient) Disconnect() error
- func (r *RemoteAgentClient) GenerateExecutionPlan(ctx context.Context, input string) (*pb.PlanResponse, error)
- func (r *RemoteAgentClient) GetCapabilities(ctx context.Context) (*pb.CapabilitiesResponse, error)
- func (r *RemoteAgentClient) GetMetadata(ctx context.Context) (*pb.MetadataResponse, error)
- func (r *RemoteAgentClient) GetURL() string
- func (r *RemoteAgentClient) Health(ctx context.Context) (*pb.HealthResponse, error)
- func (r *RemoteAgentClient) IsConnected() bool
- func (r *RemoteAgentClient) OnComplete(handler func()) *RemoteAgentClient
- func (r *RemoteAgentClient) OnContent(handler func(string)) *RemoteAgentClient
- func (r *RemoteAgentClient) OnError(handler func(error)) *RemoteAgentClient
- func (r *RemoteAgentClient) OnThinking(handler func(string)) *RemoteAgentClient
- func (r *RemoteAgentClient) OnToolCall(handler func(*interfaces.ToolCallEvent)) *RemoteAgentClient
- func (r *RemoteAgentClient) OnToolResult(handler func(*interfaces.ToolCallEvent)) *RemoteAgentClient
- func (r *RemoteAgentClient) Ready(ctx context.Context) (*pb.ReadinessResponse, error)
- func (r *RemoteAgentClient) Run(ctx context.Context, input string) (string, error)
- func (r *RemoteAgentClient) RunStream(ctx context.Context, input string) (<-chan interfaces.AgentStreamEvent, error)
- func (r *RemoteAgentClient) RunStreamWithAuth(ctx context.Context, input string, authToken string) (<-chan interfaces.AgentStreamEvent, error)
- func (r *RemoteAgentClient) RunWithAuth(ctx context.Context, input string, authToken string) (string, error)
- func (r *RemoteAgentClient) SetRetryCount(count int)
- func (r *RemoteAgentClient) SetTimeout(timeout time.Duration)
- func (r *RemoteAgentClient) Stream(ctx context.Context, input string) error
- func (r *RemoteAgentClient) StreamWithAuth(ctx context.Context, input string, authToken string) error
- type RemoteAgentConfig
Constants ¶
const JWTTokenKey contextKey = "jwtToken"
JWTTokenKey is used for JWT token context propagation
Variables ¶
var JWTTokenKeyStruct = jwtContextKey{}
Use exact same variable name and type as starops-agent middleware
Functions ¶
This section is empty.
Types ¶
type RemoteAgentClient ¶
type RemoteAgentClient struct {
// contains filtered or unexported fields
}
RemoteAgentClient handles communication with remote agents via gRPC
func NewRemoteAgentClient ¶
func NewRemoteAgentClient(config RemoteAgentConfig) *RemoteAgentClient
NewRemoteAgentClient creates a new remote agent client
func (*RemoteAgentClient) ApproveExecutionPlan ¶
func (r *RemoteAgentClient) ApproveExecutionPlan(ctx context.Context, planID string, approved bool, modifications string) (*pb.ApprovalResponse, error)
ApproveExecutionPlan approves an execution plan via the remote agent
func (*RemoteAgentClient) Connect ¶
func (r *RemoteAgentClient) Connect() error
Connect establishes a connection to the remote agent service
func (*RemoteAgentClient) Disconnect ¶
func (r *RemoteAgentClient) Disconnect() error
Disconnect closes the connection to the remote agent service
func (*RemoteAgentClient) GenerateExecutionPlan ¶
func (r *RemoteAgentClient) GenerateExecutionPlan(ctx context.Context, input string) (*pb.PlanResponse, error)
GenerateExecutionPlan generates an execution plan via the remote agent
func (*RemoteAgentClient) GetCapabilities ¶
func (r *RemoteAgentClient) GetCapabilities(ctx context.Context) (*pb.CapabilitiesResponse, error)
GetCapabilities retrieves capabilities from the remote agent
func (*RemoteAgentClient) GetMetadata ¶
func (r *RemoteAgentClient) GetMetadata(ctx context.Context) (*pb.MetadataResponse, error)
GetMetadata retrieves metadata from the remote agent
func (*RemoteAgentClient) GetURL ¶
func (r *RemoteAgentClient) GetURL() string
GetURL returns the URL of the remote agent
func (*RemoteAgentClient) Health ¶
func (r *RemoteAgentClient) Health(ctx context.Context) (*pb.HealthResponse, error)
Health checks the health of the remote agent service
func (*RemoteAgentClient) IsConnected ¶
func (r *RemoteAgentClient) IsConnected() bool
IsConnected returns true if the client is connected
func (*RemoteAgentClient) OnComplete ¶ added in v0.0.35
func (r *RemoteAgentClient) OnComplete(handler func()) *RemoteAgentClient
OnComplete registers a handler for completion events
func (*RemoteAgentClient) OnContent ¶ added in v0.0.35
func (r *RemoteAgentClient) OnContent(handler func(string)) *RemoteAgentClient
OnContent registers a handler for content events
func (*RemoteAgentClient) OnError ¶ added in v0.0.35
func (r *RemoteAgentClient) OnError(handler func(error)) *RemoteAgentClient
OnError registers a handler for error events
func (*RemoteAgentClient) OnThinking ¶ added in v0.0.35
func (r *RemoteAgentClient) OnThinking(handler func(string)) *RemoteAgentClient
OnThinking registers a handler for thinking events
func (*RemoteAgentClient) OnToolCall ¶ added in v0.0.35
func (r *RemoteAgentClient) OnToolCall(handler func(*interfaces.ToolCallEvent)) *RemoteAgentClient
OnToolCall registers a handler for tool call events
func (*RemoteAgentClient) OnToolResult ¶ added in v0.0.35
func (r *RemoteAgentClient) OnToolResult(handler func(*interfaces.ToolCallEvent)) *RemoteAgentClient
OnToolResult registers a handler for tool result events
func (*RemoteAgentClient) Ready ¶
func (r *RemoteAgentClient) Ready(ctx context.Context) (*pb.ReadinessResponse, error)
Ready checks if the remote agent service is ready
func (*RemoteAgentClient) RunStream ¶ added in v0.0.35
func (r *RemoteAgentClient) RunStream(ctx context.Context, input string) (<-chan interfaces.AgentStreamEvent, error)
RunStream executes the remote agent with streaming response
func (*RemoteAgentClient) RunStreamWithAuth ¶ added in v0.0.35
func (r *RemoteAgentClient) RunStreamWithAuth(ctx context.Context, input string, authToken string) (<-chan interfaces.AgentStreamEvent, error)
RunStreamWithAuth executes the remote agent with streaming response and explicit auth token
func (*RemoteAgentClient) RunWithAuth ¶ added in v0.0.29
func (r *RemoteAgentClient) RunWithAuth(ctx context.Context, input string, authToken string) (string, error)
RunWithAuth executes the remote agent with explicit auth token
func (*RemoteAgentClient) SetRetryCount ¶
func (r *RemoteAgentClient) SetRetryCount(count int)
SetRetryCount sets the number of retries for failed requests
func (*RemoteAgentClient) SetTimeout ¶
func (r *RemoteAgentClient) SetTimeout(timeout time.Duration)
SetTimeout sets the timeout for requests
func (*RemoteAgentClient) Stream ¶ added in v0.0.35
func (r *RemoteAgentClient) Stream(ctx context.Context, input string) error
Stream executes the remote agent with registered event handlers
func (*RemoteAgentClient) StreamWithAuth ¶ added in v0.0.35
func (r *RemoteAgentClient) StreamWithAuth(ctx context.Context, input string, authToken string) error
StreamWithAuth executes the remote agent with registered event handlers and explicit auth token