Handler implements the ChatCLIService gRPC server.
| 34 | |
| 35 | // Handler implements the ChatCLIService gRPC server. |
| 36 | type Handler struct { |
| 37 | pb.UnimplementedChatCLIServiceServer |
| 38 | |
| 39 | llmManager manager.LLMManager |
| 40 | sessionManager SessionStore |
| 41 | logger *zap.Logger |
| 42 | |
| 43 | // default provider/model from server config |
| 44 | defaultProvider string |
| 45 | defaultModel string |
| 46 | |
| 47 | // K8s watcher context injection (optional, set when watcher is active) |
| 48 | watcherContextFunc func() string |
| 49 | watcherStatusFunc func() string // compact status summary |
| 50 | watcherStatsFunc func() (alertCount, snapshotCount, podCount int) |
| 51 | watcherAlertsFunc func() []AlertInfo // raw alerts for AIOps operator |
| 52 | watcherDeployment string |
| 53 | watcherNamespace string |
| 54 | |
| 55 | // Prometheus metrics (optional, nil when metrics are disabled) |
| 56 | llmMetrics *metrics.LLMMetrics |
| 57 | sessionMetrics *metrics.SessionMetrics |
| 58 | |
| 59 | // Remote resource discovery (optional, nil when not configured) |
| 60 | pluginManager *plugins.Manager |
| 61 | personaLoader *persona.Loader |
| 62 | |
| 63 | // Provider fallback chain (optional, nil when not configured) |
| 64 | fallbackChain *fallback.Chain |
| 65 | |
| 66 | // MCP manager (optional, nil when not configured) |
| 67 | mcpManager *mcp.Manager |
| 68 | |
| 69 | // Security: SSRF validator for provider URL checking (H1) |
| 70 | ssrfValidator *SSRFValidator |
| 71 | |
| 72 | // Conversation hub broker for cross-channel continuity (optional, nil when |
| 73 | // the hub is disabled). Set via SetHub. |
| 74 | hub hub.Broker |
| 75 | } |
| 76 | |
| 77 | // SessionStore abstracts session persistence for testability. |
| 78 | type SessionStore interface { |
nothing calls this directly
no outgoing calls
no test coverage detected