@amd-gaia/agent-ui 0.26.0-rc.5 → 0.26.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AdvancedSettings-BnWw0T2Y.js → AdvancedSettings-8tGuuocd.js} +1 -1
- package/dist/assets/{ConnectorsPane-C4Nf75r4.js → ConnectorsPane-BfS5fSIl.js} +1 -1
- package/dist/assets/{DocumentLibrary-DA1FKyAu.js → DocumentLibrary-V2n1obTR.js} +1 -1
- package/dist/assets/{FileBrowser-CODR0L_L.js → FileBrowser-D5gu5VB9.js} +1 -1
- package/dist/assets/{MemoryDashboard-DJWkELvL.js → MemoryDashboard-D3BSEWvI.js} +1 -1
- package/dist/assets/{MobileAccessModal-D1jnQ_9R.js → MobileAccessModal-DGKfraeR.js} +1 -1
- package/dist/assets/{ScheduleManager-xx9Mhex5.js → ScheduleManager-BwuPu7-w.js} +1 -1
- package/dist/assets/{index-De9ONgdP.js → index-BSZT2AHb.js} +3 -3
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/main.cjs +17 -0
- package/package.json +1 -1
- package/services/auto-updater.cjs +10 -0
- package/services/backend-installer.cjs +157 -470
package/dist/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
13
13
|
<meta name="apple-mobile-web-app-title" content="GAIA" />
|
|
14
14
|
<title>GAIA Agent UI</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-BSZT2AHb.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-XKyaHtl9.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/useT-9bLwAbF7.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/api-c2Hja8UA.js">
|
package/dist/sw.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// never sees a stale UI or stale data.
|
|
10
10
|
|
|
11
11
|
const CACHE_PREFIX = 'gaia-assets-';
|
|
12
|
-
const CACHE_NAME = CACHE_PREFIX + '0.26.
|
|
12
|
+
const CACHE_NAME = CACHE_PREFIX + '0.26.0rc6-3207623f99905247';
|
|
13
13
|
const ASSETS_PATH = new URL('assets/', self.registration.scope).pathname;
|
|
14
14
|
|
|
15
15
|
self.addEventListener('install', () => {
|
package/main.cjs
CHANGED
|
@@ -1460,6 +1460,7 @@ async function cleanup() {
|
|
|
1460
1460
|
shutdownStarted = true;
|
|
1461
1461
|
backendSupervisor.stop();
|
|
1462
1462
|
const installStopped = engineInstall ? engineInstall.stop() : null;
|
|
1463
|
+
const updating = app.isPackaged && autoUpdater.installsOnQuit();
|
|
1463
1464
|
|
|
1464
1465
|
// Phase F: tear down auto-updater timers and IPC handlers.
|
|
1465
1466
|
try {
|
|
@@ -1485,6 +1486,7 @@ async function cleanup() {
|
|
|
1485
1486
|
// The install, the agents and the backend stop side by side: each waits out
|
|
1486
1487
|
// its own grace period, and in series they could overrun the quit's time limit.
|
|
1487
1488
|
await Promise.all([installStopped, stopAgentsForQuit(), stopBackendForQuit()]);
|
|
1489
|
+
if (updating) await stopDaemonForUpdate();
|
|
1488
1490
|
|
|
1489
1491
|
// Destroy tray icon
|
|
1490
1492
|
if (trayManager) {
|
|
@@ -1493,6 +1495,21 @@ async function cleanup() {
|
|
|
1493
1495
|
}
|
|
1494
1496
|
}
|
|
1495
1497
|
|
|
1498
|
+
/**
|
|
1499
|
+
* The daemon runs from the app's own files, which the update is about to
|
|
1500
|
+
* replace, and macOS has no installer step that stops it first.
|
|
1501
|
+
*/
|
|
1502
|
+
async function stopDaemonForUpdate() {
|
|
1503
|
+
const gaia = backendInstaller.findGaiaBin();
|
|
1504
|
+
if (!gaia) return;
|
|
1505
|
+
console.log("Stopping the GAIA daemon before the update replaces its files...");
|
|
1506
|
+
try {
|
|
1507
|
+
await backendInstaller.stopRunningDaemon({ gaiaBin: gaia, timeoutMs: 30000 });
|
|
1508
|
+
} catch (err) {
|
|
1509
|
+
console.error(`[main] Couldn't stop the GAIA daemon before the update: ${err.message}`);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1496
1513
|
async function stopAgentsForQuit() {
|
|
1497
1514
|
if (!agentProcessManager) return;
|
|
1498
1515
|
console.log("Stopping all managed agents...");
|
package/package.json
CHANGED
|
@@ -363,6 +363,8 @@ let downloadEpoch = 0;
|
|
|
363
363
|
const prefetching = new Map();
|
|
364
364
|
// The user asked for this download, so it may install on quit with auto-update off.
|
|
365
365
|
let installRequested = false;
|
|
366
|
+
// The user chose to restart into the update: the quit runs its installer.
|
|
367
|
+
let installingNow = false;
|
|
366
368
|
// The file was unreadable at launch, so a pin it holds was never loaded.
|
|
367
369
|
let pinUnknown = false;
|
|
368
370
|
let scheduledTimeout = null;
|
|
@@ -1434,6 +1436,7 @@ async function restartToInstall() {
|
|
|
1434
1436
|
}
|
|
1435
1437
|
log("info", "User chose to restart — calling quitAndInstall");
|
|
1436
1438
|
_recordInstallAttempt();
|
|
1439
|
+
installingNow = true;
|
|
1437
1440
|
// Silent: the installer wizard would otherwise wait for clicks. Force-run
|
|
1438
1441
|
// brings the app straight back.
|
|
1439
1442
|
autoUpdaterRef.quitAndInstall(!wizardNextInstall, true);
|
|
@@ -1883,6 +1886,12 @@ function _onBeforeQuit(event) {
|
|
|
1883
1886
|
_recordInstallAttempt();
|
|
1884
1887
|
}
|
|
1885
1888
|
|
|
1889
|
+
/** Whether this quit hands over to an update's installer, which replaces the app's files. */
|
|
1890
|
+
function installsOnQuit() {
|
|
1891
|
+
if (!autoUpdaterRef || state.status !== STATES.DOWNLOADED) return false;
|
|
1892
|
+
return installingNow || Boolean(autoUpdaterRef.autoInstallOnAppQuit);
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1886
1895
|
/** Tear down timers and IPC handlers. Safe to call multiple times. */
|
|
1887
1896
|
function destroy() {
|
|
1888
1897
|
if (initialCheckTimeout) {
|
|
@@ -1917,6 +1926,7 @@ module.exports = {
|
|
|
1917
1926
|
setIncludePrereleases,
|
|
1918
1927
|
downloadUpdate,
|
|
1919
1928
|
restartToInstall,
|
|
1929
|
+
installsOnQuit,
|
|
1920
1930
|
STATES,
|
|
1921
1931
|
// For tests: init() runs it on a timer.
|
|
1922
1932
|
_seedInstalledBlockmap,
|