mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 10:43:36 +00:00
5294ed8e4e
Wire up the adapter-based update system to HTTP API: **Enhanced UpdateHandlers:** - Initialize UpdateHistory and UpdaterRegistry - Register all deployment adapters (systemd, proxmoxve, docker, aur) - Handlers now have access to history and updater registry **New API Endpoints:** - GET /api/updates/plan?version=X - Get update plan for deployment * Returns canAutoUpdate, instructions, prerequisites, estimated time * Deployment-specific based on detected type - GET /api/updates/history?limit=N&status=X - List update history * Supports filtering by status (success/failed/in_progress) * Returns audit log entries with full metadata - GET /api/updates/history/entry?id=X - Get specific history entry * Retrieve detailed information about past update **Existing Endpoints Still Work:** - GET /api/updates/check - Check for available updates - POST /api/updates/apply - Apply update (legacy manager) - GET /api/updates/status - Get current update status The system now supports both: - Legacy update flow (existing install.sh wrapper in manager.go) - New adapter-based flow (prepared for frontend integration) Next: Frontend components to consume new endpoints.
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.