aggregator

package
v0.59.134 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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