@amd-gaia/agent-ui 0.26.1-rc.2 → 0.27.0-rc.2
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-DHERtrno.js +1 -0
- package/dist/assets/AutomationsSettings-4FWcRau9.js +1 -0
- package/dist/assets/ConnectorsPane-BGI8nBUb.css +1 -0
- package/dist/assets/ConnectorsPane-Dkat1zLC.js +1 -0
- package/dist/assets/DocumentLibrary-Dll55N7l.js +5 -0
- package/dist/assets/DocumentLibrary-fEMoY7lH.css +1 -0
- package/dist/assets/FileBrowser-1goNp4CP.css +1 -0
- package/dist/assets/FileBrowser-wFHqH6K_.js +4 -0
- package/dist/assets/MemoryDashboard-BuUBoNq8.js +1 -0
- package/dist/assets/MemoryDashboard-RpfLag-v.css +1 -0
- package/dist/assets/MessagingSettings-DomiT2rX.js +1 -0
- package/dist/assets/MobileAccessModal-B2gaE8nk.js +2 -0
- package/dist/assets/{MobileAccessModal-CX4NZmr4.css → MobileAccessModal-BrZMaERi.css} +1 -1
- package/dist/assets/ScheduleManager-8UE81KlQ.js +1 -0
- package/dist/assets/ScheduleManager-BZzEH2-W.css +1 -0
- package/dist/assets/Temml-CCjoacWt.woff2 +0 -0
- package/dist/assets/index-BiETDNik.css +1 -0
- package/dist/assets/index-HCZ86cyP.js +220 -0
- package/dist/assets/useFocusTrap-BFi0chLf.js +6 -0
- package/dist/assets/zap-DjkIffnX.js +1 -0
- package/dist/index.html +3 -3
- package/dist/sw.js +1 -1
- package/main.cjs +130 -40
- package/package.json +5 -3
- package/preload.cjs +28 -0
- package/services/browser-pane/bridge-error.cjs +20 -0
- package/services/browser-pane/bridge-server.cjs +496 -0
- package/services/browser-pane/cdp-session.cjs +375 -0
- package/services/browser-pane/contract.d.ts +448 -0
- package/services/browser-pane/dev-servers.cjs +478 -0
- package/services/browser-pane/input.cjs +375 -0
- package/services/browser-pane/ipc.cjs +267 -0
- package/services/browser-pane/navigation-policy.cjs +255 -0
- package/services/browser-pane/pane-host.cjs +1686 -0
- package/services/browser-pane/picker-world.js +360 -0
- package/services/browser-pane/picker.cjs +261 -0
- package/services/browser-pane/service-ports.cjs +66 -0
- package/services/dev-qa-mode.cjs +32 -0
- package/dist/assets/AdvancedSettings-C-9ErldS.js +0 -1
- package/dist/assets/AutomationsSettings-CL3K4hLZ.js +0 -1
- package/dist/assets/ConnectorsPane-DpGR78cA.js +0 -1
- package/dist/assets/ConnectorsPane-w-HLcq3n.css +0 -1
- package/dist/assets/DocumentLibrary-BKZdx6rJ.css +0 -1
- package/dist/assets/DocumentLibrary-N7tBbt9v.js +0 -5
- package/dist/assets/FileBrowser-CO2p3xa2.js +0 -4
- package/dist/assets/FileBrowser-CrRQXiPo.css +0 -1
- package/dist/assets/MemoryDashboard-1OIrKFIa.js +0 -1
- package/dist/assets/MemoryDashboard-B4AO_CU8.css +0 -1
- package/dist/assets/MessagingSettings-0AJnsoWA.js +0 -1
- package/dist/assets/MobileAccessModal-CnPB1BEN.js +0 -2
- package/dist/assets/ScheduleManager-BYOhqnfv.js +0 -1
- package/dist/assets/ScheduleManager-DQBnf_IN.css +0 -1
- package/dist/assets/index-Bkx-QRv4.css +0 -1
- package/dist/assets/index-C-3wCH_s.js +0 -116
- package/dist/assets/useT-DuzpQY8p.js +0 -6
- package/dist/assets/zap-gF9QDKfa.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{li as e}from"./useFocusTrap-BFi0chLf.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
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
// main.tsx applies the theme again and reports why it could not read the saved one.
|
|
27
27
|
}
|
|
28
28
|
</script>
|
|
29
|
-
<script type="module" crossorigin src="./assets/index-
|
|
29
|
+
<script type="module" crossorigin src="./assets/index-HCZ86cyP.js"></script>
|
|
30
30
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-XKyaHtl9.js">
|
|
31
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
32
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
31
|
+
<link rel="modulepreload" crossorigin href="./assets/useFocusTrap-BFi0chLf.js">
|
|
32
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BiETDNik.css">
|
|
33
33
|
</head>
|
|
34
34
|
<body>
|
|
35
35
|
<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.
|
|
12
|
+
const CACHE_NAME = CACHE_PREFIX + '0.27.0rc2-0aaf94c22e3f4d41';
|
|
13
13
|
const ASSETS_PATH = new URL('assets/', self.registration.scope).pathname;
|
|
14
14
|
|
|
15
15
|
self.addEventListener('install', () => {
|
package/main.cjs
CHANGED
|
@@ -124,6 +124,16 @@ const { installWindowKeys } = require("./services/window-keys.cjs");
|
|
|
124
124
|
const { installQuitCleanup } = require("./services/quit-cleanup.cjs");
|
|
125
125
|
const { chromiumSwitches } = require("./services/chromium-switches.cjs");
|
|
126
126
|
const { titleBarKind, titleBarOptions } = require("./services/window-frame.cjs");
|
|
127
|
+
const { resolveDevQaMode } = require("./services/dev-qa-mode.cjs");
|
|
128
|
+
const { createBrowserPaneService, PANE_PARTITION } = require("./services/browser-pane/ipc.cjs");
|
|
129
|
+
const { DevServerSupervisor } = require("./services/browser-pane/dev-servers.cjs");
|
|
130
|
+
const { servicePorts } = require("./services/browser-pane/service-ports.cjs");
|
|
131
|
+
const {
|
|
132
|
+
DISCOVERY_ENV: PANE_DISCOVERY_ENV,
|
|
133
|
+
createHandlers: createPaneBridgeHandlers,
|
|
134
|
+
discoveryPath: paneDiscoveryPath,
|
|
135
|
+
startBridge: startPaneBridge,
|
|
136
|
+
} = require("./services/browser-pane/bridge-server.cjs");
|
|
127
137
|
|
|
128
138
|
// No ozone switch: Electron 38+ already picks Wayland or X11, and users override with --ozone-platform=x11.
|
|
129
139
|
for (const [name, value] of chromiumSwitches({ platform: process.platform, env: process.env })) {
|
|
@@ -219,6 +229,10 @@ const RESTART_TIMEOUT = 90000;
|
|
|
219
229
|
// Parse CLI args (T11: --minimized flag for auto-start)
|
|
220
230
|
const startMinimized = process.argv.includes("--minimized");
|
|
221
231
|
|
|
232
|
+
// GAIA_BIN in an unpackaged build: use that backend and leave the user's install alone.
|
|
233
|
+
const devQa = resolveDevQaMode({ isPackaged: app.isPackaged, env: process.env });
|
|
234
|
+
if (devQa) console.log(`[main] Dev QA mode: backend ${devQa.gaiaBin}; installer and pidfile skipped`);
|
|
235
|
+
|
|
222
236
|
// Load app.config.json if available
|
|
223
237
|
let appConfig = {};
|
|
224
238
|
try {
|
|
@@ -273,6 +287,20 @@ let notificationService = null;
|
|
|
273
287
|
/** @type {KeepAwake | null} */
|
|
274
288
|
let keepAwake = null;
|
|
275
289
|
|
|
290
|
+
/** @type {ReturnType<typeof createBrowserPaneService> | null} */
|
|
291
|
+
let browserPane = null;
|
|
292
|
+
|
|
293
|
+
/** @type {Awaited<ReturnType<typeof startPaneBridge>> | null} */
|
|
294
|
+
let paneBridge = null;
|
|
295
|
+
|
|
296
|
+
/** @type {DevServerSupervisor | null} */
|
|
297
|
+
let devServers = null;
|
|
298
|
+
|
|
299
|
+
/** Where the agent finds the pane's bridge; the backend is told through PANE_DISCOVERY_ENV. */
|
|
300
|
+
function paneDiscoveryFile() {
|
|
301
|
+
return paneDiscoveryPath({ devQa: Boolean(devQa), userDataDir: app.getPath("userData"), gaiaDir: _GAIA_DIR });
|
|
302
|
+
}
|
|
303
|
+
|
|
276
304
|
/** @type {PortManager} */
|
|
277
305
|
const portManager = new PortManager({
|
|
278
306
|
logger: { log: console.log.bind(console), error: console.error.bind(console) },
|
|
@@ -351,7 +379,7 @@ async function cleanupOrphanedBackend() {
|
|
|
351
379
|
* (shouldn't happen post-ensureBackend, but we guard just in case).
|
|
352
380
|
*/
|
|
353
381
|
async function startBackend() {
|
|
354
|
-
const gaiaCmd = backendInstaller.findGaiaBin();
|
|
382
|
+
const gaiaCmd = devQa ? devQa.gaiaBin : backendInstaller.findGaiaBin();
|
|
355
383
|
|
|
356
384
|
if (!gaiaCmd) {
|
|
357
385
|
console.error(
|
|
@@ -376,7 +404,8 @@ async function startBackend() {
|
|
|
376
404
|
// Defensively clean up any orphaned backend in case bootstrap was skipped
|
|
377
405
|
// on this path. cleanupOrphanedBackend() is idempotent and a no-op once the
|
|
378
406
|
// pidfile has already been consumed earlier in app startup.
|
|
379
|
-
|
|
407
|
+
// Dev QA mode leaves it alone: it belongs to the installed app's backend.
|
|
408
|
+
if (!devQa) await cleanupOrphanedBackend();
|
|
380
409
|
|
|
381
410
|
console.log(`Starting backend: ${gaiaCmd} chat --ui --ui-port ${backendPort}`);
|
|
382
411
|
|
|
@@ -394,9 +423,11 @@ async function startBackend() {
|
|
|
394
423
|
// and no other GAIA client is using them.
|
|
395
424
|
// GAIA_BUNDLED_LEMONADE_DIR: where EmbeddedLemonade.install() finds the
|
|
396
425
|
// archive this app ships (electron-builder.yml) instead of downloading it.
|
|
426
|
+
// GAIA_BROWSER_PANE_DISCOVERY: the agent finds this app's browser pane, never another app's.
|
|
397
427
|
env: {
|
|
398
428
|
...process.env,
|
|
399
429
|
GAIA_APP_PID: String(process.pid),
|
|
430
|
+
[PANE_DISCOVERY_ENV]: paneDiscoveryFile(),
|
|
400
431
|
// Piped stdout is block-buffered: a dying backend's last lines would never arrive.
|
|
401
432
|
PYTHONUNBUFFERED: "1",
|
|
402
433
|
...(app.isPackaged && {
|
|
@@ -437,13 +468,15 @@ async function startBackend() {
|
|
|
437
468
|
// Write a PID file so subsequent AppImage launches can detect and
|
|
438
469
|
// cleanup this backend if it becomes orphaned. The pidfile is removed
|
|
439
470
|
// when the child exits.
|
|
440
|
-
|
|
441
|
-
try {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
471
|
+
if (!devQa) {
|
|
472
|
+
try {
|
|
473
|
+
try { fs.mkdirSync(_GAIA_DIR, { recursive: true }); } catch { /* ignore */ }
|
|
474
|
+
const pidFile = path.join(_GAIA_DIR, "backend.pid");
|
|
475
|
+
fs.writeFileSync(pidFile, String(child.pid), { mode: 0o600 });
|
|
476
|
+
console.log(`[main] Wrote backend pidfile ${pidFile} (pid=${child.pid})`);
|
|
477
|
+
} catch (err) {
|
|
478
|
+
console.warn(`[main] Could not write backend pidfile: ${err.message}`);
|
|
479
|
+
}
|
|
447
480
|
}
|
|
448
481
|
|
|
449
482
|
child.on("exit", (code, signal) => {
|
|
@@ -875,6 +908,7 @@ function reopenWindow() {
|
|
|
875
908
|
revealWhenReady(reopened, () => !reopened.isDestroyed() && reopened.show());
|
|
876
909
|
if (trayManager) trayManager.mainWindow = mainWindow;
|
|
877
910
|
if (notificationService) notificationService.mainWindow = mainWindow;
|
|
911
|
+
if (browserPane) browserPane.attach(mainWindow);
|
|
878
912
|
loadApp().catch((err) => {
|
|
879
913
|
console.error("[main] Failed to load the reopened window:", err.message);
|
|
880
914
|
dialog.showErrorBox("GAIA", `GAIA couldn't reopen its window: ${err.message}`);
|
|
@@ -920,6 +954,44 @@ function initializeServices() {
|
|
|
920
954
|
|
|
921
955
|
folderDialog.registerIpcHandlers();
|
|
922
956
|
|
|
957
|
+
// GAIA's backend, the pane bridge, and GAIA's other local services: no pane page may reach any.
|
|
958
|
+
const appPorts = () => [backendPort, ...(paneBridge ? [paneBridge.port] : []), ...servicePorts()];
|
|
959
|
+
|
|
960
|
+
// Dev servers the agent starts; ones a crash left running are stopped first.
|
|
961
|
+
devServers = new DevServerSupervisor({
|
|
962
|
+
dir: path.join(app.getPath("userData"), "dev-servers"),
|
|
963
|
+
blockedPorts: appPorts,
|
|
964
|
+
onChange: () => {
|
|
965
|
+
if (browserPane) browserPane.publish();
|
|
966
|
+
},
|
|
967
|
+
});
|
|
968
|
+
devServers.start();
|
|
969
|
+
|
|
970
|
+
// A browser beside the chat; its pages can't reach GAIA's own backend.
|
|
971
|
+
browserPane = createBrowserPaneService({
|
|
972
|
+
ipcMain,
|
|
973
|
+
session: session.fromPartition(PANE_PARTITION),
|
|
974
|
+
shell,
|
|
975
|
+
userDataDir: app.getPath("userData"),
|
|
976
|
+
savePathFor: saveFolderFor,
|
|
977
|
+
// GAIA's backend, the bridge and GAIA's other local services: no pane page may reach any.
|
|
978
|
+
blockedPorts: appPorts,
|
|
979
|
+
devServers,
|
|
980
|
+
});
|
|
981
|
+
browserPane.attach(mainWindow);
|
|
982
|
+
|
|
983
|
+
// The agent reaches the pane through this loopback bridge, in-process or from a sidecar.
|
|
984
|
+
startPaneBridge({
|
|
985
|
+
discoveryFile: paneDiscoveryFile(),
|
|
986
|
+
handlers: createPaneBridgeHandlers({ getHost: () => browserPane.getHost(), devServers, appVersion: app.getVersion() }),
|
|
987
|
+
})
|
|
988
|
+
.then((bridge) => {
|
|
989
|
+
paneBridge = bridge;
|
|
990
|
+
})
|
|
991
|
+
.catch((err) => {
|
|
992
|
+
console.error(`[main] The browser pane bridge did not start, so the agent can't use the pane: ${err.message}`);
|
|
993
|
+
});
|
|
994
|
+
|
|
923
995
|
console.log("[main] Services initialized");
|
|
924
996
|
}
|
|
925
997
|
|
|
@@ -1093,36 +1165,40 @@ app.whenReady().then(async () => {
|
|
|
1093
1165
|
});
|
|
1094
1166
|
|
|
1095
1167
|
// Decided before the window has a page, so a current backend never sees this screen.
|
|
1096
|
-
|
|
1168
|
+
// Dev QA mode runs GAIA_BIN's backend and never installs one.
|
|
1169
|
+
if (!devQa) showingInstallScreen = !backendInstaller.isBackendCurrent();
|
|
1097
1170
|
if (showingInstallScreen) await loadApp();
|
|
1098
1171
|
|
|
1099
|
-
//
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1172
|
+
// Both write to the user's ~/.gaia, so dev QA mode skips them.
|
|
1173
|
+
if (!devQa) {
|
|
1174
|
+
// Phase 0: seed bundled agents BEFORE the Python backend starts, so the
|
|
1175
|
+
// agent registry sees them on its first discovery pass. Failures here are
|
|
1176
|
+
// non-fatal — the app must still launch even if seeding is blocked (e.g.
|
|
1177
|
+
// permission error on ~/.gaia/agents).
|
|
1178
|
+
try {
|
|
1179
|
+
const seedResult = await agentSeeder.seedBundledAgents();
|
|
1180
|
+
if (seedResult.seeded.length > 0) {
|
|
1181
|
+
console.log("[main] Seeded agents:", seedResult.seeded);
|
|
1182
|
+
}
|
|
1183
|
+
if (seedResult.cleaned.length > 0) {
|
|
1184
|
+
console.log("[main] Cleaned legacy agents:", seedResult.cleaned);
|
|
1185
|
+
}
|
|
1186
|
+
if (seedResult.errors.length > 0) {
|
|
1187
|
+
console.warn(
|
|
1188
|
+
"[main] Agent seeding errors:",
|
|
1189
|
+
seedResult.errors.map((e) => e.id)
|
|
1190
|
+
);
|
|
1191
|
+
}
|
|
1192
|
+
} catch (err) {
|
|
1193
|
+
console.warn("[main] Agent seeding failed (non-fatal):", err);
|
|
1116
1194
|
}
|
|
1117
|
-
} catch (err) {
|
|
1118
|
-
console.warn("[main] Agent seeding failed (non-fatal):", err);
|
|
1119
|
-
}
|
|
1120
1195
|
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1196
|
+
// Phase A0: kill any orphaned backend from a previous launch BEFORE the
|
|
1197
|
+
// installer runs. On Windows a live `gaia chat --ui` holds an open handle on
|
|
1198
|
+
// gaia.exe, so an upgrade's `uv pip install --refresh` fails with os error 32
|
|
1199
|
+
// unless that process is gone first (issue #1388).
|
|
1200
|
+
await cleanupOrphanedBackend();
|
|
1201
|
+
}
|
|
1126
1202
|
|
|
1127
1203
|
// Phase A: install or upgrade the Python backend behind EngineInstallScreen.
|
|
1128
1204
|
if (showingInstallScreen) {
|
|
@@ -1195,8 +1271,8 @@ app.whenReady().then(async () => {
|
|
|
1195
1271
|
if (mainWindow) await loadApp();
|
|
1196
1272
|
}
|
|
1197
1273
|
|
|
1198
|
-
// Auto-start enabled agents (T2)
|
|
1199
|
-
if (agentProcessManager) {
|
|
1274
|
+
// Auto-start enabled agents (T2); in dev QA mode the installed app owns them.
|
|
1275
|
+
if (agentProcessManager && !devQa) {
|
|
1200
1276
|
try {
|
|
1201
1277
|
await agentProcessManager.startAllEnabled();
|
|
1202
1278
|
} catch (err) {
|
|
@@ -1320,9 +1396,14 @@ async function cleanup() {
|
|
|
1320
1396
|
keepAwake = null;
|
|
1321
1397
|
}
|
|
1322
1398
|
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1399
|
+
if (paneBridge) {
|
|
1400
|
+
await paneBridge.close().catch((err) => console.error(`[main] Closing the browser pane bridge failed: ${err.message}`));
|
|
1401
|
+
paneBridge = null;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
// The install, the agents, the backend and the dev servers stop side by side: each
|
|
1405
|
+
// waits out its own grace period, and in series they could overrun the quit's time limit.
|
|
1406
|
+
await Promise.all([installStopped, stopAgentsForQuit(), stopBackendForQuit(), stopDevServersForQuit()]);
|
|
1326
1407
|
if (updating) await stopDaemonForUpdate();
|
|
1327
1408
|
|
|
1328
1409
|
// Destroy tray icon
|
|
@@ -1332,6 +1413,15 @@ async function cleanup() {
|
|
|
1332
1413
|
}
|
|
1333
1414
|
}
|
|
1334
1415
|
|
|
1416
|
+
async function stopDevServersForQuit() {
|
|
1417
|
+
if (!devServers) return;
|
|
1418
|
+
try {
|
|
1419
|
+
await devServers.stopAll();
|
|
1420
|
+
} catch (err) {
|
|
1421
|
+
console.error(`[main] Stopping dev servers failed: ${err.message}. Any left running are stopped on the next launch.`);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1335
1425
|
/**
|
|
1336
1426
|
* The daemon runs from the app's own files, which the update is about to
|
|
1337
1427
|
* replace, and macOS has no installer step that stops it first.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amd-gaia/agent-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"productName": "GAIA Agent UI",
|
|
6
6
|
"desktopName": "gaia-desktop.desktop",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"test:watch": "vitest",
|
|
63
63
|
"test:visual": "vite build && playwright test -c visual/playwright.config.ts",
|
|
64
64
|
"docs:shots": "vite build && playwright test -c visual/docs.playwright.config.ts",
|
|
65
|
-
"test:rtl": "vite build && playwright test -c visual/playwright.config.ts rtl --project=light",
|
|
65
|
+
"test:rtl": "vite build && playwright test -c visual/playwright.config.ts visual/rtl.visual.ts --project=light",
|
|
66
66
|
"test:scroll": "vite build && playwright test -c visual/playwright.config.ts autoscroll --project=light",
|
|
67
67
|
"gen:api-types": "node scripts/gen-api-types.mjs"
|
|
68
68
|
},
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"electron-updater": "^6.8.3"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@playwright/test": "1.65.
|
|
73
|
+
"@playwright/test": "1.65.1",
|
|
74
74
|
"@testing-library/jest-dom": "^7.0.0",
|
|
75
75
|
"@testing-library/react": "^16.1.0",
|
|
76
76
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -87,6 +87,8 @@
|
|
|
87
87
|
"react-dom": "^19.2.7",
|
|
88
88
|
"react-markdown": "^10.1.0",
|
|
89
89
|
"remark-gfm": "^4.0.1",
|
|
90
|
+
"remark-math": "^6.0.0",
|
|
91
|
+
"temml": "^0.14.0",
|
|
90
92
|
"typescript": "^7.0.2",
|
|
91
93
|
"vite": "^8.3.2",
|
|
92
94
|
"vitest": "^5.0.3",
|
package/preload.cjs
CHANGED
|
@@ -83,6 +83,34 @@ contextBridge.exposeInMainWorld("gaiaWindow", {
|
|
|
83
83
|
setColors: (colors) => ipcRenderer.invoke("window:set-titlebar-colors", colors),
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
// ── Browser pane ─────────────────────────────────────────────────────────
|
|
87
|
+
// Channel names match CHANNELS in services/browser-pane/ipc.cjs (a sandboxed
|
|
88
|
+
// preload can't require it). Types: services/browser-pane/contract.d.ts.
|
|
89
|
+
contextBridge.exposeInMainWorld("gaiaBrowserPane", {
|
|
90
|
+
getState: () => ipcRenderer.invoke("pane:get-state"),
|
|
91
|
+
onState: (cb) => onEvent("pane:state", cb),
|
|
92
|
+
onCommand: (cb) => onEvent("pane:command", cb),
|
|
93
|
+
setBounds: (rect) => ipcRenderer.send("pane:set-bounds", rect),
|
|
94
|
+
setView: (chat, visible) => ipcRenderer.send("pane:set-view", chat, visible),
|
|
95
|
+
claimDraft: (sessionId) => ipcRenderer.send("pane:claim-draft", sessionId),
|
|
96
|
+
forgetChat: (sessionId) => ipcRenderer.send("pane:forget-chat", sessionId),
|
|
97
|
+
setOccluded: (occluded) => ipcRenderer.invoke("pane:set-occluded", occluded),
|
|
98
|
+
openTab: (url) => ipcRenderer.invoke("pane:open-tab", url),
|
|
99
|
+
closeTab: (tabId) => ipcRenderer.invoke("pane:close-tab", tabId),
|
|
100
|
+
selectTab: (tabId) => ipcRenderer.invoke("pane:select-tab", tabId),
|
|
101
|
+
navigate: (tabId, url) => ipcRenderer.invoke("pane:navigate", tabId, url),
|
|
102
|
+
history: (tabId, action) => ipcRenderer.invoke("pane:history", tabId, action),
|
|
103
|
+
toggleDevTools: (tabId) => ipcRenderer.invoke("pane:toggle-devtools", tabId),
|
|
104
|
+
clearBrowsingData: () => ipcRenderer.invoke("pane:clear-data"),
|
|
105
|
+
openExternal: (tabId) => ipcRenderer.invoke("pane:open-external", tabId),
|
|
106
|
+
setControl: (tabId, control) => ipcRenderer.invoke("pane:set-control", tabId, control),
|
|
107
|
+
setViewport: (tabId, choice) => ipcRenderer.invoke("pane:set-viewport", tabId, choice),
|
|
108
|
+
togglePicking: () => ipcRenderer.invoke("pane:toggle-picking"),
|
|
109
|
+
onPicked: (cb) => onEvent("pane:picked", cb),
|
|
110
|
+
stopDevServer: (key) => ipcRenderer.invoke("pane:stop-dev-server", key),
|
|
111
|
+
answerDialog: (tabId, accept, text) => ipcRenderer.invoke("pane:answer-dialog", tabId, accept, text),
|
|
112
|
+
});
|
|
113
|
+
|
|
86
114
|
// ── Backend install (Phase A) ───────────────────────────────────────────
|
|
87
115
|
// EngineInstallScreen runs with no backend, so this stands apart from gaiaAPI.
|
|
88
116
|
contextBridge.exposeInMainWorld("gaiaInstall", {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright(C) 2026 Advanced Micro Devices, Inc. All rights reserved.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
/** An agent op's failure, with a code from BridgeErrorCode and a message written for the model. */
|
|
7
|
+
class BridgeError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* @param {import("./contract").BridgeErrorCode} code
|
|
10
|
+
* @param {string} message
|
|
11
|
+
* @param {Record<string, unknown>} [data]
|
|
12
|
+
*/
|
|
13
|
+
constructor(code, message, data = {}) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.code = code;
|
|
16
|
+
this.data = data;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = { BridgeError };
|