Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentBackendConfig ¶
type AgentBackendConfig struct {
Allowed bool `yaml:"allowed"`
ToolDenylist []string `yaml:"tool_denylist"`
RateLimits map[string]RateLimitConfig `yaml:"rate_limits"`
ApprovalRequired []string `yaml:"approval_required"`
}
AgentBackendConfig defines an agent's access to a specific backend.
type AgentConfig ¶
type AgentConfig struct {
DisplayName string `yaml:"display_name"`
Backends map[string]AgentBackendConfig `yaml:"backends"`
}
AgentConfig defines per-agent access rules.
type ApprovalConfig ¶
type ApprovalConfig struct {
Feishu FeishuConfig `yaml:"feishu"`
Generic GenericWebhookConfig `yaml:"generic"`
Timeout time.Duration `yaml:"timeout"`
CallbackBaseURL string `yaml:"callback_base_url"`
}
ApprovalConfig holds approval system settings.
type AuditConfig ¶
type AuditConfig struct {
DBPath string `yaml:"db_path"`
RetentionDays int `yaml:"retention_days"`
}
AuditConfig holds audit logging settings.
type BackendConfig ¶
type BackendConfig struct {
URL string `yaml:"url"`
HealthURL string `yaml:"health_url"`
Timeout time.Duration `yaml:"timeout"`
}
BackendConfig defines an upstream MCP server.
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
Backends map[string]BackendConfig `yaml:"backends"`
Queue map[string]QueueConfig `yaml:"queue"`
Agents map[string]AgentConfig `yaml:"agents"`
Approval ApprovalConfig `yaml:"approval"`
Audit AuditConfig `yaml:"audit"`
}
Config is the root configuration structure.
type FeishuConfig ¶
type FeishuConfig struct {
WebhookURL string `yaml:"webhook_url"`
}
FeishuConfig holds Feishu webhook settings.
type GenericWebhookConfig ¶ added in v0.1.4
type GenericWebhookConfig struct {
WebhookURL string `yaml:"webhook_url"`
}
GenericWebhookConfig holds generic webhook settings.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles configuration loading and provides thread-safe access.
func NewManager ¶
NewManager creates a Manager and loads the config from the given path.
func NewManagerFromConfig ¶ added in v0.1.6
NewManagerFromConfig creates a Manager from a Config struct directly. Useful for tests and programmatic configuration (e.g., demo mode).
type QueueConfig ¶
type QueueConfig struct {
Enabled bool `yaml:"enabled"`
DelayMin time.Duration `yaml:"delay_min"`
DelayMax time.Duration `yaml:"delay_max"`
MaxPending int `yaml:"max_pending"`
BypassTools []string `yaml:"bypass_tools"`
GlobalRateLimits map[string]RateLimitConfig `yaml:"global_rate_limits"`
}
QueueConfig defines FIFO queue settings per backend.
type RateLimitConfig ¶
type RateLimitConfig struct {
Window time.Duration `yaml:"window"`
MaxCount int `yaml:"max_count"`
}
RateLimitConfig defines a sliding window rate limit.