Commit Graph

24 Commits

Author SHA1 Message Date
rcourtman dc8208cc00 Enforce data handling in AI context 2026-04-25 20:41:13 +01:00
rcourtman a6c0386069 feat(ai): expose canonical truenas resources to pulse query 2026-03-29 18:25:39 +01:00
rcourtman c13dc9ddbc refactor(ai): share policy posture summary 2026-03-27 12:13:17 +00:00
rcourtman 06fe58144d Extract AI resource context policy owner 2026-03-23 16:05:38 +00:00
rcourtman 65c39cb8a4 Centralize resource cluster/IP presentation helpers 2026-03-19 06:01:18 +00:00
rcourtman 071da2c189 Centralize canonical resource metadata refresh 2026-03-19 05:33:25 +00:00
rcourtman f12d6b2838 Route resource IP summaries through policy helper 2026-03-19 04:09:26 +00:00
rcourtman 116bce58e1 Move policy posture summary into unified resources 2026-03-19 03:42:36 +00:00
rcourtman aafa76ea01 Centralize resource display naming 2026-03-19 03:20:11 +00:00
rcourtman ab44a5d09b Centralize governed label helpers 2026-03-19 03:17:54 +00:00
rcourtman 1d1c7bf636 Centralize aiSafeSummary policy decisions 2026-03-19 02:37:13 +00:00
rcourtman 1b64bf9e3f Centralize policy posture redaction labels 2026-03-19 02:34:36 +00:00
rcourtman 401e2c0df4 Move policy count formatting into unified resources 2026-03-19 02:20:30 +00:00
rcourtman dcbfd8c76c Label policy counts canonically 2026-03-19 02:18:49 +00:00
rcourtman b0cbc45864 Canonicalize policy posture ordering 2026-03-19 02:16:26 +00:00
rcourtman ad7388b591 Expose canonical policy posture summary 2026-03-19 01:08:48 +00:00
rcourtman 4ea83e39c1 Surface canonical policy governance posture 2026-03-19 00:53:18 +00:00
rcourtman e864682e33 Audit unified AI exports 2026-03-18 17:22:24 +00:00
rcourtman 778a2577b6 feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
rcourtman 31c704c7a7 refactor: fix lint issues in internal/ai package
- Remove redundant nil checks before len() calls
- Mark unused parameters with underscore
- Convert if/else chains to switch statements for cleaner code
- Add test assertions to resolve unused write warnings in patrol_test.go
2026-01-02 19:53:01 +00:00
rcourtman 3fdf753a5b Enhance devcontainer and CI workflows
- Add persistent volume mounts for Go/npm caches (faster rebuilds)
- Add shell config with helpful aliases and custom prompt
- Add comprehensive devcontainer documentation
- Add pre-commit hooks for Go formatting and linting
- Use go-version-file in CI workflows instead of hardcoded versions
- Simplify docker compose commands with --wait flag
- Add gitignore entries for devcontainer auth files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 22:29:15 +00:00
rcourtman c6bd8cb74c Improve internal package test coverage 2025-12-29 17:25:21 +00:00
rcourtman c8adbb7ae5 Add AI monitoring enhancements and host metadata features
- Add host metadata API for custom URL editing on hosts page
- Enhance AI routing with unified resource provider lookup
- Add encryption key watcher script for debugging key issues
- Improve AI service with better command timeout handling
- Update dev environment workflow with key monitoring docs
- Fix resource store deduplication logic
2025-12-09 16:27:46 +00:00
rcourtman f34c28f970 feat: Complete Unified Resource Architecture (Phases 1-3)
This commit implements the Unified Resource Architecture for AI-first
infrastructure management. Key features:

Phase 1 - Backend Unification:
- New unified Resource type with 9 resource types, 7 platforms, 7 statuses
- Resource store with identity-based deduplication (hostname, machineID, IP)
- 8 converter functions (FromNode, FromVM, FromContainer, etc.)
- REST API endpoints: /api/resources, /api/resources/stats, /api/resources/{id}
- 28 comprehensive unit tests

Phase 2 - AI Context Enhancement:
- Unified context builder for AI system prompts
- Cross-platform query methods: GetTopByCPU, GetTopByMemory, GetTopByDisk
- Resource correlation: GetRelated (parent, children, siblings, cluster)
- Infrastructure summary: GetResourceSummary with health status counts
- AI context now includes top consumers and infrastructure overview

Phase 3 - Agent Preference & Hybrid Mode:
- Polling optimization methods in resource store
- ResourceStoreInterface added to Monitor
- SetResourceStore() and shouldSkipNodeMetrics() helper methods
- Store automatically wired into Monitor via Router.SetMonitor()
- Foundation ready for reduced API polling when agents are active

Files added:
- internal/resources/resource.go - Core Resource type
- internal/resources/store.go - Store with deduplication
- internal/resources/converters.go - Type converters
- internal/resources/platform_data.go - Platform-specific data
- internal/resources/store_test.go - 28 tests
- internal/resources/converters_test.go - Converter tests
- internal/api/resource_handlers.go - REST API handlers
- internal/ai/resource_context.go - AI context builder
- .gemini/docs/unified-resource-architecture.md - Architecture docs

All tests pass.
2025-12-07 13:49:00 +00:00