Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
revert: remove accidentally committed WIP OpenCode changes
rcourtmanb177812fd3d7
diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsxindex b359c09433..d9f3bb5815 100644--- a/frontend-modern/src/App.tsx+++ b/frontend-modern/src/App.tsx@@ -48,7 +48,7 @@ import { TokenRevealDialog } from './components/TokenRevealDialog';import { useAlertsActivation } from './stores/alertsActivation';import { UpdateProgressModal } from './components/UpdateProgressModal';import type { UpdateStatus } from './api/updates';-import { AIChat } from './components/AI/Chat';+import { AIChat } from './components/AI/AIChat';import { AIStatusIndicator } from './components/AI/AIStatusIndicator';import { aiChatStore } from './stores/aiChat';import { useResourcesAsLegacy } from './hooks/useResources';diff --git a/internal/ai/service.go b/internal/ai/service.goindex ad6bd7916e..71953bafb4 100644--- a/internal/ai/service.go+++ b/internal/ai/service.go@@ -226,15 +226,6 @@ func (s *Service) GetPatrolService() *PatrolService {return s.patrolService}-// GetRemediationLog returns the remediation log from the patrol service.-func (s *Service) GetRemediationLog() *memory.RemediationLog {- patrol := s.GetPatrolService()- if patrol == nil {- return nil- }- return patrol.GetRemediationLog()-}-// GetAlertTriggeredAnalyzer returns the alert-triggered analyzer for token-efficient real-time analysisfunc (s *Service) GetAlertTriggeredAnalyzer() *AlertTriggeredAnalyzer {s.mu.RLock()@@ -970,13 +961,6 @@ func (s *Service) GetConfig() *config.AIConfig {return &cfg}-// GetCommandPolicy returns the command policy for security checks-func (s *Service) GetCommandPolicy() CommandPolicy {- s.mu.RLock()- defer s.mu.RUnlock()- return s.policy-}-// GetDebugContext returns debug information about what context would be sent to the AIfunc (s *Service) GetDebugContext(req ExecuteRequest) map[string]interface{} {s.mu.RLock()@@ -3232,12 +3216,6 @@ This is a 3-command job. Don't over-investigate.`return prompt}-// BuildSystemPromptForOpenCode builds a system prompt for use with OpenCode integration.-// This is a public wrapper around the internal buildSystemPrompt for the OpenCode service.-func (s *Service) BuildSystemPromptForOpenCode(req ExecuteRequest) string {- return s.buildSystemPrompt(req)-}-// formatContextKey converts snake_case keys to readable labelsfunc formatContextKey(key string) string {replacements := map[string]string{diff --git a/internal/api/router.go b/internal/api/router.goindex bb2bac3e95..e22677b9a7 100644--- a/internal/api/router.go+++ b/internal/api/router.go@@ -57,7 +57,6 @@ type Router struct {temperatureProxyHandlers *TemperatureProxyHandlerssystemSettingsHandler *SystemSettingsHandleraiSettingsHandler *AISettingsHandler- aiHandler *AIHandlerresourceHandlers *ResourceHandlersreportingHandlers *ReportingHandlersconfigProfileHandler *ConfigProfileHandler@@ -72,8 +71,6 @@ type Router struct {persistence *config.ConfigPersistenceoidcMu sync.MutexoidcService *OIDCService- ssoConfig *config.SSOConfig- samlManager *SAMLServiceManagerauthorizer auth.Authorizerwrapped http.HandlerserverVersion string@@ -136,12 +133,6 @@ func NewRouter(cfg *config.Config, monitor *monitoring.Monitor, wsHub *websocketupdateManager := updates.NewManager(cfg)updateManager.SetHistory(updateHistory)- // Determine base URL for SSO callbacks- baseURL := cfg.PublicURL- if baseURL == "" {- baseURL = fmt.Sprintf("http://localhost:%d", cfg.FrontendPort)- }-r := &Router{mux: http.NewServeMux(),config: cfg,@@ -157,8 +148,6 @@ func NewRouter(cfg *config.Config, monitor *monitoring.Monitor, wsHub *websocketserverVersion: strings.TrimSpace(serverVersion),projectRoot: projectRoot,checksumCache: make(map[string]checksumCacheEntry),- ssoConfig: config.NewSSOConfig(),- samlManager: NewSAMLServiceManager(baseURL),}// Sync the configured admin user to the authorizer (if supported)@@ -521,8 +510,6 @@ func (r *Router) setupRoutes() {r.mux.HandleFunc("GET /api/audit", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceAuditLogs, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureAuditLogging, RequireScope(config.ScopeSettingsRead, auditHandlers.HandleListAuditEvents))))r.mux.HandleFunc("GET /api/audit/", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceAuditLogs, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureAuditLogging, RequireScope(config.ScopeSettingsRead, auditHandlers.HandleListAuditEvents))))r.mux.HandleFunc("GET /api/audit/{id}/verify", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceAuditLogs, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureAuditLogging, RequireScope(config.ScopeSettingsRead, auditHandlers.HandleVerifyAuditEvent))))- r.mux.HandleFunc("GET /api/audit/export", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceAuditLogs, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureAuditLogging, RequireScope(config.ScopeSettingsRead, auditHandlers.HandleExportAuditEvents))))- r.mux.HandleFunc("GET /api/audit/summary", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceAuditLogs, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureAuditLogging, RequireScope(config.ScopeSettingsRead, auditHandlers.HandleAuditSummary))))// RBAC routes (Phase 2 - Enterprise feature)r.mux.HandleFunc("/api/admin/roles", RequirePermission(r.config, r.authorizer, auth.ActionAdmin, auth.ResourceUsers, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureRBAC, rbacHandlers.HandleRoles)))@@ -530,11 +517,6 @@ func (r *Router) setupRoutes() {r.mux.HandleFunc("/api/admin/users", RequirePermission(r.config, r.authorizer, auth.ActionAdmin, auth.ResourceUsers, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureRBAC, rbacHandlers.HandleGetUsers)))r.mux.HandleFunc("/api/admin/users/", RequirePermission(r.config, r.authorizer, auth.ActionAdmin, auth.ResourceUsers, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureRBAC, rbacHandlers.HandleUserRoleActions)))- // RBAC Pro routes (role inheritance, changelog, effective permissions)- r.mux.HandleFunc("GET /api/admin/rbac/changelog", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceAuditLogs, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureRBAC, rbacHandlers.HandleRBACChangelog)))- r.mux.HandleFunc("GET /api/admin/roles/{id}/effective", RequirePermission(r.config, r.authorizer, auth.ActionAdmin, auth.ResourceUsers, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureRBAC, rbacHandlers.HandleRoleEffective)))- r.mux.HandleFunc("GET /api/admin/users/{username}/effective-permissions", RequirePermission(r.config, r.authorizer, auth.ActionAdmin, auth.ResourceUsers, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureRBAC, rbacHandlers.HandleUserEffectivePermissions)))-// Advanced Reporting routesr.mux.HandleFunc("/api/admin/reports/generate", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceNodes, RequireLicenseFeature(r.licenseHandlers.Service(), license.FeatureAdvancedReporting, RequireScope(config.ScopeSettingsRead, r.reportingHandlers.HandleGenerateReport))))@@ -555,38 +537,6 @@ func (r *Router) setupRoutes() {r.mux.HandleFunc("/api/security/oidc", RequireAdmin(r.config, RequireScope(config.ScopeSettingsWrite, r.handleOIDCConfig)))r.mux.HandleFunc("/api/oidc/login", r.handleOIDCLogin)r.mux.HandleFunc(config.DefaultOIDCCallbackPath, r.handleOIDCCallback)-- // SAML SSO routes - dynamic provider-based endpoints- r.mux.HandleFunc("/api/saml/", func(w http.ResponseWriter, req *http.Request) {- // Route SAML requests based on path: /api/saml/{providerID}/{action}- path := strings.TrimPrefix(req.URL.Path, "/api/saml/")- parts := strings.SplitN(path, "/", 2)- if len(parts) < 2 {- writeErrorResponse(w, http.StatusBadRequest, "invalid_path", "Invalid SAML endpoint path", nil)- return- }- action := parts[1]- switch action {- case "login":- r.handleSAMLLogin(w, req)- case "acs":- r.handleSAMLACS(w, req)- case "metadata":- r.handleSAMLMetadata(w, req)- case "logout":- r.handleSAMLLogout(w, req)- case "slo":- r.handleSAMLSLO(w, req)- default:- writeErrorResponse(w, http.StatusNotFound, "not_found", "Unknown SAML endpoint", nil)- }- })-- // SSO providers management API- r.mux.HandleFunc("/api/security/sso/providers/test", RequireAdmin(r.config, RequireScope(config.ScopeSettingsWrite, r.handleTestSSOProvider)))- r.mux.HandleFunc("/api/security/sso/providers/metadata/preview", RequireAdmin(r.config, RequireScope(config.ScopeSettingsWrite, r.handleMetadataPreview)))- r.mux.HandleFunc("/api/security/sso/providers", RequireAdmin(r.config, RequireScope(config.ScopeSettingsWrite, r.handleSSOProviders)))- r.mux.HandleFunc("/api/security/sso/providers/", RequireAdmin(r.config, RequireScope(config.ScopeSettingsWrite, r.handleSSOProvider)))r.mux.HandleFunc("/api/security/tokens", RequirePermission(r.config, r.authorizer, auth.ActionAdmin, auth.ResourceUsers, func(w http.ResponseWriter, req *http.Request) {switch req.Method {case http.MethodGet:@@ -758,35 +708,6 @@ func (r *Router) setupRoutes() {}}- // Add SSO providers for multi-provider support- if r.ssoConfig != nil && len(r.ssoConfig.Providers) > 0 {- enabledProviders := make([]map[string]interface{}, 0)- for _, p := range r.ssoConfig.GetEnabledProviders() {- provider := map[string]interface{}{- "id": p.ID,- "name": p.Name,- "type": string(p.Type),- "displayName": p.DisplayName,- }- if provider["displayName"] == "" {- provider["displayName"] = p.Name- }- if p.IconURL != "" {- provider["iconUrl"] = p.IconURL- }- // Add login URL for each provider- if p.Type == config.SSOProviderTypeOIDC {- provider["loginUrl"] = "/api/oidc/login?provider=" + p.ID- } else if p.Type == config.SSOProviderTypeSAML {- provider["loginUrl"] = "/api/saml/" + p.ID + "/login"- }- enabledProviders = append(enabledProviders, provider)- }- if len(enabledProviders) > 0 {- status["ssoProviders"] = enabledProviders- }- }-// Add bootstrap token location for first-run setup UIif r.bootstrapTokenHash != "" {status["bootstrapTokenPath"] = r.bootstrapTokenPath@@ -1332,62 +1253,6 @@ func (r *Router) setupRoutes() {})}}-- // OpenCode-powered AI handler for chat- r.aiHandler = NewAIHandler(r.config, r.persistence, r.agentExecServer)-- // OpenCode chat endpoints (new SSE-based chat)- r.mux.HandleFunc("/api/ai/chat", RequireAuth(r.config, r.aiHandler.HandleChat))- r.mux.HandleFunc("/api/ai/status", RequireAuth(r.config, r.aiHandler.HandleStatus))- r.mux.HandleFunc("/api/ai/sessions", RequireAuth(r.config, func(w http.ResponseWriter, req *http.Request) {- switch req.Method {- case http.MethodGet:- r.aiHandler.HandleSessions(w, req)- case http.MethodPost:- r.aiHandler.HandleCreateSession(w, req)- default:- http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)- }- }))- r.mux.HandleFunc("/api/ai/sessions/", RequireAuth(r.config, func(w http.ResponseWriter, req *http.Request) {- // Extract session ID from path: /api/ai/sessions/{id}[/messages|/abort]- path := strings.TrimPrefix(req.URL.Path, "/api/ai/sessions/")- parts := strings.SplitN(path, "/", 2)- sessionID := parts[0]- if sessionID == "" {- http.Error(w, "Missing session ID", http.StatusBadRequest)- return- }-- if len(parts) == 1 {- // /api/ai/sessions/{id}- if req.Method == http.MethodDelete {- r.aiHandler.HandleDeleteSession(w, req, sessionID)- } else {- http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)- }- return- }-- // /api/ai/sessions/{id}/messages or /api/ai/sessions/{id}/abort- switch parts[1] {- case "messages":- if req.Method == http.MethodGet {- r.aiHandler.HandleMessages(w, req, sessionID)- } else {- http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)- }- case "abort":- if req.Method == http.MethodPost {- r.aiHandler.HandleAbort(w, req, sessionID)- } else {- http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)- }- default:- http.Error(w, "Not found", http.StatusNotFound)- }- }))-r.mux.HandleFunc("/api/settings/ai", RequirePermission(r.config, r.authorizer, auth.ActionRead, auth.ResourceSettings, RequireScope(config.ScopeSettingsRead, r.aiSettingsHandler.HandleGetAISettings)))r.mux.HandleFunc("/api/settings/ai/update", RequirePermission(r.config, r.authorizer, auth.ActionWrite, auth.ResourceSettings, RequireScope(config.ScopeSettingsWrite, r.aiSettingsHandler.HandleUpdateAISettings)))r.mux.HandleFunc("/api/ai/test", RequirePermission(r.config, r.authorizer, auth.ActionWrite, auth.ResourceSettings, RequireScope(config.ScopeSettingsWrite, r.aiSettingsHandler.HandleTestAIConnection)))@@ -1491,19 +1356,6 @@ func (r *Router) setupRoutes() {r.mux.HandleFunc("/api/ai/intelligence/anomalies", RequireAuth(r.config, r.aiSettingsHandler.HandleGetAnomalies))r.mux.HandleFunc("/api/ai/intelligence/learning", RequireAuth(r.config, r.aiSettingsHandler.HandleGetLearningStatus))- // AI Auto-Fix Approval Workflows (Pro feature)- r.mux.HandleFunc("GET /api/ai/approvals", RequireAuth(r.config, r.aiSettingsHandler.HandleListApprovals))- r.mux.HandleFunc("GET /api/ai/approvals/{id}", RequireAuth(r.config, r.aiSettingsHandler.HandleGetApproval))- r.mux.HandleFunc("POST /api/ai/approvals/{id}/approve", RequireAuth(r.config, r.aiSettingsHandler.HandleApproveCommand))- r.mux.HandleFunc("POST /api/ai/approvals/{id}/deny", RequireAuth(r.config, r.aiSettingsHandler.HandleDenyCommand))-- // AI Remediation Rollback (Pro feature)- r.mux.HandleFunc("GET /api/ai/remediations/rollbackable", RequireAuth(r.config, r.aiSettingsHandler.HandleGetRollbackable))- r.mux.HandleFunc("POST /api/ai/remediations/{id}/rollback", RequireAuth(r.config, r.aiSettingsHandler.HandleRollback))-- // AI Dry-Run Simulation- r.mux.HandleFunc("POST /api/ai/simulate", RequireAuth(r.config, r.aiSettingsHandler.HandleDryRunSimulate))-// AI Chat Sessions - sync across devicesr.mux.HandleFunc("/api/ai/chat/sessions", RequireAuth(r.config, r.aiSettingsHandler.HandleListAIChatSessions))r.mux.HandleFunc("/api/ai/chat/sessions/", RequireAuth(r.config, func(w http.ResponseWriter, req *http.Request) {@@ -1927,24 +1779,6 @@ func (r *Router) StopPatrol() {}}-// StartOpenCode starts the OpenCode-powered AI service-func (r *Router) StartOpenCode(ctx context.Context) {- if r.aiHandler != nil && r.monitor != nil {- if err := r.aiHandler.Start(ctx, r.monitor); err != nil {- log.Error().Err(err).Msg("Failed to start OpenCode AI service")- }- }-}--// StopOpenCode stops the OpenCode AI service-func (r *Router) StopOpenCode(ctx context.Context) {- if r.aiHandler != nil {- if err := r.aiHandler.Stop(ctx); err != nil {- log.Error().Err(err).Msg("Failed to stop OpenCode AI service")- }- }-}-// startBaselineLearning runs a background loop that learns baselines from metrics history// This enables anomaly detection by understanding what "normal" looks like for each resourcefunc (r *Router) startBaselineLearning(ctx context.Context, store *ai.BaselineStore, metricsHistory *monitoring.MetricsHistory) {@@ -2234,7 +2068,6 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {"/api/login", // Add login endpoint as public"/api/oidc/login",config.DefaultOIDCCallbackPath,- "/api/saml/", // All SAML endpoints are public (login, ACS, metadata, etc.)"/install-docker-agent.sh", // Docker agent bootstrap script must be public"/install-container-agent.sh", // Container agent bootstrap script must be public"/download/pulse-docker-agent", // Agent binary download should not require authdiff --git a/internal/config/ai.go b/internal/config/ai.goindex bdb0df4dcb..bce3e542c6 100644--- a/internal/config/ai.go+++ b/internal/config/ai.go@@ -61,12 +61,6 @@ type AIConfig struct {// AI cost controls// Budget is expressed as an estimated USD amount over a 30-day window (pro-rated in UI for other ranges).CostBudgetUSD30d float64 `json:"cost_budget_usd_30d,omitempty"`-- // OpenCode integration - experimental feature to use OpenCode as the AI backend- // When enabled, chat and patrol use OpenCode instead of the built-in provider system- UseOpenCode bool `json:"use_opencode,omitempty"` // Enable OpenCode backend (experimental)- OpenCodeDataDir string `json:"opencode_data_dir,omitempty"` // Data directory for OpenCode (default: ~/.opencode)- OpenCodePort int `json:"opencode_port,omitempty"` // Port for OpenCode server (0 = auto-assign)}// AIProvider constantsdiff --git a/pkg/server/server.go b/pkg/server/server.goindex bd9a0027e0..ae96b18316 100644--- a/pkg/server/server.go+++ b/pkg/server/server.go@@ -15,20 +15,16 @@ import ("github.com/prometheus/client_golang/prometheus/promhttp""github.com/rcourtman/pulse-go-rewrite/internal/agentbinaries"- "github.com/rcourtman/pulse-go-rewrite/internal/ai/approval""github.com/rcourtman/pulse-go-rewrite/internal/alerts""github.com/rcourtman/pulse-go-rewrite/internal/api""github.com/rcourtman/pulse-go-rewrite/internal/config"- "github.com/rcourtman/pulse-go-rewrite/internal/crypto""github.com/rcourtman/pulse-go-rewrite/internal/license""github.com/rcourtman/pulse-go-rewrite/internal/logging"_ "github.com/rcourtman/pulse-go-rewrite/internal/mock" // Import for init() to run"github.com/rcourtman/pulse-go-rewrite/internal/monitoring""github.com/rcourtman/pulse-go-rewrite/internal/websocket"- "github.com/rcourtman/pulse-go-rewrite/pkg/audit""github.com/rcourtman/pulse-go-rewrite/pkg/auth""github.com/rcourtman/pulse-go-rewrite/pkg/metrics"- "github.com/rcourtman/pulse-go-rewrite/pkg/reporting""github.com/rs/zerolog/log")@@ -92,92 +88,17 @@ func Run(ctx context.Context, version string) error {// Initialize license public key for Pro feature validationlicense.InitPublicKey()- // Create license service early for feature checks- licenseService := license.NewService()-// Initialize RBAC manager for role-based access controldataDir := os.Getenv("PULSE_DATA_DIR")if dataDir == "" {dataDir = "/etc/pulse"}-- // Use SQLite-backed manager for Pro features, file-based for Community- if licenseService.HasFeature(license.FeatureRBAC) {- sqliteManager, err := auth.NewSQLiteManager(auth.SQLiteManagerConfig{- DataDir: dataDir,- MigrateFromFiles: true, // Automatically migrate from file-based storage- })- if err != nil {- log.Warn().Err(err).Msg("Failed to initialize SQLite RBAC manager, falling back to file-based")- // Fall back to file-based manager- fileManager, fileErr := auth.NewFileManager(dataDir)- if fileErr != nil {- log.Warn().Err(fileErr).Msg("Failed to initialize file-based RBAC manager")- } else {- auth.SetManager(fileManager)- log.Info().Msg("RBAC manager initialized (file-based fallback)")- }- } else {- auth.SetManager(sqliteManager)- // Set up RBAC authorizer with policy evaluation- rbacAuthorizer := auth.NewRBACAuthorizer(sqliteManager)- auth.SetAuthorizer(rbacAuthorizer)- log.Info().Msg("RBAC Pro manager initialized with SQLite backend (deny policies, inheritance, changelog)")- }- } else {- rbacManager, err := auth.NewFileManager(dataDir)- if err != nil {- log.Warn().Err(err).Msg("Failed to initialize RBAC manager, role management will be unavailable")- } else {- auth.SetManager(rbacManager)- log.Info().Msg("RBAC manager initialized (file-based)")- }- }-- // Initialize SQLite audit logger for Pro/Enterprise- // Check if audit logging feature is available via mock mode or license- if licenseService.HasFeature(license.FeatureAuditLogging) {- // Initialize crypto manager for signing key encryption- cryptoMgr, err := crypto.NewCryptoManagerAt(dataDir)- if err != nil {- log.Warn().Err(err).Msg("Failed to initialize crypto manager for audit logging")- } else {- auditLogger, err := audit.NewSQLiteLogger(audit.SQLiteLoggerConfig{- DataDir: dataDir,- CryptoMgr: cryptoMgr,- RetentionDays: 90, // Default 90 day retention- })- if err != nil {- log.Warn().Err(err).Msg("Failed to initialize SQLite audit logger, using console logger")- } else {- audit.SetLogger(auditLogger)- log.Info().Msg("Enterprise audit logging enabled with SQLite backend")- // Ensure cleanup on shutdown- defer func() {- if err := auditLogger.Close(); err != nil {- log.Error().Err(err).Msg("Failed to close audit logger")- }- }()- }- }+ rbacManager, err := auth.NewFileManager(dataDir)+ if err != nil {+ log.Warn().Err(err).Msg("Failed to initialize RBAC manager, role management will be unavailable")} else {- log.Debug().Msg("Audit logging feature not licensed, using console logger")- }-- // Initialize AI approval store for Auto-Fix workflows (Pro feature)- if licenseService.HasFeature(license.FeatureAIAutoFix) {- approvalStore, err := approval.NewStore(approval.StoreConfig{- DataDir: dataDir,- DefaultTimeout: 5 * time.Minute,- MaxApprovals: 1000,- })- if err != nil {- log.Warn().Err(err).Msg("Failed to initialize AI approval store")- } else {- approval.SetStore(approvalStore)- approvalStore.StartCleanup(ctx)- log.Info().Msg("AI approval store initialized for Auto-Fix workflows")- }+ auth.SetManager(rbacManager)+ log.Info().Msg("RBAC manager initialized")}log.Info().Msg("Starting Pulse monitoring server")@@ -252,21 +173,6 @@ func Run(ctx context.Context, version string) error {// Start monitoringreloadableMonitor.Start(ctx)- // Initialize reporting engine for Pro/Enterprise- if licenseService.HasFeature(license.FeatureAdvancedReporting) {- if store := reloadableMonitor.GetMonitor().GetMetricsStore(); store != nil {- reportEngine := reporting.NewReportEngine(reporting.EngineConfig{- MetricsStore: store,- })- reporting.SetEngine(reportEngine)- log.Info().Msg("Advanced reporting engine initialized")- } else {- log.Warn().Msg("Metrics store not available, reporting engine not initialized")- }- } else {- log.Debug().Msg("Advanced reporting feature not licensed")- }-// Initialize API server with reload functionvar router *api.RouterreloadFunc := func() error {@@ -289,9 +195,6 @@ func Run(ctx context.Context, version string) error {// Start AI patrol service for background infrastructure monitoringrouter.StartPatrol(ctx)- // Start OpenCode-powered AI chat service- router.StartOpenCode(ctx)-// Wire alert-triggered AI analysisrouter.WireAlertTriggeredAI()