feat(wake): long-poll wake listener for instant CLI sync
Some checks failed
Release / release (push) Failing after 0s
Release / docker (push) Has been skipped
Release / virustotal (push) Failing after 0s

CLI now holds a GET /api/internal/agent/wake connection open.
When the server calls triggerWake(userId) — on stream request,
download queue, pause, cancel, resume, scan, etc. — the CLI
receives the signal immediately and fires a sync cycle in <100ms
instead of waiting up to 10s for the next scheduled interval.

- Add WaitForWake(ctx) to Client using a no-timeout HTTP client
- Add runWakeListener goroutine to SyncClient (auto-reconnects)
- Start wake listener from SyncClient.Run()

Closes: sub-second stream latency from the web UI
This commit is contained in:
Deivid Soto 2026-04-09 00:01:24 +02:00
parent ef4f38d324
commit 3fd19f1406
2 changed files with 7 additions and 1 deletions

View file

@ -1,4 +1,4 @@
package cmd
// Version is the CLI version. Overridden by goreleaser ldflags at release time.
var Version = "0.6.0"
var Version = "0.6.1"