@trops/dash-core 0.1.107 → 0.1.110
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/electron/index.js +540 -153
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +1243 -385
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1242 -384
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/electron/index.js
CHANGED
|
@@ -638,6 +638,9 @@ const REGISTRY_AUTH_GET_STATUS$1 = "registry-auth:get-status";
|
|
|
638
638
|
const REGISTRY_AUTH_GET_PROFILE$1 = "registry-auth:get-profile";
|
|
639
639
|
const REGISTRY_AUTH_LOGOUT$1 = "registry-auth:logout";
|
|
640
640
|
const REGISTRY_AUTH_PUBLISH$1 = "registry-auth:publish";
|
|
641
|
+
const REGISTRY_AUTH_UPDATE_PROFILE$1 = "registry-auth:update-profile";
|
|
642
|
+
const REGISTRY_AUTH_GET_PACKAGES$1 = "registry-auth:get-packages";
|
|
643
|
+
const REGISTRY_AUTH_UPDATE_PACKAGE$1 = "registry-auth:update-package";
|
|
641
644
|
|
|
642
645
|
var registryAuthEvents$1 = {
|
|
643
646
|
REGISTRY_AUTH_INITIATE_LOGIN: REGISTRY_AUTH_INITIATE_LOGIN$1,
|
|
@@ -646,6 +649,31 @@ var registryAuthEvents$1 = {
|
|
|
646
649
|
REGISTRY_AUTH_GET_PROFILE: REGISTRY_AUTH_GET_PROFILE$1,
|
|
647
650
|
REGISTRY_AUTH_LOGOUT: REGISTRY_AUTH_LOGOUT$1,
|
|
648
651
|
REGISTRY_AUTH_PUBLISH: REGISTRY_AUTH_PUBLISH$1,
|
|
652
|
+
REGISTRY_AUTH_UPDATE_PROFILE: REGISTRY_AUTH_UPDATE_PROFILE$1,
|
|
653
|
+
REGISTRY_AUTH_GET_PACKAGES: REGISTRY_AUTH_GET_PACKAGES$1,
|
|
654
|
+
REGISTRY_AUTH_UPDATE_PACKAGE: REGISTRY_AUTH_UPDATE_PACKAGE$1,
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Event Constants — Session Events
|
|
659
|
+
*
|
|
660
|
+
* IPC event constants for session management (recents + session restore).
|
|
661
|
+
*/
|
|
662
|
+
|
|
663
|
+
const SESSION_GET_RECENTS$1 = "session:get-recents";
|
|
664
|
+
const SESSION_ADD_RECENT$1 = "session:add-recent";
|
|
665
|
+
const SESSION_CLEAR_RECENTS$1 = "session:clear-recents";
|
|
666
|
+
const SESSION_GET_STATE$1 = "session:get-state";
|
|
667
|
+
const SESSION_SAVE_STATE$1 = "session:save-state";
|
|
668
|
+
const SESSION_CLEAR_STATE$1 = "session:clear-state";
|
|
669
|
+
|
|
670
|
+
var sessionEvents$1 = {
|
|
671
|
+
SESSION_GET_RECENTS: SESSION_GET_RECENTS$1,
|
|
672
|
+
SESSION_ADD_RECENT: SESSION_ADD_RECENT$1,
|
|
673
|
+
SESSION_CLEAR_RECENTS: SESSION_CLEAR_RECENTS$1,
|
|
674
|
+
SESSION_GET_STATE: SESSION_GET_STATE$1,
|
|
675
|
+
SESSION_SAVE_STATE: SESSION_SAVE_STATE$1,
|
|
676
|
+
SESSION_CLEAR_STATE: SESSION_CLEAR_STATE$1,
|
|
649
677
|
};
|
|
650
678
|
|
|
651
679
|
/**
|
|
@@ -672,6 +700,7 @@ const clientCacheEvents = clientCacheEvents$1;
|
|
|
672
700
|
const dashboardConfigEvents = dashboardConfigEvents$1;
|
|
673
701
|
const dashboardRatingsEvents = dashboardRatingsEvents$1;
|
|
674
702
|
const registryAuthEvents = registryAuthEvents$1;
|
|
703
|
+
const sessionEvents = sessionEvents$1;
|
|
675
704
|
|
|
676
705
|
const publicEvents = {
|
|
677
706
|
...dataEvents,
|
|
@@ -697,6 +726,7 @@ var events$8 = {
|
|
|
697
726
|
...dashboardConfigEvents,
|
|
698
727
|
...dashboardRatingsEvents,
|
|
699
728
|
...registryAuthEvents,
|
|
729
|
+
...sessionEvents,
|
|
700
730
|
};
|
|
701
731
|
|
|
702
732
|
/**
|
|
@@ -10194,16 +10224,16 @@ const REGISTRY_BASE_URL$1 =
|
|
|
10194
10224
|
process.env.DASH_REGISTRY_API_URL || "https://registry.trops.dev";
|
|
10195
10225
|
|
|
10196
10226
|
// Lazy-load electron-store to avoid issues when not installed
|
|
10197
|
-
let store = null;
|
|
10198
|
-
function getStore() {
|
|
10199
|
-
if (!store) {
|
|
10227
|
+
let store$1 = null;
|
|
10228
|
+
function getStore$1() {
|
|
10229
|
+
if (!store$1) {
|
|
10200
10230
|
const Store = require$$1;
|
|
10201
|
-
store = new Store({
|
|
10231
|
+
store$1 = new Store({
|
|
10202
10232
|
name: "dash-registry-auth",
|
|
10203
10233
|
encryptionKey: "dash-registry-v1",
|
|
10204
10234
|
});
|
|
10205
10235
|
}
|
|
10206
|
-
return store;
|
|
10236
|
+
return store$1;
|
|
10207
10237
|
}
|
|
10208
10238
|
|
|
10209
10239
|
/**
|
|
@@ -10261,7 +10291,7 @@ async function pollForToken$1(deviceCode) {
|
|
|
10261
10291
|
const data = await response.json();
|
|
10262
10292
|
|
|
10263
10293
|
// Store the token securely
|
|
10264
|
-
const s = getStore();
|
|
10294
|
+
const s = getStore$1();
|
|
10265
10295
|
s.set("accessToken", data.access_token);
|
|
10266
10296
|
s.set("userId", data.user_id);
|
|
10267
10297
|
s.set("tokenType", data.token_type);
|
|
@@ -10284,7 +10314,7 @@ async function pollForToken$1(deviceCode) {
|
|
|
10284
10314
|
*/
|
|
10285
10315
|
function getStoredToken$1() {
|
|
10286
10316
|
try {
|
|
10287
|
-
const s = getStore();
|
|
10317
|
+
const s = getStore$1();
|
|
10288
10318
|
const token = s.get("accessToken");
|
|
10289
10319
|
if (!token) return null;
|
|
10290
10320
|
|
|
@@ -10351,7 +10381,7 @@ async function getRegistryProfile$1() {
|
|
|
10351
10381
|
*/
|
|
10352
10382
|
function clearToken() {
|
|
10353
10383
|
try {
|
|
10354
|
-
const s = getStore();
|
|
10384
|
+
const s = getStore$1();
|
|
10355
10385
|
s.clear();
|
|
10356
10386
|
console.log("[RegistryAuthController] Token cleared");
|
|
10357
10387
|
} catch (err) {
|
|
@@ -10359,12 +10389,116 @@ function clearToken() {
|
|
|
10359
10389
|
}
|
|
10360
10390
|
}
|
|
10361
10391
|
|
|
10392
|
+
/**
|
|
10393
|
+
* Update the authenticated user's registry profile.
|
|
10394
|
+
*
|
|
10395
|
+
* @param {Object} updates - Fields to update (e.g. { displayName })
|
|
10396
|
+
* @returns {Promise<Object|null>} Updated user or null on 401
|
|
10397
|
+
*/
|
|
10398
|
+
async function updateRegistryProfile$1(updates) {
|
|
10399
|
+
const stored = getStoredToken$1();
|
|
10400
|
+
if (!stored) return null;
|
|
10401
|
+
|
|
10402
|
+
try {
|
|
10403
|
+
const response = await fetch(`${REGISTRY_BASE_URL$1}/api/auth/me`, {
|
|
10404
|
+
method: "PATCH",
|
|
10405
|
+
headers: {
|
|
10406
|
+
Authorization: `Bearer ${stored.token}`,
|
|
10407
|
+
"Content-Type": "application/json",
|
|
10408
|
+
},
|
|
10409
|
+
body: JSON.stringify(updates),
|
|
10410
|
+
});
|
|
10411
|
+
|
|
10412
|
+
if (response.status === 401) {
|
|
10413
|
+
clearToken();
|
|
10414
|
+
return null;
|
|
10415
|
+
}
|
|
10416
|
+
if (!response.ok) return null;
|
|
10417
|
+
|
|
10418
|
+
const data = await response.json();
|
|
10419
|
+
return data.user || null;
|
|
10420
|
+
} catch {
|
|
10421
|
+
return null;
|
|
10422
|
+
}
|
|
10423
|
+
}
|
|
10424
|
+
|
|
10425
|
+
/**
|
|
10426
|
+
* Get the authenticated user's published packages.
|
|
10427
|
+
*
|
|
10428
|
+
* @returns {Promise<Object|null>} { packages: [...] } or null
|
|
10429
|
+
*/
|
|
10430
|
+
async function getRegistryPackages$1() {
|
|
10431
|
+
const stored = getStoredToken$1();
|
|
10432
|
+
if (!stored) return null;
|
|
10433
|
+
|
|
10434
|
+
try {
|
|
10435
|
+
const response = await fetch(
|
|
10436
|
+
`${REGISTRY_BASE_URL$1}/api/auth/me/packages`,
|
|
10437
|
+
{
|
|
10438
|
+
headers: {
|
|
10439
|
+
Authorization: `Bearer ${stored.token}`,
|
|
10440
|
+
},
|
|
10441
|
+
},
|
|
10442
|
+
);
|
|
10443
|
+
|
|
10444
|
+
if (response.status === 401) {
|
|
10445
|
+
clearToken();
|
|
10446
|
+
return null;
|
|
10447
|
+
}
|
|
10448
|
+
if (!response.ok) return null;
|
|
10449
|
+
|
|
10450
|
+
return await response.json();
|
|
10451
|
+
} catch {
|
|
10452
|
+
return null;
|
|
10453
|
+
}
|
|
10454
|
+
}
|
|
10455
|
+
|
|
10456
|
+
/**
|
|
10457
|
+
* Update a published package's metadata.
|
|
10458
|
+
*
|
|
10459
|
+
* @param {string} scope - Package scope (e.g. "@trops")
|
|
10460
|
+
* @param {string} name - Package name
|
|
10461
|
+
* @param {Object} updates - Fields to update (displayName, description, category, tags, visibility)
|
|
10462
|
+
* @returns {Promise<Object|null>} Updated package or null
|
|
10463
|
+
*/
|
|
10464
|
+
async function updateRegistryPackage$1(scope, name, updates) {
|
|
10465
|
+
const stored = getStoredToken$1();
|
|
10466
|
+
if (!stored) return null;
|
|
10467
|
+
|
|
10468
|
+
try {
|
|
10469
|
+
const response = await fetch(
|
|
10470
|
+
`${REGISTRY_BASE_URL$1}/api/packages/${encodeURIComponent(scope)}/${encodeURIComponent(name)}`,
|
|
10471
|
+
{
|
|
10472
|
+
method: "PATCH",
|
|
10473
|
+
headers: {
|
|
10474
|
+
Authorization: `Bearer ${stored.token}`,
|
|
10475
|
+
"Content-Type": "application/json",
|
|
10476
|
+
},
|
|
10477
|
+
body: JSON.stringify(updates),
|
|
10478
|
+
},
|
|
10479
|
+
);
|
|
10480
|
+
|
|
10481
|
+
if (response.status === 401) {
|
|
10482
|
+
clearToken();
|
|
10483
|
+
return null;
|
|
10484
|
+
}
|
|
10485
|
+
if (!response.ok) return null;
|
|
10486
|
+
|
|
10487
|
+
return await response.json();
|
|
10488
|
+
} catch {
|
|
10489
|
+
return null;
|
|
10490
|
+
}
|
|
10491
|
+
}
|
|
10492
|
+
|
|
10362
10493
|
var registryAuthController$1 = {
|
|
10363
10494
|
initiateDeviceFlow: initiateDeviceFlow$1,
|
|
10364
10495
|
pollForToken: pollForToken$1,
|
|
10365
10496
|
getStoredToken: getStoredToken$1,
|
|
10366
10497
|
getAuthStatus,
|
|
10367
10498
|
getRegistryProfile: getRegistryProfile$1,
|
|
10499
|
+
updateRegistryProfile: updateRegistryProfile$1,
|
|
10500
|
+
getRegistryPackages: getRegistryPackages$1,
|
|
10501
|
+
updateRegistryPackage: updateRegistryPackage$1,
|
|
10368
10502
|
clearToken,
|
|
10369
10503
|
};
|
|
10370
10504
|
|
|
@@ -11471,6 +11605,139 @@ clientCache$1.registerFactory("openai", (credentials) => {
|
|
|
11471
11605
|
return new OpenAI({ apiKey: credentials.apiKey });
|
|
11472
11606
|
});
|
|
11473
11607
|
|
|
11608
|
+
/**
|
|
11609
|
+
* sessionController.js
|
|
11610
|
+
*
|
|
11611
|
+
* Manages session persistence: recently opened dashboards and
|
|
11612
|
+
* open tab state for session restore on relaunch.
|
|
11613
|
+
*
|
|
11614
|
+
* Uses electron-store (unencrypted) for lightweight persistence.
|
|
11615
|
+
*/
|
|
11616
|
+
|
|
11617
|
+
const MAX_RECENTS = 20;
|
|
11618
|
+
|
|
11619
|
+
// Lazy-load electron-store to avoid issues when not installed
|
|
11620
|
+
let store = null;
|
|
11621
|
+
function getStore() {
|
|
11622
|
+
if (!store) {
|
|
11623
|
+
const Store = require$$1;
|
|
11624
|
+
store = new Store({ name: "dash-session" });
|
|
11625
|
+
}
|
|
11626
|
+
return store;
|
|
11627
|
+
}
|
|
11628
|
+
|
|
11629
|
+
/**
|
|
11630
|
+
* Get recently opened dashboards.
|
|
11631
|
+
*
|
|
11632
|
+
* @returns {Array<{ workspaceId: string, name: string, openedAt: string }>}
|
|
11633
|
+
*/
|
|
11634
|
+
function getRecentDashboards$1() {
|
|
11635
|
+
try {
|
|
11636
|
+
const s = getStore();
|
|
11637
|
+
const recents = s.get("recents", []);
|
|
11638
|
+
return recents
|
|
11639
|
+
.sort((a, b) => new Date(b.openedAt) - new Date(a.openedAt))
|
|
11640
|
+
.slice(0, MAX_RECENTS);
|
|
11641
|
+
} catch {
|
|
11642
|
+
return [];
|
|
11643
|
+
}
|
|
11644
|
+
}
|
|
11645
|
+
|
|
11646
|
+
/**
|
|
11647
|
+
* Add (or upsert) a recent dashboard entry.
|
|
11648
|
+
*
|
|
11649
|
+
* @param {string} workspaceId
|
|
11650
|
+
* @param {string} name
|
|
11651
|
+
* @returns {Array} Updated recents list
|
|
11652
|
+
*/
|
|
11653
|
+
function addRecentDashboard$1(workspaceId, name) {
|
|
11654
|
+
try {
|
|
11655
|
+
const s = getStore();
|
|
11656
|
+
let recents = s.get("recents", []);
|
|
11657
|
+
|
|
11658
|
+
// Remove existing entry for this workspace (upsert)
|
|
11659
|
+
recents = recents.filter((r) => r.workspaceId !== workspaceId);
|
|
11660
|
+
|
|
11661
|
+
// Prepend new entry
|
|
11662
|
+
recents.unshift({
|
|
11663
|
+
workspaceId,
|
|
11664
|
+
name: name || "Untitled",
|
|
11665
|
+
openedAt: new Date().toISOString(),
|
|
11666
|
+
});
|
|
11667
|
+
|
|
11668
|
+
// Cap at MAX_RECENTS
|
|
11669
|
+
recents = recents.slice(0, MAX_RECENTS);
|
|
11670
|
+
|
|
11671
|
+
s.set("recents", recents);
|
|
11672
|
+
return recents;
|
|
11673
|
+
} catch {
|
|
11674
|
+
return [];
|
|
11675
|
+
}
|
|
11676
|
+
}
|
|
11677
|
+
|
|
11678
|
+
/**
|
|
11679
|
+
* Clear all recent dashboards.
|
|
11680
|
+
*/
|
|
11681
|
+
function clearRecentDashboards$1() {
|
|
11682
|
+
try {
|
|
11683
|
+
const s = getStore();
|
|
11684
|
+
s.set("recents", []);
|
|
11685
|
+
} catch {
|
|
11686
|
+
// ignore
|
|
11687
|
+
}
|
|
11688
|
+
}
|
|
11689
|
+
|
|
11690
|
+
/**
|
|
11691
|
+
* Get saved session state (open tabs + active tab).
|
|
11692
|
+
*
|
|
11693
|
+
* @returns {{ openTabIds: string[], activeTabId: string | null } | null}
|
|
11694
|
+
*/
|
|
11695
|
+
function getSessionState$1() {
|
|
11696
|
+
try {
|
|
11697
|
+
const s = getStore();
|
|
11698
|
+
const state = s.get("sessionState", null);
|
|
11699
|
+
return state || null;
|
|
11700
|
+
} catch {
|
|
11701
|
+
return null;
|
|
11702
|
+
}
|
|
11703
|
+
}
|
|
11704
|
+
|
|
11705
|
+
/**
|
|
11706
|
+
* Save session state (open tabs + active tab).
|
|
11707
|
+
*
|
|
11708
|
+
* @param {string[]} openTabIds
|
|
11709
|
+
* @param {string|null} activeTabId
|
|
11710
|
+
*/
|
|
11711
|
+
function saveSessionState$1(openTabIds, activeTabId) {
|
|
11712
|
+
try {
|
|
11713
|
+
const s = getStore();
|
|
11714
|
+
s.set("sessionState", { openTabIds, activeTabId });
|
|
11715
|
+
} catch {
|
|
11716
|
+
// ignore
|
|
11717
|
+
}
|
|
11718
|
+
}
|
|
11719
|
+
|
|
11720
|
+
/**
|
|
11721
|
+
* Clear saved session state.
|
|
11722
|
+
*/
|
|
11723
|
+
function clearSessionState$1() {
|
|
11724
|
+
try {
|
|
11725
|
+
const s = getStore();
|
|
11726
|
+
s.delete("sessionState");
|
|
11727
|
+
} catch {
|
|
11728
|
+
// ignore
|
|
11729
|
+
}
|
|
11730
|
+
}
|
|
11731
|
+
|
|
11732
|
+
var sessionController = {
|
|
11733
|
+
getRecentDashboards: getRecentDashboards$1,
|
|
11734
|
+
addRecentDashboard: addRecentDashboard$1,
|
|
11735
|
+
clearRecentDashboards: clearRecentDashboards$1,
|
|
11736
|
+
getSessionState: getSessionState$1,
|
|
11737
|
+
saveSessionState: saveSessionState$1,
|
|
11738
|
+
clearSessionState: clearSessionState$1,
|
|
11739
|
+
};
|
|
11740
|
+
|
|
11474
11741
|
/**
|
|
11475
11742
|
* dashboardRatingsUtils.js
|
|
11476
11743
|
*
|
|
@@ -11705,12 +11972,23 @@ const {
|
|
|
11705
11972
|
getStoredToken: getRegistryToken,
|
|
11706
11973
|
getAuthStatus: getRegistryAuthStatus,
|
|
11707
11974
|
getRegistryProfile,
|
|
11975
|
+
updateRegistryProfile,
|
|
11976
|
+
getRegistryPackages,
|
|
11977
|
+
updateRegistryPackage,
|
|
11708
11978
|
clearToken: clearRegistryToken,
|
|
11709
11979
|
} = registryAuthController$1;
|
|
11710
11980
|
const {
|
|
11711
11981
|
publishToRegistry,
|
|
11712
11982
|
getRegistryUrl,
|
|
11713
11983
|
} = registryApiController$1;
|
|
11984
|
+
const {
|
|
11985
|
+
getRecentDashboards,
|
|
11986
|
+
addRecentDashboard,
|
|
11987
|
+
clearRecentDashboards,
|
|
11988
|
+
getSessionState,
|
|
11989
|
+
saveSessionState,
|
|
11990
|
+
clearSessionState,
|
|
11991
|
+
} = sessionController;
|
|
11714
11992
|
const {
|
|
11715
11993
|
saveDashboardRating,
|
|
11716
11994
|
getDashboardRating,
|
|
@@ -11779,12 +12057,21 @@ var controller = {
|
|
|
11779
12057
|
getRegistryToken,
|
|
11780
12058
|
getRegistryAuthStatus,
|
|
11781
12059
|
getRegistryProfile,
|
|
12060
|
+
updateRegistryProfile,
|
|
12061
|
+
getRegistryPackages,
|
|
12062
|
+
updateRegistryPackage,
|
|
11782
12063
|
clearRegistryToken,
|
|
11783
12064
|
publishToRegistry,
|
|
11784
12065
|
getRegistryUrl,
|
|
12066
|
+
getRecentDashboards,
|
|
12067
|
+
addRecentDashboard,
|
|
12068
|
+
clearRecentDashboards,
|
|
12069
|
+
getSessionState,
|
|
12070
|
+
saveSessionState,
|
|
12071
|
+
clearSessionState,
|
|
11785
12072
|
};
|
|
11786
12073
|
|
|
11787
|
-
const { ipcRenderer: ipcRenderer$
|
|
12074
|
+
const { ipcRenderer: ipcRenderer$l } = require$$0$1;
|
|
11788
12075
|
const {
|
|
11789
12076
|
SECURE_STORE_ENCRYPTION_CHECK,
|
|
11790
12077
|
SECURE_STORE_SET_DATA,
|
|
@@ -11796,10 +12083,10 @@ const {
|
|
|
11796
12083
|
*/
|
|
11797
12084
|
const secureStoreApi$2 = {
|
|
11798
12085
|
isEncryptionAvailable: () =>
|
|
11799
|
-
ipcRenderer$
|
|
12086
|
+
ipcRenderer$l.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
|
|
11800
12087
|
saveData: (key, value) =>
|
|
11801
|
-
ipcRenderer$
|
|
11802
|
-
getData: (key) => ipcRenderer$
|
|
12088
|
+
ipcRenderer$l.invoke(SECURE_STORE_SET_DATA, { key, value }),
|
|
12089
|
+
getData: (key) => ipcRenderer$l.invoke(SECURE_STORE_GET_DATA, { key }),
|
|
11803
12090
|
};
|
|
11804
12091
|
|
|
11805
12092
|
var secureStoreApi_1 = secureStoreApi$2;
|
|
@@ -11810,7 +12097,7 @@ var secureStoreApi_1 = secureStoreApi$2;
|
|
|
11810
12097
|
* Handle the workspace configuration file
|
|
11811
12098
|
*/
|
|
11812
12099
|
|
|
11813
|
-
const { ipcRenderer: ipcRenderer$
|
|
12100
|
+
const { ipcRenderer: ipcRenderer$k } = require$$0$1;
|
|
11814
12101
|
const {
|
|
11815
12102
|
WORKSPACE_LIST,
|
|
11816
12103
|
WORKSPACE_SAVE,
|
|
@@ -11827,7 +12114,7 @@ const workspaceApi$2 = {
|
|
|
11827
12114
|
*/
|
|
11828
12115
|
listWorkspacesForApplication: (appId) => {
|
|
11829
12116
|
console.log("listWorkspacesForApplication called with appId:", appId);
|
|
11830
|
-
return ipcRenderer$
|
|
12117
|
+
return ipcRenderer$k.invoke(WORKSPACE_LIST, { appId });
|
|
11831
12118
|
},
|
|
11832
12119
|
|
|
11833
12120
|
/**
|
|
@@ -11838,7 +12125,7 @@ const workspaceApi$2 = {
|
|
|
11838
12125
|
* @returns
|
|
11839
12126
|
*/
|
|
11840
12127
|
saveWorkspaceForApplication: (appId, data) =>
|
|
11841
|
-
ipcRenderer$
|
|
12128
|
+
ipcRenderer$k.invoke(WORKSPACE_SAVE, { appId, data }),
|
|
11842
12129
|
|
|
11843
12130
|
/**
|
|
11844
12131
|
* deleteWorkspaceForApplication
|
|
@@ -11848,7 +12135,7 @@ const workspaceApi$2 = {
|
|
|
11848
12135
|
* @returns
|
|
11849
12136
|
*/
|
|
11850
12137
|
deleteWorkspaceForApplication: (appId, workspaceId) =>
|
|
11851
|
-
ipcRenderer$
|
|
12138
|
+
ipcRenderer$k.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
|
|
11852
12139
|
};
|
|
11853
12140
|
|
|
11854
12141
|
var workspaceApi_1 = workspaceApi$2;
|
|
@@ -11860,15 +12147,15 @@ var workspaceApi_1 = workspaceApi$2;
|
|
|
11860
12147
|
*/
|
|
11861
12148
|
|
|
11862
12149
|
// ipcRenderer that must be used to invoke the events
|
|
11863
|
-
const { ipcRenderer: ipcRenderer$
|
|
12150
|
+
const { ipcRenderer: ipcRenderer$j } = require$$0$1;
|
|
11864
12151
|
|
|
11865
12152
|
const { LAYOUT_LIST, LAYOUT_SAVE } = events$8;
|
|
11866
12153
|
|
|
11867
12154
|
const layoutApi$2 = {
|
|
11868
12155
|
listLayoutsForApplication: (appId) =>
|
|
11869
|
-
ipcRenderer$
|
|
12156
|
+
ipcRenderer$j.invoke(LAYOUT_LIST, { appId }),
|
|
11870
12157
|
saveLayoutForApplication: (appId, data) =>
|
|
11871
|
-
ipcRenderer$
|
|
12158
|
+
ipcRenderer$j.invoke(LAYOUT_SAVE, { appId, data }),
|
|
11872
12159
|
};
|
|
11873
12160
|
|
|
11874
12161
|
var layoutApi_1 = layoutApi$2;
|
|
@@ -11880,7 +12167,7 @@ var layoutApi_1 = layoutApi$2;
|
|
|
11880
12167
|
*/
|
|
11881
12168
|
|
|
11882
12169
|
// ipcRenderer that must be used to invoke the events
|
|
11883
|
-
const { ipcRenderer: ipcRenderer$
|
|
12170
|
+
const { ipcRenderer: ipcRenderer$i } = require$$0$1;
|
|
11884
12171
|
|
|
11885
12172
|
const {
|
|
11886
12173
|
DATA_JSON_TO_CSV_FILE,
|
|
@@ -11899,7 +12186,7 @@ const {
|
|
|
11899
12186
|
const dataApi$2 = {
|
|
11900
12187
|
// convert a json array of objects to a csv string and save to file
|
|
11901
12188
|
convertJsonToCsvFile: (appId, jsonObject, filename) =>
|
|
11902
|
-
ipcRenderer$
|
|
12189
|
+
ipcRenderer$i.invoke(DATA_JSON_TO_CSV_FILE, {
|
|
11903
12190
|
appId,
|
|
11904
12191
|
jsonObject,
|
|
11905
12192
|
filename,
|
|
@@ -11907,10 +12194,10 @@ const dataApi$2 = {
|
|
|
11907
12194
|
|
|
11908
12195
|
// convert a json array of objects to a csv string and return a string
|
|
11909
12196
|
convertJsonToCsvString: (appId, jsonObject) =>
|
|
11910
|
-
ipcRenderer$
|
|
12197
|
+
ipcRenderer$i.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
|
|
11911
12198
|
|
|
11912
12199
|
parseXMLStream: (filepath, outpath, start) =>
|
|
11913
|
-
ipcRenderer$
|
|
12200
|
+
ipcRenderer$i.invoke(PARSE_XML_STREAM, {
|
|
11914
12201
|
filepath,
|
|
11915
12202
|
outpath,
|
|
11916
12203
|
start,
|
|
@@ -11924,7 +12211,7 @@ const dataApi$2 = {
|
|
|
11924
12211
|
headers = null,
|
|
11925
12212
|
limit = null,
|
|
11926
12213
|
) => {
|
|
11927
|
-
ipcRenderer$
|
|
12214
|
+
ipcRenderer$i.invoke(PARSE_CSV_STREAM, {
|
|
11928
12215
|
filepath,
|
|
11929
12216
|
outpath,
|
|
11930
12217
|
delimiter,
|
|
@@ -11935,15 +12222,15 @@ const dataApi$2 = {
|
|
|
11935
12222
|
},
|
|
11936
12223
|
|
|
11937
12224
|
readLinesFromFile: (filepath, lineCount) => {
|
|
11938
|
-
ipcRenderer$
|
|
12225
|
+
ipcRenderer$i.invoke(READ_LINES, { filepath, lineCount });
|
|
11939
12226
|
},
|
|
11940
12227
|
|
|
11941
12228
|
readJSONFromFile: (filepath, objectCount = null) => {
|
|
11942
|
-
ipcRenderer$
|
|
12229
|
+
ipcRenderer$i.invoke(READ_JSON, { filepath, objectCount });
|
|
11943
12230
|
},
|
|
11944
12231
|
|
|
11945
12232
|
readDataFromURL: (url, toFilepath) => {
|
|
11946
|
-
ipcRenderer$
|
|
12233
|
+
ipcRenderer$i.invoke(READ_DATA_URL, { url, toFilepath });
|
|
11947
12234
|
},
|
|
11948
12235
|
|
|
11949
12236
|
/*
|
|
@@ -11952,7 +12239,7 @@ const dataApi$2 = {
|
|
|
11952
12239
|
* @param {object} returnEmpty the return empty object
|
|
11953
12240
|
*/
|
|
11954
12241
|
saveData: (data, filename, append, returnEmpty, uuid) =>
|
|
11955
|
-
ipcRenderer$
|
|
12242
|
+
ipcRenderer$i.invoke(DATA_SAVE_TO_FILE, {
|
|
11956
12243
|
data,
|
|
11957
12244
|
filename,
|
|
11958
12245
|
append,
|
|
@@ -11964,14 +12251,14 @@ const dataApi$2 = {
|
|
|
11964
12251
|
* @param {string} filename the filename to read (not path)
|
|
11965
12252
|
*/
|
|
11966
12253
|
readData: (filename, returnEmpty = []) =>
|
|
11967
|
-
ipcRenderer$
|
|
12254
|
+
ipcRenderer$i.invoke(DATA_READ_FROM_FILE, { filename, returnEmpty }),
|
|
11968
12255
|
|
|
11969
12256
|
/**
|
|
11970
12257
|
* transformFile
|
|
11971
12258
|
* @returns
|
|
11972
12259
|
*/
|
|
11973
12260
|
transformFile: (filepath, outFilepath, mappingFunctionBody, args) => {
|
|
11974
|
-
ipcRenderer$
|
|
12261
|
+
ipcRenderer$i.invoke(TRANSFORM_FILE, {
|
|
11975
12262
|
filepath,
|
|
11976
12263
|
outFilepath,
|
|
11977
12264
|
mappingFunctionBody,
|
|
@@ -11980,7 +12267,7 @@ const dataApi$2 = {
|
|
|
11980
12267
|
},
|
|
11981
12268
|
|
|
11982
12269
|
extractColorsFromImageURL: (url) => {
|
|
11983
|
-
ipcRenderer$
|
|
12270
|
+
ipcRenderer$i.invoke(EXTRACT_COLORS_FROM_IMAGE, {
|
|
11984
12271
|
url,
|
|
11985
12272
|
});
|
|
11986
12273
|
},
|
|
@@ -11995,7 +12282,7 @@ var dataApi_1 = dataApi$2;
|
|
|
11995
12282
|
*/
|
|
11996
12283
|
|
|
11997
12284
|
// ipcRenderer that must be used to invoke the events
|
|
11998
|
-
const { ipcRenderer: ipcRenderer$
|
|
12285
|
+
const { ipcRenderer: ipcRenderer$h } = require$$0$1;
|
|
11999
12286
|
|
|
12000
12287
|
const {
|
|
12001
12288
|
SETTINGS_GET,
|
|
@@ -12006,14 +12293,14 @@ const {
|
|
|
12006
12293
|
} = events$8;
|
|
12007
12294
|
|
|
12008
12295
|
const settingsApi$2 = {
|
|
12009
|
-
getSettingsForApplication: () => ipcRenderer$
|
|
12296
|
+
getSettingsForApplication: () => ipcRenderer$h.invoke(SETTINGS_GET, {}),
|
|
12010
12297
|
saveSettingsForApplication: (data) =>
|
|
12011
|
-
ipcRenderer$
|
|
12012
|
-
getDataDirectory: () => ipcRenderer$
|
|
12298
|
+
ipcRenderer$h.invoke(SETTINGS_SAVE, { data }),
|
|
12299
|
+
getDataDirectory: () => ipcRenderer$h.invoke(SETTINGS_GET_DATA_DIR, {}),
|
|
12013
12300
|
setDataDirectory: (dataDirectory) =>
|
|
12014
|
-
ipcRenderer$
|
|
12301
|
+
ipcRenderer$h.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
|
|
12015
12302
|
migrateDataDirectory: (oldDirectory, newDirectory) =>
|
|
12016
|
-
ipcRenderer$
|
|
12303
|
+
ipcRenderer$h.invoke(SETTINGS_MIGRATE_DATA_DIR, {
|
|
12017
12304
|
oldDirectory,
|
|
12018
12305
|
newDirectory,
|
|
12019
12306
|
}),
|
|
@@ -12028,7 +12315,7 @@ var settingsApi_1 = settingsApi$2;
|
|
|
12028
12315
|
*/
|
|
12029
12316
|
|
|
12030
12317
|
// ipcRenderer that must be used to invoke the events
|
|
12031
|
-
const { ipcRenderer: ipcRenderer$
|
|
12318
|
+
const { ipcRenderer: ipcRenderer$g } = require$$0$1;
|
|
12032
12319
|
|
|
12033
12320
|
const { CHOOSE_FILE } = events$8;
|
|
12034
12321
|
|
|
@@ -12040,7 +12327,7 @@ const dialogApi$2 = {
|
|
|
12040
12327
|
*/
|
|
12041
12328
|
chooseFile: (allowFile = true, extensions = ["*"]) => {
|
|
12042
12329
|
console.log("dialog api choose file");
|
|
12043
|
-
return ipcRenderer$
|
|
12330
|
+
return ipcRenderer$g.invoke(CHOOSE_FILE, { allowFile, extensions });
|
|
12044
12331
|
},
|
|
12045
12332
|
};
|
|
12046
12333
|
|
|
@@ -12059,7 +12346,7 @@ var dialogApi_1 = dialogApi$2;
|
|
|
12059
12346
|
* mainApi.widgets.uninstall('Weather')
|
|
12060
12347
|
*/
|
|
12061
12348
|
|
|
12062
|
-
const { ipcRenderer: ipcRenderer$
|
|
12349
|
+
const { ipcRenderer: ipcRenderer$f } = require$$0$1;
|
|
12063
12350
|
|
|
12064
12351
|
const widgetApi$2 = {
|
|
12065
12352
|
/**
|
|
@@ -12068,7 +12355,7 @@ const widgetApi$2 = {
|
|
|
12068
12355
|
*/
|
|
12069
12356
|
list: async () => {
|
|
12070
12357
|
try {
|
|
12071
|
-
return await ipcRenderer$
|
|
12358
|
+
return await ipcRenderer$f.invoke("widget:list");
|
|
12072
12359
|
} catch (error) {
|
|
12073
12360
|
console.error("[WidgetApi] Error listing widgets:", error);
|
|
12074
12361
|
throw error;
|
|
@@ -12082,7 +12369,7 @@ const widgetApi$2 = {
|
|
|
12082
12369
|
*/
|
|
12083
12370
|
get: async (widgetName) => {
|
|
12084
12371
|
try {
|
|
12085
|
-
return await ipcRenderer$
|
|
12372
|
+
return await ipcRenderer$f.invoke("widget:get", widgetName);
|
|
12086
12373
|
} catch (error) {
|
|
12087
12374
|
console.error(`[WidgetApi] Error getting widget ${widgetName}:`, error);
|
|
12088
12375
|
throw error;
|
|
@@ -12113,7 +12400,7 @@ const widgetApi$2 = {
|
|
|
12113
12400
|
console.log(
|
|
12114
12401
|
`[WidgetApi] Installing widget: ${widgetName} from ${downloadUrl}`,
|
|
12115
12402
|
);
|
|
12116
|
-
const config = await ipcRenderer$
|
|
12403
|
+
const config = await ipcRenderer$f.invoke(
|
|
12117
12404
|
"widget:install",
|
|
12118
12405
|
widgetName,
|
|
12119
12406
|
downloadUrl,
|
|
@@ -12153,7 +12440,7 @@ const widgetApi$2 = {
|
|
|
12153
12440
|
console.log(
|
|
12154
12441
|
`[WidgetApi] Installing local widget: ${widgetName} from ${localPath}`,
|
|
12155
12442
|
);
|
|
12156
|
-
const config = await ipcRenderer$
|
|
12443
|
+
const config = await ipcRenderer$f.invoke(
|
|
12157
12444
|
"widget:install-local",
|
|
12158
12445
|
widgetName,
|
|
12159
12446
|
localPath,
|
|
@@ -12184,7 +12471,7 @@ const widgetApi$2 = {
|
|
|
12184
12471
|
loadFolder: async (folderPath) => {
|
|
12185
12472
|
try {
|
|
12186
12473
|
console.log(`[WidgetApi] Loading widgets from folder: ${folderPath}`);
|
|
12187
|
-
const results = await ipcRenderer$
|
|
12474
|
+
const results = await ipcRenderer$f.invoke(
|
|
12188
12475
|
"widget:load-folder",
|
|
12189
12476
|
folderPath,
|
|
12190
12477
|
);
|
|
@@ -12208,7 +12495,7 @@ const widgetApi$2 = {
|
|
|
12208
12495
|
uninstall: async (widgetName) => {
|
|
12209
12496
|
try {
|
|
12210
12497
|
console.log(`[WidgetApi] Uninstalling widget: ${widgetName}`);
|
|
12211
|
-
const success = await ipcRenderer$
|
|
12498
|
+
const success = await ipcRenderer$f.invoke("widget:uninstall", widgetName);
|
|
12212
12499
|
if (success) {
|
|
12213
12500
|
console.log(`[WidgetApi] ✓ Widget ${widgetName} uninstalled`);
|
|
12214
12501
|
} else {
|
|
@@ -12231,7 +12518,7 @@ const widgetApi$2 = {
|
|
|
12231
12518
|
*/
|
|
12232
12519
|
getCachePath: async () => {
|
|
12233
12520
|
try {
|
|
12234
|
-
return await ipcRenderer$
|
|
12521
|
+
return await ipcRenderer$f.invoke("widget:cache-path");
|
|
12235
12522
|
} catch (error) {
|
|
12236
12523
|
console.error("[WidgetApi] Error getting cache path:", error);
|
|
12237
12524
|
throw error;
|
|
@@ -12245,7 +12532,7 @@ const widgetApi$2 = {
|
|
|
12245
12532
|
*/
|
|
12246
12533
|
getStoragePath: async () => {
|
|
12247
12534
|
try {
|
|
12248
|
-
return await ipcRenderer$
|
|
12535
|
+
return await ipcRenderer$f.invoke("widget:storage-path");
|
|
12249
12536
|
} catch (error) {
|
|
12250
12537
|
console.error("[WidgetApi] Error getting storage path:", error);
|
|
12251
12538
|
throw error;
|
|
@@ -12262,7 +12549,7 @@ const widgetApi$2 = {
|
|
|
12262
12549
|
setStoragePath: async (customPath) => {
|
|
12263
12550
|
try {
|
|
12264
12551
|
console.log(`[WidgetApi] Setting storage path to: ${customPath}`);
|
|
12265
|
-
const result = await ipcRenderer$
|
|
12552
|
+
const result = await ipcRenderer$f.invoke(
|
|
12266
12553
|
"widget:set-storage-path",
|
|
12267
12554
|
customPath,
|
|
12268
12555
|
);
|
|
@@ -12284,7 +12571,7 @@ const widgetApi$2 = {
|
|
|
12284
12571
|
*/
|
|
12285
12572
|
getComponentConfigs: async () => {
|
|
12286
12573
|
try {
|
|
12287
|
-
return await ipcRenderer$
|
|
12574
|
+
return await ipcRenderer$f.invoke("widget:get-component-configs");
|
|
12288
12575
|
} catch (error) {
|
|
12289
12576
|
console.error("[WidgetApi] Error getting component configs:", error);
|
|
12290
12577
|
return [];
|
|
@@ -12299,7 +12586,7 @@ const widgetApi$2 = {
|
|
|
12299
12586
|
*/
|
|
12300
12587
|
readBundle: async (widgetName) => {
|
|
12301
12588
|
try {
|
|
12302
|
-
return await ipcRenderer$
|
|
12589
|
+
return await ipcRenderer$f.invoke("widget:read-bundle", widgetName);
|
|
12303
12590
|
} catch (error) {
|
|
12304
12591
|
console.error(
|
|
12305
12592
|
`[WidgetApi] Error reading bundle for ${widgetName}:`,
|
|
@@ -12316,7 +12603,7 @@ const widgetApi$2 = {
|
|
|
12316
12603
|
*/
|
|
12317
12604
|
readAllBundles: async () => {
|
|
12318
12605
|
try {
|
|
12319
|
-
return await ipcRenderer$
|
|
12606
|
+
return await ipcRenderer$f.invoke("widget:read-all-bundles");
|
|
12320
12607
|
} catch (error) {
|
|
12321
12608
|
console.error("[WidgetApi] Error reading all bundles:", error);
|
|
12322
12609
|
return [];
|
|
@@ -12336,7 +12623,7 @@ const widgetApi$2 = {
|
|
|
12336
12623
|
* });
|
|
12337
12624
|
*/
|
|
12338
12625
|
onInstalled: (callback) => {
|
|
12339
|
-
ipcRenderer$
|
|
12626
|
+
ipcRenderer$f.on("widget:installed", (event, data) => {
|
|
12340
12627
|
callback(data);
|
|
12341
12628
|
});
|
|
12342
12629
|
},
|
|
@@ -12354,7 +12641,7 @@ const widgetApi$2 = {
|
|
|
12354
12641
|
* });
|
|
12355
12642
|
*/
|
|
12356
12643
|
onLoaded: (callback) => {
|
|
12357
|
-
ipcRenderer$
|
|
12644
|
+
ipcRenderer$f.on("widgets:loaded", (event, data) => {
|
|
12358
12645
|
callback(data);
|
|
12359
12646
|
});
|
|
12360
12647
|
},
|
|
@@ -12365,7 +12652,7 @@ const widgetApi$2 = {
|
|
|
12365
12652
|
* @param {Function} callback - The callback to remove
|
|
12366
12653
|
*/
|
|
12367
12654
|
removeInstalledListener: (callback) => {
|
|
12368
|
-
ipcRenderer$
|
|
12655
|
+
ipcRenderer$f.removeListener("widget:installed", callback);
|
|
12369
12656
|
},
|
|
12370
12657
|
|
|
12371
12658
|
/**
|
|
@@ -12374,7 +12661,7 @@ const widgetApi$2 = {
|
|
|
12374
12661
|
* @param {Function} callback - The callback to remove
|
|
12375
12662
|
*/
|
|
12376
12663
|
removeLoadedListener: (callback) => {
|
|
12377
|
-
ipcRenderer$
|
|
12664
|
+
ipcRenderer$f.removeListener("widgets:loaded", callback);
|
|
12378
12665
|
},
|
|
12379
12666
|
};
|
|
12380
12667
|
|
|
@@ -12387,7 +12674,7 @@ var widgetApi_1 = widgetApi$2;
|
|
|
12387
12674
|
* Communicates with main process via IPC to handle encryption and file storage
|
|
12388
12675
|
*/
|
|
12389
12676
|
|
|
12390
|
-
const { ipcRenderer: ipcRenderer$
|
|
12677
|
+
const { ipcRenderer: ipcRenderer$e } = require$$0$1;
|
|
12391
12678
|
const {
|
|
12392
12679
|
PROVIDER_SAVE,
|
|
12393
12680
|
PROVIDER_LIST,
|
|
@@ -12419,7 +12706,7 @@ const providerApi$2 = {
|
|
|
12419
12706
|
mcpConfig = null,
|
|
12420
12707
|
allowedTools = null,
|
|
12421
12708
|
) =>
|
|
12422
|
-
ipcRenderer$
|
|
12709
|
+
ipcRenderer$e.invoke(PROVIDER_SAVE, {
|
|
12423
12710
|
appId,
|
|
12424
12711
|
providerName,
|
|
12425
12712
|
providerType,
|
|
@@ -12437,7 +12724,7 @@ const providerApi$2 = {
|
|
|
12437
12724
|
* @param {String} appId - the appId specified in the dash initialization
|
|
12438
12725
|
* @returns {Promise<Array>} Array of provider objects with name, type, credentials
|
|
12439
12726
|
*/
|
|
12440
|
-
listProviders: (appId) => ipcRenderer$
|
|
12727
|
+
listProviders: (appId) => ipcRenderer$e.invoke(PROVIDER_LIST, { appId }),
|
|
12441
12728
|
|
|
12442
12729
|
/**
|
|
12443
12730
|
* getProvider
|
|
@@ -12449,7 +12736,7 @@ const providerApi$2 = {
|
|
|
12449
12736
|
* @returns {Promise<Object>} Provider object with name, type, credentials
|
|
12450
12737
|
*/
|
|
12451
12738
|
getProvider: (appId, providerName) =>
|
|
12452
|
-
ipcRenderer$
|
|
12739
|
+
ipcRenderer$e.invoke(PROVIDER_GET, { appId, providerName }),
|
|
12453
12740
|
|
|
12454
12741
|
/**
|
|
12455
12742
|
* deleteProvider
|
|
@@ -12461,7 +12748,7 @@ const providerApi$2 = {
|
|
|
12461
12748
|
* @returns {Promise}
|
|
12462
12749
|
*/
|
|
12463
12750
|
deleteProvider: (appId, providerName) =>
|
|
12464
|
-
ipcRenderer$
|
|
12751
|
+
ipcRenderer$e.invoke(PROVIDER_DELETE, { appId, providerName }),
|
|
12465
12752
|
|
|
12466
12753
|
/**
|
|
12467
12754
|
* listProvidersForApplication
|
|
@@ -12471,14 +12758,14 @@ const providerApi$2 = {
|
|
|
12471
12758
|
* @param {String} appId - the appId specified in the dash initialization
|
|
12472
12759
|
*/
|
|
12473
12760
|
listProvidersForApplication: (appId) => {
|
|
12474
|
-
ipcRenderer$
|
|
12761
|
+
ipcRenderer$e
|
|
12475
12762
|
.invoke(PROVIDER_LIST, { appId })
|
|
12476
12763
|
.then((result) => {
|
|
12477
12764
|
// Emit the event for ElectronDashboardApi to listen to
|
|
12478
|
-
ipcRenderer$
|
|
12765
|
+
ipcRenderer$e.send("PROVIDER_LIST_COMPLETE", result);
|
|
12479
12766
|
})
|
|
12480
12767
|
.catch((error) => {
|
|
12481
|
-
ipcRenderer$
|
|
12768
|
+
ipcRenderer$e.send("PROVIDER_LIST_ERROR", {
|
|
12482
12769
|
error: error.message,
|
|
12483
12770
|
});
|
|
12484
12771
|
});
|
|
@@ -12495,7 +12782,7 @@ const providerApi$2 = {
|
|
|
12495
12782
|
providerType,
|
|
12496
12783
|
credentials,
|
|
12497
12784
|
) => {
|
|
12498
|
-
ipcRenderer$
|
|
12785
|
+
ipcRenderer$e
|
|
12499
12786
|
.invoke(PROVIDER_SAVE, {
|
|
12500
12787
|
appId,
|
|
12501
12788
|
providerName,
|
|
@@ -12503,10 +12790,10 @@ const providerApi$2 = {
|
|
|
12503
12790
|
credentials,
|
|
12504
12791
|
})
|
|
12505
12792
|
.then((result) => {
|
|
12506
|
-
ipcRenderer$
|
|
12793
|
+
ipcRenderer$e.send("PROVIDER_SAVE_COMPLETE", result);
|
|
12507
12794
|
})
|
|
12508
12795
|
.catch((error) => {
|
|
12509
|
-
ipcRenderer$
|
|
12796
|
+
ipcRenderer$e.send("PROVIDER_SAVE_ERROR", {
|
|
12510
12797
|
error: error.message,
|
|
12511
12798
|
});
|
|
12512
12799
|
});
|
|
@@ -12518,13 +12805,13 @@ const providerApi$2 = {
|
|
|
12518
12805
|
* Event-listener-based version for use with ElectronDashboardApi
|
|
12519
12806
|
*/
|
|
12520
12807
|
getProviderForApplication: (appId, providerName) => {
|
|
12521
|
-
ipcRenderer$
|
|
12808
|
+
ipcRenderer$e
|
|
12522
12809
|
.invoke(PROVIDER_GET, { appId, providerName })
|
|
12523
12810
|
.then((result) => {
|
|
12524
|
-
ipcRenderer$
|
|
12811
|
+
ipcRenderer$e.send("PROVIDER_GET_COMPLETE", result);
|
|
12525
12812
|
})
|
|
12526
12813
|
.catch((error) => {
|
|
12527
|
-
ipcRenderer$
|
|
12814
|
+
ipcRenderer$e.send("PROVIDER_GET_ERROR", {
|
|
12528
12815
|
error: error.message,
|
|
12529
12816
|
});
|
|
12530
12817
|
});
|
|
@@ -12536,13 +12823,13 @@ const providerApi$2 = {
|
|
|
12536
12823
|
* Event-listener-based version for use with ElectronDashboardApi
|
|
12537
12824
|
*/
|
|
12538
12825
|
deleteProviderForApplication: (appId, providerName) => {
|
|
12539
|
-
ipcRenderer$
|
|
12826
|
+
ipcRenderer$e
|
|
12540
12827
|
.invoke(PROVIDER_DELETE, { appId, providerName })
|
|
12541
12828
|
.then((result) => {
|
|
12542
|
-
ipcRenderer$
|
|
12829
|
+
ipcRenderer$e.send("PROVIDER_DELETE_COMPLETE", result);
|
|
12543
12830
|
})
|
|
12544
12831
|
.catch((error) => {
|
|
12545
|
-
ipcRenderer$
|
|
12832
|
+
ipcRenderer$e.send("PROVIDER_DELETE_ERROR", {
|
|
12546
12833
|
error: error.message,
|
|
12547
12834
|
});
|
|
12548
12835
|
});
|
|
@@ -12558,7 +12845,7 @@ var providerApi_1 = providerApi$2;
|
|
|
12558
12845
|
* Communicates with main process via IPC to manage MCP server lifecycle.
|
|
12559
12846
|
*/
|
|
12560
12847
|
|
|
12561
|
-
const { ipcRenderer: ipcRenderer$
|
|
12848
|
+
const { ipcRenderer: ipcRenderer$d } = require$$0$1;
|
|
12562
12849
|
const {
|
|
12563
12850
|
MCP_START_SERVER,
|
|
12564
12851
|
MCP_STOP_SERVER,
|
|
@@ -12582,7 +12869,7 @@ const mcpApi$2 = {
|
|
|
12582
12869
|
* @returns {Promise<{ success, serverName, tools, status } | { error, message }>}
|
|
12583
12870
|
*/
|
|
12584
12871
|
startServer: (serverName, mcpConfig, credentials) =>
|
|
12585
|
-
ipcRenderer$
|
|
12872
|
+
ipcRenderer$d.invoke(MCP_START_SERVER, {
|
|
12586
12873
|
serverName,
|
|
12587
12874
|
mcpConfig,
|
|
12588
12875
|
credentials,
|
|
@@ -12596,7 +12883,7 @@ const mcpApi$2 = {
|
|
|
12596
12883
|
* @returns {Promise<{ success, serverName } | { error, message }>}
|
|
12597
12884
|
*/
|
|
12598
12885
|
stopServer: (serverName) =>
|
|
12599
|
-
ipcRenderer$
|
|
12886
|
+
ipcRenderer$d.invoke(MCP_STOP_SERVER, { serverName }),
|
|
12600
12887
|
|
|
12601
12888
|
/**
|
|
12602
12889
|
* listTools
|
|
@@ -12605,7 +12892,7 @@ const mcpApi$2 = {
|
|
|
12605
12892
|
* @param {string} serverName the server name
|
|
12606
12893
|
* @returns {Promise<{ tools } | { error, message }>}
|
|
12607
12894
|
*/
|
|
12608
|
-
listTools: (serverName) => ipcRenderer$
|
|
12895
|
+
listTools: (serverName) => ipcRenderer$d.invoke(MCP_LIST_TOOLS, { serverName }),
|
|
12609
12896
|
|
|
12610
12897
|
/**
|
|
12611
12898
|
* callTool
|
|
@@ -12618,7 +12905,7 @@ const mcpApi$2 = {
|
|
|
12618
12905
|
* @returns {Promise<{ result } | { error, message }>}
|
|
12619
12906
|
*/
|
|
12620
12907
|
callTool: (serverName, toolName, args, allowedTools = null) =>
|
|
12621
|
-
ipcRenderer$
|
|
12908
|
+
ipcRenderer$d.invoke(MCP_CALL_TOOL, {
|
|
12622
12909
|
serverName,
|
|
12623
12910
|
toolName,
|
|
12624
12911
|
args,
|
|
@@ -12633,7 +12920,7 @@ const mcpApi$2 = {
|
|
|
12633
12920
|
* @returns {Promise<{ resources } | { error, message }>}
|
|
12634
12921
|
*/
|
|
12635
12922
|
listResources: (serverName) =>
|
|
12636
|
-
ipcRenderer$
|
|
12923
|
+
ipcRenderer$d.invoke(MCP_LIST_RESOURCES, { serverName }),
|
|
12637
12924
|
|
|
12638
12925
|
/**
|
|
12639
12926
|
* readResource
|
|
@@ -12644,7 +12931,7 @@ const mcpApi$2 = {
|
|
|
12644
12931
|
* @returns {Promise<{ resource } | { error, message }>}
|
|
12645
12932
|
*/
|
|
12646
12933
|
readResource: (serverName, uri) =>
|
|
12647
|
-
ipcRenderer$
|
|
12934
|
+
ipcRenderer$d.invoke(MCP_READ_RESOURCE, { serverName, uri }),
|
|
12648
12935
|
|
|
12649
12936
|
/**
|
|
12650
12937
|
* getServerStatus
|
|
@@ -12654,7 +12941,7 @@ const mcpApi$2 = {
|
|
|
12654
12941
|
* @returns {Promise<{ status, tools, error }>}
|
|
12655
12942
|
*/
|
|
12656
12943
|
getServerStatus: (serverName) =>
|
|
12657
|
-
ipcRenderer$
|
|
12944
|
+
ipcRenderer$d.invoke(MCP_SERVER_STATUS, { serverName }),
|
|
12658
12945
|
|
|
12659
12946
|
/**
|
|
12660
12947
|
* getCatalog
|
|
@@ -12662,7 +12949,7 @@ const mcpApi$2 = {
|
|
|
12662
12949
|
*
|
|
12663
12950
|
* @returns {Promise<{ catalog } | { error, message }>}
|
|
12664
12951
|
*/
|
|
12665
|
-
getCatalog: () => ipcRenderer$
|
|
12952
|
+
getCatalog: () => ipcRenderer$d.invoke(MCP_GET_CATALOG),
|
|
12666
12953
|
|
|
12667
12954
|
/**
|
|
12668
12955
|
* runAuth
|
|
@@ -12674,7 +12961,7 @@ const mcpApi$2 = {
|
|
|
12674
12961
|
* @returns {Promise<{ success } | { error, message }>}
|
|
12675
12962
|
*/
|
|
12676
12963
|
runAuth: (mcpConfig, credentials, authCommand) =>
|
|
12677
|
-
ipcRenderer$
|
|
12964
|
+
ipcRenderer$d.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
|
|
12678
12965
|
};
|
|
12679
12966
|
|
|
12680
12967
|
var mcpApi_1 = mcpApi$2;
|
|
@@ -12692,7 +12979,7 @@ var mcpApi_1 = mcpApi$2;
|
|
|
12692
12979
|
* mainApi.registry.checkUpdates([{ name: "weather-widgets", version: "1.0.0" }])
|
|
12693
12980
|
*/
|
|
12694
12981
|
|
|
12695
|
-
const { ipcRenderer: ipcRenderer$
|
|
12982
|
+
const { ipcRenderer: ipcRenderer$c } = require$$0$1;
|
|
12696
12983
|
|
|
12697
12984
|
const registryApi$2 = {
|
|
12698
12985
|
/**
|
|
@@ -12702,7 +12989,7 @@ const registryApi$2 = {
|
|
|
12702
12989
|
*/
|
|
12703
12990
|
fetchIndex: async (forceRefresh = false) => {
|
|
12704
12991
|
try {
|
|
12705
|
-
return await ipcRenderer$
|
|
12992
|
+
return await ipcRenderer$c.invoke("registry:fetch-index", forceRefresh);
|
|
12706
12993
|
} catch (error) {
|
|
12707
12994
|
console.error("[RegistryApi] Error fetching index:", error);
|
|
12708
12995
|
throw error;
|
|
@@ -12717,7 +13004,7 @@ const registryApi$2 = {
|
|
|
12717
13004
|
*/
|
|
12718
13005
|
search: async (query = "", filters = {}) => {
|
|
12719
13006
|
try {
|
|
12720
|
-
return await ipcRenderer$
|
|
13007
|
+
return await ipcRenderer$c.invoke("registry:search", query, filters);
|
|
12721
13008
|
} catch (error) {
|
|
12722
13009
|
console.error("[RegistryApi] Error searching registry:", error);
|
|
12723
13010
|
throw error;
|
|
@@ -12731,7 +13018,7 @@ const registryApi$2 = {
|
|
|
12731
13018
|
*/
|
|
12732
13019
|
getPackage: async (packageName) => {
|
|
12733
13020
|
try {
|
|
12734
|
-
return await ipcRenderer$
|
|
13021
|
+
return await ipcRenderer$c.invoke("registry:get-package", packageName);
|
|
12735
13022
|
} catch (error) {
|
|
12736
13023
|
console.error(
|
|
12737
13024
|
`[RegistryApi] Error getting package ${packageName}:`,
|
|
@@ -12748,7 +13035,7 @@ const registryApi$2 = {
|
|
|
12748
13035
|
*/
|
|
12749
13036
|
checkUpdates: async (installedWidgets = []) => {
|
|
12750
13037
|
try {
|
|
12751
|
-
return await ipcRenderer$
|
|
13038
|
+
return await ipcRenderer$c.invoke(
|
|
12752
13039
|
"registry:check-updates",
|
|
12753
13040
|
installedWidgets,
|
|
12754
13041
|
);
|
|
@@ -12766,7 +13053,7 @@ const registryApi$2 = {
|
|
|
12766
13053
|
*/
|
|
12767
13054
|
searchDashboards: async (query = "", filters = {}) => {
|
|
12768
13055
|
try {
|
|
12769
|
-
return await ipcRenderer$
|
|
13056
|
+
return await ipcRenderer$c.invoke(
|
|
12770
13057
|
"registry:search-dashboards",
|
|
12771
13058
|
query,
|
|
12772
13059
|
filters,
|
|
@@ -12786,17 +13073,17 @@ var registryApi_1 = registryApi$2;
|
|
|
12786
13073
|
* Handle the theme configuration file
|
|
12787
13074
|
*/
|
|
12788
13075
|
|
|
12789
|
-
const { ipcRenderer: ipcRenderer$
|
|
13076
|
+
const { ipcRenderer: ipcRenderer$b } = require$$0$1;
|
|
12790
13077
|
|
|
12791
13078
|
const { THEME_LIST, THEME_SAVE, THEME_DELETE } = events$8;
|
|
12792
13079
|
|
|
12793
13080
|
const themeApi$2 = {
|
|
12794
13081
|
listThemesForApplication: (appId) =>
|
|
12795
|
-
ipcRenderer$
|
|
13082
|
+
ipcRenderer$b.invoke(THEME_LIST, { appId }),
|
|
12796
13083
|
saveThemeForApplication: (appId, themeName, themeObject) =>
|
|
12797
|
-
ipcRenderer$
|
|
13084
|
+
ipcRenderer$b.invoke(THEME_SAVE, { appId, themeName, themeObject }),
|
|
12798
13085
|
deleteThemeForApplication: (appId, themeKey) =>
|
|
12799
|
-
ipcRenderer$
|
|
13086
|
+
ipcRenderer$b.invoke(THEME_DELETE, { appId, themeKey }),
|
|
12800
13087
|
};
|
|
12801
13088
|
|
|
12802
13089
|
var themeApi_1 = themeApi$2;
|
|
@@ -12808,7 +13095,7 @@ var themeApi_1 = themeApi$2;
|
|
|
12808
13095
|
*/
|
|
12809
13096
|
|
|
12810
13097
|
// ipcRenderer that must be used to invoke the events
|
|
12811
|
-
const { ipcRenderer: ipcRenderer$
|
|
13098
|
+
const { ipcRenderer: ipcRenderer$a } = require$$0$1;
|
|
12812
13099
|
|
|
12813
13100
|
const {
|
|
12814
13101
|
ALGOLIA_LIST_INDICES,
|
|
@@ -12822,10 +13109,10 @@ const {
|
|
|
12822
13109
|
|
|
12823
13110
|
const algoliaApi$2 = {
|
|
12824
13111
|
listIndices: (application) =>
|
|
12825
|
-
ipcRenderer$
|
|
13112
|
+
ipcRenderer$a.invoke(ALGOLIA_LIST_INDICES, application),
|
|
12826
13113
|
|
|
12827
13114
|
browseObjects: (appId, apiKey, indexName) => {
|
|
12828
|
-
ipcRenderer$
|
|
13115
|
+
ipcRenderer$a.invoke(ALGOLIA_BROWSE_OBJECTS, {
|
|
12829
13116
|
appId,
|
|
12830
13117
|
apiKey,
|
|
12831
13118
|
indexName,
|
|
@@ -12833,10 +13120,10 @@ const algoliaApi$2 = {
|
|
|
12833
13120
|
});
|
|
12834
13121
|
},
|
|
12835
13122
|
|
|
12836
|
-
saveSynonyms: () => ipcRenderer$
|
|
13123
|
+
saveSynonyms: () => ipcRenderer$a.invoke(ALGOLIA_SAVE_SYNONYMS, {}),
|
|
12837
13124
|
|
|
12838
13125
|
getAnalyticsForQuery: (application, indexName, query) =>
|
|
12839
|
-
ipcRenderer$
|
|
13126
|
+
ipcRenderer$a.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
|
|
12840
13127
|
application,
|
|
12841
13128
|
indexName,
|
|
12842
13129
|
query,
|
|
@@ -12849,7 +13136,7 @@ const algoliaApi$2 = {
|
|
|
12849
13136
|
dir,
|
|
12850
13137
|
createIfNotExists = false,
|
|
12851
13138
|
) =>
|
|
12852
|
-
ipcRenderer$
|
|
13139
|
+
ipcRenderer$a.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
|
|
12853
13140
|
appId,
|
|
12854
13141
|
apiKey,
|
|
12855
13142
|
indexName,
|
|
@@ -12858,7 +13145,7 @@ const algoliaApi$2 = {
|
|
|
12858
13145
|
}),
|
|
12859
13146
|
|
|
12860
13147
|
createBatchesFromFile: (filepath, batchFilepath, batchSize) => {
|
|
12861
|
-
ipcRenderer$
|
|
13148
|
+
ipcRenderer$a.invoke(ALGOLIA_CREATE_BATCH, {
|
|
12862
13149
|
filepath,
|
|
12863
13150
|
batchFilepath,
|
|
12864
13151
|
batchSize,
|
|
@@ -12866,7 +13153,7 @@ const algoliaApi$2 = {
|
|
|
12866
13153
|
},
|
|
12867
13154
|
|
|
12868
13155
|
browseObjectsToFile: (appId, apiKey, indexName, toFilename, query = "") => {
|
|
12869
|
-
ipcRenderer$
|
|
13156
|
+
ipcRenderer$a.invoke(ALGOLIA_BROWSE_OBJECTS, {
|
|
12870
13157
|
appId,
|
|
12871
13158
|
apiKey,
|
|
12872
13159
|
indexName,
|
|
@@ -12876,7 +13163,7 @@ const algoliaApi$2 = {
|
|
|
12876
13163
|
},
|
|
12877
13164
|
|
|
12878
13165
|
search: (appId, apiKey, indexName, query = "", options = {}) =>
|
|
12879
|
-
ipcRenderer$
|
|
13166
|
+
ipcRenderer$a.invoke(ALGOLIA_SEARCH, {
|
|
12880
13167
|
appId,
|
|
12881
13168
|
apiKey,
|
|
12882
13169
|
indexName,
|
|
@@ -12891,14 +13178,14 @@ var algoliaApi_1 = algoliaApi$2;
|
|
|
12891
13178
|
* openAI
|
|
12892
13179
|
*/
|
|
12893
13180
|
|
|
12894
|
-
const { ipcRenderer: ipcRenderer$
|
|
13181
|
+
const { ipcRenderer: ipcRenderer$9 } = require$$0$1;
|
|
12895
13182
|
|
|
12896
13183
|
const { OPENAI_DESCRIBE_IMAGE } = openaiEvents$1;
|
|
12897
13184
|
|
|
12898
13185
|
const openaiApi$2 = {
|
|
12899
13186
|
// convert a json array of objects to a csv string and save to file
|
|
12900
13187
|
describeImage: (imageUrl, apiKey, prompt = "What's in this image?") =>
|
|
12901
|
-
ipcRenderer$
|
|
13188
|
+
ipcRenderer$9.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
|
|
12902
13189
|
};
|
|
12903
13190
|
|
|
12904
13191
|
var openaiApi_1 = openaiApi$2;
|
|
@@ -12909,14 +13196,14 @@ var openaiApi_1 = openaiApi$2;
|
|
|
12909
13196
|
*/
|
|
12910
13197
|
|
|
12911
13198
|
// ipcRenderer that must be used to invoke the events
|
|
12912
|
-
const { ipcRenderer: ipcRenderer$
|
|
13199
|
+
const { ipcRenderer: ipcRenderer$8 } = require$$0$1;
|
|
12913
13200
|
|
|
12914
13201
|
const { MENU_ITEMS_SAVE, MENU_ITEMS_LIST } = events$8;
|
|
12915
13202
|
|
|
12916
13203
|
const menuItemsApi$2 = {
|
|
12917
13204
|
saveMenuItem: (appId, menuItem) =>
|
|
12918
|
-
ipcRenderer$
|
|
12919
|
-
listMenuItems: (appId) => ipcRenderer$
|
|
13205
|
+
ipcRenderer$8.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
|
|
13206
|
+
listMenuItems: (appId) => ipcRenderer$8.invoke(MENU_ITEMS_LIST, { appId }),
|
|
12920
13207
|
};
|
|
12921
13208
|
|
|
12922
13209
|
var menuItemsApi_1 = menuItemsApi$2;
|
|
@@ -12928,12 +13215,12 @@ var menuItemsApi_1 = menuItemsApi$2;
|
|
|
12928
13215
|
*/
|
|
12929
13216
|
|
|
12930
13217
|
// ipcRenderer that must be used to invoke the events
|
|
12931
|
-
const { ipcRenderer: ipcRenderer$
|
|
13218
|
+
const { ipcRenderer: ipcRenderer$7 } = require$$0$1;
|
|
12932
13219
|
|
|
12933
13220
|
const pluginApi$2 = {
|
|
12934
13221
|
install: (packageName, filepath) =>
|
|
12935
|
-
ipcRenderer$
|
|
12936
|
-
uninstall: (filepath) => ipcRenderer$
|
|
13222
|
+
ipcRenderer$7.invoke("plugin-install", { packageName, filepath }),
|
|
13223
|
+
uninstall: (filepath) => ipcRenderer$7.invoke("plugin-uninstall", filepath),
|
|
12937
13224
|
};
|
|
12938
13225
|
|
|
12939
13226
|
var pluginApi_1 = pluginApi$2;
|
|
@@ -12946,7 +13233,7 @@ var pluginApi_1 = pluginApi$2;
|
|
|
12946
13233
|
* tool-use events, and request cancellation.
|
|
12947
13234
|
*/
|
|
12948
13235
|
|
|
12949
|
-
const { ipcRenderer: ipcRenderer$
|
|
13236
|
+
const { ipcRenderer: ipcRenderer$6 } = require$$0$1;
|
|
12950
13237
|
const {
|
|
12951
13238
|
LLM_SEND_MESSAGE,
|
|
12952
13239
|
LLM_ABORT_REQUEST,
|
|
@@ -12968,7 +13255,7 @@ const _listenerMap = new Map();
|
|
|
12968
13255
|
function _addListener(channel, callback) {
|
|
12969
13256
|
const id = String(++_nextListenerId);
|
|
12970
13257
|
const wrapped = (_event, data) => callback(data);
|
|
12971
|
-
ipcRenderer$
|
|
13258
|
+
ipcRenderer$6.on(channel, wrapped);
|
|
12972
13259
|
_listenerMap.set(id, { channel, wrapped });
|
|
12973
13260
|
return id;
|
|
12974
13261
|
}
|
|
@@ -12983,7 +13270,7 @@ const llmApi$2 = {
|
|
|
12983
13270
|
* @returns {Promise<void>}
|
|
12984
13271
|
*/
|
|
12985
13272
|
sendMessage: (requestId, params) =>
|
|
12986
|
-
ipcRenderer$
|
|
13273
|
+
ipcRenderer$6.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
|
|
12987
13274
|
|
|
12988
13275
|
/**
|
|
12989
13276
|
* abortRequest
|
|
@@ -12993,7 +13280,7 @@ const llmApi$2 = {
|
|
|
12993
13280
|
* @returns {Promise<{ success: boolean }>}
|
|
12994
13281
|
*/
|
|
12995
13282
|
abortRequest: (requestId) =>
|
|
12996
|
-
ipcRenderer$
|
|
13283
|
+
ipcRenderer$6.invoke(LLM_ABORT_REQUEST, { requestId }),
|
|
12997
13284
|
|
|
12998
13285
|
/**
|
|
12999
13286
|
* listConnectedTools
|
|
@@ -13001,7 +13288,7 @@ const llmApi$2 = {
|
|
|
13001
13288
|
*
|
|
13002
13289
|
* @returns {Promise<Array<{ serverName, tools, resources, status }>>}
|
|
13003
13290
|
*/
|
|
13004
|
-
listConnectedTools: () => ipcRenderer$
|
|
13291
|
+
listConnectedTools: () => ipcRenderer$6.invoke(LLM_LIST_CONNECTED_TOOLS),
|
|
13005
13292
|
|
|
13006
13293
|
/**
|
|
13007
13294
|
* checkCliAvailable
|
|
@@ -13009,7 +13296,7 @@ const llmApi$2 = {
|
|
|
13009
13296
|
*
|
|
13010
13297
|
* @returns {Promise<{ available: boolean, path?: string }>}
|
|
13011
13298
|
*/
|
|
13012
|
-
checkCliAvailable: () => ipcRenderer$
|
|
13299
|
+
checkCliAvailable: () => ipcRenderer$6.invoke(LLM_CHECK_CLI_AVAILABLE),
|
|
13013
13300
|
|
|
13014
13301
|
/**
|
|
13015
13302
|
* clearCliSession
|
|
@@ -13019,7 +13306,7 @@ const llmApi$2 = {
|
|
|
13019
13306
|
* @returns {Promise<{ success: boolean }>}
|
|
13020
13307
|
*/
|
|
13021
13308
|
clearCliSession: (widgetUuid) =>
|
|
13022
|
-
ipcRenderer$
|
|
13309
|
+
ipcRenderer$6.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
|
|
13023
13310
|
|
|
13024
13311
|
/**
|
|
13025
13312
|
* getCliSessionStatus
|
|
@@ -13029,7 +13316,7 @@ const llmApi$2 = {
|
|
|
13029
13316
|
* @returns {Promise<{ hasSession: boolean, sessionId?: string, isProcessActive: boolean }>}
|
|
13030
13317
|
*/
|
|
13031
13318
|
getCliSessionStatus: (widgetUuid) =>
|
|
13032
|
-
ipcRenderer$
|
|
13319
|
+
ipcRenderer$6.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
|
|
13033
13320
|
|
|
13034
13321
|
/**
|
|
13035
13322
|
* endCliSession
|
|
@@ -13039,7 +13326,7 @@ const llmApi$2 = {
|
|
|
13039
13326
|
* @returns {Promise<{ success: boolean }>}
|
|
13040
13327
|
*/
|
|
13041
13328
|
endCliSession: (widgetUuid) =>
|
|
13042
|
-
ipcRenderer$
|
|
13329
|
+
ipcRenderer$6.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
|
|
13043
13330
|
|
|
13044
13331
|
// --- Stream event listeners ---
|
|
13045
13332
|
// Each on* method returns an opaque string ID. Strings cross the
|
|
@@ -13073,7 +13360,7 @@ const llmApi$2 = {
|
|
|
13073
13360
|
const listenerId = id !== undefined ? String(id) : String(idOrChannel);
|
|
13074
13361
|
const entry = _listenerMap.get(listenerId);
|
|
13075
13362
|
if (entry) {
|
|
13076
|
-
ipcRenderer$
|
|
13363
|
+
ipcRenderer$6.removeListener(entry.channel, entry.wrapped);
|
|
13077
13364
|
_listenerMap.delete(listenerId);
|
|
13078
13365
|
}
|
|
13079
13366
|
},
|
|
@@ -13085,14 +13372,14 @@ const llmApi$2 = {
|
|
|
13085
13372
|
*/
|
|
13086
13373
|
removeAllStreamListeners: () => {
|
|
13087
13374
|
for (const [, entry] of _listenerMap) {
|
|
13088
|
-
ipcRenderer$
|
|
13375
|
+
ipcRenderer$6.removeListener(entry.channel, entry.wrapped);
|
|
13089
13376
|
}
|
|
13090
13377
|
_listenerMap.clear();
|
|
13091
|
-
ipcRenderer$
|
|
13092
|
-
ipcRenderer$
|
|
13093
|
-
ipcRenderer$
|
|
13094
|
-
ipcRenderer$
|
|
13095
|
-
ipcRenderer$
|
|
13378
|
+
ipcRenderer$6.removeAllListeners(LLM_STREAM_DELTA);
|
|
13379
|
+
ipcRenderer$6.removeAllListeners(LLM_STREAM_TOOL_CALL);
|
|
13380
|
+
ipcRenderer$6.removeAllListeners(LLM_STREAM_TOOL_RESULT);
|
|
13381
|
+
ipcRenderer$6.removeAllListeners(LLM_STREAM_COMPLETE);
|
|
13382
|
+
ipcRenderer$6.removeAllListeners(LLM_STREAM_ERROR);
|
|
13096
13383
|
},
|
|
13097
13384
|
};
|
|
13098
13385
|
|
|
@@ -13106,7 +13393,7 @@ var llmApi_1 = llmApi$2;
|
|
|
13106
13393
|
* and manage the response cache.
|
|
13107
13394
|
*/
|
|
13108
13395
|
|
|
13109
|
-
const { ipcRenderer: ipcRenderer$
|
|
13396
|
+
const { ipcRenderer: ipcRenderer$5 } = require$$0$1;
|
|
13110
13397
|
const {
|
|
13111
13398
|
CLIENT_CACHE_INVALIDATE,
|
|
13112
13399
|
CLIENT_CACHE_INVALIDATE_ALL,
|
|
@@ -13123,28 +13410,28 @@ const clientCacheApi$2 = {
|
|
|
13123
13410
|
* @returns {Promise<{success: boolean}>}
|
|
13124
13411
|
*/
|
|
13125
13412
|
invalidate: (appId, providerName) =>
|
|
13126
|
-
ipcRenderer$
|
|
13413
|
+
ipcRenderer$5.invoke(CLIENT_CACHE_INVALIDATE, { appId, providerName }),
|
|
13127
13414
|
|
|
13128
13415
|
/**
|
|
13129
13416
|
* Invalidate all cached clients.
|
|
13130
13417
|
*
|
|
13131
13418
|
* @returns {Promise<{success: boolean}>}
|
|
13132
13419
|
*/
|
|
13133
|
-
invalidateAll: () => ipcRenderer$
|
|
13420
|
+
invalidateAll: () => ipcRenderer$5.invoke(CLIENT_CACHE_INVALIDATE_ALL),
|
|
13134
13421
|
|
|
13135
13422
|
/**
|
|
13136
13423
|
* Clear the response cache.
|
|
13137
13424
|
*
|
|
13138
13425
|
* @returns {Promise<{success: boolean}>}
|
|
13139
13426
|
*/
|
|
13140
|
-
clearResponseCache: () => ipcRenderer$
|
|
13427
|
+
clearResponseCache: () => ipcRenderer$5.invoke(RESPONSE_CACHE_CLEAR),
|
|
13141
13428
|
|
|
13142
13429
|
/**
|
|
13143
13430
|
* Get response cache statistics.
|
|
13144
13431
|
*
|
|
13145
13432
|
* @returns {Promise<{entries: number, inflight: number, keys: string[]}>}
|
|
13146
13433
|
*/
|
|
13147
|
-
responseCacheStats: () => ipcRenderer$
|
|
13434
|
+
responseCacheStats: () => ipcRenderer$5.invoke(RESPONSE_CACHE_STATS),
|
|
13148
13435
|
};
|
|
13149
13436
|
|
|
13150
13437
|
var clientCacheApi_1 = clientCacheApi$2;
|
|
@@ -13156,7 +13443,7 @@ var clientCacheApi_1 = clientCacheApi$2;
|
|
|
13156
13443
|
* Exposed via contextBridge through mainApi.
|
|
13157
13444
|
*/
|
|
13158
13445
|
|
|
13159
|
-
const { ipcRenderer: ipcRenderer$
|
|
13446
|
+
const { ipcRenderer: ipcRenderer$4 } = require$$0$1;
|
|
13160
13447
|
const {
|
|
13161
13448
|
DASHBOARD_CONFIG_EXPORT,
|
|
13162
13449
|
DASHBOARD_CONFIG_IMPORT,
|
|
@@ -13179,7 +13466,7 @@ const dashboardConfigApi$2 = {
|
|
|
13179
13466
|
* @returns {Promise<Object>} Result with success, filePath, and config
|
|
13180
13467
|
*/
|
|
13181
13468
|
exportDashboardConfig: (appId, workspaceId, options = {}) =>
|
|
13182
|
-
ipcRenderer$
|
|
13469
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_EXPORT, {
|
|
13183
13470
|
appId,
|
|
13184
13471
|
workspaceId,
|
|
13185
13472
|
options,
|
|
@@ -13194,7 +13481,7 @@ const dashboardConfigApi$2 = {
|
|
|
13194
13481
|
* @returns {Promise<Object>} Result with success, workspace, and summary
|
|
13195
13482
|
*/
|
|
13196
13483
|
importDashboardConfig: (appId) =>
|
|
13197
|
-
ipcRenderer$
|
|
13484
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_IMPORT, { appId }),
|
|
13198
13485
|
|
|
13199
13486
|
/**
|
|
13200
13487
|
* Install a dashboard from the registry by package name.
|
|
@@ -13206,7 +13493,7 @@ const dashboardConfigApi$2 = {
|
|
|
13206
13493
|
* @returns {Promise<Object>} Result with success, workspace, and summary
|
|
13207
13494
|
*/
|
|
13208
13495
|
installDashboardFromRegistry: (appId, packageName) =>
|
|
13209
|
-
ipcRenderer$
|
|
13496
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_INSTALL, {
|
|
13210
13497
|
appId,
|
|
13211
13498
|
packageName,
|
|
13212
13499
|
}),
|
|
@@ -13219,7 +13506,7 @@ const dashboardConfigApi$2 = {
|
|
|
13219
13506
|
* @returns {Promise<Object>} Compatibility report with per-widget status
|
|
13220
13507
|
*/
|
|
13221
13508
|
checkDashboardCompatibility: (appId, dashboardWidgets) =>
|
|
13222
|
-
ipcRenderer$
|
|
13509
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
|
|
13223
13510
|
appId,
|
|
13224
13511
|
dashboardWidgets,
|
|
13225
13512
|
}),
|
|
@@ -13235,7 +13522,7 @@ const dashboardConfigApi$2 = {
|
|
|
13235
13522
|
* @returns {Promise<Object>} Result with success, manifest, filePath
|
|
13236
13523
|
*/
|
|
13237
13524
|
prepareDashboardForPublish: (appId, workspaceId, options = {}) =>
|
|
13238
|
-
ipcRenderer$
|
|
13525
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_PUBLISH, {
|
|
13239
13526
|
appId,
|
|
13240
13527
|
workspaceId,
|
|
13241
13528
|
options,
|
|
@@ -13249,7 +13536,7 @@ const dashboardConfigApi$2 = {
|
|
|
13249
13536
|
* @returns {Promise<Object>} Preview with metadata, widgets, wiring, compatibility
|
|
13250
13537
|
*/
|
|
13251
13538
|
getDashboardPreview: (packageName) =>
|
|
13252
|
-
ipcRenderer$
|
|
13539
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
|
|
13253
13540
|
|
|
13254
13541
|
/**
|
|
13255
13542
|
* Check installed dashboards for available updates.
|
|
@@ -13258,7 +13545,7 @@ const dashboardConfigApi$2 = {
|
|
|
13258
13545
|
* @returns {Promise<Object>} Result with updates array
|
|
13259
13546
|
*/
|
|
13260
13547
|
checkDashboardUpdates: (appId) =>
|
|
13261
|
-
ipcRenderer$
|
|
13548
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
|
|
13262
13549
|
|
|
13263
13550
|
/**
|
|
13264
13551
|
* Get provider setup manifest for a dashboard's requirements.
|
|
@@ -13268,7 +13555,7 @@ const dashboardConfigApi$2 = {
|
|
|
13268
13555
|
* @returns {Promise<Object>} Setup manifest with per-provider status
|
|
13269
13556
|
*/
|
|
13270
13557
|
getProviderSetupManifest: (appId, requiredProviders) =>
|
|
13271
|
-
ipcRenderer$
|
|
13558
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
|
|
13272
13559
|
appId,
|
|
13273
13560
|
requiredProviders,
|
|
13274
13561
|
}),
|
|
@@ -13282,7 +13569,7 @@ const dashboardConfigApi$2 = {
|
|
|
13282
13569
|
* @returns {Promise<Object>} Preview with dashboardName, widgetCount, widgets, componentNames
|
|
13283
13570
|
*/
|
|
13284
13571
|
getPublishPreview: (appId, workspaceId) =>
|
|
13285
|
-
ipcRenderer$
|
|
13572
|
+
ipcRenderer$4.invoke(DASHBOARD_CONFIG_PUBLISH_PREVIEW, {
|
|
13286
13573
|
appId,
|
|
13287
13574
|
workspaceId,
|
|
13288
13575
|
}),
|
|
@@ -13297,7 +13584,7 @@ var dashboardConfigApi_1 = dashboardConfigApi$2;
|
|
|
13297
13584
|
* Exposed via contextBridge through mainApi.
|
|
13298
13585
|
*/
|
|
13299
13586
|
|
|
13300
|
-
const { ipcRenderer: ipcRenderer$
|
|
13587
|
+
const { ipcRenderer: ipcRenderer$3 } = require$$0$1;
|
|
13301
13588
|
const {
|
|
13302
13589
|
REGISTRY_AUTH_INITIATE_LOGIN,
|
|
13303
13590
|
REGISTRY_AUTH_POLL_TOKEN,
|
|
@@ -13305,6 +13592,9 @@ const {
|
|
|
13305
13592
|
REGISTRY_AUTH_GET_PROFILE,
|
|
13306
13593
|
REGISTRY_AUTH_LOGOUT,
|
|
13307
13594
|
REGISTRY_AUTH_PUBLISH,
|
|
13595
|
+
REGISTRY_AUTH_UPDATE_PROFILE,
|
|
13596
|
+
REGISTRY_AUTH_GET_PACKAGES,
|
|
13597
|
+
REGISTRY_AUTH_UPDATE_PACKAGE,
|
|
13308
13598
|
} = events$8;
|
|
13309
13599
|
|
|
13310
13600
|
const registryAuthApi$2 = {
|
|
@@ -13314,7 +13604,7 @@ const registryAuthApi$2 = {
|
|
|
13314
13604
|
*
|
|
13315
13605
|
* @returns {Promise<Object>} { deviceCode, userCode, verificationUrl, verificationUrlComplete, expiresIn, interval }
|
|
13316
13606
|
*/
|
|
13317
|
-
initiateLogin: () => ipcRenderer$
|
|
13607
|
+
initiateLogin: () => ipcRenderer$3.invoke(REGISTRY_AUTH_INITIATE_LOGIN),
|
|
13318
13608
|
|
|
13319
13609
|
/**
|
|
13320
13610
|
* Poll for token after user completes browser auth.
|
|
@@ -13323,26 +13613,26 @@ const registryAuthApi$2 = {
|
|
|
13323
13613
|
* @returns {Promise<Object>} { status: 'pending' | 'authorized' | 'expired', token?, userId? }
|
|
13324
13614
|
*/
|
|
13325
13615
|
pollToken: (deviceCode) =>
|
|
13326
|
-
ipcRenderer$
|
|
13616
|
+
ipcRenderer$3.invoke(REGISTRY_AUTH_POLL_TOKEN, { deviceCode }),
|
|
13327
13617
|
|
|
13328
13618
|
/**
|
|
13329
13619
|
* Get current auth status.
|
|
13330
13620
|
*
|
|
13331
13621
|
* @returns {Promise<Object>} { authenticated: boolean, userId?: string }
|
|
13332
13622
|
*/
|
|
13333
|
-
getStatus: () => ipcRenderer$
|
|
13623
|
+
getStatus: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_STATUS),
|
|
13334
13624
|
|
|
13335
13625
|
/**
|
|
13336
13626
|
* Get the authenticated user's registry profile.
|
|
13337
13627
|
*
|
|
13338
13628
|
* @returns {Promise<Object|null>} User profile or null
|
|
13339
13629
|
*/
|
|
13340
|
-
getProfile: () => ipcRenderer$
|
|
13630
|
+
getProfile: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_PROFILE),
|
|
13341
13631
|
|
|
13342
13632
|
/**
|
|
13343
13633
|
* Logout from registry.
|
|
13344
13634
|
*/
|
|
13345
|
-
logout: () => ipcRenderer$
|
|
13635
|
+
logout: () => ipcRenderer$3.invoke(REGISTRY_AUTH_LOGOUT),
|
|
13346
13636
|
|
|
13347
13637
|
/**
|
|
13348
13638
|
* Publish a ZIP to the registry.
|
|
@@ -13352,7 +13642,38 @@ const registryAuthApi$2 = {
|
|
|
13352
13642
|
* @returns {Promise<Object>} { success, registryUrl, packageId, version, error? }
|
|
13353
13643
|
*/
|
|
13354
13644
|
publish: (zipPath, manifest) =>
|
|
13355
|
-
ipcRenderer$
|
|
13645
|
+
ipcRenderer$3.invoke(REGISTRY_AUTH_PUBLISH, { zipPath, manifest }),
|
|
13646
|
+
|
|
13647
|
+
/**
|
|
13648
|
+
* Update the authenticated user's profile.
|
|
13649
|
+
*
|
|
13650
|
+
* @param {Object} updates - Fields to update (e.g. { displayName })
|
|
13651
|
+
* @returns {Promise<Object|null>} Updated user or null
|
|
13652
|
+
*/
|
|
13653
|
+
updateProfile: (updates) =>
|
|
13654
|
+
ipcRenderer$3.invoke(REGISTRY_AUTH_UPDATE_PROFILE, updates),
|
|
13655
|
+
|
|
13656
|
+
/**
|
|
13657
|
+
* Get the authenticated user's published packages.
|
|
13658
|
+
*
|
|
13659
|
+
* @returns {Promise<Object|null>} { packages: [...] } or null
|
|
13660
|
+
*/
|
|
13661
|
+
getPackages: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_PACKAGES),
|
|
13662
|
+
|
|
13663
|
+
/**
|
|
13664
|
+
* Update a published package's metadata.
|
|
13665
|
+
*
|
|
13666
|
+
* @param {string} scope - Package scope
|
|
13667
|
+
* @param {string} name - Package name
|
|
13668
|
+
* @param {Object} updates - Fields to update
|
|
13669
|
+
* @returns {Promise<Object|null>} Updated package or null
|
|
13670
|
+
*/
|
|
13671
|
+
updatePackage: (scope, name, updates) =>
|
|
13672
|
+
ipcRenderer$3.invoke(REGISTRY_AUTH_UPDATE_PACKAGE, {
|
|
13673
|
+
scope,
|
|
13674
|
+
name,
|
|
13675
|
+
updates,
|
|
13676
|
+
}),
|
|
13356
13677
|
};
|
|
13357
13678
|
|
|
13358
13679
|
var registryAuthApi_1 = registryAuthApi$2;
|
|
@@ -13363,7 +13684,7 @@ var registryAuthApi_1 = registryAuthApi$2;
|
|
|
13363
13684
|
* IPC bridge for dashboard ratings (renderer side).
|
|
13364
13685
|
*/
|
|
13365
13686
|
|
|
13366
|
-
const { ipcRenderer: ipcRenderer$
|
|
13687
|
+
const { ipcRenderer: ipcRenderer$2 } = require$$0$1;
|
|
13367
13688
|
const {
|
|
13368
13689
|
DASHBOARD_RATING_SAVE,
|
|
13369
13690
|
DASHBOARD_RATING_GET,
|
|
@@ -13373,24 +13694,88 @@ const {
|
|
|
13373
13694
|
|
|
13374
13695
|
const dashboardRatingsApi$1 = {
|
|
13375
13696
|
saveDashboardRating: (appId, packageName, rating) =>
|
|
13376
|
-
ipcRenderer$
|
|
13697
|
+
ipcRenderer$2.invoke(DASHBOARD_RATING_SAVE, {
|
|
13377
13698
|
appId,
|
|
13378
13699
|
packageName,
|
|
13379
13700
|
rating,
|
|
13380
13701
|
}),
|
|
13381
13702
|
|
|
13382
13703
|
getDashboardRating: (appId, packageName) =>
|
|
13383
|
-
ipcRenderer$
|
|
13704
|
+
ipcRenderer$2.invoke(DASHBOARD_RATING_GET, { appId, packageName }),
|
|
13384
13705
|
|
|
13385
13706
|
listDashboardRatings: (appId) =>
|
|
13386
|
-
ipcRenderer$
|
|
13707
|
+
ipcRenderer$2.invoke(DASHBOARD_RATING_LIST, { appId }),
|
|
13387
13708
|
|
|
13388
13709
|
deleteDashboardRating: (appId, packageName) =>
|
|
13389
|
-
ipcRenderer$
|
|
13710
|
+
ipcRenderer$2.invoke(DASHBOARD_RATING_DELETE, { appId, packageName }),
|
|
13390
13711
|
};
|
|
13391
13712
|
|
|
13392
13713
|
var dashboardRatingsApi_1 = dashboardRatingsApi$1;
|
|
13393
13714
|
|
|
13715
|
+
/**
|
|
13716
|
+
* sessionApi.js
|
|
13717
|
+
*
|
|
13718
|
+
* IPC bridge for session management (renderer side).
|
|
13719
|
+
* Exposed via contextBridge through mainApi.
|
|
13720
|
+
*/
|
|
13721
|
+
|
|
13722
|
+
const { ipcRenderer: ipcRenderer$1 } = require$$0$1;
|
|
13723
|
+
const {
|
|
13724
|
+
SESSION_GET_RECENTS,
|
|
13725
|
+
SESSION_ADD_RECENT,
|
|
13726
|
+
SESSION_CLEAR_RECENTS,
|
|
13727
|
+
SESSION_GET_STATE,
|
|
13728
|
+
SESSION_SAVE_STATE,
|
|
13729
|
+
SESSION_CLEAR_STATE,
|
|
13730
|
+
} = events$8;
|
|
13731
|
+
|
|
13732
|
+
const sessionApi$1 = {
|
|
13733
|
+
/**
|
|
13734
|
+
* Get recently opened dashboards.
|
|
13735
|
+
*
|
|
13736
|
+
* @returns {Promise<Array<{ workspaceId: string, name: string, openedAt: string }>>}
|
|
13737
|
+
*/
|
|
13738
|
+
getRecents: () => ipcRenderer$1.invoke(SESSION_GET_RECENTS),
|
|
13739
|
+
|
|
13740
|
+
/**
|
|
13741
|
+
* Add a recent dashboard entry.
|
|
13742
|
+
*
|
|
13743
|
+
* @param {string} workspaceId
|
|
13744
|
+
* @param {string} name
|
|
13745
|
+
* @returns {Promise<Array>} Updated recents list
|
|
13746
|
+
*/
|
|
13747
|
+
addRecent: (workspaceId, name) =>
|
|
13748
|
+
ipcRenderer$1.invoke(SESSION_ADD_RECENT, { workspaceId, name }),
|
|
13749
|
+
|
|
13750
|
+
/**
|
|
13751
|
+
* Clear all recent dashboards.
|
|
13752
|
+
*/
|
|
13753
|
+
clearRecents: () => ipcRenderer$1.invoke(SESSION_CLEAR_RECENTS),
|
|
13754
|
+
|
|
13755
|
+
/**
|
|
13756
|
+
* Get saved session state.
|
|
13757
|
+
*
|
|
13758
|
+
* @returns {Promise<{ openTabIds: string[], activeTabId: string | null } | null>}
|
|
13759
|
+
*/
|
|
13760
|
+
getState: () => ipcRenderer$1.invoke(SESSION_GET_STATE),
|
|
13761
|
+
|
|
13762
|
+
/**
|
|
13763
|
+
* Save session state.
|
|
13764
|
+
*
|
|
13765
|
+
* @param {string[]} openTabIds
|
|
13766
|
+
* @param {string|null} activeTabId
|
|
13767
|
+
*/
|
|
13768
|
+
saveState: (openTabIds, activeTabId) =>
|
|
13769
|
+
ipcRenderer$1.invoke(SESSION_SAVE_STATE, { openTabIds, activeTabId }),
|
|
13770
|
+
|
|
13771
|
+
/**
|
|
13772
|
+
* Clear saved session state.
|
|
13773
|
+
*/
|
|
13774
|
+
clearState: () => ipcRenderer$1.invoke(SESSION_CLEAR_STATE),
|
|
13775
|
+
};
|
|
13776
|
+
|
|
13777
|
+
var sessionApi_1 = sessionApi$1;
|
|
13778
|
+
|
|
13394
13779
|
/**
|
|
13395
13780
|
* mainApi.js
|
|
13396
13781
|
*
|
|
@@ -13425,6 +13810,7 @@ const clientCacheApi$1 = clientCacheApi_1;
|
|
|
13425
13810
|
const dashboardConfigApi$1 = dashboardConfigApi_1;
|
|
13426
13811
|
const dashboardRatingsApi = dashboardRatingsApi_1;
|
|
13427
13812
|
const registryAuthApi$1 = registryAuthApi_1;
|
|
13813
|
+
const sessionApi = sessionApi_1;
|
|
13428
13814
|
|
|
13429
13815
|
// Events constants
|
|
13430
13816
|
const events$1 = events$8;
|
|
@@ -13499,6 +13885,7 @@ function createMainApi$1(extensions = {}) {
|
|
|
13499
13885
|
dashboardConfig: dashboardConfigApi$1,
|
|
13500
13886
|
dashboardRatings: dashboardRatingsApi,
|
|
13501
13887
|
registryAuth: registryAuthApi$1,
|
|
13888
|
+
session: sessionApi,
|
|
13502
13889
|
|
|
13503
13890
|
widgetEvent: {
|
|
13504
13891
|
publish: (eventType, content) => {
|