diff --git a/CHANGELOG.md b/CHANGELOG.md index d322a9b..e20afbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to **felhom-agent** are recorded here. Update on every code change that gets pushed. +## v0.22.0 — expose durable_id in GET /disks (enable controller-side guided storage) (2026-06-11) + +One-line, read-only addition: `localapi.DiskInfo` gains `durable_id` (mapped from +`StorageTarget.DurableID`, e.g. `"uuid:"` for usb/local-dir). The de-privileged controller +cannot read a device's fs UUID itself, yet `POST /disks/assign` mounts strictly by UUID — so without +this it could not complete the guided init/attach flows. The controller strips the `uuid:` prefix to +get the assign key. No new privilege, no behaviour change to format/assign/eject or the data-bearing +gate. Pairs with `felhom-controller` v0.43.0 (the storage-management UI rebuild). + ## v0.21.0 — agent-managed split-horizon LAN resolver (internal/lanresolver) (2026-06-11) LAN clients can now reach their guest **directly** at the same public hostname with the same real diff --git a/cmd/felhom-agent/main.go b/cmd/felhom-agent/main.go index e619741..729b787 100644 --- a/cmd/felhom-agent/main.go +++ b/cmd/felhom-agent/main.go @@ -43,7 +43,7 @@ import ( // version is the agent version. Overridable at build time with // -ldflags "-X main.version="; defaults to the in-repo CHANGELOG version. -var version = "0.21.0" +var version = "0.22.0" func main() { var ( diff --git a/internal/localapi/disks.go b/internal/localapi/disks.go index db80ec0..340bd41 100644 --- a/internal/localapi/disks.go +++ b/internal/localapi/disks.go @@ -51,6 +51,10 @@ type DiskInfo struct { Class string `json:"class"` // fast | slow | "" DataBearing bool `json:"data_bearing"` // agent device-inspection verdict (UI hint) DataReason string `json:"data_reason,omitempty"` + // DurableID is the target's stable identity (e.g. "uuid:" for usb/local-dir). The + // controller strips the "uuid:" prefix to get the fs UUID it passes to POST /disks/assign — + // the only way the (de-privileged) controller can learn the mount key it cannot read itself. + DurableID string `json:"durable_id,omitempty"` } // handleDisks lists the host's drives + data-bearing flags (read-only/benign). @@ -69,6 +73,7 @@ func (s *Server) handleDisks(w http.ResponseWriter, r *http.Request, vmid int) { di := DiskInfo{ Name: t.Name, Type: t.Type, State: t.State, BackingDevice: t.BackingDevice, MountPath: t.MountPath, Class: t.ClassHint, + DurableID: t.DurableID, } // Inspect the backing device for the UI's data-bearing hint (the authoritative check // is re-run at format time on the actual device).