@amd-gaia/agent-ui 0.26.0-rc.1 → 0.26.0-rc.10

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.
@@ -1 +1 @@
1
- import{q as e}from"./useT-C0ow1Kps.js";var t={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};t.node;var n=e(t),r={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};r.node;var i=e(r);export{n,i as t};
1
+ import{q as e}from"./useT-ByY7OhOj.js";var t={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};t.node;var n=e(t),r={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};r.node;var i=e(r);export{n,i as t};
package/dist/index.html CHANGED
@@ -12,11 +12,11 @@
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-Cw3Kx9eq.js"></script>
15
+ <script type="module" crossorigin src="./assets/index--tVNC0Jc.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-XKyaHtl9.js">
17
- <link rel="modulepreload" crossorigin href="./assets/useT-C0ow1Kps.js">
18
- <link rel="modulepreload" crossorigin href="./assets/api-9RdlUJAP.js">
19
- <link rel="stylesheet" crossorigin href="./assets/index-LLooEbjq.css">
17
+ <link rel="modulepreload" crossorigin href="./assets/useT-ByY7OhOj.js">
18
+ <link rel="modulepreload" crossorigin href="./assets/api-B8v2Xp8S.js">
19
+ <link rel="stylesheet" crossorigin href="./assets/index-r-CFg5BV.css">
20
20
  </head>
21
21
  <body>
22
22
  <div id="root"></div>
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.0rc1-c6932d3e03cf42c5';
12
+ const CACHE_NAME = CACHE_PREFIX + '0.26.0rc10-00e9b859184a5e82';
13
13
  const ASSETS_PATH = new URL('assets/', self.registration.scope).pathname;
14
14
 
15
15
  self.addEventListener('install', () => {
package/main.cjs CHANGED
@@ -403,6 +403,9 @@ async function startBackend() {
403
403
  PYTHONUNBUFFERED: "1",
404
404
  ...(app.isPackaged && {
405
405
  GAIA_BUNDLED_LEMONADE_DIR: path.join(process.resourcesPath, "vendor", "lemonade"),
406
+ // The daemon exits once this is deleted: a Trashed macOS app or a
407
+ // deleted AppImage runs no uninstall step. An AppImage's exe is a mount.
408
+ GAIA_APP_PATH: process.env.APPIMAGE || app.getPath("exe"),
406
409
  }),
407
410
  },
408
411
  detached: false,
@@ -1457,6 +1460,7 @@ async function cleanup() {
1457
1460
  shutdownStarted = true;
1458
1461
  backendSupervisor.stop();
1459
1462
  const installStopped = engineInstall ? engineInstall.stop() : null;
1463
+ const updating = app.isPackaged && autoUpdater.installsOnQuit();
1460
1464
 
1461
1465
  // Phase F: tear down auto-updater timers and IPC handlers.
1462
1466
  try {
@@ -1482,6 +1486,7 @@ async function cleanup() {
1482
1486
  // The install, the agents and the backend stop side by side: each waits out
1483
1487
  // its own grace period, and in series they could overrun the quit's time limit.
1484
1488
  await Promise.all([installStopped, stopAgentsForQuit(), stopBackendForQuit()]);
1489
+ if (updating) await stopDaemonForUpdate();
1485
1490
 
1486
1491
  // Destroy tray icon
1487
1492
  if (trayManager) {
@@ -1490,6 +1495,21 @@ async function cleanup() {
1490
1495
  }
1491
1496
  }
1492
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
+
1493
1513
  async function stopAgentsForQuit() {
1494
1514
  if (!agentProcessManager) return;
1495
1515
  console.log("Stopping all managed agents...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amd-gaia/agent-ui",
3
- "version": "0.26.0-rc.1",
3
+ "version": "0.26.0-rc.10",
4
4
  "type": "module",
5
5
  "productName": "GAIA Agent UI",
6
6
  "desktopName": "gaia-desktop.desktop",
@@ -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,