Pulse/internal
rcourtman 4d7d2e42dc feat(ai): pass raw metric samples to LLM for pattern interpretation
Instead of relying on pre-computed trend heuristics (which can be misleading
for edge cases like step changes vs continuous growth), we now pass downsampled
raw data points to the LLM so it can interpret patterns directly.

Changes:
- Add MetricSamples field to ResourceContext
- Add DownsampleMetrics() to reduce data points for LLM consumption
- Add formatMetricSamples() to format data compactly (e.g., 'Disk: 26→26→31%')
- Add computeGuestMetricSamples() to gather 7-day sampled history
- Populate MetricSamples for VMs and containers during context build
- Add History section to formatted context output

The LLM now sees actual patterns like 'stable for 6 days then jumped' rather
than just '45.8%/day growth rate' - allowing for much more nuanced interpretation.

This approach:
- Leverages LLM's pattern recognition instead of hard-coded heuristics
- Provides 7 days of data (~24 samples) for context on normal behavior
- Uses minimal tokens due to compact formatting with deduplication
- Is more future-proof as LLMs improve

Example output:
  **History (7d sampled, oldest→newest)**: Disk: 26→26→26→26→26→31%

Refs: Frigate disk usage false positive investigation
2025-12-21 21:09:24 +00:00
..
agentbinaries test: expand cmd and agent update coverage 2025-12-17 13:28:17 +00:00
agentexec security: allow rm on /var/tmp and /tmp with approval 2025-12-21 18:53:08 +00:00
agentupdate test: expand cmd and agent update coverage 2025-12-17 13:28:17 +00:00
ai feat(ai): pass raw metric samples to LLM for pattern interpretation 2025-12-21 21:09:24 +00:00
alerts feat: enhance AI baseline context visibility and incident timeline improvements 2025-12-21 00:14:20 +00:00
api refactor: remove runbooks feature entirely 2025-12-21 17:48:07 +00:00
auth feat: auto-detect platforms during agent install and allow multi-host tokens 2025-12-14 16:21:59 +00:00
buffer Fix offline buffering: add tests, remove unused config, fix flaky test 2025-12-02 22:31:44 +00:00
ceph Improve test coverage 2025-12-17 12:00:59 +00:00
config fix: Allow all threshold types (Storage, Temperature, Host Agent) to be set to 0 to disable alerting 2025-12-20 20:42:23 +00:00
crypto fix: disable encryption key deletion to prevent key loss bug 2025-12-21 00:27:16 +00:00
discovery feat(ai): Add enriched context with historical trends and predictions 2025-12-12 09:45:57 +00:00
dockeragent feat(docker-agent): add payload size logging for debugging body-too-large errors 2025-12-14 21:10:06 +00:00
errors refactor: Remove unreachable dead code branches 2025-12-02 14:48:57 +00:00
hostagent hostagent: avoid identity collisions with MAC fallback (Related to #836) 2025-12-17 20:09:55 +00:00
hostmetrics fix(agent): find zpool binary on TrueNAS SCALE (#718) 2025-12-18 16:23:56 +00:00
kubernetesagent feat: add --kube-include-all-deployments flag for Kubernetes agent 2025-12-18 20:58:30 +00:00
license test: improve test coverage for AI, license, config, and monitoring packages 2025-12-19 22:49:30 +00:00
logging chore: remove dead code and unused exports 2025-11-27 13:17:39 +00:00
mdadm perf: Pre-compile regexes in mdadm package 2025-12-02 15:11:04 +00:00
metrics Improve test coverage 2025-12-17 12:00:59 +00:00
mock feat(kubernetes): Add Kubernetes mock data and UI 2025-12-12 23:13:40 +00:00
models fix: backup matching uses instance+VMID to prevent cross-instance collisions 2025-12-16 22:19:19 +00:00
monitoring feat: enhance AI baseline context visibility and incident timeline improvements 2025-12-21 00:14:20 +00:00
notifications style: remove emojis from log messages 2025-12-13 21:29:11 +00:00
resources feat(backend): Implement remaining TODOs 2025-12-13 13:21:23 +00:00
sensors feat: AI security and policy improvements for 5.0 2025-12-12 17:38:55 +00:00
ssh/knownhosts test: Add tests for SSH knownhosts error and path methods 2025-12-01 17:50:13 +00:00
system style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
tempproxy perf: Remove redundant fmt.Sprintf in tempproxy contains function 2025-12-02 15:24:40 +00:00
types test: add unit tests for types package 2025-11-26 14:10:21 +00:00
updates fix(updates): Add RSS/Atom feed fallback for GitHub rate limits 2025-12-20 10:54:14 +00:00
utils AI Problem Solver implementation and various fixes 2025-12-06 23:46:08 +00:00
websocket refactor: Remove unreachable dead code branches 2025-12-02 14:56:35 +00:00