Versions in this module Expand all Collapse all v0 v0.3.0 Jun 11, 2026 Changes in this version + const ProviderAzureOpenAI + const ProviderBedrock + const ProviderGroq + const ProviderOpenRouter v0.2.0 Jun 9, 2026 Changes in this version + const ApprovalTimeout + const ChannelEmail + const ChannelSlack + const ChannelTelegram + const ChannelWhatsApp + const ProviderClaude + const ProviderDeepSeek + const ProviderGemini + const ProviderOllama + const ProviderOpenAI + var ErrBudgetExceeded = fmt.Errorf("messaging: daily AI budget exceeded") + type AIGateway struct + func NewAIGateway(cfg AIGatewayConfig) (*AIGateway, error) + func (g *AIGateway) Complete(ctx context.Context, prompt, systemPrompt string) (string, error) + func (g *AIGateway) Cost() float64 + func (g *AIGateway) CostToday() CostSnapshot + func (g *AIGateway) ProviderNames() []string + func (g *AIGateway) ResetDailyCost() + type AIGatewayConfig struct + Client *http.Client + CostPerToken map[string]float64 + DailyBudget float64 + DefaultModel string + Providers []AIProvider + type AIProvider struct + APIKey string + Endpoint string + Models []string + Name string + Priority int + type ApprovalManager struct + func NewApprovalManager(tg *TelegramBot, chatID int64, timeout time.Duration) *ApprovalManager + func (m *ApprovalManager) ApprovalFunc() agents.ApprovalFunc + func (m *ApprovalManager) Resolve(callbackData string) bool + type CallbackResolver interface + Resolve func(callbackData string) bool + type ClarifyQuestion struct + Key string + Options []string + Question string + type CommandHooks struct + Approve func(sessionID string, ok bool) (string, bool) + ClarifySubmit func(sessionID, answer string) + Cost func() string + List func(path string) string + Routes func() string + Status func() string + type CostSnapshot struct + DailyBudget float64 + Free bool + Provider string + RemainingBudget float64 + RequestsToday int + TotalUSD float64 + type NotificationConfig struct + DefaultChatID int64 + DefaultPhone string + Rules []NotificationRule + Slack *SlackBot + Telegram *TelegramBot + WhatsApp *WhatsAppBot + type NotificationRule struct + Channels []string + Severity Severity + SilenceUntil time.Time + type Router struct + func NewRouter(cfg NotificationConfig) *Router + func (r *Router) ConfiguredChannels() []string + func (r *Router) Send(ctx context.Context, severity Severity, title, body string) error + func (r *Router) SendFile(ctx context.Context, filename string, data []byte, caption string) error + func (r *Router) Silence(channel string, duration time.Duration) + type Severity string + const SeverityCritical + const SeverityInfo + const SeverityWarn + func (s Severity) String() string + type SlackBot struct + func NewSlackBot(cfg SlackConfig) (*SlackBot, error) + func (s *SlackBot) HandleSlashCommand(runtime *agents.Runtime) http.Handler + func (s *SlackBot) SendAlert(ctx context.Context, title, body, severity string) error + func (s *SlackBot) SendMessage(ctx context.Context, text string) error + type SlackConfig struct + BotToken string + Client *http.Client + SigningSecret string + WebhookURL string + type TelegramBot struct + func NewTelegramBot(cfg TelegramConfig) (*TelegramBot, error) + func (t *TelegramBot) HandleWebhook(runtime *agents.Runtime) http.Handler + func (t *TelegramBot) Poll(ctx context.Context, runtime *agents.Runtime, interval time.Duration) + func (t *TelegramBot) SendApprovalRequest(ctx context.Context, chatID int64, ...) error + func (t *TelegramBot) SendClarifyingQuestions(ctx context.Context, chatID int64, session string, qs []ClarifyQuestion) error + func (t *TelegramBot) SendFile(ctx context.Context, chatID int64, filename string, data []byte, ...) error + func (t *TelegramBot) SendMessage(ctx context.Context, chatID int64, text string) error + func (t *TelegramBot) SetCallbackResolver(r CallbackResolver) + func (t *TelegramBot) SetCommandHooks(h CommandHooks) + func (t *TelegramBot) SetCommands(ctx context.Context) error + func (t *TelegramBot) SetWebhook(ctx context.Context, url string) error + type TelegramConfig struct + AllowedIDs []int64 + BaseURL string + Client *http.Client + SecretToken string + Token string + WebhookURL string + type WhatsAppBot struct + func NewWhatsAppBot(cfg WhatsAppConfig) (*WhatsAppBot, error) + func (wb *WhatsAppBot) HandleWebhook(runtime *agents.Runtime) http.Handler + func (wb *WhatsAppBot) SendApprovalRequest(ctx context.Context, to, description string) error + func (wb *WhatsAppBot) SendImage(ctx context.Context, to string, imageData []byte, caption string) error + func (wb *WhatsAppBot) SendText(ctx context.Context, to, text string) error + type WhatsAppConfig struct + AccessToken string + AppSecret string + BaseURL string + Client *http.Client + PhoneNumberID string + VerifyToken string