MCPcopy Create free account
hub / github.com/diillson/chatcli / Handler

Struct Handler

server/handler.go:36–75  ·  view source on GitHub ↗

Handler implements the ChatCLIService gRPC server.

Source from the content-addressed store, hash-verified

34
35// Handler implements the ChatCLIService gRPC server.
36type 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.
78type SessionStore interface {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected