Commit graph

2555 commits

Author SHA1 Message Date
rcourtman
62e8d609de feat: add WebSocket multi-tenant isolation
- Enhance WebSocket hub with tenant awareness
- Add tenant isolation for real-time updates
- Add hub tenant isolation tests
2026-01-24 22:43:50 +00:00
rcourtman
1e77763870 feat: improve monitoring and temperature handling
Temperature Monitoring:
- Enhance temperature collection and processing
- Add temperature tests

Monitor Improvements:
- Improve monitor reload handling
- Add reload tests

Test Coverage:
- Add Ceph monitoring tests
- Add Docker commands tests
- Add host agent temperature tests
- Add extra coverage tests
2026-01-24 22:43:31 +00:00
rcourtman
4a8f9827fe feat: add config migration system and multi-tenant support
Migration System:
- Add migration framework for config schema updates
- Add migration tests

Config Enhancements:
- Add multi-tenant configuration support
- Add DeepCopy for tenant isolation
- Enhance AI config options
- Improve API token handling
- Update persistence layer

Documentation:
- Update multi-tenant documentation
2026-01-24 22:43:10 +00:00
rcourtman
54a3e7f4af feat: add host agent sysinfo and improve test coverage
New Features:
- Add sysinfo module for system information collection
- Enhance agent with improved metrics handling

Test Coverage:
- Add sysinfo tests
- Add commands coverage tests
- Add hostagent coverage tests
- Add mock collector for testing
- Improve agent, metrics, sensors, and proxmox setup tests
2026-01-24 22:42:46 +00:00
rcourtman
9072b8eaa8 feat: enhance API router with multi-tenant authorization
Router & Middleware:
- Add auth context middleware for user/token extraction
- Add tenant middleware with authorization checking
- Refactor middleware chain ordering for proper isolation
- Add router helpers for common patterns

Authentication & SSO:
- Enhance auth with tenant-aware context
- Update OIDC, SAML, and SSO handlers for multi-tenant
- Add RBAC handler improvements
- Add security enhancements

New Test Coverage:
- API foundation tests
- Auth and authorization tests
- Router state and general tests
- SSO handler CRUD tests
- WebSocket isolation tests
- Resource handler tests
2026-01-24 22:42:23 +00:00
rcourtman
27f1a11acb feat: add AI Intelligence system with investigation and forecasting
Major new AI capabilities for infrastructure monitoring:

Investigation System:
- Autonomous finding investigation with configurable autonomy levels
- Investigation orchestrator with rate limiting and guardrails
- Safety checks for read-only mode enforcement
- Chat-based investigation with approval workflows

Forecasting & Remediation:
- Trend forecasting for resource capacity planning
- Remediation engine for generating fix proposals
- Circuit breaker for AI operation protection

Unified Findings:
- Unified store bridging alerts and AI findings
- Correlation and root cause analysis
- Incident coordinator with metrics recording

New Frontend:
- AI Intelligence page with patrol controls
- Investigation drawer for finding details
- Unified findings panel with actions

Supporting Infrastructure:
- Learning store for user preference tracking
- Proxmox event ingestion and correlation
- Enhanced patrol with investigation triggers
2026-01-24 22:41:43 +00:00
rcourtman
775ac5108c chore: remove unused components and dead code
Remove frontend components and utilities that are no longer used:
- AI panels: GuestNotes, AIImpactTimelinePanel, AIInsightsPanel,
  AIOverviewTable, AIRecentChangesPanel
- Dashboard: AnomalyCell, AnomalyIndicator, IOMetric
- Docker: StackedContainerBar
- Shared: FeatureTip, OnlineStatusBadge
- Stores: featureTips
- Utils: anomalyColors
- Content: features/index.ts, features/types.ts

Remove backend dry-run simulator (unused):
- internal/ai/dryrun/simulator.go and tests

Remove editor config:
- .opencode/config.json
2026-01-24 22:40:20 +00:00
rcourtman
fd2c53a84e Gate multi-tenant migration by flag 2026-01-24 15:41:02 +00:00
rcourtman
889719243b fix: reduce offline alert spam. Related to #1159, #1043 2026-01-24 13:25:25 +00:00
rcourtman
3da64d5e32 fix(types): add type assertion for remediation plans API response 2026-01-23 22:06:37 +00:00
rcourtman
8d20585f0d fix(ai-chat): resolve dropdown clipping and auto-refresh models on settings change
- Fix chat dropdowns (model selector, session picker) being cut off by
  parent container overflow by using fixed positioning with calculated
  coordinates based on button position

- Add settings change notification system so the side chat automatically
  refreshes its model list when API keys are added/removed in AI settings,
  eliminating the need for a page refresh
2026-01-23 22:04:32 +00:00
rcourtman
c4ca169e2b feat: add multi-tenant isolation foundation (disabled by default)
Implements multi-tenant infrastructure for organization-based data isolation.
Feature is gated behind PULSE_MULTI_TENANT_ENABLED env var and requires
Enterprise license - no impact on existing users.

Core components:
- TenantMiddleware: extracts org ID, validates access, 501/402 responses
- AuthorizationChecker: token/user access validation for organizations
- MultiTenantChecker: WebSocket upgrade gating with license check
- Per-tenant audit logging via LogAuditEventForTenant
- Organization model with membership support

Gating behavior:
- Feature flag disabled: 501 Not Implemented for non-default orgs
- Flag enabled, no license: 402 Payment Required
- Default org always works regardless of flag/license

Documentation added: docs/MULTI_TENANT.md
2026-01-23 21:42:27 +00:00
rcourtman
2243bfb5e3 fix(frontend): resolve webhooks navigation and incorrect temperature notice (#1155) 2026-01-23 19:33:18 +00:00
rcourtman
4c19fa3c1b fix: resolve btrfs disk summing (#1158), podman disable flag (#1151), and diagnostics path (#1155) 2026-01-23 19:24:38 +00:00
rcourtman
508c9f88f6 fix: Support partial updates for PBS nodes. Related to #1105
Allow updating PBS node settings (like excludeDatastores) without
requiring host to be resent. Match the behavior of PVE/PMG handlers
which only validate and update fields when provided.

Previously, PUT /api/config/nodes/{pbs-id} with just {excludeDatastores: [...]}
would fail with 'host is required' because the handler always called
normalizeNodeHost regardless of whether a new host was provided.
2026-01-23 00:13:28 +00:00
rcourtman
1ac53fa9f1 test: add stream, restart, and fallback tests for AI handlers and providers 2026-01-22 22:33:33 +00:00
rcourtman
66e8460196 chore: update dev scripts and mock configuration
- Improve hot-dev script
- Add sync-production-config script
- Update toggle-mock script
- Update mock environment
2026-01-22 22:32:45 +00:00
rcourtman
5efd1591ca docs: update AI documentation 2026-01-22 22:32:42 +00:00
rcourtman
da9c322ddd feat: improve AI chat utilities and types
- Enhance useChat hook
- Improve AI chat utilities
- Update AI types
2026-01-22 22:32:22 +00:00
rcourtman
1657beeb92 feat: add alert enhancements
- Improve alert handling and processing
2026-01-22 22:32:03 +00:00
rcourtman
d909f319a5 feat: improve AI config and persistence
- Enhance AI configuration options
- Improve persistence layer
- Add AI config tests
2026-01-22 22:31:42 +00:00
rcourtman
8bf31214f5 feat: enhance API handlers and router with new endpoints
- Add new AI handler endpoints
- Enhance diagnostics API
- Improve router configuration
2026-01-22 22:31:24 +00:00
rcourtman
c93b54ce9f refactor: clean up AI tools and remove deprecated code
- Remove deprecated tool functions
- Simplify control helpers
- Clean up test files
2026-01-22 22:31:04 +00:00
rcourtman
c76903c3f8 feat: improve Gemini provider with streaming and error handling
- Add streaming response support
- Improve error handling and recovery
- Enhance provider interface
2026-01-22 22:30:49 +00:00
rcourtman
37e7aebc98 feat: enhance AI patrol with streaming and improved findings
- Add streaming support to patrol operations
- Improve finding detection and reporting
- Enhance agentic chat capabilities
- Add alert integration improvements
2026-01-22 22:30:35 +00:00
rcourtman
8963d69764 feat: add metrics store point limiting and mock improvements
- Add point limiting to metrics queries
- Improve mock metrics history for testing
- Add monitor enhancements
2026-01-22 22:29:56 +00:00
rcourtman
c2f43c995e feat: enhance history charts with maxPoints and source tracking
- Add maxPoints param for backend point limiting
- Add source field to track data origin (store/memory/live)
- Simplify GuestDrawer by removing split view toggle
- Improve chart rendering and responsiveness
2026-01-22 22:29:41 +00:00
rcourtman
66f645085a refactor: rebrand AI to Pulse in user-facing text
- AI Assistant → Pulse Assistant
- AI Patrol → Pulse Patrol
- AI Insights → Pulse Insights
- AI Cost & Usage → Pulse Cost & Usage
- AI Intelligence Summary → Pulse Intelligence Summary
- AI Permission Level → Pulse Permission Level
- AI commands enabled → Pulse commands enabled
- AI features → Pulse features

Internal file names and code comments unchanged (describe technology)
2026-01-22 22:27:27 +00:00
rcourtman
8d82c7d8d8 style: replace purple AI gradients with Pulse blue
- Changed chat header, send button from violet to blue-600
- Updated user message bubbles from purple to blue
- Changed empty state icon to neutral gray/blue
- Converted AI context row animations from purple to blue-500
- Toggle bar now uses bg-blue-600
2026-01-22 22:27:04 +00:00
rcourtman
422efdde61 Restore UI improvements and refine Docker/Hosts display
- Restore 'mini' mode for StackedDiskBar.
- Restore layout fixes (fixed table layout, mobile columns) for Docker and Hosts tables.
- Remove 'Ask AI' and AI context selection features.
- Docker: Use compact 'Cube' icon for Podman pods to prevent name obstruction.
- Docker: Show concise image names (strip registry URL).
- Backend: Include pending fixes for AI providers.
2026-01-22 18:03:35 +00:00
rcourtman
defe298ddd Refactor: AI provider and executor multi-tenancy support
- Updated AI providers and tests for context/tenant awareness
- Refactored tool executor for multi-tenant state handling
- Added new tests for Docker control and update tools
2026-01-22 16:51:45 +00:00
rcourtman
f378a36a5e Feat: Docker Unified Table and frontend UI improvements
- Implemented Docker Unified Table and Cluster Services view
- Improved date/time formatting utilities
- Updated agent tests for multi-tenancy support in Pulse Unified Agent
2026-01-22 16:43:41 +00:00
rcourtman
5f56efa88a Refactor: Core monitoring and update managers multi-tenancy
- Updated monitoring reload and metrics history to be tenant-aware
- Refactored update manager and checksum validation for multi-tenancy
- Enhanced test coverage for agent updates and metrics storage
2026-01-22 16:43:24 +00:00
rcourtman
798f6a8deb Refactor: Update AI tools and tests for multi-tenancy
- Refactored tool execution to handle tenant-scoped contexts
- Added new tests for infrastructure, control, and kubernetes tools
- Improved test coverage for agentic chat and approval store
2026-01-22 16:43:08 +00:00
rcourtman
f2541b0d6c Refactor: Multi-tenancy support for API and License handlers
- Updated LicenseHandlers and LicenseService to be context/tenant aware
- Refactored API router and middleware to support tenant-scoped license checks
- Updated associated tests for context-aware handlers
2026-01-22 16:42:39 +00:00
rcourtman
267d5f97e5 Support: Fix OpenAI tool schema error by ensuring properties field is always present
- Removed omitempty from InputSchema.Properties
- Ensures OpenAI accepts tools with no input parameters
2026-01-22 16:41:57 +00:00
rcourtman
85f171290b Support: Add Kubernetes monitoring options to agent installers
- Added --kube-include-all-pods and --kube-include-all-deployments flags
- Added --help support to install.sh
- Moved root check in install.sh to allow viewing help as non-root
2026-01-22 16:41:40 +00:00
rcourtman
8ffec7c124 Support: Fix audit log permissions and improve UI empty state
- Updated server installer to ensure correct permissions for audit directory
- Added descriptive empty state and filter clearing to AuditLogPanel
2026-01-22 16:41:18 +00:00
rcourtman
351bd0539e feat(dev): add file backup watcher status to dev-check 2026-01-22 14:27:14 +00:00
rcourtman
c743bd2c30 feat(dev): add optional file backup watcher to hot-dev
When scripts/watch-backup.sh exists (gitignored, local only), hot-dev
automatically starts a file watcher that backs up source files on every
save to ~/.pulse-backups/. Protects against accidental data loss from
git checkout or other mishaps, regardless of what tool makes the change.
2026-01-22 14:25:21 +00:00
rcourtman
1b2885c484 fix(ui): restore morning changes to GuestDrawer and DockerUnifiedTable
Recovered from git reflog commits c75972d5 and 0a00e201:
- GuestDrawer: drawer controls layout improvements
- DockerUnifiedTable: column width fixes, removed unused version badge code
2026-01-22 14:08:31 +00:00
rcourtman
25567204f1 fix(ui): add missing onClick prop to GuestRow
The recovered GuestRow component was missing the onClick prop that
Dashboard.tsx expects for row click handling to open the guest drawer.
2026-01-22 14:04:00 +00:00
rcourtman
ffbcefee44 feat(ui): restore Docker and dashboard improvements
Recovered from git dangling commits (codex snapshots):
- DockerHostSummaryTable: Add StackedContainerBar for container counts
- DockerUnifiedTable: Column width improvements, AI integration
- GuestDrawer: Improved controls layout and styling
- GuestRow: Minor improvements
- StackedDiskBar: Refactored implementation
- HostsOverview: Layout updates
- NodeSummaryTable: Improvements
- animations.css: Add AI context row highlight styling
- types/nodes.ts: Additional type definitions
2026-01-22 13:53:02 +00:00
rcourtman
8412cc7ddb fix: env overrides and OS-aware test improvements
- Add PBS/PMG polling interval environment variable overrides in config.go
- Fix temp path expectation in detect_root_test.go using filepath.Join
- Use EvalSymlinks for symlink target comparison in self_update_test.go
- Add Linux-only skip for MAC fallback test in agent_new_test.go
- Add OS-aware RAID/SMART assertions in agent_metrics_test.go
2026-01-22 13:49:05 +00:00
rcourtman
ad4acf1222 chore: add frontend utilities and metrics documentation
- Add useResizeObserver and useTooltip React hooks
- Add utility functions for anomaly colors, error extraction, text width, and threshold colors
- Add METRICS_DATA_FLOW.md documentation
- Ignore SQLite temp files (*.db-shm, *.db-wal)
2026-01-22 13:48:41 +00:00
rcourtman
289d95374f feat: add multi-tenancy foundation (directory-per-tenant)
Implements Phase 1-2 of multi-tenancy support using a directory-per-tenant
strategy that preserves existing file-based persistence.

Key changes:
- Add MultiTenantPersistence manager for org-scoped config routing
- Add TenantMiddleware for X-Pulse-Org-ID header extraction and context propagation
- Add MultiTenantMonitor for per-tenant monitor lifecycle management
- Refactor handlers (ConfigHandlers, AlertHandlers, AIHandlers, etc.) to be
  context-aware with getConfig(ctx)/getMonitor(ctx) helpers
- Add Organization model for future tenant metadata
- Update server and router to wire multi-tenant components

All handlers maintain backward compatibility via legacy field fallbacks
for single-tenant deployments using the "default" org.
2026-01-22 13:39:06 +00:00
rcourtman
31989803f0 Remove unused version badge code 2026-01-22 09:47:26 +00:00
rcourtman
0a00e20172 Improve Docker table column layout and image display
- Show short image name (image:tag) instead of full registry path
- Remove redundant version badges since tag is now visible
- Add minimum width to container names to prevent over-compression
- Make pod and host badges more compact with tighter padding
- Rebalance column widths (resource 18%, image 12%)
2026-01-22 09:45:33 +00:00
rcourtman
c75972d57c Fix mock metrics history and guest drawer controls 2026-01-22 09:39:53 +00:00
rcourtman
6e2cae2363 feat(ui): add history chart components for guest drawer
- HistoryChart: single metric visualization (CPU, memory, disk)
- UnifiedHistoryChart: combined multi-metric view
- Support for time range selection (1h to 90d)
- Responsive charts with proper dark mode support
- Fix corrupted tools_query_test.go from stash merge
2026-01-22 00:46:52 +00:00