From 410e4355fd5aa5a007f59aa368cbdaa8d46d47eb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:27:13 +0000 Subject: [PATCH 1/2] Initial plan From 14c15a2fdad822792791e6a922f821cb65de5f9c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:42:29 +0000 Subject: [PATCH 2/2] Add agent auto-update: fix ETag saving, add UpdateAgent button and UpdateAgents method Co-authored-by: Undermozes <58026189+Undermozes@users.noreply.github.com> --- Agent/Services/Linux/UpdaterLinux.cs | 5 +++++ Agent/Services/MacOS/UpdaterMac.cs | 5 +++++ Agent/Services/Windows/UpdaterWin.cs | 6 +++++- Server/Components/Devices/DeviceCard.razor | 6 ++++++ Server/Components/Devices/DeviceCard.razor.cs | 6 ++++++ Server/Hubs/CircuitConnection.cs | 9 +++++++++ 6 files changed, 36 insertions(+), 1 deletion(-) diff --git a/Agent/Services/Linux/UpdaterLinux.cs b/Agent/Services/Linux/UpdaterLinux.cs index 4a6b2b299..6a84e59e3 100644 --- a/Agent/Services/Linux/UpdaterLinux.cs +++ b/Agent/Services/Linux/UpdaterLinux.cs @@ -102,6 +102,11 @@ public async Task CheckForUpdates() _logger.LogInformation("Service Updater: Update found."); + if (response.Headers.ETag is { } responseEtag) + { + await File.WriteAllTextAsync("etag.txt", responseEtag.ToString()); + } + await InstallLatestVersion(); } diff --git a/Agent/Services/MacOS/UpdaterMac.cs b/Agent/Services/MacOS/UpdaterMac.cs index 9d1d1b0d8..8bf2b6da3 100644 --- a/Agent/Services/MacOS/UpdaterMac.cs +++ b/Agent/Services/MacOS/UpdaterMac.cs @@ -100,6 +100,11 @@ public async Task CheckForUpdates() _logger.LogInformation("Service Updater: Update found."); + if (response.Headers.ETag is { } responseEtag) + { + await File.WriteAllTextAsync("etag.txt", responseEtag.ToString()); + } + await InstallLatestVersion(); } diff --git a/Agent/Services/Windows/UpdaterWin.cs b/Agent/Services/Windows/UpdaterWin.cs index 3d76bec47..48ada8039 100644 --- a/Agent/Services/Windows/UpdaterWin.cs +++ b/Agent/Services/Windows/UpdaterWin.cs @@ -96,9 +96,13 @@ public async Task CheckForUpdates() return; } - _logger.LogInformation("Service Updater: Update found."); + if (response.Headers.ETag is { } responseEtag) + { + await File.WriteAllTextAsync("etag.txt", responseEtag.ToString()); + } + await InstallLatestVersion(); } diff --git a/Server/Components/Devices/DeviceCard.razor b/Server/Components/Devices/DeviceCard.razor index c4a18746b..8c2fa7c4d 100644 --- a/Server/Components/Devices/DeviceCard.razor +++ b/Server/Components/Devices/DeviceCard.razor @@ -113,6 +113,12 @@ +