mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-03 12:42:43 +00:00
d9d798084e
Create internal/ai/patterns package: 1. Pattern Detector (detector.go): - Records historical events (high memory, OOM, restarts, etc.) - Detects recurring failure patterns - Calculates average interval between occurrences - Computes confidence based on pattern consistency - Predicts when failures will occur again - Persists to ai_patterns.json 2. Event types tracked: - high_memory, high_cpu, disk_full - oom, restart, unresponsive - backup_failed 3. Integration: - Wire PatternDetector into router startup - Add to AI context in buildEnrichedContext - FormatForContext generates failure predictions Example AI context now includes: 'OOM events typically occurs every ~10 days (next expected in ~3 days)' This enables proactive alerts before problems recur. All tests passing.
Internal API Package
This directory contains the API server implementation for Pulse.
Important Note About frontend-modern/
The frontend-modern/ subdirectory that appears here is:
- AUTO-GENERATED during builds
- NOT the source code - just a build artifact
- IN .gitignore - never committed
- REQUIRED BY GO - The embed directive needs it here
Frontend Development Location
👉 Edit frontend files at: /opt/pulse/frontend-modern/src/
Why This Structure?
Go's //go:embed directive has limitations:
- Cannot use
../paths to access parent directories - Cannot follow symbolic links
- Must embed files within the Go module
This is a known Go limitation and our structure works around it.