aggregator

package
v0.59.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedTool

type AggregatedTool struct {
	Name         string // Potentially prefixed with upstream name
	OriginalName string // Original tool name from upstream
	UpstreamName string
	Description  string
	InputSchema  any
}

AggregatedTool represents a tool with its upstream origin.

type Aggregator

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

Aggregator combines and manages tools from multiple upstreams.

func NewAggregator

func NewAggregator(config *types.ProxyConfig) *Aggregator

NewAggregator creates a new tool aggregator.

func (*Aggregator) AggregateTools

func (agg *Aggregator) AggregateTools(allTools map[string][]upstream.ToolInfo) []AggregatedTool

AggregateTools combines tools from all upstreams, applying filters and handling name conflicts.

func (*Aggregator) GetOriginalToolName

func (agg *Aggregator) GetOriginalToolName(toolName string) string

GetOriginalToolName extracts the original tool name from a potentially prefixed name.

func (*Aggregator) GetTools

func (agg *Aggregator) GetTools() []AggregatedTool

GetTools returns all aggregated tools.

func (*Aggregator) GetUpstreamForTool

func (agg *Aggregator) GetUpstreamForTool(toolName string) (string, error)

GetUpstreamForTool returns the upstream name for a given tool.

type Filter

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

Filter handles tool filtering based on include and ignore patterns.

func NewFilter

func NewFilter(includeTools, ignoreTools []string) *Filter

NewFilter creates a new filter with the given include and ignore patterns.

func (*Filter) ShouldInclude

func (f *Filter) ShouldInclude(toolName string) bool

ShouldInclude returns true if the tool should be included based on filter rules. Logic: - If include patterns exist, tool must match at least one include pattern - If ignore patterns exist, tool must NOT match any ignore pattern - If both exist, tool must match include AND not match ignore

Jump to

Keyboard shortcuts

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