config

package
v0.0.0-...-7d1323b Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Type           string   `json:"type"`
	Token          string   `json:"token,omitempty"`
	TokenEnv       string   `json:"tokenEnv,omitempty"`
	Audience       string   `json:"audience,omitempty"`
	IncludeEmail   bool     `json:"includeEmail,omitempty"`
	Scopes         []string `json:"scopes,omitempty"`
	ServiceAccount string   `json:"serviceAccount,omitempty"`
}

type Config

type Config struct {
	Servers map[string]ServerConfig `json:"servers"`
}

func Load

func Load(path string) (*Config, error)

type DirectTools

type DirectTools struct {
	All   bool
	Names []string
}

DirectTools controls which tools are exposed directly on the proxy server. It unmarshal from either a JSON boolean or a JSON array of tool name strings.

func (*DirectTools) Enabled

func (d *DirectTools) Enabled() bool

func (*DirectTools) Includes

func (d *DirectTools) Includes(name string) bool

func (*DirectTools) UnmarshalJSON

func (d *DirectTools) UnmarshalJSON(data []byte) error

type NoPrefix

type NoPrefix struct {
	All   bool
	Names []string
}

NoPrefix controls which tools omit the server name prefix. It unmarshals from either a JSON boolean or a JSON array of tool name strings.

func (*NoPrefix) Enabled

func (n *NoPrefix) Enabled() bool

func (*NoPrefix) Includes

func (n *NoPrefix) Includes(name string) bool

func (*NoPrefix) UnmarshalJSON

func (n *NoPrefix) UnmarshalJSON(data []byte) error

type ServerConfig

type ServerConfig struct {
	// HTTP upstream
	URL     string            `json:"url,omitempty"`
	Headers map[string]string `json:"headers,omitempty"` // extra HTTP headers
	// Stdio upstream
	Command string            `json:"command,omitempty"`
	Args    []string          `json:"args,omitempty"`
	Env     map[string]string `json:"env,omitempty"` // extra env vars for subprocess
	// Auth
	Auth *AuthConfig `json:"auth,omitempty"`
	// Eager connects to this server at startup instead of on first use.
	Eager bool `json:"eager,omitempty"`
	// Keepalive is the interval for sending pings to keep the connection alive (e.g. "30s").
	// Zero or omitted disables keepalive.
	Keepalive string `json:"keepalive,omitempty"`
	// DirectTools exposes tools directly on the proxy. true = all tools,
	// ["tool1","tool2"] = only those tools (rest go through discover/call).
	DirectTools DirectTools `json:"directTools,omitempty"`
	// NoPrefix omits the server name prefix from tool names (toolname instead of server-toolname).
	// true = all tools, ["tool1","tool2"] = only those tools.
	// Use only when tool names are unique across all servers.
	NoPrefix NoPrefix `json:"noPrefix,omitempty"`
	// ExcludeTools lists tool names to hide from the LLM.
	ExcludeTools []string `json:"excludeTools,omitempty"`
}

Jump to

Keyboard shortcuts

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