@trops/dash-core 0.1.109 → 0.1.111

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.
@@ -638,6 +638,10 @@ 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";
644
+ const REGISTRY_AUTH_DELETE_PACKAGE$1 = "registry-auth:delete-package";
641
645
 
642
646
  var registryAuthEvents$1 = {
643
647
  REGISTRY_AUTH_INITIATE_LOGIN: REGISTRY_AUTH_INITIATE_LOGIN$1,
@@ -646,6 +650,32 @@ var registryAuthEvents$1 = {
646
650
  REGISTRY_AUTH_GET_PROFILE: REGISTRY_AUTH_GET_PROFILE$1,
647
651
  REGISTRY_AUTH_LOGOUT: REGISTRY_AUTH_LOGOUT$1,
648
652
  REGISTRY_AUTH_PUBLISH: REGISTRY_AUTH_PUBLISH$1,
653
+ REGISTRY_AUTH_UPDATE_PROFILE: REGISTRY_AUTH_UPDATE_PROFILE$1,
654
+ REGISTRY_AUTH_GET_PACKAGES: REGISTRY_AUTH_GET_PACKAGES$1,
655
+ REGISTRY_AUTH_UPDATE_PACKAGE: REGISTRY_AUTH_UPDATE_PACKAGE$1,
656
+ REGISTRY_AUTH_DELETE_PACKAGE: REGISTRY_AUTH_DELETE_PACKAGE$1,
657
+ };
658
+
659
+ /**
660
+ * Event Constants — Session Events
661
+ *
662
+ * IPC event constants for session management (recents + session restore).
663
+ */
664
+
665
+ const SESSION_GET_RECENTS$1 = "session:get-recents";
666
+ const SESSION_ADD_RECENT$1 = "session:add-recent";
667
+ const SESSION_CLEAR_RECENTS$1 = "session:clear-recents";
668
+ const SESSION_GET_STATE$1 = "session:get-state";
669
+ const SESSION_SAVE_STATE$1 = "session:save-state";
670
+ const SESSION_CLEAR_STATE$1 = "session:clear-state";
671
+
672
+ var sessionEvents$1 = {
673
+ SESSION_GET_RECENTS: SESSION_GET_RECENTS$1,
674
+ SESSION_ADD_RECENT: SESSION_ADD_RECENT$1,
675
+ SESSION_CLEAR_RECENTS: SESSION_CLEAR_RECENTS$1,
676
+ SESSION_GET_STATE: SESSION_GET_STATE$1,
677
+ SESSION_SAVE_STATE: SESSION_SAVE_STATE$1,
678
+ SESSION_CLEAR_STATE: SESSION_CLEAR_STATE$1,
649
679
  };
650
680
 
651
681
  /**
@@ -672,6 +702,7 @@ const clientCacheEvents = clientCacheEvents$1;
672
702
  const dashboardConfigEvents = dashboardConfigEvents$1;
673
703
  const dashboardRatingsEvents = dashboardRatingsEvents$1;
674
704
  const registryAuthEvents = registryAuthEvents$1;
705
+ const sessionEvents = sessionEvents$1;
675
706
 
676
707
  const publicEvents = {
677
708
  ...dataEvents,
@@ -697,6 +728,7 @@ var events$8 = {
697
728
  ...dashboardConfigEvents,
698
729
  ...dashboardRatingsEvents,
699
730
  ...registryAuthEvents,
731
+ ...sessionEvents,
700
732
  };
701
733
 
702
734
  /**
@@ -10194,16 +10226,16 @@ const REGISTRY_BASE_URL$1 =
10194
10226
  process.env.DASH_REGISTRY_API_URL || "https://registry.trops.dev";
10195
10227
 
10196
10228
  // Lazy-load electron-store to avoid issues when not installed
10197
- let store = null;
10198
- function getStore() {
10199
- if (!store) {
10229
+ let store$1 = null;
10230
+ function getStore$1() {
10231
+ if (!store$1) {
10200
10232
  const Store = require$$1;
10201
- store = new Store({
10233
+ store$1 = new Store({
10202
10234
  name: "dash-registry-auth",
10203
10235
  encryptionKey: "dash-registry-v1",
10204
10236
  });
10205
10237
  }
10206
- return store;
10238
+ return store$1;
10207
10239
  }
10208
10240
 
10209
10241
  /**
@@ -10261,7 +10293,7 @@ async function pollForToken$1(deviceCode) {
10261
10293
  const data = await response.json();
10262
10294
 
10263
10295
  // Store the token securely
10264
- const s = getStore();
10296
+ const s = getStore$1();
10265
10297
  s.set("accessToken", data.access_token);
10266
10298
  s.set("userId", data.user_id);
10267
10299
  s.set("tokenType", data.token_type);
@@ -10284,7 +10316,7 @@ async function pollForToken$1(deviceCode) {
10284
10316
  */
10285
10317
  function getStoredToken$1() {
10286
10318
  try {
10287
- const s = getStore();
10319
+ const s = getStore$1();
10288
10320
  const token = s.get("accessToken");
10289
10321
  if (!token) return null;
10290
10322
 
@@ -10351,7 +10383,7 @@ async function getRegistryProfile$1() {
10351
10383
  */
10352
10384
  function clearToken() {
10353
10385
  try {
10354
- const s = getStore();
10386
+ const s = getStore$1();
10355
10387
  s.clear();
10356
10388
  console.log("[RegistryAuthController] Token cleared");
10357
10389
  } catch (err) {
@@ -10359,12 +10391,151 @@ function clearToken() {
10359
10391
  }
10360
10392
  }
10361
10393
 
10394
+ /**
10395
+ * Update the authenticated user's registry profile.
10396
+ *
10397
+ * @param {Object} updates - Fields to update (e.g. { displayName })
10398
+ * @returns {Promise<Object|null>} Updated user or null on 401
10399
+ */
10400
+ async function updateRegistryProfile$1(updates) {
10401
+ const stored = getStoredToken$1();
10402
+ if (!stored) return null;
10403
+
10404
+ try {
10405
+ const response = await fetch(`${REGISTRY_BASE_URL$1}/api/auth/me`, {
10406
+ method: "PATCH",
10407
+ headers: {
10408
+ Authorization: `Bearer ${stored.token}`,
10409
+ "Content-Type": "application/json",
10410
+ },
10411
+ body: JSON.stringify(updates),
10412
+ });
10413
+
10414
+ if (response.status === 401) {
10415
+ clearToken();
10416
+ return null;
10417
+ }
10418
+ if (!response.ok) return null;
10419
+
10420
+ const data = await response.json();
10421
+ return data.user || null;
10422
+ } catch {
10423
+ return null;
10424
+ }
10425
+ }
10426
+
10427
+ /**
10428
+ * Get the authenticated user's published packages.
10429
+ *
10430
+ * @returns {Promise<Object|null>} { packages: [...] } or null
10431
+ */
10432
+ async function getRegistryPackages$1() {
10433
+ const stored = getStoredToken$1();
10434
+ if (!stored) return null;
10435
+
10436
+ try {
10437
+ const response = await fetch(
10438
+ `${REGISTRY_BASE_URL$1}/api/auth/me/packages`,
10439
+ {
10440
+ headers: {
10441
+ Authorization: `Bearer ${stored.token}`,
10442
+ },
10443
+ },
10444
+ );
10445
+
10446
+ if (response.status === 401) {
10447
+ clearToken();
10448
+ return null;
10449
+ }
10450
+ if (!response.ok) return null;
10451
+
10452
+ return await response.json();
10453
+ } catch {
10454
+ return null;
10455
+ }
10456
+ }
10457
+
10458
+ /**
10459
+ * Update a published package's metadata.
10460
+ *
10461
+ * @param {string} scope - Package scope (e.g. "@trops")
10462
+ * @param {string} name - Package name
10463
+ * @param {Object} updates - Fields to update (displayName, description, category, tags, visibility)
10464
+ * @returns {Promise<Object|null>} Updated package or null
10465
+ */
10466
+ async function updateRegistryPackage$1(scope, name, updates) {
10467
+ const stored = getStoredToken$1();
10468
+ if (!stored) return null;
10469
+
10470
+ try {
10471
+ const response = await fetch(
10472
+ `${REGISTRY_BASE_URL$1}/api/packages/${encodeURIComponent(scope)}/${encodeURIComponent(name)}`,
10473
+ {
10474
+ method: "PATCH",
10475
+ headers: {
10476
+ Authorization: `Bearer ${stored.token}`,
10477
+ "Content-Type": "application/json",
10478
+ },
10479
+ body: JSON.stringify(updates),
10480
+ },
10481
+ );
10482
+
10483
+ if (response.status === 401) {
10484
+ clearToken();
10485
+ return null;
10486
+ }
10487
+ if (!response.ok) return null;
10488
+
10489
+ return await response.json();
10490
+ } catch {
10491
+ return null;
10492
+ }
10493
+ }
10494
+
10495
+ /**
10496
+ * Delete a published package from the registry.
10497
+ *
10498
+ * @param {string} scope - Package scope (e.g. "@trops")
10499
+ * @param {string} name - Package name
10500
+ * @returns {Promise<Object|null>} Response or null
10501
+ */
10502
+ async function deleteRegistryPackage(scope, name) {
10503
+ const stored = getStoredToken$1();
10504
+ if (!stored) return null;
10505
+
10506
+ try {
10507
+ const response = await fetch(
10508
+ `${REGISTRY_BASE_URL$1}/api/packages/${encodeURIComponent(scope)}/${encodeURIComponent(name)}`,
10509
+ {
10510
+ method: "DELETE",
10511
+ headers: {
10512
+ Authorization: `Bearer ${stored.token}`,
10513
+ },
10514
+ },
10515
+ );
10516
+
10517
+ if (response.status === 401) {
10518
+ clearToken();
10519
+ return null;
10520
+ }
10521
+ if (!response.ok) return null;
10522
+
10523
+ return await response.json();
10524
+ } catch {
10525
+ return null;
10526
+ }
10527
+ }
10528
+
10362
10529
  var registryAuthController$1 = {
10363
10530
  initiateDeviceFlow: initiateDeviceFlow$1,
10364
10531
  pollForToken: pollForToken$1,
10365
10532
  getStoredToken: getStoredToken$1,
10366
10533
  getAuthStatus,
10367
10534
  getRegistryProfile: getRegistryProfile$1,
10535
+ updateRegistryProfile: updateRegistryProfile$1,
10536
+ getRegistryPackages: getRegistryPackages$1,
10537
+ updateRegistryPackage: updateRegistryPackage$1,
10538
+ deleteRegistryPackage,
10368
10539
  clearToken,
10369
10540
  };
10370
10541
 
@@ -11471,6 +11642,139 @@ clientCache$1.registerFactory("openai", (credentials) => {
11471
11642
  return new OpenAI({ apiKey: credentials.apiKey });
11472
11643
  });
11473
11644
 
11645
+ /**
11646
+ * sessionController.js
11647
+ *
11648
+ * Manages session persistence: recently opened dashboards and
11649
+ * open tab state for session restore on relaunch.
11650
+ *
11651
+ * Uses electron-store (unencrypted) for lightweight persistence.
11652
+ */
11653
+
11654
+ const MAX_RECENTS = 20;
11655
+
11656
+ // Lazy-load electron-store to avoid issues when not installed
11657
+ let store = null;
11658
+ function getStore() {
11659
+ if (!store) {
11660
+ const Store = require$$1;
11661
+ store = new Store({ name: "dash-session" });
11662
+ }
11663
+ return store;
11664
+ }
11665
+
11666
+ /**
11667
+ * Get recently opened dashboards.
11668
+ *
11669
+ * @returns {Array<{ workspaceId: string, name: string, openedAt: string }>}
11670
+ */
11671
+ function getRecentDashboards$1() {
11672
+ try {
11673
+ const s = getStore();
11674
+ const recents = s.get("recents", []);
11675
+ return recents
11676
+ .sort((a, b) => new Date(b.openedAt) - new Date(a.openedAt))
11677
+ .slice(0, MAX_RECENTS);
11678
+ } catch {
11679
+ return [];
11680
+ }
11681
+ }
11682
+
11683
+ /**
11684
+ * Add (or upsert) a recent dashboard entry.
11685
+ *
11686
+ * @param {string} workspaceId
11687
+ * @param {string} name
11688
+ * @returns {Array} Updated recents list
11689
+ */
11690
+ function addRecentDashboard$1(workspaceId, name) {
11691
+ try {
11692
+ const s = getStore();
11693
+ let recents = s.get("recents", []);
11694
+
11695
+ // Remove existing entry for this workspace (upsert)
11696
+ recents = recents.filter((r) => r.workspaceId !== workspaceId);
11697
+
11698
+ // Prepend new entry
11699
+ recents.unshift({
11700
+ workspaceId,
11701
+ name: name || "Untitled",
11702
+ openedAt: new Date().toISOString(),
11703
+ });
11704
+
11705
+ // Cap at MAX_RECENTS
11706
+ recents = recents.slice(0, MAX_RECENTS);
11707
+
11708
+ s.set("recents", recents);
11709
+ return recents;
11710
+ } catch {
11711
+ return [];
11712
+ }
11713
+ }
11714
+
11715
+ /**
11716
+ * Clear all recent dashboards.
11717
+ */
11718
+ function clearRecentDashboards$1() {
11719
+ try {
11720
+ const s = getStore();
11721
+ s.set("recents", []);
11722
+ } catch {
11723
+ // ignore
11724
+ }
11725
+ }
11726
+
11727
+ /**
11728
+ * Get saved session state (open tabs + active tab).
11729
+ *
11730
+ * @returns {{ openTabIds: string[], activeTabId: string | null } | null}
11731
+ */
11732
+ function getSessionState$1() {
11733
+ try {
11734
+ const s = getStore();
11735
+ const state = s.get("sessionState", null);
11736
+ return state || null;
11737
+ } catch {
11738
+ return null;
11739
+ }
11740
+ }
11741
+
11742
+ /**
11743
+ * Save session state (open tabs + active tab).
11744
+ *
11745
+ * @param {string[]} openTabIds
11746
+ * @param {string|null} activeTabId
11747
+ */
11748
+ function saveSessionState$1(openTabIds, activeTabId) {
11749
+ try {
11750
+ const s = getStore();
11751
+ s.set("sessionState", { openTabIds, activeTabId });
11752
+ } catch {
11753
+ // ignore
11754
+ }
11755
+ }
11756
+
11757
+ /**
11758
+ * Clear saved session state.
11759
+ */
11760
+ function clearSessionState$1() {
11761
+ try {
11762
+ const s = getStore();
11763
+ s.delete("sessionState");
11764
+ } catch {
11765
+ // ignore
11766
+ }
11767
+ }
11768
+
11769
+ var sessionController = {
11770
+ getRecentDashboards: getRecentDashboards$1,
11771
+ addRecentDashboard: addRecentDashboard$1,
11772
+ clearRecentDashboards: clearRecentDashboards$1,
11773
+ getSessionState: getSessionState$1,
11774
+ saveSessionState: saveSessionState$1,
11775
+ clearSessionState: clearSessionState$1,
11776
+ };
11777
+
11474
11778
  /**
11475
11779
  * dashboardRatingsUtils.js
11476
11780
  *
@@ -11705,12 +12009,23 @@ const {
11705
12009
  getStoredToken: getRegistryToken,
11706
12010
  getAuthStatus: getRegistryAuthStatus,
11707
12011
  getRegistryProfile,
12012
+ updateRegistryProfile,
12013
+ getRegistryPackages,
12014
+ updateRegistryPackage,
11708
12015
  clearToken: clearRegistryToken,
11709
12016
  } = registryAuthController$1;
11710
12017
  const {
11711
12018
  publishToRegistry,
11712
12019
  getRegistryUrl,
11713
12020
  } = registryApiController$1;
12021
+ const {
12022
+ getRecentDashboards,
12023
+ addRecentDashboard,
12024
+ clearRecentDashboards,
12025
+ getSessionState,
12026
+ saveSessionState,
12027
+ clearSessionState,
12028
+ } = sessionController;
11714
12029
  const {
11715
12030
  saveDashboardRating,
11716
12031
  getDashboardRating,
@@ -11779,12 +12094,21 @@ var controller = {
11779
12094
  getRegistryToken,
11780
12095
  getRegistryAuthStatus,
11781
12096
  getRegistryProfile,
12097
+ updateRegistryProfile,
12098
+ getRegistryPackages,
12099
+ updateRegistryPackage,
11782
12100
  clearRegistryToken,
11783
12101
  publishToRegistry,
11784
12102
  getRegistryUrl,
12103
+ getRecentDashboards,
12104
+ addRecentDashboard,
12105
+ clearRecentDashboards,
12106
+ getSessionState,
12107
+ saveSessionState,
12108
+ clearSessionState,
11785
12109
  };
11786
12110
 
11787
- const { ipcRenderer: ipcRenderer$k } = require$$0$1;
12111
+ const { ipcRenderer: ipcRenderer$l } = require$$0$1;
11788
12112
  const {
11789
12113
  SECURE_STORE_ENCRYPTION_CHECK,
11790
12114
  SECURE_STORE_SET_DATA,
@@ -11796,10 +12120,10 @@ const {
11796
12120
  */
11797
12121
  const secureStoreApi$2 = {
11798
12122
  isEncryptionAvailable: () =>
11799
- ipcRenderer$k.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
12123
+ ipcRenderer$l.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
11800
12124
  saveData: (key, value) =>
11801
- ipcRenderer$k.invoke(SECURE_STORE_SET_DATA, { key, value }),
11802
- getData: (key) => ipcRenderer$k.invoke(SECURE_STORE_GET_DATA, { key }),
12125
+ ipcRenderer$l.invoke(SECURE_STORE_SET_DATA, { key, value }),
12126
+ getData: (key) => ipcRenderer$l.invoke(SECURE_STORE_GET_DATA, { key }),
11803
12127
  };
11804
12128
 
11805
12129
  var secureStoreApi_1 = secureStoreApi$2;
@@ -11810,7 +12134,7 @@ var secureStoreApi_1 = secureStoreApi$2;
11810
12134
  * Handle the workspace configuration file
11811
12135
  */
11812
12136
 
11813
- const { ipcRenderer: ipcRenderer$j } = require$$0$1;
12137
+ const { ipcRenderer: ipcRenderer$k } = require$$0$1;
11814
12138
  const {
11815
12139
  WORKSPACE_LIST,
11816
12140
  WORKSPACE_SAVE,
@@ -11827,7 +12151,7 @@ const workspaceApi$2 = {
11827
12151
  */
11828
12152
  listWorkspacesForApplication: (appId) => {
11829
12153
  console.log("listWorkspacesForApplication called with appId:", appId);
11830
- return ipcRenderer$j.invoke(WORKSPACE_LIST, { appId });
12154
+ return ipcRenderer$k.invoke(WORKSPACE_LIST, { appId });
11831
12155
  },
11832
12156
 
11833
12157
  /**
@@ -11838,7 +12162,7 @@ const workspaceApi$2 = {
11838
12162
  * @returns
11839
12163
  */
11840
12164
  saveWorkspaceForApplication: (appId, data) =>
11841
- ipcRenderer$j.invoke(WORKSPACE_SAVE, { appId, data }),
12165
+ ipcRenderer$k.invoke(WORKSPACE_SAVE, { appId, data }),
11842
12166
 
11843
12167
  /**
11844
12168
  * deleteWorkspaceForApplication
@@ -11848,7 +12172,7 @@ const workspaceApi$2 = {
11848
12172
  * @returns
11849
12173
  */
11850
12174
  deleteWorkspaceForApplication: (appId, workspaceId) =>
11851
- ipcRenderer$j.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
12175
+ ipcRenderer$k.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
11852
12176
  };
11853
12177
 
11854
12178
  var workspaceApi_1 = workspaceApi$2;
@@ -11860,15 +12184,15 @@ var workspaceApi_1 = workspaceApi$2;
11860
12184
  */
11861
12185
 
11862
12186
  // ipcRenderer that must be used to invoke the events
11863
- const { ipcRenderer: ipcRenderer$i } = require$$0$1;
12187
+ const { ipcRenderer: ipcRenderer$j } = require$$0$1;
11864
12188
 
11865
12189
  const { LAYOUT_LIST, LAYOUT_SAVE } = events$8;
11866
12190
 
11867
12191
  const layoutApi$2 = {
11868
12192
  listLayoutsForApplication: (appId) =>
11869
- ipcRenderer$i.invoke(LAYOUT_LIST, { appId }),
12193
+ ipcRenderer$j.invoke(LAYOUT_LIST, { appId }),
11870
12194
  saveLayoutForApplication: (appId, data) =>
11871
- ipcRenderer$i.invoke(LAYOUT_SAVE, { appId, data }),
12195
+ ipcRenderer$j.invoke(LAYOUT_SAVE, { appId, data }),
11872
12196
  };
11873
12197
 
11874
12198
  var layoutApi_1 = layoutApi$2;
@@ -11880,7 +12204,7 @@ var layoutApi_1 = layoutApi$2;
11880
12204
  */
11881
12205
 
11882
12206
  // ipcRenderer that must be used to invoke the events
11883
- const { ipcRenderer: ipcRenderer$h } = require$$0$1;
12207
+ const { ipcRenderer: ipcRenderer$i } = require$$0$1;
11884
12208
 
11885
12209
  const {
11886
12210
  DATA_JSON_TO_CSV_FILE,
@@ -11899,7 +12223,7 @@ const {
11899
12223
  const dataApi$2 = {
11900
12224
  // convert a json array of objects to a csv string and save to file
11901
12225
  convertJsonToCsvFile: (appId, jsonObject, filename) =>
11902
- ipcRenderer$h.invoke(DATA_JSON_TO_CSV_FILE, {
12226
+ ipcRenderer$i.invoke(DATA_JSON_TO_CSV_FILE, {
11903
12227
  appId,
11904
12228
  jsonObject,
11905
12229
  filename,
@@ -11907,10 +12231,10 @@ const dataApi$2 = {
11907
12231
 
11908
12232
  // convert a json array of objects to a csv string and return a string
11909
12233
  convertJsonToCsvString: (appId, jsonObject) =>
11910
- ipcRenderer$h.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
12234
+ ipcRenderer$i.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
11911
12235
 
11912
12236
  parseXMLStream: (filepath, outpath, start) =>
11913
- ipcRenderer$h.invoke(PARSE_XML_STREAM, {
12237
+ ipcRenderer$i.invoke(PARSE_XML_STREAM, {
11914
12238
  filepath,
11915
12239
  outpath,
11916
12240
  start,
@@ -11924,7 +12248,7 @@ const dataApi$2 = {
11924
12248
  headers = null,
11925
12249
  limit = null,
11926
12250
  ) => {
11927
- ipcRenderer$h.invoke(PARSE_CSV_STREAM, {
12251
+ ipcRenderer$i.invoke(PARSE_CSV_STREAM, {
11928
12252
  filepath,
11929
12253
  outpath,
11930
12254
  delimiter,
@@ -11935,15 +12259,15 @@ const dataApi$2 = {
11935
12259
  },
11936
12260
 
11937
12261
  readLinesFromFile: (filepath, lineCount) => {
11938
- ipcRenderer$h.invoke(READ_LINES, { filepath, lineCount });
12262
+ ipcRenderer$i.invoke(READ_LINES, { filepath, lineCount });
11939
12263
  },
11940
12264
 
11941
12265
  readJSONFromFile: (filepath, objectCount = null) => {
11942
- ipcRenderer$h.invoke(READ_JSON, { filepath, objectCount });
12266
+ ipcRenderer$i.invoke(READ_JSON, { filepath, objectCount });
11943
12267
  },
11944
12268
 
11945
12269
  readDataFromURL: (url, toFilepath) => {
11946
- ipcRenderer$h.invoke(READ_DATA_URL, { url, toFilepath });
12270
+ ipcRenderer$i.invoke(READ_DATA_URL, { url, toFilepath });
11947
12271
  },
11948
12272
 
11949
12273
  /*
@@ -11952,7 +12276,7 @@ const dataApi$2 = {
11952
12276
  * @param {object} returnEmpty the return empty object
11953
12277
  */
11954
12278
  saveData: (data, filename, append, returnEmpty, uuid) =>
11955
- ipcRenderer$h.invoke(DATA_SAVE_TO_FILE, {
12279
+ ipcRenderer$i.invoke(DATA_SAVE_TO_FILE, {
11956
12280
  data,
11957
12281
  filename,
11958
12282
  append,
@@ -11964,14 +12288,14 @@ const dataApi$2 = {
11964
12288
  * @param {string} filename the filename to read (not path)
11965
12289
  */
11966
12290
  readData: (filename, returnEmpty = []) =>
11967
- ipcRenderer$h.invoke(DATA_READ_FROM_FILE, { filename, returnEmpty }),
12291
+ ipcRenderer$i.invoke(DATA_READ_FROM_FILE, { filename, returnEmpty }),
11968
12292
 
11969
12293
  /**
11970
12294
  * transformFile
11971
12295
  * @returns
11972
12296
  */
11973
12297
  transformFile: (filepath, outFilepath, mappingFunctionBody, args) => {
11974
- ipcRenderer$h.invoke(TRANSFORM_FILE, {
12298
+ ipcRenderer$i.invoke(TRANSFORM_FILE, {
11975
12299
  filepath,
11976
12300
  outFilepath,
11977
12301
  mappingFunctionBody,
@@ -11980,7 +12304,7 @@ const dataApi$2 = {
11980
12304
  },
11981
12305
 
11982
12306
  extractColorsFromImageURL: (url) => {
11983
- ipcRenderer$h.invoke(EXTRACT_COLORS_FROM_IMAGE, {
12307
+ ipcRenderer$i.invoke(EXTRACT_COLORS_FROM_IMAGE, {
11984
12308
  url,
11985
12309
  });
11986
12310
  },
@@ -11995,7 +12319,7 @@ var dataApi_1 = dataApi$2;
11995
12319
  */
11996
12320
 
11997
12321
  // ipcRenderer that must be used to invoke the events
11998
- const { ipcRenderer: ipcRenderer$g } = require$$0$1;
12322
+ const { ipcRenderer: ipcRenderer$h } = require$$0$1;
11999
12323
 
12000
12324
  const {
12001
12325
  SETTINGS_GET,
@@ -12006,14 +12330,14 @@ const {
12006
12330
  } = events$8;
12007
12331
 
12008
12332
  const settingsApi$2 = {
12009
- getSettingsForApplication: () => ipcRenderer$g.invoke(SETTINGS_GET, {}),
12333
+ getSettingsForApplication: () => ipcRenderer$h.invoke(SETTINGS_GET, {}),
12010
12334
  saveSettingsForApplication: (data) =>
12011
- ipcRenderer$g.invoke(SETTINGS_SAVE, { data }),
12012
- getDataDirectory: () => ipcRenderer$g.invoke(SETTINGS_GET_DATA_DIR, {}),
12335
+ ipcRenderer$h.invoke(SETTINGS_SAVE, { data }),
12336
+ getDataDirectory: () => ipcRenderer$h.invoke(SETTINGS_GET_DATA_DIR, {}),
12013
12337
  setDataDirectory: (dataDirectory) =>
12014
- ipcRenderer$g.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
12338
+ ipcRenderer$h.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
12015
12339
  migrateDataDirectory: (oldDirectory, newDirectory) =>
12016
- ipcRenderer$g.invoke(SETTINGS_MIGRATE_DATA_DIR, {
12340
+ ipcRenderer$h.invoke(SETTINGS_MIGRATE_DATA_DIR, {
12017
12341
  oldDirectory,
12018
12342
  newDirectory,
12019
12343
  }),
@@ -12028,7 +12352,7 @@ var settingsApi_1 = settingsApi$2;
12028
12352
  */
12029
12353
 
12030
12354
  // ipcRenderer that must be used to invoke the events
12031
- const { ipcRenderer: ipcRenderer$f } = require$$0$1;
12355
+ const { ipcRenderer: ipcRenderer$g } = require$$0$1;
12032
12356
 
12033
12357
  const { CHOOSE_FILE } = events$8;
12034
12358
 
@@ -12040,7 +12364,7 @@ const dialogApi$2 = {
12040
12364
  */
12041
12365
  chooseFile: (allowFile = true, extensions = ["*"]) => {
12042
12366
  console.log("dialog api choose file");
12043
- return ipcRenderer$f.invoke(CHOOSE_FILE, { allowFile, extensions });
12367
+ return ipcRenderer$g.invoke(CHOOSE_FILE, { allowFile, extensions });
12044
12368
  },
12045
12369
  };
12046
12370
 
@@ -12059,7 +12383,7 @@ var dialogApi_1 = dialogApi$2;
12059
12383
  * mainApi.widgets.uninstall('Weather')
12060
12384
  */
12061
12385
 
12062
- const { ipcRenderer: ipcRenderer$e } = require$$0$1;
12386
+ const { ipcRenderer: ipcRenderer$f } = require$$0$1;
12063
12387
 
12064
12388
  const widgetApi$2 = {
12065
12389
  /**
@@ -12068,7 +12392,7 @@ const widgetApi$2 = {
12068
12392
  */
12069
12393
  list: async () => {
12070
12394
  try {
12071
- return await ipcRenderer$e.invoke("widget:list");
12395
+ return await ipcRenderer$f.invoke("widget:list");
12072
12396
  } catch (error) {
12073
12397
  console.error("[WidgetApi] Error listing widgets:", error);
12074
12398
  throw error;
@@ -12082,7 +12406,7 @@ const widgetApi$2 = {
12082
12406
  */
12083
12407
  get: async (widgetName) => {
12084
12408
  try {
12085
- return await ipcRenderer$e.invoke("widget:get", widgetName);
12409
+ return await ipcRenderer$f.invoke("widget:get", widgetName);
12086
12410
  } catch (error) {
12087
12411
  console.error(`[WidgetApi] Error getting widget ${widgetName}:`, error);
12088
12412
  throw error;
@@ -12113,7 +12437,7 @@ const widgetApi$2 = {
12113
12437
  console.log(
12114
12438
  `[WidgetApi] Installing widget: ${widgetName} from ${downloadUrl}`,
12115
12439
  );
12116
- const config = await ipcRenderer$e.invoke(
12440
+ const config = await ipcRenderer$f.invoke(
12117
12441
  "widget:install",
12118
12442
  widgetName,
12119
12443
  downloadUrl,
@@ -12153,7 +12477,7 @@ const widgetApi$2 = {
12153
12477
  console.log(
12154
12478
  `[WidgetApi] Installing local widget: ${widgetName} from ${localPath}`,
12155
12479
  );
12156
- const config = await ipcRenderer$e.invoke(
12480
+ const config = await ipcRenderer$f.invoke(
12157
12481
  "widget:install-local",
12158
12482
  widgetName,
12159
12483
  localPath,
@@ -12184,7 +12508,7 @@ const widgetApi$2 = {
12184
12508
  loadFolder: async (folderPath) => {
12185
12509
  try {
12186
12510
  console.log(`[WidgetApi] Loading widgets from folder: ${folderPath}`);
12187
- const results = await ipcRenderer$e.invoke(
12511
+ const results = await ipcRenderer$f.invoke(
12188
12512
  "widget:load-folder",
12189
12513
  folderPath,
12190
12514
  );
@@ -12208,7 +12532,7 @@ const widgetApi$2 = {
12208
12532
  uninstall: async (widgetName) => {
12209
12533
  try {
12210
12534
  console.log(`[WidgetApi] Uninstalling widget: ${widgetName}`);
12211
- const success = await ipcRenderer$e.invoke("widget:uninstall", widgetName);
12535
+ const success = await ipcRenderer$f.invoke("widget:uninstall", widgetName);
12212
12536
  if (success) {
12213
12537
  console.log(`[WidgetApi] ✓ Widget ${widgetName} uninstalled`);
12214
12538
  } else {
@@ -12231,7 +12555,7 @@ const widgetApi$2 = {
12231
12555
  */
12232
12556
  getCachePath: async () => {
12233
12557
  try {
12234
- return await ipcRenderer$e.invoke("widget:cache-path");
12558
+ return await ipcRenderer$f.invoke("widget:cache-path");
12235
12559
  } catch (error) {
12236
12560
  console.error("[WidgetApi] Error getting cache path:", error);
12237
12561
  throw error;
@@ -12245,7 +12569,7 @@ const widgetApi$2 = {
12245
12569
  */
12246
12570
  getStoragePath: async () => {
12247
12571
  try {
12248
- return await ipcRenderer$e.invoke("widget:storage-path");
12572
+ return await ipcRenderer$f.invoke("widget:storage-path");
12249
12573
  } catch (error) {
12250
12574
  console.error("[WidgetApi] Error getting storage path:", error);
12251
12575
  throw error;
@@ -12262,7 +12586,7 @@ const widgetApi$2 = {
12262
12586
  setStoragePath: async (customPath) => {
12263
12587
  try {
12264
12588
  console.log(`[WidgetApi] Setting storage path to: ${customPath}`);
12265
- const result = await ipcRenderer$e.invoke(
12589
+ const result = await ipcRenderer$f.invoke(
12266
12590
  "widget:set-storage-path",
12267
12591
  customPath,
12268
12592
  );
@@ -12284,7 +12608,7 @@ const widgetApi$2 = {
12284
12608
  */
12285
12609
  getComponentConfigs: async () => {
12286
12610
  try {
12287
- return await ipcRenderer$e.invoke("widget:get-component-configs");
12611
+ return await ipcRenderer$f.invoke("widget:get-component-configs");
12288
12612
  } catch (error) {
12289
12613
  console.error("[WidgetApi] Error getting component configs:", error);
12290
12614
  return [];
@@ -12299,7 +12623,7 @@ const widgetApi$2 = {
12299
12623
  */
12300
12624
  readBundle: async (widgetName) => {
12301
12625
  try {
12302
- return await ipcRenderer$e.invoke("widget:read-bundle", widgetName);
12626
+ return await ipcRenderer$f.invoke("widget:read-bundle", widgetName);
12303
12627
  } catch (error) {
12304
12628
  console.error(
12305
12629
  `[WidgetApi] Error reading bundle for ${widgetName}:`,
@@ -12316,7 +12640,7 @@ const widgetApi$2 = {
12316
12640
  */
12317
12641
  readAllBundles: async () => {
12318
12642
  try {
12319
- return await ipcRenderer$e.invoke("widget:read-all-bundles");
12643
+ return await ipcRenderer$f.invoke("widget:read-all-bundles");
12320
12644
  } catch (error) {
12321
12645
  console.error("[WidgetApi] Error reading all bundles:", error);
12322
12646
  return [];
@@ -12336,7 +12660,7 @@ const widgetApi$2 = {
12336
12660
  * });
12337
12661
  */
12338
12662
  onInstalled: (callback) => {
12339
- ipcRenderer$e.on("widget:installed", (event, data) => {
12663
+ ipcRenderer$f.on("widget:installed", (event, data) => {
12340
12664
  callback(data);
12341
12665
  });
12342
12666
  },
@@ -12354,7 +12678,7 @@ const widgetApi$2 = {
12354
12678
  * });
12355
12679
  */
12356
12680
  onLoaded: (callback) => {
12357
- ipcRenderer$e.on("widgets:loaded", (event, data) => {
12681
+ ipcRenderer$f.on("widgets:loaded", (event, data) => {
12358
12682
  callback(data);
12359
12683
  });
12360
12684
  },
@@ -12365,7 +12689,7 @@ const widgetApi$2 = {
12365
12689
  * @param {Function} callback - The callback to remove
12366
12690
  */
12367
12691
  removeInstalledListener: (callback) => {
12368
- ipcRenderer$e.removeListener("widget:installed", callback);
12692
+ ipcRenderer$f.removeListener("widget:installed", callback);
12369
12693
  },
12370
12694
 
12371
12695
  /**
@@ -12374,7 +12698,7 @@ const widgetApi$2 = {
12374
12698
  * @param {Function} callback - The callback to remove
12375
12699
  */
12376
12700
  removeLoadedListener: (callback) => {
12377
- ipcRenderer$e.removeListener("widgets:loaded", callback);
12701
+ ipcRenderer$f.removeListener("widgets:loaded", callback);
12378
12702
  },
12379
12703
  };
12380
12704
 
@@ -12387,7 +12711,7 @@ var widgetApi_1 = widgetApi$2;
12387
12711
  * Communicates with main process via IPC to handle encryption and file storage
12388
12712
  */
12389
12713
 
12390
- const { ipcRenderer: ipcRenderer$d } = require$$0$1;
12714
+ const { ipcRenderer: ipcRenderer$e } = require$$0$1;
12391
12715
  const {
12392
12716
  PROVIDER_SAVE,
12393
12717
  PROVIDER_LIST,
@@ -12419,7 +12743,7 @@ const providerApi$2 = {
12419
12743
  mcpConfig = null,
12420
12744
  allowedTools = null,
12421
12745
  ) =>
12422
- ipcRenderer$d.invoke(PROVIDER_SAVE, {
12746
+ ipcRenderer$e.invoke(PROVIDER_SAVE, {
12423
12747
  appId,
12424
12748
  providerName,
12425
12749
  providerType,
@@ -12437,7 +12761,7 @@ const providerApi$2 = {
12437
12761
  * @param {String} appId - the appId specified in the dash initialization
12438
12762
  * @returns {Promise<Array>} Array of provider objects with name, type, credentials
12439
12763
  */
12440
- listProviders: (appId) => ipcRenderer$d.invoke(PROVIDER_LIST, { appId }),
12764
+ listProviders: (appId) => ipcRenderer$e.invoke(PROVIDER_LIST, { appId }),
12441
12765
 
12442
12766
  /**
12443
12767
  * getProvider
@@ -12449,7 +12773,7 @@ const providerApi$2 = {
12449
12773
  * @returns {Promise<Object>} Provider object with name, type, credentials
12450
12774
  */
12451
12775
  getProvider: (appId, providerName) =>
12452
- ipcRenderer$d.invoke(PROVIDER_GET, { appId, providerName }),
12776
+ ipcRenderer$e.invoke(PROVIDER_GET, { appId, providerName }),
12453
12777
 
12454
12778
  /**
12455
12779
  * deleteProvider
@@ -12461,7 +12785,7 @@ const providerApi$2 = {
12461
12785
  * @returns {Promise}
12462
12786
  */
12463
12787
  deleteProvider: (appId, providerName) =>
12464
- ipcRenderer$d.invoke(PROVIDER_DELETE, { appId, providerName }),
12788
+ ipcRenderer$e.invoke(PROVIDER_DELETE, { appId, providerName }),
12465
12789
 
12466
12790
  /**
12467
12791
  * listProvidersForApplication
@@ -12471,14 +12795,14 @@ const providerApi$2 = {
12471
12795
  * @param {String} appId - the appId specified in the dash initialization
12472
12796
  */
12473
12797
  listProvidersForApplication: (appId) => {
12474
- ipcRenderer$d
12798
+ ipcRenderer$e
12475
12799
  .invoke(PROVIDER_LIST, { appId })
12476
12800
  .then((result) => {
12477
12801
  // Emit the event for ElectronDashboardApi to listen to
12478
- ipcRenderer$d.send("PROVIDER_LIST_COMPLETE", result);
12802
+ ipcRenderer$e.send("PROVIDER_LIST_COMPLETE", result);
12479
12803
  })
12480
12804
  .catch((error) => {
12481
- ipcRenderer$d.send("PROVIDER_LIST_ERROR", {
12805
+ ipcRenderer$e.send("PROVIDER_LIST_ERROR", {
12482
12806
  error: error.message,
12483
12807
  });
12484
12808
  });
@@ -12495,7 +12819,7 @@ const providerApi$2 = {
12495
12819
  providerType,
12496
12820
  credentials,
12497
12821
  ) => {
12498
- ipcRenderer$d
12822
+ ipcRenderer$e
12499
12823
  .invoke(PROVIDER_SAVE, {
12500
12824
  appId,
12501
12825
  providerName,
@@ -12503,10 +12827,10 @@ const providerApi$2 = {
12503
12827
  credentials,
12504
12828
  })
12505
12829
  .then((result) => {
12506
- ipcRenderer$d.send("PROVIDER_SAVE_COMPLETE", result);
12830
+ ipcRenderer$e.send("PROVIDER_SAVE_COMPLETE", result);
12507
12831
  })
12508
12832
  .catch((error) => {
12509
- ipcRenderer$d.send("PROVIDER_SAVE_ERROR", {
12833
+ ipcRenderer$e.send("PROVIDER_SAVE_ERROR", {
12510
12834
  error: error.message,
12511
12835
  });
12512
12836
  });
@@ -12518,13 +12842,13 @@ const providerApi$2 = {
12518
12842
  * Event-listener-based version for use with ElectronDashboardApi
12519
12843
  */
12520
12844
  getProviderForApplication: (appId, providerName) => {
12521
- ipcRenderer$d
12845
+ ipcRenderer$e
12522
12846
  .invoke(PROVIDER_GET, { appId, providerName })
12523
12847
  .then((result) => {
12524
- ipcRenderer$d.send("PROVIDER_GET_COMPLETE", result);
12848
+ ipcRenderer$e.send("PROVIDER_GET_COMPLETE", result);
12525
12849
  })
12526
12850
  .catch((error) => {
12527
- ipcRenderer$d.send("PROVIDER_GET_ERROR", {
12851
+ ipcRenderer$e.send("PROVIDER_GET_ERROR", {
12528
12852
  error: error.message,
12529
12853
  });
12530
12854
  });
@@ -12536,13 +12860,13 @@ const providerApi$2 = {
12536
12860
  * Event-listener-based version for use with ElectronDashboardApi
12537
12861
  */
12538
12862
  deleteProviderForApplication: (appId, providerName) => {
12539
- ipcRenderer$d
12863
+ ipcRenderer$e
12540
12864
  .invoke(PROVIDER_DELETE, { appId, providerName })
12541
12865
  .then((result) => {
12542
- ipcRenderer$d.send("PROVIDER_DELETE_COMPLETE", result);
12866
+ ipcRenderer$e.send("PROVIDER_DELETE_COMPLETE", result);
12543
12867
  })
12544
12868
  .catch((error) => {
12545
- ipcRenderer$d.send("PROVIDER_DELETE_ERROR", {
12869
+ ipcRenderer$e.send("PROVIDER_DELETE_ERROR", {
12546
12870
  error: error.message,
12547
12871
  });
12548
12872
  });
@@ -12558,7 +12882,7 @@ var providerApi_1 = providerApi$2;
12558
12882
  * Communicates with main process via IPC to manage MCP server lifecycle.
12559
12883
  */
12560
12884
 
12561
- const { ipcRenderer: ipcRenderer$c } = require$$0$1;
12885
+ const { ipcRenderer: ipcRenderer$d } = require$$0$1;
12562
12886
  const {
12563
12887
  MCP_START_SERVER,
12564
12888
  MCP_STOP_SERVER,
@@ -12582,7 +12906,7 @@ const mcpApi$2 = {
12582
12906
  * @returns {Promise<{ success, serverName, tools, status } | { error, message }>}
12583
12907
  */
12584
12908
  startServer: (serverName, mcpConfig, credentials) =>
12585
- ipcRenderer$c.invoke(MCP_START_SERVER, {
12909
+ ipcRenderer$d.invoke(MCP_START_SERVER, {
12586
12910
  serverName,
12587
12911
  mcpConfig,
12588
12912
  credentials,
@@ -12596,7 +12920,7 @@ const mcpApi$2 = {
12596
12920
  * @returns {Promise<{ success, serverName } | { error, message }>}
12597
12921
  */
12598
12922
  stopServer: (serverName) =>
12599
- ipcRenderer$c.invoke(MCP_STOP_SERVER, { serverName }),
12923
+ ipcRenderer$d.invoke(MCP_STOP_SERVER, { serverName }),
12600
12924
 
12601
12925
  /**
12602
12926
  * listTools
@@ -12605,7 +12929,7 @@ const mcpApi$2 = {
12605
12929
  * @param {string} serverName the server name
12606
12930
  * @returns {Promise<{ tools } | { error, message }>}
12607
12931
  */
12608
- listTools: (serverName) => ipcRenderer$c.invoke(MCP_LIST_TOOLS, { serverName }),
12932
+ listTools: (serverName) => ipcRenderer$d.invoke(MCP_LIST_TOOLS, { serverName }),
12609
12933
 
12610
12934
  /**
12611
12935
  * callTool
@@ -12618,7 +12942,7 @@ const mcpApi$2 = {
12618
12942
  * @returns {Promise<{ result } | { error, message }>}
12619
12943
  */
12620
12944
  callTool: (serverName, toolName, args, allowedTools = null) =>
12621
- ipcRenderer$c.invoke(MCP_CALL_TOOL, {
12945
+ ipcRenderer$d.invoke(MCP_CALL_TOOL, {
12622
12946
  serverName,
12623
12947
  toolName,
12624
12948
  args,
@@ -12633,7 +12957,7 @@ const mcpApi$2 = {
12633
12957
  * @returns {Promise<{ resources } | { error, message }>}
12634
12958
  */
12635
12959
  listResources: (serverName) =>
12636
- ipcRenderer$c.invoke(MCP_LIST_RESOURCES, { serverName }),
12960
+ ipcRenderer$d.invoke(MCP_LIST_RESOURCES, { serverName }),
12637
12961
 
12638
12962
  /**
12639
12963
  * readResource
@@ -12644,7 +12968,7 @@ const mcpApi$2 = {
12644
12968
  * @returns {Promise<{ resource } | { error, message }>}
12645
12969
  */
12646
12970
  readResource: (serverName, uri) =>
12647
- ipcRenderer$c.invoke(MCP_READ_RESOURCE, { serverName, uri }),
12971
+ ipcRenderer$d.invoke(MCP_READ_RESOURCE, { serverName, uri }),
12648
12972
 
12649
12973
  /**
12650
12974
  * getServerStatus
@@ -12654,7 +12978,7 @@ const mcpApi$2 = {
12654
12978
  * @returns {Promise<{ status, tools, error }>}
12655
12979
  */
12656
12980
  getServerStatus: (serverName) =>
12657
- ipcRenderer$c.invoke(MCP_SERVER_STATUS, { serverName }),
12981
+ ipcRenderer$d.invoke(MCP_SERVER_STATUS, { serverName }),
12658
12982
 
12659
12983
  /**
12660
12984
  * getCatalog
@@ -12662,7 +12986,7 @@ const mcpApi$2 = {
12662
12986
  *
12663
12987
  * @returns {Promise<{ catalog } | { error, message }>}
12664
12988
  */
12665
- getCatalog: () => ipcRenderer$c.invoke(MCP_GET_CATALOG),
12989
+ getCatalog: () => ipcRenderer$d.invoke(MCP_GET_CATALOG),
12666
12990
 
12667
12991
  /**
12668
12992
  * runAuth
@@ -12674,7 +12998,7 @@ const mcpApi$2 = {
12674
12998
  * @returns {Promise<{ success } | { error, message }>}
12675
12999
  */
12676
13000
  runAuth: (mcpConfig, credentials, authCommand) =>
12677
- ipcRenderer$c.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
13001
+ ipcRenderer$d.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
12678
13002
  };
12679
13003
 
12680
13004
  var mcpApi_1 = mcpApi$2;
@@ -12692,7 +13016,7 @@ var mcpApi_1 = mcpApi$2;
12692
13016
  * mainApi.registry.checkUpdates([{ name: "weather-widgets", version: "1.0.0" }])
12693
13017
  */
12694
13018
 
12695
- const { ipcRenderer: ipcRenderer$b } = require$$0$1;
13019
+ const { ipcRenderer: ipcRenderer$c } = require$$0$1;
12696
13020
 
12697
13021
  const registryApi$2 = {
12698
13022
  /**
@@ -12702,7 +13026,7 @@ const registryApi$2 = {
12702
13026
  */
12703
13027
  fetchIndex: async (forceRefresh = false) => {
12704
13028
  try {
12705
- return await ipcRenderer$b.invoke("registry:fetch-index", forceRefresh);
13029
+ return await ipcRenderer$c.invoke("registry:fetch-index", forceRefresh);
12706
13030
  } catch (error) {
12707
13031
  console.error("[RegistryApi] Error fetching index:", error);
12708
13032
  throw error;
@@ -12717,7 +13041,7 @@ const registryApi$2 = {
12717
13041
  */
12718
13042
  search: async (query = "", filters = {}) => {
12719
13043
  try {
12720
- return await ipcRenderer$b.invoke("registry:search", query, filters);
13044
+ return await ipcRenderer$c.invoke("registry:search", query, filters);
12721
13045
  } catch (error) {
12722
13046
  console.error("[RegistryApi] Error searching registry:", error);
12723
13047
  throw error;
@@ -12731,7 +13055,7 @@ const registryApi$2 = {
12731
13055
  */
12732
13056
  getPackage: async (packageName) => {
12733
13057
  try {
12734
- return await ipcRenderer$b.invoke("registry:get-package", packageName);
13058
+ return await ipcRenderer$c.invoke("registry:get-package", packageName);
12735
13059
  } catch (error) {
12736
13060
  console.error(
12737
13061
  `[RegistryApi] Error getting package ${packageName}:`,
@@ -12748,7 +13072,7 @@ const registryApi$2 = {
12748
13072
  */
12749
13073
  checkUpdates: async (installedWidgets = []) => {
12750
13074
  try {
12751
- return await ipcRenderer$b.invoke(
13075
+ return await ipcRenderer$c.invoke(
12752
13076
  "registry:check-updates",
12753
13077
  installedWidgets,
12754
13078
  );
@@ -12766,7 +13090,7 @@ const registryApi$2 = {
12766
13090
  */
12767
13091
  searchDashboards: async (query = "", filters = {}) => {
12768
13092
  try {
12769
- return await ipcRenderer$b.invoke(
13093
+ return await ipcRenderer$c.invoke(
12770
13094
  "registry:search-dashboards",
12771
13095
  query,
12772
13096
  filters,
@@ -12786,17 +13110,17 @@ var registryApi_1 = registryApi$2;
12786
13110
  * Handle the theme configuration file
12787
13111
  */
12788
13112
 
12789
- const { ipcRenderer: ipcRenderer$a } = require$$0$1;
13113
+ const { ipcRenderer: ipcRenderer$b } = require$$0$1;
12790
13114
 
12791
13115
  const { THEME_LIST, THEME_SAVE, THEME_DELETE } = events$8;
12792
13116
 
12793
13117
  const themeApi$2 = {
12794
13118
  listThemesForApplication: (appId) =>
12795
- ipcRenderer$a.invoke(THEME_LIST, { appId }),
13119
+ ipcRenderer$b.invoke(THEME_LIST, { appId }),
12796
13120
  saveThemeForApplication: (appId, themeName, themeObject) =>
12797
- ipcRenderer$a.invoke(THEME_SAVE, { appId, themeName, themeObject }),
13121
+ ipcRenderer$b.invoke(THEME_SAVE, { appId, themeName, themeObject }),
12798
13122
  deleteThemeForApplication: (appId, themeKey) =>
12799
- ipcRenderer$a.invoke(THEME_DELETE, { appId, themeKey }),
13123
+ ipcRenderer$b.invoke(THEME_DELETE, { appId, themeKey }),
12800
13124
  };
12801
13125
 
12802
13126
  var themeApi_1 = themeApi$2;
@@ -12808,7 +13132,7 @@ var themeApi_1 = themeApi$2;
12808
13132
  */
12809
13133
 
12810
13134
  // ipcRenderer that must be used to invoke the events
12811
- const { ipcRenderer: ipcRenderer$9 } = require$$0$1;
13135
+ const { ipcRenderer: ipcRenderer$a } = require$$0$1;
12812
13136
 
12813
13137
  const {
12814
13138
  ALGOLIA_LIST_INDICES,
@@ -12822,10 +13146,10 @@ const {
12822
13146
 
12823
13147
  const algoliaApi$2 = {
12824
13148
  listIndices: (application) =>
12825
- ipcRenderer$9.invoke(ALGOLIA_LIST_INDICES, application),
13149
+ ipcRenderer$a.invoke(ALGOLIA_LIST_INDICES, application),
12826
13150
 
12827
13151
  browseObjects: (appId, apiKey, indexName) => {
12828
- ipcRenderer$9.invoke(ALGOLIA_BROWSE_OBJECTS, {
13152
+ ipcRenderer$a.invoke(ALGOLIA_BROWSE_OBJECTS, {
12829
13153
  appId,
12830
13154
  apiKey,
12831
13155
  indexName,
@@ -12833,10 +13157,10 @@ const algoliaApi$2 = {
12833
13157
  });
12834
13158
  },
12835
13159
 
12836
- saveSynonyms: () => ipcRenderer$9.invoke(ALGOLIA_SAVE_SYNONYMS, {}),
13160
+ saveSynonyms: () => ipcRenderer$a.invoke(ALGOLIA_SAVE_SYNONYMS, {}),
12837
13161
 
12838
13162
  getAnalyticsForQuery: (application, indexName, query) =>
12839
- ipcRenderer$9.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
13163
+ ipcRenderer$a.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
12840
13164
  application,
12841
13165
  indexName,
12842
13166
  query,
@@ -12849,7 +13173,7 @@ const algoliaApi$2 = {
12849
13173
  dir,
12850
13174
  createIfNotExists = false,
12851
13175
  ) =>
12852
- ipcRenderer$9.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
13176
+ ipcRenderer$a.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
12853
13177
  appId,
12854
13178
  apiKey,
12855
13179
  indexName,
@@ -12858,7 +13182,7 @@ const algoliaApi$2 = {
12858
13182
  }),
12859
13183
 
12860
13184
  createBatchesFromFile: (filepath, batchFilepath, batchSize) => {
12861
- ipcRenderer$9.invoke(ALGOLIA_CREATE_BATCH, {
13185
+ ipcRenderer$a.invoke(ALGOLIA_CREATE_BATCH, {
12862
13186
  filepath,
12863
13187
  batchFilepath,
12864
13188
  batchSize,
@@ -12866,7 +13190,7 @@ const algoliaApi$2 = {
12866
13190
  },
12867
13191
 
12868
13192
  browseObjectsToFile: (appId, apiKey, indexName, toFilename, query = "") => {
12869
- ipcRenderer$9.invoke(ALGOLIA_BROWSE_OBJECTS, {
13193
+ ipcRenderer$a.invoke(ALGOLIA_BROWSE_OBJECTS, {
12870
13194
  appId,
12871
13195
  apiKey,
12872
13196
  indexName,
@@ -12876,7 +13200,7 @@ const algoliaApi$2 = {
12876
13200
  },
12877
13201
 
12878
13202
  search: (appId, apiKey, indexName, query = "", options = {}) =>
12879
- ipcRenderer$9.invoke(ALGOLIA_SEARCH, {
13203
+ ipcRenderer$a.invoke(ALGOLIA_SEARCH, {
12880
13204
  appId,
12881
13205
  apiKey,
12882
13206
  indexName,
@@ -12891,14 +13215,14 @@ var algoliaApi_1 = algoliaApi$2;
12891
13215
  * openAI
12892
13216
  */
12893
13217
 
12894
- const { ipcRenderer: ipcRenderer$8 } = require$$0$1;
13218
+ const { ipcRenderer: ipcRenderer$9 } = require$$0$1;
12895
13219
 
12896
13220
  const { OPENAI_DESCRIBE_IMAGE } = openaiEvents$1;
12897
13221
 
12898
13222
  const openaiApi$2 = {
12899
13223
  // convert a json array of objects to a csv string and save to file
12900
13224
  describeImage: (imageUrl, apiKey, prompt = "What's in this image?") =>
12901
- ipcRenderer$8.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
13225
+ ipcRenderer$9.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
12902
13226
  };
12903
13227
 
12904
13228
  var openaiApi_1 = openaiApi$2;
@@ -12909,14 +13233,14 @@ var openaiApi_1 = openaiApi$2;
12909
13233
  */
12910
13234
 
12911
13235
  // ipcRenderer that must be used to invoke the events
12912
- const { ipcRenderer: ipcRenderer$7 } = require$$0$1;
13236
+ const { ipcRenderer: ipcRenderer$8 } = require$$0$1;
12913
13237
 
12914
13238
  const { MENU_ITEMS_SAVE, MENU_ITEMS_LIST } = events$8;
12915
13239
 
12916
13240
  const menuItemsApi$2 = {
12917
13241
  saveMenuItem: (appId, menuItem) =>
12918
- ipcRenderer$7.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
12919
- listMenuItems: (appId) => ipcRenderer$7.invoke(MENU_ITEMS_LIST, { appId }),
13242
+ ipcRenderer$8.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
13243
+ listMenuItems: (appId) => ipcRenderer$8.invoke(MENU_ITEMS_LIST, { appId }),
12920
13244
  };
12921
13245
 
12922
13246
  var menuItemsApi_1 = menuItemsApi$2;
@@ -12928,12 +13252,12 @@ var menuItemsApi_1 = menuItemsApi$2;
12928
13252
  */
12929
13253
 
12930
13254
  // ipcRenderer that must be used to invoke the events
12931
- const { ipcRenderer: ipcRenderer$6 } = require$$0$1;
13255
+ const { ipcRenderer: ipcRenderer$7 } = require$$0$1;
12932
13256
 
12933
13257
  const pluginApi$2 = {
12934
13258
  install: (packageName, filepath) =>
12935
- ipcRenderer$6.invoke("plugin-install", { packageName, filepath }),
12936
- uninstall: (filepath) => ipcRenderer$6.invoke("plugin-uninstall", filepath),
13259
+ ipcRenderer$7.invoke("plugin-install", { packageName, filepath }),
13260
+ uninstall: (filepath) => ipcRenderer$7.invoke("plugin-uninstall", filepath),
12937
13261
  };
12938
13262
 
12939
13263
  var pluginApi_1 = pluginApi$2;
@@ -12946,7 +13270,7 @@ var pluginApi_1 = pluginApi$2;
12946
13270
  * tool-use events, and request cancellation.
12947
13271
  */
12948
13272
 
12949
- const { ipcRenderer: ipcRenderer$5 } = require$$0$1;
13273
+ const { ipcRenderer: ipcRenderer$6 } = require$$0$1;
12950
13274
  const {
12951
13275
  LLM_SEND_MESSAGE,
12952
13276
  LLM_ABORT_REQUEST,
@@ -12968,7 +13292,7 @@ const _listenerMap = new Map();
12968
13292
  function _addListener(channel, callback) {
12969
13293
  const id = String(++_nextListenerId);
12970
13294
  const wrapped = (_event, data) => callback(data);
12971
- ipcRenderer$5.on(channel, wrapped);
13295
+ ipcRenderer$6.on(channel, wrapped);
12972
13296
  _listenerMap.set(id, { channel, wrapped });
12973
13297
  return id;
12974
13298
  }
@@ -12983,7 +13307,7 @@ const llmApi$2 = {
12983
13307
  * @returns {Promise<void>}
12984
13308
  */
12985
13309
  sendMessage: (requestId, params) =>
12986
- ipcRenderer$5.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
13310
+ ipcRenderer$6.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
12987
13311
 
12988
13312
  /**
12989
13313
  * abortRequest
@@ -12993,7 +13317,7 @@ const llmApi$2 = {
12993
13317
  * @returns {Promise<{ success: boolean }>}
12994
13318
  */
12995
13319
  abortRequest: (requestId) =>
12996
- ipcRenderer$5.invoke(LLM_ABORT_REQUEST, { requestId }),
13320
+ ipcRenderer$6.invoke(LLM_ABORT_REQUEST, { requestId }),
12997
13321
 
12998
13322
  /**
12999
13323
  * listConnectedTools
@@ -13001,7 +13325,7 @@ const llmApi$2 = {
13001
13325
  *
13002
13326
  * @returns {Promise<Array<{ serverName, tools, resources, status }>>}
13003
13327
  */
13004
- listConnectedTools: () => ipcRenderer$5.invoke(LLM_LIST_CONNECTED_TOOLS),
13328
+ listConnectedTools: () => ipcRenderer$6.invoke(LLM_LIST_CONNECTED_TOOLS),
13005
13329
 
13006
13330
  /**
13007
13331
  * checkCliAvailable
@@ -13009,7 +13333,7 @@ const llmApi$2 = {
13009
13333
  *
13010
13334
  * @returns {Promise<{ available: boolean, path?: string }>}
13011
13335
  */
13012
- checkCliAvailable: () => ipcRenderer$5.invoke(LLM_CHECK_CLI_AVAILABLE),
13336
+ checkCliAvailable: () => ipcRenderer$6.invoke(LLM_CHECK_CLI_AVAILABLE),
13013
13337
 
13014
13338
  /**
13015
13339
  * clearCliSession
@@ -13019,7 +13343,7 @@ const llmApi$2 = {
13019
13343
  * @returns {Promise<{ success: boolean }>}
13020
13344
  */
13021
13345
  clearCliSession: (widgetUuid) =>
13022
- ipcRenderer$5.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
13346
+ ipcRenderer$6.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
13023
13347
 
13024
13348
  /**
13025
13349
  * getCliSessionStatus
@@ -13029,7 +13353,7 @@ const llmApi$2 = {
13029
13353
  * @returns {Promise<{ hasSession: boolean, sessionId?: string, isProcessActive: boolean }>}
13030
13354
  */
13031
13355
  getCliSessionStatus: (widgetUuid) =>
13032
- ipcRenderer$5.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
13356
+ ipcRenderer$6.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
13033
13357
 
13034
13358
  /**
13035
13359
  * endCliSession
@@ -13039,7 +13363,7 @@ const llmApi$2 = {
13039
13363
  * @returns {Promise<{ success: boolean }>}
13040
13364
  */
13041
13365
  endCliSession: (widgetUuid) =>
13042
- ipcRenderer$5.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
13366
+ ipcRenderer$6.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
13043
13367
 
13044
13368
  // --- Stream event listeners ---
13045
13369
  // Each on* method returns an opaque string ID. Strings cross the
@@ -13073,7 +13397,7 @@ const llmApi$2 = {
13073
13397
  const listenerId = id !== undefined ? String(id) : String(idOrChannel);
13074
13398
  const entry = _listenerMap.get(listenerId);
13075
13399
  if (entry) {
13076
- ipcRenderer$5.removeListener(entry.channel, entry.wrapped);
13400
+ ipcRenderer$6.removeListener(entry.channel, entry.wrapped);
13077
13401
  _listenerMap.delete(listenerId);
13078
13402
  }
13079
13403
  },
@@ -13085,14 +13409,14 @@ const llmApi$2 = {
13085
13409
  */
13086
13410
  removeAllStreamListeners: () => {
13087
13411
  for (const [, entry] of _listenerMap) {
13088
- ipcRenderer$5.removeListener(entry.channel, entry.wrapped);
13412
+ ipcRenderer$6.removeListener(entry.channel, entry.wrapped);
13089
13413
  }
13090
13414
  _listenerMap.clear();
13091
- ipcRenderer$5.removeAllListeners(LLM_STREAM_DELTA);
13092
- ipcRenderer$5.removeAllListeners(LLM_STREAM_TOOL_CALL);
13093
- ipcRenderer$5.removeAllListeners(LLM_STREAM_TOOL_RESULT);
13094
- ipcRenderer$5.removeAllListeners(LLM_STREAM_COMPLETE);
13095
- ipcRenderer$5.removeAllListeners(LLM_STREAM_ERROR);
13415
+ ipcRenderer$6.removeAllListeners(LLM_STREAM_DELTA);
13416
+ ipcRenderer$6.removeAllListeners(LLM_STREAM_TOOL_CALL);
13417
+ ipcRenderer$6.removeAllListeners(LLM_STREAM_TOOL_RESULT);
13418
+ ipcRenderer$6.removeAllListeners(LLM_STREAM_COMPLETE);
13419
+ ipcRenderer$6.removeAllListeners(LLM_STREAM_ERROR);
13096
13420
  },
13097
13421
  };
13098
13422
 
@@ -13106,7 +13430,7 @@ var llmApi_1 = llmApi$2;
13106
13430
  * and manage the response cache.
13107
13431
  */
13108
13432
 
13109
- const { ipcRenderer: ipcRenderer$4 } = require$$0$1;
13433
+ const { ipcRenderer: ipcRenderer$5 } = require$$0$1;
13110
13434
  const {
13111
13435
  CLIENT_CACHE_INVALIDATE,
13112
13436
  CLIENT_CACHE_INVALIDATE_ALL,
@@ -13123,28 +13447,28 @@ const clientCacheApi$2 = {
13123
13447
  * @returns {Promise<{success: boolean}>}
13124
13448
  */
13125
13449
  invalidate: (appId, providerName) =>
13126
- ipcRenderer$4.invoke(CLIENT_CACHE_INVALIDATE, { appId, providerName }),
13450
+ ipcRenderer$5.invoke(CLIENT_CACHE_INVALIDATE, { appId, providerName }),
13127
13451
 
13128
13452
  /**
13129
13453
  * Invalidate all cached clients.
13130
13454
  *
13131
13455
  * @returns {Promise<{success: boolean}>}
13132
13456
  */
13133
- invalidateAll: () => ipcRenderer$4.invoke(CLIENT_CACHE_INVALIDATE_ALL),
13457
+ invalidateAll: () => ipcRenderer$5.invoke(CLIENT_CACHE_INVALIDATE_ALL),
13134
13458
 
13135
13459
  /**
13136
13460
  * Clear the response cache.
13137
13461
  *
13138
13462
  * @returns {Promise<{success: boolean}>}
13139
13463
  */
13140
- clearResponseCache: () => ipcRenderer$4.invoke(RESPONSE_CACHE_CLEAR),
13464
+ clearResponseCache: () => ipcRenderer$5.invoke(RESPONSE_CACHE_CLEAR),
13141
13465
 
13142
13466
  /**
13143
13467
  * Get response cache statistics.
13144
13468
  *
13145
13469
  * @returns {Promise<{entries: number, inflight: number, keys: string[]}>}
13146
13470
  */
13147
- responseCacheStats: () => ipcRenderer$4.invoke(RESPONSE_CACHE_STATS),
13471
+ responseCacheStats: () => ipcRenderer$5.invoke(RESPONSE_CACHE_STATS),
13148
13472
  };
13149
13473
 
13150
13474
  var clientCacheApi_1 = clientCacheApi$2;
@@ -13156,7 +13480,7 @@ var clientCacheApi_1 = clientCacheApi$2;
13156
13480
  * Exposed via contextBridge through mainApi.
13157
13481
  */
13158
13482
 
13159
- const { ipcRenderer: ipcRenderer$3 } = require$$0$1;
13483
+ const { ipcRenderer: ipcRenderer$4 } = require$$0$1;
13160
13484
  const {
13161
13485
  DASHBOARD_CONFIG_EXPORT,
13162
13486
  DASHBOARD_CONFIG_IMPORT,
@@ -13179,7 +13503,7 @@ const dashboardConfigApi$2 = {
13179
13503
  * @returns {Promise<Object>} Result with success, filePath, and config
13180
13504
  */
13181
13505
  exportDashboardConfig: (appId, workspaceId, options = {}) =>
13182
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_EXPORT, {
13506
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_EXPORT, {
13183
13507
  appId,
13184
13508
  workspaceId,
13185
13509
  options,
@@ -13194,7 +13518,7 @@ const dashboardConfigApi$2 = {
13194
13518
  * @returns {Promise<Object>} Result with success, workspace, and summary
13195
13519
  */
13196
13520
  importDashboardConfig: (appId) =>
13197
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_IMPORT, { appId }),
13521
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_IMPORT, { appId }),
13198
13522
 
13199
13523
  /**
13200
13524
  * Install a dashboard from the registry by package name.
@@ -13206,7 +13530,7 @@ const dashboardConfigApi$2 = {
13206
13530
  * @returns {Promise<Object>} Result with success, workspace, and summary
13207
13531
  */
13208
13532
  installDashboardFromRegistry: (appId, packageName) =>
13209
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_INSTALL, {
13533
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_INSTALL, {
13210
13534
  appId,
13211
13535
  packageName,
13212
13536
  }),
@@ -13219,7 +13543,7 @@ const dashboardConfigApi$2 = {
13219
13543
  * @returns {Promise<Object>} Compatibility report with per-widget status
13220
13544
  */
13221
13545
  checkDashboardCompatibility: (appId, dashboardWidgets) =>
13222
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
13546
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
13223
13547
  appId,
13224
13548
  dashboardWidgets,
13225
13549
  }),
@@ -13235,7 +13559,7 @@ const dashboardConfigApi$2 = {
13235
13559
  * @returns {Promise<Object>} Result with success, manifest, filePath
13236
13560
  */
13237
13561
  prepareDashboardForPublish: (appId, workspaceId, options = {}) =>
13238
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_PUBLISH, {
13562
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_PUBLISH, {
13239
13563
  appId,
13240
13564
  workspaceId,
13241
13565
  options,
@@ -13249,7 +13573,7 @@ const dashboardConfigApi$2 = {
13249
13573
  * @returns {Promise<Object>} Preview with metadata, widgets, wiring, compatibility
13250
13574
  */
13251
13575
  getDashboardPreview: (packageName) =>
13252
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
13576
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
13253
13577
 
13254
13578
  /**
13255
13579
  * Check installed dashboards for available updates.
@@ -13258,7 +13582,7 @@ const dashboardConfigApi$2 = {
13258
13582
  * @returns {Promise<Object>} Result with updates array
13259
13583
  */
13260
13584
  checkDashboardUpdates: (appId) =>
13261
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
13585
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
13262
13586
 
13263
13587
  /**
13264
13588
  * Get provider setup manifest for a dashboard's requirements.
@@ -13268,7 +13592,7 @@ const dashboardConfigApi$2 = {
13268
13592
  * @returns {Promise<Object>} Setup manifest with per-provider status
13269
13593
  */
13270
13594
  getProviderSetupManifest: (appId, requiredProviders) =>
13271
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
13595
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
13272
13596
  appId,
13273
13597
  requiredProviders,
13274
13598
  }),
@@ -13282,7 +13606,7 @@ const dashboardConfigApi$2 = {
13282
13606
  * @returns {Promise<Object>} Preview with dashboardName, widgetCount, widgets, componentNames
13283
13607
  */
13284
13608
  getPublishPreview: (appId, workspaceId) =>
13285
- ipcRenderer$3.invoke(DASHBOARD_CONFIG_PUBLISH_PREVIEW, {
13609
+ ipcRenderer$4.invoke(DASHBOARD_CONFIG_PUBLISH_PREVIEW, {
13286
13610
  appId,
13287
13611
  workspaceId,
13288
13612
  }),
@@ -13297,7 +13621,7 @@ var dashboardConfigApi_1 = dashboardConfigApi$2;
13297
13621
  * Exposed via contextBridge through mainApi.
13298
13622
  */
13299
13623
 
13300
- const { ipcRenderer: ipcRenderer$2 } = require$$0$1;
13624
+ const { ipcRenderer: ipcRenderer$3 } = require$$0$1;
13301
13625
  const {
13302
13626
  REGISTRY_AUTH_INITIATE_LOGIN,
13303
13627
  REGISTRY_AUTH_POLL_TOKEN,
@@ -13305,6 +13629,10 @@ const {
13305
13629
  REGISTRY_AUTH_GET_PROFILE,
13306
13630
  REGISTRY_AUTH_LOGOUT,
13307
13631
  REGISTRY_AUTH_PUBLISH,
13632
+ REGISTRY_AUTH_UPDATE_PROFILE,
13633
+ REGISTRY_AUTH_GET_PACKAGES,
13634
+ REGISTRY_AUTH_UPDATE_PACKAGE,
13635
+ REGISTRY_AUTH_DELETE_PACKAGE,
13308
13636
  } = events$8;
13309
13637
 
13310
13638
  const registryAuthApi$2 = {
@@ -13314,7 +13642,7 @@ const registryAuthApi$2 = {
13314
13642
  *
13315
13643
  * @returns {Promise<Object>} { deviceCode, userCode, verificationUrl, verificationUrlComplete, expiresIn, interval }
13316
13644
  */
13317
- initiateLogin: () => ipcRenderer$2.invoke(REGISTRY_AUTH_INITIATE_LOGIN),
13645
+ initiateLogin: () => ipcRenderer$3.invoke(REGISTRY_AUTH_INITIATE_LOGIN),
13318
13646
 
13319
13647
  /**
13320
13648
  * Poll for token after user completes browser auth.
@@ -13323,26 +13651,26 @@ const registryAuthApi$2 = {
13323
13651
  * @returns {Promise<Object>} { status: 'pending' | 'authorized' | 'expired', token?, userId? }
13324
13652
  */
13325
13653
  pollToken: (deviceCode) =>
13326
- ipcRenderer$2.invoke(REGISTRY_AUTH_POLL_TOKEN, { deviceCode }),
13654
+ ipcRenderer$3.invoke(REGISTRY_AUTH_POLL_TOKEN, { deviceCode }),
13327
13655
 
13328
13656
  /**
13329
13657
  * Get current auth status.
13330
13658
  *
13331
13659
  * @returns {Promise<Object>} { authenticated: boolean, userId?: string }
13332
13660
  */
13333
- getStatus: () => ipcRenderer$2.invoke(REGISTRY_AUTH_GET_STATUS),
13661
+ getStatus: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_STATUS),
13334
13662
 
13335
13663
  /**
13336
13664
  * Get the authenticated user's registry profile.
13337
13665
  *
13338
13666
  * @returns {Promise<Object|null>} User profile or null
13339
13667
  */
13340
- getProfile: () => ipcRenderer$2.invoke(REGISTRY_AUTH_GET_PROFILE),
13668
+ getProfile: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_PROFILE),
13341
13669
 
13342
13670
  /**
13343
13671
  * Logout from registry.
13344
13672
  */
13345
- logout: () => ipcRenderer$2.invoke(REGISTRY_AUTH_LOGOUT),
13673
+ logout: () => ipcRenderer$3.invoke(REGISTRY_AUTH_LOGOUT),
13346
13674
 
13347
13675
  /**
13348
13676
  * Publish a ZIP to the registry.
@@ -13352,7 +13680,48 @@ const registryAuthApi$2 = {
13352
13680
  * @returns {Promise<Object>} { success, registryUrl, packageId, version, error? }
13353
13681
  */
13354
13682
  publish: (zipPath, manifest) =>
13355
- ipcRenderer$2.invoke(REGISTRY_AUTH_PUBLISH, { zipPath, manifest }),
13683
+ ipcRenderer$3.invoke(REGISTRY_AUTH_PUBLISH, { zipPath, manifest }),
13684
+
13685
+ /**
13686
+ * Update the authenticated user's profile.
13687
+ *
13688
+ * @param {Object} updates - Fields to update (e.g. { displayName })
13689
+ * @returns {Promise<Object|null>} Updated user or null
13690
+ */
13691
+ updateProfile: (updates) =>
13692
+ ipcRenderer$3.invoke(REGISTRY_AUTH_UPDATE_PROFILE, updates),
13693
+
13694
+ /**
13695
+ * Get the authenticated user's published packages.
13696
+ *
13697
+ * @returns {Promise<Object|null>} { packages: [...] } or null
13698
+ */
13699
+ getPackages: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_PACKAGES),
13700
+
13701
+ /**
13702
+ * Update a published package's metadata.
13703
+ *
13704
+ * @param {string} scope - Package scope
13705
+ * @param {string} name - Package name
13706
+ * @param {Object} updates - Fields to update
13707
+ * @returns {Promise<Object|null>} Updated package or null
13708
+ */
13709
+ updatePackage: (scope, name, updates) =>
13710
+ ipcRenderer$3.invoke(REGISTRY_AUTH_UPDATE_PACKAGE, {
13711
+ scope,
13712
+ name,
13713
+ updates,
13714
+ }),
13715
+
13716
+ /**
13717
+ * Delete a published package.
13718
+ *
13719
+ * @param {string} scope - Package scope
13720
+ * @param {string} name - Package name
13721
+ * @returns {Promise<Object|null>} Response or null
13722
+ */
13723
+ deletePackage: (scope, name) =>
13724
+ ipcRenderer$3.invoke(REGISTRY_AUTH_DELETE_PACKAGE, { scope, name }),
13356
13725
  };
13357
13726
 
13358
13727
  var registryAuthApi_1 = registryAuthApi$2;
@@ -13363,7 +13732,7 @@ var registryAuthApi_1 = registryAuthApi$2;
13363
13732
  * IPC bridge for dashboard ratings (renderer side).
13364
13733
  */
13365
13734
 
13366
- const { ipcRenderer: ipcRenderer$1 } = require$$0$1;
13735
+ const { ipcRenderer: ipcRenderer$2 } = require$$0$1;
13367
13736
  const {
13368
13737
  DASHBOARD_RATING_SAVE,
13369
13738
  DASHBOARD_RATING_GET,
@@ -13373,24 +13742,88 @@ const {
13373
13742
 
13374
13743
  const dashboardRatingsApi$1 = {
13375
13744
  saveDashboardRating: (appId, packageName, rating) =>
13376
- ipcRenderer$1.invoke(DASHBOARD_RATING_SAVE, {
13745
+ ipcRenderer$2.invoke(DASHBOARD_RATING_SAVE, {
13377
13746
  appId,
13378
13747
  packageName,
13379
13748
  rating,
13380
13749
  }),
13381
13750
 
13382
13751
  getDashboardRating: (appId, packageName) =>
13383
- ipcRenderer$1.invoke(DASHBOARD_RATING_GET, { appId, packageName }),
13752
+ ipcRenderer$2.invoke(DASHBOARD_RATING_GET, { appId, packageName }),
13384
13753
 
13385
13754
  listDashboardRatings: (appId) =>
13386
- ipcRenderer$1.invoke(DASHBOARD_RATING_LIST, { appId }),
13755
+ ipcRenderer$2.invoke(DASHBOARD_RATING_LIST, { appId }),
13387
13756
 
13388
13757
  deleteDashboardRating: (appId, packageName) =>
13389
- ipcRenderer$1.invoke(DASHBOARD_RATING_DELETE, { appId, packageName }),
13758
+ ipcRenderer$2.invoke(DASHBOARD_RATING_DELETE, { appId, packageName }),
13390
13759
  };
13391
13760
 
13392
13761
  var dashboardRatingsApi_1 = dashboardRatingsApi$1;
13393
13762
 
13763
+ /**
13764
+ * sessionApi.js
13765
+ *
13766
+ * IPC bridge for session management (renderer side).
13767
+ * Exposed via contextBridge through mainApi.
13768
+ */
13769
+
13770
+ const { ipcRenderer: ipcRenderer$1 } = require$$0$1;
13771
+ const {
13772
+ SESSION_GET_RECENTS,
13773
+ SESSION_ADD_RECENT,
13774
+ SESSION_CLEAR_RECENTS,
13775
+ SESSION_GET_STATE,
13776
+ SESSION_SAVE_STATE,
13777
+ SESSION_CLEAR_STATE,
13778
+ } = events$8;
13779
+
13780
+ const sessionApi$1 = {
13781
+ /**
13782
+ * Get recently opened dashboards.
13783
+ *
13784
+ * @returns {Promise<Array<{ workspaceId: string, name: string, openedAt: string }>>}
13785
+ */
13786
+ getRecents: () => ipcRenderer$1.invoke(SESSION_GET_RECENTS),
13787
+
13788
+ /**
13789
+ * Add a recent dashboard entry.
13790
+ *
13791
+ * @param {string} workspaceId
13792
+ * @param {string} name
13793
+ * @returns {Promise<Array>} Updated recents list
13794
+ */
13795
+ addRecent: (workspaceId, name) =>
13796
+ ipcRenderer$1.invoke(SESSION_ADD_RECENT, { workspaceId, name }),
13797
+
13798
+ /**
13799
+ * Clear all recent dashboards.
13800
+ */
13801
+ clearRecents: () => ipcRenderer$1.invoke(SESSION_CLEAR_RECENTS),
13802
+
13803
+ /**
13804
+ * Get saved session state.
13805
+ *
13806
+ * @returns {Promise<{ openTabIds: string[], activeTabId: string | null } | null>}
13807
+ */
13808
+ getState: () => ipcRenderer$1.invoke(SESSION_GET_STATE),
13809
+
13810
+ /**
13811
+ * Save session state.
13812
+ *
13813
+ * @param {string[]} openTabIds
13814
+ * @param {string|null} activeTabId
13815
+ */
13816
+ saveState: (openTabIds, activeTabId) =>
13817
+ ipcRenderer$1.invoke(SESSION_SAVE_STATE, { openTabIds, activeTabId }),
13818
+
13819
+ /**
13820
+ * Clear saved session state.
13821
+ */
13822
+ clearState: () => ipcRenderer$1.invoke(SESSION_CLEAR_STATE),
13823
+ };
13824
+
13825
+ var sessionApi_1 = sessionApi$1;
13826
+
13394
13827
  /**
13395
13828
  * mainApi.js
13396
13829
  *
@@ -13425,6 +13858,7 @@ const clientCacheApi$1 = clientCacheApi_1;
13425
13858
  const dashboardConfigApi$1 = dashboardConfigApi_1;
13426
13859
  const dashboardRatingsApi = dashboardRatingsApi_1;
13427
13860
  const registryAuthApi$1 = registryAuthApi_1;
13861
+ const sessionApi = sessionApi_1;
13428
13862
 
13429
13863
  // Events constants
13430
13864
  const events$1 = events$8;
@@ -13499,6 +13933,7 @@ function createMainApi$1(extensions = {}) {
13499
13933
  dashboardConfig: dashboardConfigApi$1,
13500
13934
  dashboardRatings: dashboardRatingsApi,
13501
13935
  registryAuth: registryAuthApi$1,
13936
+ session: sessionApi,
13502
13937
 
13503
13938
  widgetEvent: {
13504
13939
  publish: (eventType, content) => {