Documentation
¶
Overview ¶
Package analyzer receives signed watch alerts and investigates them through a read-only MCP connection and a function-calling model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Report struct {
Language string `yaml:"language"`
SuggestActions bool `yaml:"suggest_actions"`
ApprovalURL string `yaml:"approval_url"`
} `yaml:"report"`
Listen string `yaml:"listen"`
SecretFile string `yaml:"secret_file"`
MCP struct {
Endpoint string `yaml:"endpoint"`
TokenFile string `yaml:"token_file"`
} `yaml:"mcp"`
Model struct {
Backend string `yaml:"backend"`
Codex struct {
Binary string `yaml:"binary"`
ConfigDir string `yaml:"config_dir"`
} `yaml:"codex"`
Claude struct {
Binary string `yaml:"binary"`
ConfigDir string `yaml:"config_dir"`
MaxTurns int `yaml:"max_turns"`
MaxBudgetUSD float64 `yaml:"max_budget_usd"`
} `yaml:"claude"`
Endpoint string `yaml:"endpoint"`
Name string `yaml:"name"`
APIKeyFile string `yaml:"api_key_file"`
} `yaml:"model"`
Forward struct {
URL string `yaml:"url"`
SecretFile string `yaml:"secret_file"`
AllowPrivateHTTP bool `yaml:"allow_private_http"`
} `yaml:"forward"`
DiscordURLFile string `yaml:"discord_url_file"`
WarningsOnly bool `yaml:"warnings_only"`
BatchWindow time.Duration `yaml:"batch_window"`
Cooldown time.Duration `yaml:"cooldown"`
Timeout time.Duration `yaml:"timeout"`
QueueSize int `yaml:"queue_size"`
MaxToolCalls int `yaml:"max_tool_calls"`
MaxRounds int `yaml:"max_rounds"`
MaxCompletionTokens int `yaml:"max_completion_tokens"`
MaxTotalTokens int `yaml:"max_total_tokens"`
MaxContextBytes int `yaml:"max_context_bytes"`
ToolOutputBytes int `yaml:"tool_output_bytes"`
}
Config is independent of the opsgate MCP server configuration.
func Default ¶
func Default() Config
Default returns bounded investigation settings. No model is selected implicitly.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a bounded, in-memory investigation queue and webhook handler. One worker serializes investigations, limiting model spending and MCP load.
func New ¶
New loads credentials without sending network requests. No watcher or model is started unless all files and endpoints are valid.