config

package
v0.1.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Upstreams

func Upstreams(meta map[string]interface{}) map[string]Upstream

Upstreams extracts upstream definitions from metadata.

func ValidateResourceRoots

func ValidateResourceRoots(meta map[string]interface{}) []string

ValidateResourceRoots returns warnings for invalid resource root settings.

Types

type Group

type Group[T any] struct {
	URL   string `yaml:"url,omitempty" json:"url,omitempty"`
	Items []T    `yaml:"items,omitempty" json:"items,omitempty"`
}

Group is a simple list wrapper used by config with an optional URL root.

type MCPClient

type MCPClient struct {
	*mcp.ClientOptions `yaml:",inline" json:",inline"`
	Async              []*asynccfg.Config     `yaml:"async,omitempty" json:"async,omitempty"`
	Descriptions       map[string]string      `yaml:"descriptions,omitempty" json:"descriptions,omitempty"`
	Metadata           map[string]interface{} `yaml:"metadata,omitempty" json:"metadata,omitempty"`
	// Cacheable marks specific tools on this MCP server as eligible for
	// prompt-history supersession. Keys are tool names (exact match);
	// values indicate cacheability.
	Cacheable map[string]bool `yaml:"cacheable,omitempty" json:"cacheable,omitempty"`
	// ToolTimeoutSec overrides the default tool execution timeout when invoking
	// tools on this MCP server. When zero, a system default applies.
	ToolTimeoutSec int `yaml:"toolTimeoutSec,omitempty" json:"toolTimeoutSec,omitempty"`
}

MCPClient augments mcp.ClientOptions with optional discovery descriptions and metadata.

type ResourceRoot

type ResourceRoot struct {
	ID           string
	URI          string
	Description  string
	Include      []string
	Exclude      []string
	MaxSizeBytes int64
	Vectorize    bool
	Snapshot     bool
	SnapshotMD5  bool
	AllowGrep    bool
	UpstreamRef  string
	SnapshotURI  string
	SnapshotRoot string
}

ResourceRoot describes a root entry under MCP client metadata.resources.roots.

func ResourceRoots

func ResourceRoots(meta map[string]interface{}) []ResourceRoot

ResourceRoots extracts resource root metadata from a generic metadata map.

type Upstream

type Upstream struct {
	Name               string
	Driver             string
	DSN                string
	Secret             *scy.Resource
	Shadow             string
	Batch              int
	Force              bool
	Enabled            bool
	MinIntervalSeconds int
}

Upstream describes an upstream database used for embedius sync/bootstrap.

func ResolveUpstream

func ResolveUpstream(meta map[string]interface{}, root ResourceRoot) (*Upstream, bool)

ResolveUpstream returns the upstream referenced by a root, if any.

Jump to

Keyboard shortcuts

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