Files
pulse/internal/api
rcourtman 5294ed8e4e feat: integrate update system with API endpoints
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.
2025-10-10 15:42:21 +00:00
..

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:

  1. Cannot use ../ paths to access parent directories
  2. Cannot follow symbolic links
  3. Must embed files within the Go module

This is a known Go limitation and our structure works around it.