mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-06 16:16:26 +00:00
Phase 3 of Pulse AI differentiation: Create internal/ai/memory package with: 1. Change Detection (changes.go): - Tracks infrastructure changes: creation, deletion, config changes - Detects status changes (started, stopped) - Detects VM/container migrations between nodes - Detects CPU/memory configuration changes - Detects backup completions - Persists change history to ai_changes.json - GetChangesSummary for AI context 2. Remediation Logging (remediation.go): - Records actions taken to fix problems - Tracks command, output, and outcome - Links to AI findings via findingID - GetSimilar finds past similar problems - GetSuccessfulRemediations for learning - Persists to ai_remediations.json 3. Type exports (memory_exports.go): - Clean re-exports from ai package This enables the AI to say things like: - 'This VM was migrated 2 hours ago' - 'Memory was increased from 4GB to 8GB yesterday' - 'Last time this happened, restarting nginx resolved it' All tests passing.
61 lines
1.8 KiB
Go
61 lines
1.8 KiB
Go
package ai
|
|
|
|
import (
|
|
"github.com/rcourtman/pulse-go-rewrite/internal/ai/memory"
|
|
)
|
|
|
|
// ChangeDetector is an alias for memory.ChangeDetector
|
|
type ChangeDetector = memory.ChangeDetector
|
|
|
|
// ChangeDetectorConfig is an alias for memory.ChangeDetectorConfig
|
|
type ChangeDetectorConfig = memory.ChangeDetectorConfig
|
|
|
|
// Change is an alias for memory.Change
|
|
type Change = memory.Change
|
|
|
|
// ResourceSnapshot is an alias for memory.ResourceSnapshot
|
|
type ResourceSnapshot = memory.ResourceSnapshot
|
|
|
|
// ChangeType is an alias for memory.ChangeType
|
|
type ChangeType = memory.ChangeType
|
|
|
|
// RemediationLog is an alias for memory.RemediationLog
|
|
type RemediationLog = memory.RemediationLog
|
|
|
|
// RemediationLogConfig is an alias for memory.RemediationLogConfig
|
|
type RemediationLogConfig = memory.RemediationLogConfig
|
|
|
|
// RemediationRecord is an alias for memory.RemediationRecord
|
|
type RemediationRecord = memory.RemediationRecord
|
|
|
|
// Outcome is an alias for memory.Outcome
|
|
type Outcome = memory.Outcome
|
|
|
|
// Change type constants
|
|
const (
|
|
ChangeCreated = memory.ChangeCreated
|
|
ChangeDeleted = memory.ChangeDeleted
|
|
ChangeConfig = memory.ChangeConfig
|
|
ChangeStatus = memory.ChangeStatus
|
|
ChangeMigrated = memory.ChangeMigrated
|
|
ChangeRestarted = memory.ChangeRestarted
|
|
ChangeBackedUp = memory.ChangeBackedUp
|
|
)
|
|
|
|
// Outcome constants
|
|
const (
|
|
OutcomeResolved = memory.OutcomeResolved
|
|
OutcomePartial = memory.OutcomePartial
|
|
OutcomeFailed = memory.OutcomeFailed
|
|
OutcomeUnknown = memory.OutcomeUnknown
|
|
)
|
|
|
|
// NewChangeDetector creates a new change detector
|
|
func NewChangeDetector(cfg ChangeDetectorConfig) *ChangeDetector {
|
|
return memory.NewChangeDetector(cfg)
|
|
}
|
|
|
|
// NewRemediationLog creates a new remediation log
|
|
func NewRemediationLog(cfg RemediationLogConfig) *RemediationLog {
|
|
return memory.NewRemediationLog(cfg)
|
|
}
|