projection

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnabledServerIDs

func EnabledServerIDs(servers []config.MCPServer, client string) []string

EnabledServerIDs returns sorted MCP server ids enabled for the client.

Types

type Approvals

type Approvals struct {
	AllowCommands bool
	AllowMCP      bool
	Commands      []string
}

Approvals captures the resolved approvals policy and allowlist.

func BuildApprovals

func BuildApprovals(cfg config.Config, commands []string) Approvals

BuildApprovals resolves approvals.mode into per-feature flags.

type EnvVarResolver

type EnvVarResolver = config.EnvVarReplacer

EnvVarResolver returns a replacement string for a resolved env var.

func ClientPlaceholderResolver added in v0.5.6

func ClientPlaceholderResolver(clientSyntax string) EnvVarResolver

ClientPlaceholderResolver returns a resolver that preserves placeholders in client-specific syntax. clientSyntax is a format string like "${%s}" or "${env:%s}" where %s is the env var name. Built-in placeholders (like AL_REPO_ROOT) are resolved to their actual values.

func FullValueResolver added in v0.5.6

func FullValueResolver(_ map[string]string) EnvVarResolver

FullValueResolver returns a resolver that keeps resolved env values. Missing values still error during substitution before the resolver runs.

type MCPServerResolveError added in v0.5.6

type MCPServerResolveError struct {
	ServerID string
	Err      error
}

MCPServerResolveError wraps a server-specific resolve error.

func (*MCPServerResolveError) Error added in v0.5.6

func (e *MCPServerResolveError) Error() string

func (*MCPServerResolveError) Unwrap added in v0.5.6

func (e *MCPServerResolveError) Unwrap() error

type ResolvedMCPServer

type ResolvedMCPServer struct {
	ID            string
	Transport     string
	URL           string
	Headers       map[string]string
	HTTPTransport string
	Command       string
	Args          []string
	Env           map[string]string
}

ResolvedMCPServer is a normalized MCP server with env substitution applied.

func ResolveEnabledMCPServers added in v0.5.6

func ResolveEnabledMCPServers(servers []config.MCPServer, env map[string]string) ([]ResolvedMCPServer, error)

ResolveEnabledMCPServers resolves all enabled MCP servers without client filtering. This is useful for operations like doctor checks that need to connect to all servers.

func ResolveMCPServers

func ResolveMCPServers(servers []config.MCPServer, env map[string]string, client string, resolver EnvVarResolver) ([]ResolvedMCPServer, error)

ResolveMCPServers filters and resolves MCP servers for a client.

Jump to

Keyboard shortcuts

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