Documentation
¶
Overview ¶
Package policy defines storage-independent MCP policy configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled"`
AuditLog string `yaml:"audit_log,omitempty"`
ApprovalThreshold string `yaml:"approval_threshold,omitempty"` // "safe"|"moderate"|"dangerous"
BlockedPatterns []string `yaml:"blocked_patterns,omitempty"`
ProtectedPaths []string `yaml:"protected_paths,omitempty"`
NodeOverrides map[string]NodeConfig `yaml:"nodes,omitempty"`
// NoElicitFallback controls behavior when the MCP client does not support
// Elicitation (e.g. Gemini CLI).
// "deny" — reject all operations that need approval (most secure)
// "allow" — allow all, trust client-side tool approval + ToolAnnotations
// "downgrade" — allow moderate, still deny dangerous (recommended default)
NoElicitFallback string `yaml:"no_elicit_fallback,omitempty"`
}
Config configures the MCP safety guardrail.
type NodeConfig ¶
type NodeConfig struct {
ApprovalThreshold string `yaml:"approval_threshold"`
}
NodeConfig holds per-node (glob pattern) policy overrides.
Click to show internal directories.
Click to hide internal directories.