aggregator

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAdapter

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

APIAdapter adapts the AggregatorService to implement api.AggregatorHandler

func NewAPIAdapter

func NewAPIAdapter(s *AggregatorService) *APIAdapter

NewAPIAdapter creates a new aggregator API adapter

func (*APIAdapter) CallTool

func (a *APIAdapter) CallTool(ctx context.Context, toolName string, args map[string]interface{}) (*api.CallToolResult, error)

CallTool calls a tool and returns the result in API format

func (*APIAdapter) CallToolInternal

func (a *APIAdapter) CallToolInternal(ctx context.Context, toolName string, args map[string]interface{}) (*mcp.CallToolResult, error)

CallToolInternal calls a tool and returns the raw MCP result

func (*APIAdapter) GetAvailableTools

func (a *APIAdapter) GetAvailableTools() []string

GetAvailableTools returns all available tools

func (*APIAdapter) GetEndpoint

func (a *APIAdapter) GetEndpoint() string

GetEndpoint returns the aggregator's SSE endpoint URL

func (*APIAdapter) GetPort

func (a *APIAdapter) GetPort() int

GetPort returns the aggregator port

func (*APIAdapter) GetServiceData

func (a *APIAdapter) GetServiceData() map[string]interface{}

GetServiceData returns aggregator service data

func (*APIAdapter) IsToolAvailable

func (a *APIAdapter) IsToolAvailable(toolName string) bool

IsToolAvailable checks if a tool is available

func (*APIAdapter) MissingToolsForSession added in v0.1.222

func (a *APIAdapter) MissingToolsForSession(ctx context.Context, toolNames []string) []string

MissingToolsForSession returns the subset of toolNames that is unavailable for the calling session, resolving SSO family tools against the session's accessible tool set (CapabilityStore) so availability is not order-dependent on a prior list_tools call. When the aggregator is unavailable, all requested tools are reported missing.

func (*APIAdapter) Register

func (a *APIAdapter) Register()

Register registers this adapter with the API package

func (*APIAdapter) RegisterServerPendingAuth

func (a *APIAdapter) RegisterServerPendingAuth(registration api.PendingAuthRegistration) error

RegisterServerPendingAuth registers a server that requires OAuth authentication.

func (*APIAdapter) UpdateCapabilities

func (a *APIAdapter) UpdateCapabilities()

UpdateCapabilities updates the aggregator's capabilities

type AggregatorService

type AggregatorService struct {
	*services.BaseService
	// contains filtered or unexported fields
}

AggregatorService implements the Service interface for the MCP aggregator This is a thin wrapper around AggregatorManager that handles only lifecycle management

func NewAggregatorService

func NewAggregatorService(
	config aggregator.AggregatorConfig,
	orchestratorAPI api.OrchestratorAPI,
	serviceRegistry api.ServiceRegistryHandler,
) *AggregatorService

NewAggregatorService creates a new aggregator service

func (*AggregatorService) GetEndpoint

func (s *AggregatorService) GetEndpoint() string

GetEndpoint returns the aggregator's SSE endpoint URL

func (*AggregatorService) GetManager

GetManager returns the underlying aggregator manager for advanced operations

func (*AggregatorService) GetServiceData

func (s *AggregatorService) GetServiceData() map[string]interface{}

GetServiceData implements ServiceDataProvider

func (*AggregatorService) ManualRefresh

func (s *AggregatorService) ManualRefresh(ctx context.Context) error

ManualRefresh manually triggers a refresh of healthy MCP server registrations This can be useful for debugging or forced updates

func (*AggregatorService) Restart

func (s *AggregatorService) Restart(ctx context.Context) error

Restart restarts the aggregator service

func (*AggregatorService) Start

func (s *AggregatorService) Start(ctx context.Context) error

Start starts the aggregator service

func (*AggregatorService) Stop

func (s *AggregatorService) Stop(ctx context.Context) error

Stop stops the aggregator service

Jump to

Keyboard shortcuts

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