@trops/dash-core 0.1.114 → 0.1.116

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.
@@ -678,6 +678,48 @@ var sessionEvents$1 = {
678
678
  SESSION_CLEAR_STATE: SESSION_CLEAR_STATE$1,
679
679
  };
680
680
 
681
+ /**
682
+ * Event Constants File - Notification Events
683
+ *
684
+ * IPC channel constants for the notification system.
685
+ */
686
+
687
+ const NOTIFICATION_SEND$1 = "notification-send";
688
+ const NOTIFICATION_SEND_COMPLETE = "notification-send-complete";
689
+ const NOTIFICATION_SEND_ERROR = "notification-send-error";
690
+
691
+ const NOTIFICATION_GET_PREFERENCES$1 = "notification-get-preferences";
692
+ const NOTIFICATION_GET_PREFERENCES_COMPLETE =
693
+ "notification-get-preferences-complete";
694
+ const NOTIFICATION_GET_PREFERENCES_ERROR = "notification-get-preferences-error";
695
+
696
+ const NOTIFICATION_SET_PREFERENCES$1 = "notification-set-preferences";
697
+ const NOTIFICATION_SET_PREFERENCES_COMPLETE =
698
+ "notification-set-preferences-complete";
699
+ const NOTIFICATION_SET_PREFERENCES_ERROR = "notification-set-preferences-error";
700
+
701
+ const NOTIFICATION_SET_GLOBAL$1 = "notification-set-global";
702
+ const NOTIFICATION_SET_GLOBAL_COMPLETE = "notification-set-global-complete";
703
+ const NOTIFICATION_SET_GLOBAL_ERROR = "notification-set-global-error";
704
+
705
+ const NOTIFICATION_CLICKED = "notification:clicked";
706
+
707
+ var notificationEvents$1 = {
708
+ NOTIFICATION_SEND: NOTIFICATION_SEND$1,
709
+ NOTIFICATION_SEND_COMPLETE,
710
+ NOTIFICATION_SEND_ERROR,
711
+ NOTIFICATION_GET_PREFERENCES: NOTIFICATION_GET_PREFERENCES$1,
712
+ NOTIFICATION_GET_PREFERENCES_COMPLETE,
713
+ NOTIFICATION_GET_PREFERENCES_ERROR,
714
+ NOTIFICATION_SET_PREFERENCES: NOTIFICATION_SET_PREFERENCES$1,
715
+ NOTIFICATION_SET_PREFERENCES_COMPLETE,
716
+ NOTIFICATION_SET_PREFERENCES_ERROR,
717
+ NOTIFICATION_SET_GLOBAL: NOTIFICATION_SET_GLOBAL$1,
718
+ NOTIFICATION_SET_GLOBAL_COMPLETE,
719
+ NOTIFICATION_SET_GLOBAL_ERROR,
720
+ NOTIFICATION_CLICKED,
721
+ };
722
+
681
723
  /**
682
724
  * Events
683
725
  *
@@ -703,6 +745,7 @@ const dashboardConfigEvents = dashboardConfigEvents$1;
703
745
  const dashboardRatingsEvents = dashboardRatingsEvents$1;
704
746
  const registryAuthEvents = registryAuthEvents$1;
705
747
  const sessionEvents = sessionEvents$1;
748
+ const notificationEvents = notificationEvents$1;
706
749
 
707
750
  const publicEvents = {
708
751
  ...dataEvents,
@@ -729,6 +772,7 @@ var events$8 = {
729
772
  ...dashboardRatingsEvents,
730
773
  ...registryAuthEvents,
731
774
  ...sessionEvents,
775
+ ...notificationEvents,
732
776
  };
733
777
 
734
778
  /**
@@ -763,7 +807,7 @@ var dialogController$1 = {
763
807
  */
764
808
 
765
809
  const { safeStorage } = require$$0$1;
766
- const Store = require$$1;
810
+ const Store$1 = require$$1;
767
811
  const events$6 = events$8;
768
812
 
769
813
  const schema$1 = {
@@ -792,7 +836,7 @@ const decryptString = (win, str) => {
792
836
 
793
837
  const saveData$1 = (key, value) => {
794
838
  try {
795
- const store = new Store({ schema: schema$1 });
839
+ const store = new Store$1({ schema: schema$1 });
796
840
  store.set(key, value);
797
841
  return getData$1(key);
798
842
  } catch (e) {
@@ -802,7 +846,7 @@ const saveData$1 = (key, value) => {
802
846
 
803
847
  const getData$1 = (key) => {
804
848
  try {
805
- const store = new Store({ schema: schema$1 });
849
+ const store = new Store$1({ schema: schema$1 });
806
850
  const value = store.get(key);
807
851
  if (value) {
808
852
  return { [key]: value };
@@ -10226,16 +10270,16 @@ const REGISTRY_BASE_URL$1 =
10226
10270
  process.env.DASH_REGISTRY_API_URL || "https://registry.trops.dev";
10227
10271
 
10228
10272
  // Lazy-load electron-store to avoid issues when not installed
10229
- let store$1 = null;
10273
+ let store$2 = null;
10230
10274
  function getStore$1() {
10231
- if (!store$1) {
10275
+ if (!store$2) {
10232
10276
  const Store = require$$1;
10233
- store$1 = new Store({
10277
+ store$2 = new Store({
10234
10278
  name: "dash-registry-auth",
10235
10279
  encryptionKey: "dash-registry-v1",
10236
10280
  });
10237
10281
  }
10238
- return store$1;
10282
+ return store$2;
10239
10283
  }
10240
10284
 
10241
10285
  /**
@@ -11615,6 +11659,251 @@ var dashboardConfigController$1 = {
11615
11659
  getDashboardPublishPreview: getDashboardPublishPreview$1,
11616
11660
  };
11617
11661
 
11662
+ /**
11663
+ * notificationController.js
11664
+ *
11665
+ * Main process controller for OS-level notifications.
11666
+ * Manages preferences (electron-store), rate limiting, deduplication,
11667
+ * and dispatching native Notification instances.
11668
+ */
11669
+
11670
+ const { Notification } = require$$0$1;
11671
+ const Store = require$$1;
11672
+
11673
+ const store$1 = new Store({ name: "dash-notifications" });
11674
+
11675
+ // --- Rate limiting ---
11676
+ // Sliding window: max 10 notifications per 60s per widget
11677
+ const RATE_LIMIT_WINDOW_MS = 60_000;
11678
+ const RATE_LIMIT_MAX = 10;
11679
+ const rateBuckets = new Map(); // widgetId -> [timestamp, ...]
11680
+
11681
+ // --- Deduplication ---
11682
+ // Same (widgetName, type, title, body) within 5s is dropped
11683
+ const DEDUP_WINDOW_MS = 5_000;
11684
+ const recentNotifications = new Map(); // dedup key -> timestamp
11685
+
11686
+ function getDedupKey(payload) {
11687
+ return `${payload.widgetName}:${payload.type}:${payload.title}:${payload.body}`;
11688
+ }
11689
+
11690
+ function isRateLimited(widgetId) {
11691
+ const now = Date.now();
11692
+ let timestamps = rateBuckets.get(widgetId) || [];
11693
+ // Prune old entries
11694
+ timestamps = timestamps.filter((t) => now - t < RATE_LIMIT_WINDOW_MS);
11695
+ rateBuckets.set(widgetId, timestamps);
11696
+ return timestamps.length >= RATE_LIMIT_MAX;
11697
+ }
11698
+
11699
+ function recordNotification(widgetId) {
11700
+ const timestamps = rateBuckets.get(widgetId) || [];
11701
+ timestamps.push(Date.now());
11702
+ rateBuckets.set(widgetId, timestamps);
11703
+ }
11704
+
11705
+ function isDuplicate(payload) {
11706
+ const key = getDedupKey(payload);
11707
+ const now = Date.now();
11708
+ const lastSent = recentNotifications.get(key);
11709
+ if (lastSent && now - lastSent < DEDUP_WINDOW_MS) {
11710
+ return true;
11711
+ }
11712
+ recentNotifications.set(key, now);
11713
+ return false;
11714
+ }
11715
+
11716
+ // Clean up stale dedup entries periodically
11717
+ setInterval(() => {
11718
+ const now = Date.now();
11719
+ for (const [key, ts] of recentNotifications) {
11720
+ if (now - ts > DEDUP_WINDOW_MS) {
11721
+ recentNotifications.delete(key);
11722
+ }
11723
+ }
11724
+ }, 30_000);
11725
+
11726
+ const notificationController$2 = {
11727
+ /**
11728
+ * Send a notification if it passes all checks.
11729
+ *
11730
+ * @param {BrowserWindow} win - the main window (for click routing)
11731
+ * @param {Object} payload
11732
+ * @param {string} payload.widgetName - component name of the widget
11733
+ * @param {string} payload.widgetId - widget instance UUID
11734
+ * @param {string} payload.workspaceId - workspace containing the widget
11735
+ * @param {string} payload.type - notification type key (must match .dash.js config)
11736
+ * @param {string} payload.title - notification title
11737
+ * @param {string} payload.body - notification body
11738
+ * @param {Object} [payload.data] - arbitrary data returned on click
11739
+ * @param {boolean} [payload.silent] - suppress sound
11740
+ * @param {string} [payload.urgency] - "low" | "normal" | "critical"
11741
+ * @returns {{ success: boolean, reason?: string }}
11742
+ */
11743
+ send: (win, payload) => {
11744
+ try {
11745
+ const {
11746
+ widgetName,
11747
+ widgetId,
11748
+ workspaceId,
11749
+ type,
11750
+ title,
11751
+ body,
11752
+ data,
11753
+ silent,
11754
+ urgency,
11755
+ } = payload;
11756
+
11757
+ // 1. Check globalEnabled
11758
+ const globalEnabled = store$1.get("globalEnabled", true);
11759
+ if (!globalEnabled) {
11760
+ return { success: false, reason: "notifications_disabled" };
11761
+ }
11762
+
11763
+ // 2. Check doNotDisturb
11764
+ const dnd = store$1.get("doNotDisturb", false);
11765
+ if (dnd) {
11766
+ return { success: false, reason: "do_not_disturb" };
11767
+ }
11768
+
11769
+ // 3. Check per-widget per-type preference
11770
+ const instances = store$1.get("instances", {});
11771
+ const widgetPrefs = instances[widgetId];
11772
+ if (widgetPrefs && widgetPrefs[type] === false) {
11773
+ return { success: false, reason: "type_disabled" };
11774
+ }
11775
+
11776
+ // 4. Rate limit
11777
+ if (isRateLimited(widgetId)) {
11778
+ return { success: false, reason: "rate_limited" };
11779
+ }
11780
+
11781
+ // 5. Deduplication
11782
+ if (isDuplicate(payload)) {
11783
+ return { success: false, reason: "duplicate" };
11784
+ }
11785
+
11786
+ // 6. All checks passed — send native notification
11787
+ const notification = new Notification({
11788
+ title,
11789
+ body,
11790
+ silent: silent || false,
11791
+ urgency: urgency || "normal",
11792
+ });
11793
+
11794
+ notification.on("click", () => {
11795
+ if (win && !win.isDestroyed()) {
11796
+ win.show();
11797
+ win.focus();
11798
+ win.webContents.send("notification:clicked", {
11799
+ widgetName,
11800
+ widgetId,
11801
+ workspaceId,
11802
+ type,
11803
+ data: data || null,
11804
+ });
11805
+ }
11806
+ });
11807
+
11808
+ notification.show();
11809
+ recordNotification(widgetId);
11810
+
11811
+ console.log(
11812
+ `[notificationController] Sent: ${widgetName}.${type} — "${title}"`,
11813
+ );
11814
+
11815
+ return { success: true };
11816
+ } catch (error) {
11817
+ console.error(
11818
+ "[notificationController] Error sending notification:",
11819
+ error,
11820
+ );
11821
+ return { error: true, message: error.message };
11822
+ }
11823
+ },
11824
+
11825
+ /**
11826
+ * Get all notification preferences.
11827
+ *
11828
+ * @returns {{ globalEnabled: boolean, doNotDisturb: boolean, instances: Object }}
11829
+ */
11830
+ getPreferences: () => {
11831
+ try {
11832
+ return {
11833
+ globalEnabled: store$1.get("globalEnabled", true),
11834
+ doNotDisturb: store$1.get("doNotDisturb", false),
11835
+ instances: store$1.get("instances", {}),
11836
+ };
11837
+ } catch (error) {
11838
+ console.error(
11839
+ "[notificationController] Error getting preferences:",
11840
+ error,
11841
+ );
11842
+ return {
11843
+ error: true,
11844
+ message: error.message,
11845
+ globalEnabled: true,
11846
+ doNotDisturb: false,
11847
+ instances: {},
11848
+ };
11849
+ }
11850
+ },
11851
+
11852
+ /**
11853
+ * Set notification preferences for a specific widget instance.
11854
+ *
11855
+ * @param {string} widgetId - widget instance UUID
11856
+ * @param {Object} prefs - { [notificationType]: boolean }
11857
+ * @returns {{ success: boolean }}
11858
+ */
11859
+ setPreferences: (widgetId, prefs) => {
11860
+ try {
11861
+ const instances = store$1.get("instances", {});
11862
+ instances[widgetId] = { ...(instances[widgetId] || {}), ...prefs };
11863
+ store$1.set("instances", instances);
11864
+ console.log(
11865
+ `[notificationController] Preferences updated for widget ${widgetId}`,
11866
+ );
11867
+ return { success: true };
11868
+ } catch (error) {
11869
+ console.error(
11870
+ "[notificationController] Error setting preferences:",
11871
+ error,
11872
+ );
11873
+ return { error: true, message: error.message };
11874
+ }
11875
+ },
11876
+
11877
+ /**
11878
+ * Set global notification settings.
11879
+ *
11880
+ * @param {Object} settings
11881
+ * @param {boolean} [settings.globalEnabled]
11882
+ * @param {boolean} [settings.doNotDisturb]
11883
+ * @returns {{ success: boolean }}
11884
+ */
11885
+ setGlobal: (settings) => {
11886
+ try {
11887
+ if (typeof settings.globalEnabled === "boolean") {
11888
+ store$1.set("globalEnabled", settings.globalEnabled);
11889
+ }
11890
+ if (typeof settings.doNotDisturb === "boolean") {
11891
+ store$1.set("doNotDisturb", settings.doNotDisturb);
11892
+ }
11893
+ console.log(
11894
+ "[notificationController] Global settings updated:",
11895
+ settings,
11896
+ );
11897
+ return { success: true };
11898
+ } catch (error) {
11899
+ console.error("[notificationController] Error setting global:", error);
11900
+ return { error: true, message: error.message };
11901
+ }
11902
+ },
11903
+ };
11904
+
11905
+ var notificationController_1 = notificationController$2;
11906
+
11618
11907
  /**
11619
11908
  * clientFactories.js
11620
11909
  *
@@ -12033,6 +12322,7 @@ const {
12033
12322
  deleteDashboardRating,
12034
12323
  enrichPackagesWithRatings,
12035
12324
  } = dashboardRatingsController;
12325
+ const notificationController$1 = notificationController_1;
12036
12326
 
12037
12327
  var controller = {
12038
12328
  showDialog,
@@ -12106,9 +12396,10 @@ var controller = {
12106
12396
  getSessionState,
12107
12397
  saveSessionState,
12108
12398
  clearSessionState,
12399
+ notificationController: notificationController$1,
12109
12400
  };
12110
12401
 
12111
- const { ipcRenderer: ipcRenderer$l } = require$$0$1;
12402
+ const { ipcRenderer: ipcRenderer$m } = require$$0$1;
12112
12403
  const {
12113
12404
  SECURE_STORE_ENCRYPTION_CHECK,
12114
12405
  SECURE_STORE_SET_DATA,
@@ -12120,10 +12411,10 @@ const {
12120
12411
  */
12121
12412
  const secureStoreApi$2 = {
12122
12413
  isEncryptionAvailable: () =>
12123
- ipcRenderer$l.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
12414
+ ipcRenderer$m.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
12124
12415
  saveData: (key, value) =>
12125
- ipcRenderer$l.invoke(SECURE_STORE_SET_DATA, { key, value }),
12126
- getData: (key) => ipcRenderer$l.invoke(SECURE_STORE_GET_DATA, { key }),
12416
+ ipcRenderer$m.invoke(SECURE_STORE_SET_DATA, { key, value }),
12417
+ getData: (key) => ipcRenderer$m.invoke(SECURE_STORE_GET_DATA, { key }),
12127
12418
  };
12128
12419
 
12129
12420
  var secureStoreApi_1 = secureStoreApi$2;
@@ -12134,7 +12425,7 @@ var secureStoreApi_1 = secureStoreApi$2;
12134
12425
  * Handle the workspace configuration file
12135
12426
  */
12136
12427
 
12137
- const { ipcRenderer: ipcRenderer$k } = require$$0$1;
12428
+ const { ipcRenderer: ipcRenderer$l } = require$$0$1;
12138
12429
  const {
12139
12430
  WORKSPACE_LIST,
12140
12431
  WORKSPACE_SAVE,
@@ -12151,7 +12442,7 @@ const workspaceApi$2 = {
12151
12442
  */
12152
12443
  listWorkspacesForApplication: (appId) => {
12153
12444
  console.log("listWorkspacesForApplication called with appId:", appId);
12154
- return ipcRenderer$k.invoke(WORKSPACE_LIST, { appId });
12445
+ return ipcRenderer$l.invoke(WORKSPACE_LIST, { appId });
12155
12446
  },
12156
12447
 
12157
12448
  /**
@@ -12162,7 +12453,7 @@ const workspaceApi$2 = {
12162
12453
  * @returns
12163
12454
  */
12164
12455
  saveWorkspaceForApplication: (appId, data) =>
12165
- ipcRenderer$k.invoke(WORKSPACE_SAVE, { appId, data }),
12456
+ ipcRenderer$l.invoke(WORKSPACE_SAVE, { appId, data }),
12166
12457
 
12167
12458
  /**
12168
12459
  * deleteWorkspaceForApplication
@@ -12172,7 +12463,7 @@ const workspaceApi$2 = {
12172
12463
  * @returns
12173
12464
  */
12174
12465
  deleteWorkspaceForApplication: (appId, workspaceId) =>
12175
- ipcRenderer$k.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
12466
+ ipcRenderer$l.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
12176
12467
  };
12177
12468
 
12178
12469
  var workspaceApi_1 = workspaceApi$2;
@@ -12184,15 +12475,15 @@ var workspaceApi_1 = workspaceApi$2;
12184
12475
  */
12185
12476
 
12186
12477
  // ipcRenderer that must be used to invoke the events
12187
- const { ipcRenderer: ipcRenderer$j } = require$$0$1;
12478
+ const { ipcRenderer: ipcRenderer$k } = require$$0$1;
12188
12479
 
12189
12480
  const { LAYOUT_LIST, LAYOUT_SAVE } = events$8;
12190
12481
 
12191
12482
  const layoutApi$2 = {
12192
12483
  listLayoutsForApplication: (appId) =>
12193
- ipcRenderer$j.invoke(LAYOUT_LIST, { appId }),
12484
+ ipcRenderer$k.invoke(LAYOUT_LIST, { appId }),
12194
12485
  saveLayoutForApplication: (appId, data) =>
12195
- ipcRenderer$j.invoke(LAYOUT_SAVE, { appId, data }),
12486
+ ipcRenderer$k.invoke(LAYOUT_SAVE, { appId, data }),
12196
12487
  };
12197
12488
 
12198
12489
  var layoutApi_1 = layoutApi$2;
@@ -12204,7 +12495,7 @@ var layoutApi_1 = layoutApi$2;
12204
12495
  */
12205
12496
 
12206
12497
  // ipcRenderer that must be used to invoke the events
12207
- const { ipcRenderer: ipcRenderer$i } = require$$0$1;
12498
+ const { ipcRenderer: ipcRenderer$j } = require$$0$1;
12208
12499
 
12209
12500
  const {
12210
12501
  DATA_JSON_TO_CSV_FILE,
@@ -12223,7 +12514,7 @@ const {
12223
12514
  const dataApi$2 = {
12224
12515
  // convert a json array of objects to a csv string and save to file
12225
12516
  convertJsonToCsvFile: (appId, jsonObject, filename) =>
12226
- ipcRenderer$i.invoke(DATA_JSON_TO_CSV_FILE, {
12517
+ ipcRenderer$j.invoke(DATA_JSON_TO_CSV_FILE, {
12227
12518
  appId,
12228
12519
  jsonObject,
12229
12520
  filename,
@@ -12231,10 +12522,10 @@ const dataApi$2 = {
12231
12522
 
12232
12523
  // convert a json array of objects to a csv string and return a string
12233
12524
  convertJsonToCsvString: (appId, jsonObject) =>
12234
- ipcRenderer$i.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
12525
+ ipcRenderer$j.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
12235
12526
 
12236
12527
  parseXMLStream: (filepath, outpath, start) =>
12237
- ipcRenderer$i.invoke(PARSE_XML_STREAM, {
12528
+ ipcRenderer$j.invoke(PARSE_XML_STREAM, {
12238
12529
  filepath,
12239
12530
  outpath,
12240
12531
  start,
@@ -12248,7 +12539,7 @@ const dataApi$2 = {
12248
12539
  headers = null,
12249
12540
  limit = null,
12250
12541
  ) => {
12251
- ipcRenderer$i.invoke(PARSE_CSV_STREAM, {
12542
+ ipcRenderer$j.invoke(PARSE_CSV_STREAM, {
12252
12543
  filepath,
12253
12544
  outpath,
12254
12545
  delimiter,
@@ -12259,15 +12550,15 @@ const dataApi$2 = {
12259
12550
  },
12260
12551
 
12261
12552
  readLinesFromFile: (filepath, lineCount) => {
12262
- ipcRenderer$i.invoke(READ_LINES, { filepath, lineCount });
12553
+ ipcRenderer$j.invoke(READ_LINES, { filepath, lineCount });
12263
12554
  },
12264
12555
 
12265
12556
  readJSONFromFile: (filepath, objectCount = null) => {
12266
- ipcRenderer$i.invoke(READ_JSON, { filepath, objectCount });
12557
+ ipcRenderer$j.invoke(READ_JSON, { filepath, objectCount });
12267
12558
  },
12268
12559
 
12269
12560
  readDataFromURL: (url, toFilepath) => {
12270
- ipcRenderer$i.invoke(READ_DATA_URL, { url, toFilepath });
12561
+ ipcRenderer$j.invoke(READ_DATA_URL, { url, toFilepath });
12271
12562
  },
12272
12563
 
12273
12564
  /*
@@ -12276,7 +12567,7 @@ const dataApi$2 = {
12276
12567
  * @param {object} returnEmpty the return empty object
12277
12568
  */
12278
12569
  saveData: (data, filename, append, returnEmpty, uuid) =>
12279
- ipcRenderer$i.invoke(DATA_SAVE_TO_FILE, {
12570
+ ipcRenderer$j.invoke(DATA_SAVE_TO_FILE, {
12280
12571
  data,
12281
12572
  filename,
12282
12573
  append,
@@ -12288,14 +12579,14 @@ const dataApi$2 = {
12288
12579
  * @param {string} filename the filename to read (not path)
12289
12580
  */
12290
12581
  readData: (filename, returnEmpty = []) =>
12291
- ipcRenderer$i.invoke(DATA_READ_FROM_FILE, { filename, returnEmpty }),
12582
+ ipcRenderer$j.invoke(DATA_READ_FROM_FILE, { filename, returnEmpty }),
12292
12583
 
12293
12584
  /**
12294
12585
  * transformFile
12295
12586
  * @returns
12296
12587
  */
12297
12588
  transformFile: (filepath, outFilepath, mappingFunctionBody, args) => {
12298
- ipcRenderer$i.invoke(TRANSFORM_FILE, {
12589
+ ipcRenderer$j.invoke(TRANSFORM_FILE, {
12299
12590
  filepath,
12300
12591
  outFilepath,
12301
12592
  mappingFunctionBody,
@@ -12304,7 +12595,7 @@ const dataApi$2 = {
12304
12595
  },
12305
12596
 
12306
12597
  extractColorsFromImageURL: (url) => {
12307
- ipcRenderer$i.invoke(EXTRACT_COLORS_FROM_IMAGE, {
12598
+ ipcRenderer$j.invoke(EXTRACT_COLORS_FROM_IMAGE, {
12308
12599
  url,
12309
12600
  });
12310
12601
  },
@@ -12319,7 +12610,7 @@ var dataApi_1 = dataApi$2;
12319
12610
  */
12320
12611
 
12321
12612
  // ipcRenderer that must be used to invoke the events
12322
- const { ipcRenderer: ipcRenderer$h } = require$$0$1;
12613
+ const { ipcRenderer: ipcRenderer$i } = require$$0$1;
12323
12614
 
12324
12615
  const {
12325
12616
  SETTINGS_GET,
@@ -12330,14 +12621,14 @@ const {
12330
12621
  } = events$8;
12331
12622
 
12332
12623
  const settingsApi$2 = {
12333
- getSettingsForApplication: () => ipcRenderer$h.invoke(SETTINGS_GET, {}),
12624
+ getSettingsForApplication: () => ipcRenderer$i.invoke(SETTINGS_GET, {}),
12334
12625
  saveSettingsForApplication: (data) =>
12335
- ipcRenderer$h.invoke(SETTINGS_SAVE, { data }),
12336
- getDataDirectory: () => ipcRenderer$h.invoke(SETTINGS_GET_DATA_DIR, {}),
12626
+ ipcRenderer$i.invoke(SETTINGS_SAVE, { data }),
12627
+ getDataDirectory: () => ipcRenderer$i.invoke(SETTINGS_GET_DATA_DIR, {}),
12337
12628
  setDataDirectory: (dataDirectory) =>
12338
- ipcRenderer$h.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
12629
+ ipcRenderer$i.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
12339
12630
  migrateDataDirectory: (oldDirectory, newDirectory) =>
12340
- ipcRenderer$h.invoke(SETTINGS_MIGRATE_DATA_DIR, {
12631
+ ipcRenderer$i.invoke(SETTINGS_MIGRATE_DATA_DIR, {
12341
12632
  oldDirectory,
12342
12633
  newDirectory,
12343
12634
  }),
@@ -12352,7 +12643,7 @@ var settingsApi_1 = settingsApi$2;
12352
12643
  */
12353
12644
 
12354
12645
  // ipcRenderer that must be used to invoke the events
12355
- const { ipcRenderer: ipcRenderer$g } = require$$0$1;
12646
+ const { ipcRenderer: ipcRenderer$h } = require$$0$1;
12356
12647
 
12357
12648
  const { CHOOSE_FILE } = events$8;
12358
12649
 
@@ -12364,7 +12655,7 @@ const dialogApi$2 = {
12364
12655
  */
12365
12656
  chooseFile: (allowFile = true, extensions = ["*"]) => {
12366
12657
  console.log("dialog api choose file");
12367
- return ipcRenderer$g.invoke(CHOOSE_FILE, { allowFile, extensions });
12658
+ return ipcRenderer$h.invoke(CHOOSE_FILE, { allowFile, extensions });
12368
12659
  },
12369
12660
  };
12370
12661
 
@@ -12383,7 +12674,7 @@ var dialogApi_1 = dialogApi$2;
12383
12674
  * mainApi.widgets.uninstall('Weather')
12384
12675
  */
12385
12676
 
12386
- const { ipcRenderer: ipcRenderer$f } = require$$0$1;
12677
+ const { ipcRenderer: ipcRenderer$g } = require$$0$1;
12387
12678
 
12388
12679
  const widgetApi$2 = {
12389
12680
  /**
@@ -12392,7 +12683,7 @@ const widgetApi$2 = {
12392
12683
  */
12393
12684
  list: async () => {
12394
12685
  try {
12395
- return await ipcRenderer$f.invoke("widget:list");
12686
+ return await ipcRenderer$g.invoke("widget:list");
12396
12687
  } catch (error) {
12397
12688
  console.error("[WidgetApi] Error listing widgets:", error);
12398
12689
  throw error;
@@ -12406,7 +12697,7 @@ const widgetApi$2 = {
12406
12697
  */
12407
12698
  get: async (widgetName) => {
12408
12699
  try {
12409
- return await ipcRenderer$f.invoke("widget:get", widgetName);
12700
+ return await ipcRenderer$g.invoke("widget:get", widgetName);
12410
12701
  } catch (error) {
12411
12702
  console.error(`[WidgetApi] Error getting widget ${widgetName}:`, error);
12412
12703
  throw error;
@@ -12437,7 +12728,7 @@ const widgetApi$2 = {
12437
12728
  console.log(
12438
12729
  `[WidgetApi] Installing widget: ${widgetName} from ${downloadUrl}`,
12439
12730
  );
12440
- const config = await ipcRenderer$f.invoke(
12731
+ const config = await ipcRenderer$g.invoke(
12441
12732
  "widget:install",
12442
12733
  widgetName,
12443
12734
  downloadUrl,
@@ -12477,7 +12768,7 @@ const widgetApi$2 = {
12477
12768
  console.log(
12478
12769
  `[WidgetApi] Installing local widget: ${widgetName} from ${localPath}`,
12479
12770
  );
12480
- const config = await ipcRenderer$f.invoke(
12771
+ const config = await ipcRenderer$g.invoke(
12481
12772
  "widget:install-local",
12482
12773
  widgetName,
12483
12774
  localPath,
@@ -12508,7 +12799,7 @@ const widgetApi$2 = {
12508
12799
  loadFolder: async (folderPath) => {
12509
12800
  try {
12510
12801
  console.log(`[WidgetApi] Loading widgets from folder: ${folderPath}`);
12511
- const results = await ipcRenderer$f.invoke(
12802
+ const results = await ipcRenderer$g.invoke(
12512
12803
  "widget:load-folder",
12513
12804
  folderPath,
12514
12805
  );
@@ -12532,7 +12823,7 @@ const widgetApi$2 = {
12532
12823
  uninstall: async (widgetName) => {
12533
12824
  try {
12534
12825
  console.log(`[WidgetApi] Uninstalling widget: ${widgetName}`);
12535
- const success = await ipcRenderer$f.invoke("widget:uninstall", widgetName);
12826
+ const success = await ipcRenderer$g.invoke("widget:uninstall", widgetName);
12536
12827
  if (success) {
12537
12828
  console.log(`[WidgetApi] ✓ Widget ${widgetName} uninstalled`);
12538
12829
  } else {
@@ -12555,7 +12846,7 @@ const widgetApi$2 = {
12555
12846
  */
12556
12847
  getCachePath: async () => {
12557
12848
  try {
12558
- return await ipcRenderer$f.invoke("widget:cache-path");
12849
+ return await ipcRenderer$g.invoke("widget:cache-path");
12559
12850
  } catch (error) {
12560
12851
  console.error("[WidgetApi] Error getting cache path:", error);
12561
12852
  throw error;
@@ -12569,7 +12860,7 @@ const widgetApi$2 = {
12569
12860
  */
12570
12861
  getStoragePath: async () => {
12571
12862
  try {
12572
- return await ipcRenderer$f.invoke("widget:storage-path");
12863
+ return await ipcRenderer$g.invoke("widget:storage-path");
12573
12864
  } catch (error) {
12574
12865
  console.error("[WidgetApi] Error getting storage path:", error);
12575
12866
  throw error;
@@ -12586,7 +12877,7 @@ const widgetApi$2 = {
12586
12877
  setStoragePath: async (customPath) => {
12587
12878
  try {
12588
12879
  console.log(`[WidgetApi] Setting storage path to: ${customPath}`);
12589
- const result = await ipcRenderer$f.invoke(
12880
+ const result = await ipcRenderer$g.invoke(
12590
12881
  "widget:set-storage-path",
12591
12882
  customPath,
12592
12883
  );
@@ -12608,7 +12899,7 @@ const widgetApi$2 = {
12608
12899
  */
12609
12900
  getComponentConfigs: async () => {
12610
12901
  try {
12611
- return await ipcRenderer$f.invoke("widget:get-component-configs");
12902
+ return await ipcRenderer$g.invoke("widget:get-component-configs");
12612
12903
  } catch (error) {
12613
12904
  console.error("[WidgetApi] Error getting component configs:", error);
12614
12905
  return [];
@@ -12623,7 +12914,7 @@ const widgetApi$2 = {
12623
12914
  */
12624
12915
  readBundle: async (widgetName) => {
12625
12916
  try {
12626
- return await ipcRenderer$f.invoke("widget:read-bundle", widgetName);
12917
+ return await ipcRenderer$g.invoke("widget:read-bundle", widgetName);
12627
12918
  } catch (error) {
12628
12919
  console.error(
12629
12920
  `[WidgetApi] Error reading bundle for ${widgetName}:`,
@@ -12640,7 +12931,7 @@ const widgetApi$2 = {
12640
12931
  */
12641
12932
  readAllBundles: async () => {
12642
12933
  try {
12643
- return await ipcRenderer$f.invoke("widget:read-all-bundles");
12934
+ return await ipcRenderer$g.invoke("widget:read-all-bundles");
12644
12935
  } catch (error) {
12645
12936
  console.error("[WidgetApi] Error reading all bundles:", error);
12646
12937
  return [];
@@ -12660,7 +12951,7 @@ const widgetApi$2 = {
12660
12951
  * });
12661
12952
  */
12662
12953
  onInstalled: (callback) => {
12663
- ipcRenderer$f.on("widget:installed", (event, data) => {
12954
+ ipcRenderer$g.on("widget:installed", (event, data) => {
12664
12955
  callback(data);
12665
12956
  });
12666
12957
  },
@@ -12678,7 +12969,7 @@ const widgetApi$2 = {
12678
12969
  * });
12679
12970
  */
12680
12971
  onLoaded: (callback) => {
12681
- ipcRenderer$f.on("widgets:loaded", (event, data) => {
12972
+ ipcRenderer$g.on("widgets:loaded", (event, data) => {
12682
12973
  callback(data);
12683
12974
  });
12684
12975
  },
@@ -12689,7 +12980,7 @@ const widgetApi$2 = {
12689
12980
  * @param {Function} callback - The callback to remove
12690
12981
  */
12691
12982
  removeInstalledListener: (callback) => {
12692
- ipcRenderer$f.removeListener("widget:installed", callback);
12983
+ ipcRenderer$g.removeListener("widget:installed", callback);
12693
12984
  },
12694
12985
 
12695
12986
  /**
@@ -12698,7 +12989,7 @@ const widgetApi$2 = {
12698
12989
  * @param {Function} callback - The callback to remove
12699
12990
  */
12700
12991
  removeLoadedListener: (callback) => {
12701
- ipcRenderer$f.removeListener("widgets:loaded", callback);
12992
+ ipcRenderer$g.removeListener("widgets:loaded", callback);
12702
12993
  },
12703
12994
  };
12704
12995
 
@@ -12711,7 +13002,7 @@ var widgetApi_1 = widgetApi$2;
12711
13002
  * Communicates with main process via IPC to handle encryption and file storage
12712
13003
  */
12713
13004
 
12714
- const { ipcRenderer: ipcRenderer$e } = require$$0$1;
13005
+ const { ipcRenderer: ipcRenderer$f } = require$$0$1;
12715
13006
  const {
12716
13007
  PROVIDER_SAVE,
12717
13008
  PROVIDER_LIST,
@@ -12743,7 +13034,7 @@ const providerApi$2 = {
12743
13034
  mcpConfig = null,
12744
13035
  allowedTools = null,
12745
13036
  ) =>
12746
- ipcRenderer$e.invoke(PROVIDER_SAVE, {
13037
+ ipcRenderer$f.invoke(PROVIDER_SAVE, {
12747
13038
  appId,
12748
13039
  providerName,
12749
13040
  providerType,
@@ -12761,7 +13052,7 @@ const providerApi$2 = {
12761
13052
  * @param {String} appId - the appId specified in the dash initialization
12762
13053
  * @returns {Promise<Array>} Array of provider objects with name, type, credentials
12763
13054
  */
12764
- listProviders: (appId) => ipcRenderer$e.invoke(PROVIDER_LIST, { appId }),
13055
+ listProviders: (appId) => ipcRenderer$f.invoke(PROVIDER_LIST, { appId }),
12765
13056
 
12766
13057
  /**
12767
13058
  * getProvider
@@ -12773,7 +13064,7 @@ const providerApi$2 = {
12773
13064
  * @returns {Promise<Object>} Provider object with name, type, credentials
12774
13065
  */
12775
13066
  getProvider: (appId, providerName) =>
12776
- ipcRenderer$e.invoke(PROVIDER_GET, { appId, providerName }),
13067
+ ipcRenderer$f.invoke(PROVIDER_GET, { appId, providerName }),
12777
13068
 
12778
13069
  /**
12779
13070
  * deleteProvider
@@ -12785,7 +13076,7 @@ const providerApi$2 = {
12785
13076
  * @returns {Promise}
12786
13077
  */
12787
13078
  deleteProvider: (appId, providerName) =>
12788
- ipcRenderer$e.invoke(PROVIDER_DELETE, { appId, providerName }),
13079
+ ipcRenderer$f.invoke(PROVIDER_DELETE, { appId, providerName }),
12789
13080
 
12790
13081
  /**
12791
13082
  * listProvidersForApplication
@@ -12795,14 +13086,14 @@ const providerApi$2 = {
12795
13086
  * @param {String} appId - the appId specified in the dash initialization
12796
13087
  */
12797
13088
  listProvidersForApplication: (appId) => {
12798
- ipcRenderer$e
13089
+ ipcRenderer$f
12799
13090
  .invoke(PROVIDER_LIST, { appId })
12800
13091
  .then((result) => {
12801
13092
  // Emit the event for ElectronDashboardApi to listen to
12802
- ipcRenderer$e.send("PROVIDER_LIST_COMPLETE", result);
13093
+ ipcRenderer$f.send("PROVIDER_LIST_COMPLETE", result);
12803
13094
  })
12804
13095
  .catch((error) => {
12805
- ipcRenderer$e.send("PROVIDER_LIST_ERROR", {
13096
+ ipcRenderer$f.send("PROVIDER_LIST_ERROR", {
12806
13097
  error: error.message,
12807
13098
  });
12808
13099
  });
@@ -12819,7 +13110,7 @@ const providerApi$2 = {
12819
13110
  providerType,
12820
13111
  credentials,
12821
13112
  ) => {
12822
- ipcRenderer$e
13113
+ ipcRenderer$f
12823
13114
  .invoke(PROVIDER_SAVE, {
12824
13115
  appId,
12825
13116
  providerName,
@@ -12827,10 +13118,10 @@ const providerApi$2 = {
12827
13118
  credentials,
12828
13119
  })
12829
13120
  .then((result) => {
12830
- ipcRenderer$e.send("PROVIDER_SAVE_COMPLETE", result);
13121
+ ipcRenderer$f.send("PROVIDER_SAVE_COMPLETE", result);
12831
13122
  })
12832
13123
  .catch((error) => {
12833
- ipcRenderer$e.send("PROVIDER_SAVE_ERROR", {
13124
+ ipcRenderer$f.send("PROVIDER_SAVE_ERROR", {
12834
13125
  error: error.message,
12835
13126
  });
12836
13127
  });
@@ -12842,13 +13133,13 @@ const providerApi$2 = {
12842
13133
  * Event-listener-based version for use with ElectronDashboardApi
12843
13134
  */
12844
13135
  getProviderForApplication: (appId, providerName) => {
12845
- ipcRenderer$e
13136
+ ipcRenderer$f
12846
13137
  .invoke(PROVIDER_GET, { appId, providerName })
12847
13138
  .then((result) => {
12848
- ipcRenderer$e.send("PROVIDER_GET_COMPLETE", result);
13139
+ ipcRenderer$f.send("PROVIDER_GET_COMPLETE", result);
12849
13140
  })
12850
13141
  .catch((error) => {
12851
- ipcRenderer$e.send("PROVIDER_GET_ERROR", {
13142
+ ipcRenderer$f.send("PROVIDER_GET_ERROR", {
12852
13143
  error: error.message,
12853
13144
  });
12854
13145
  });
@@ -12860,13 +13151,13 @@ const providerApi$2 = {
12860
13151
  * Event-listener-based version for use with ElectronDashboardApi
12861
13152
  */
12862
13153
  deleteProviderForApplication: (appId, providerName) => {
12863
- ipcRenderer$e
13154
+ ipcRenderer$f
12864
13155
  .invoke(PROVIDER_DELETE, { appId, providerName })
12865
13156
  .then((result) => {
12866
- ipcRenderer$e.send("PROVIDER_DELETE_COMPLETE", result);
13157
+ ipcRenderer$f.send("PROVIDER_DELETE_COMPLETE", result);
12867
13158
  })
12868
13159
  .catch((error) => {
12869
- ipcRenderer$e.send("PROVIDER_DELETE_ERROR", {
13160
+ ipcRenderer$f.send("PROVIDER_DELETE_ERROR", {
12870
13161
  error: error.message,
12871
13162
  });
12872
13163
  });
@@ -12882,7 +13173,7 @@ var providerApi_1 = providerApi$2;
12882
13173
  * Communicates with main process via IPC to manage MCP server lifecycle.
12883
13174
  */
12884
13175
 
12885
- const { ipcRenderer: ipcRenderer$d } = require$$0$1;
13176
+ const { ipcRenderer: ipcRenderer$e } = require$$0$1;
12886
13177
  const {
12887
13178
  MCP_START_SERVER,
12888
13179
  MCP_STOP_SERVER,
@@ -12906,7 +13197,7 @@ const mcpApi$2 = {
12906
13197
  * @returns {Promise<{ success, serverName, tools, status } | { error, message }>}
12907
13198
  */
12908
13199
  startServer: (serverName, mcpConfig, credentials) =>
12909
- ipcRenderer$d.invoke(MCP_START_SERVER, {
13200
+ ipcRenderer$e.invoke(MCP_START_SERVER, {
12910
13201
  serverName,
12911
13202
  mcpConfig,
12912
13203
  credentials,
@@ -12920,7 +13211,7 @@ const mcpApi$2 = {
12920
13211
  * @returns {Promise<{ success, serverName } | { error, message }>}
12921
13212
  */
12922
13213
  stopServer: (serverName) =>
12923
- ipcRenderer$d.invoke(MCP_STOP_SERVER, { serverName }),
13214
+ ipcRenderer$e.invoke(MCP_STOP_SERVER, { serverName }),
12924
13215
 
12925
13216
  /**
12926
13217
  * listTools
@@ -12929,7 +13220,7 @@ const mcpApi$2 = {
12929
13220
  * @param {string} serverName the server name
12930
13221
  * @returns {Promise<{ tools } | { error, message }>}
12931
13222
  */
12932
- listTools: (serverName) => ipcRenderer$d.invoke(MCP_LIST_TOOLS, { serverName }),
13223
+ listTools: (serverName) => ipcRenderer$e.invoke(MCP_LIST_TOOLS, { serverName }),
12933
13224
 
12934
13225
  /**
12935
13226
  * callTool
@@ -12942,7 +13233,7 @@ const mcpApi$2 = {
12942
13233
  * @returns {Promise<{ result } | { error, message }>}
12943
13234
  */
12944
13235
  callTool: (serverName, toolName, args, allowedTools = null) =>
12945
- ipcRenderer$d.invoke(MCP_CALL_TOOL, {
13236
+ ipcRenderer$e.invoke(MCP_CALL_TOOL, {
12946
13237
  serverName,
12947
13238
  toolName,
12948
13239
  args,
@@ -12957,7 +13248,7 @@ const mcpApi$2 = {
12957
13248
  * @returns {Promise<{ resources } | { error, message }>}
12958
13249
  */
12959
13250
  listResources: (serverName) =>
12960
- ipcRenderer$d.invoke(MCP_LIST_RESOURCES, { serverName }),
13251
+ ipcRenderer$e.invoke(MCP_LIST_RESOURCES, { serverName }),
12961
13252
 
12962
13253
  /**
12963
13254
  * readResource
@@ -12968,7 +13259,7 @@ const mcpApi$2 = {
12968
13259
  * @returns {Promise<{ resource } | { error, message }>}
12969
13260
  */
12970
13261
  readResource: (serverName, uri) =>
12971
- ipcRenderer$d.invoke(MCP_READ_RESOURCE, { serverName, uri }),
13262
+ ipcRenderer$e.invoke(MCP_READ_RESOURCE, { serverName, uri }),
12972
13263
 
12973
13264
  /**
12974
13265
  * getServerStatus
@@ -12978,7 +13269,7 @@ const mcpApi$2 = {
12978
13269
  * @returns {Promise<{ status, tools, error }>}
12979
13270
  */
12980
13271
  getServerStatus: (serverName) =>
12981
- ipcRenderer$d.invoke(MCP_SERVER_STATUS, { serverName }),
13272
+ ipcRenderer$e.invoke(MCP_SERVER_STATUS, { serverName }),
12982
13273
 
12983
13274
  /**
12984
13275
  * getCatalog
@@ -12986,7 +13277,7 @@ const mcpApi$2 = {
12986
13277
  *
12987
13278
  * @returns {Promise<{ catalog } | { error, message }>}
12988
13279
  */
12989
- getCatalog: () => ipcRenderer$d.invoke(MCP_GET_CATALOG),
13280
+ getCatalog: () => ipcRenderer$e.invoke(MCP_GET_CATALOG),
12990
13281
 
12991
13282
  /**
12992
13283
  * runAuth
@@ -12998,7 +13289,7 @@ const mcpApi$2 = {
12998
13289
  * @returns {Promise<{ success } | { error, message }>}
12999
13290
  */
13000
13291
  runAuth: (mcpConfig, credentials, authCommand) =>
13001
- ipcRenderer$d.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
13292
+ ipcRenderer$e.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
13002
13293
  };
13003
13294
 
13004
13295
  var mcpApi_1 = mcpApi$2;
@@ -13016,7 +13307,7 @@ var mcpApi_1 = mcpApi$2;
13016
13307
  * mainApi.registry.checkUpdates([{ name: "weather-widgets", version: "1.0.0" }])
13017
13308
  */
13018
13309
 
13019
- const { ipcRenderer: ipcRenderer$c } = require$$0$1;
13310
+ const { ipcRenderer: ipcRenderer$d } = require$$0$1;
13020
13311
 
13021
13312
  const registryApi$2 = {
13022
13313
  /**
@@ -13026,7 +13317,7 @@ const registryApi$2 = {
13026
13317
  */
13027
13318
  fetchIndex: async (forceRefresh = false) => {
13028
13319
  try {
13029
- return await ipcRenderer$c.invoke("registry:fetch-index", forceRefresh);
13320
+ return await ipcRenderer$d.invoke("registry:fetch-index", forceRefresh);
13030
13321
  } catch (error) {
13031
13322
  console.error("[RegistryApi] Error fetching index:", error);
13032
13323
  throw error;
@@ -13041,7 +13332,7 @@ const registryApi$2 = {
13041
13332
  */
13042
13333
  search: async (query = "", filters = {}) => {
13043
13334
  try {
13044
- return await ipcRenderer$c.invoke("registry:search", query, filters);
13335
+ return await ipcRenderer$d.invoke("registry:search", query, filters);
13045
13336
  } catch (error) {
13046
13337
  console.error("[RegistryApi] Error searching registry:", error);
13047
13338
  throw error;
@@ -13055,7 +13346,7 @@ const registryApi$2 = {
13055
13346
  */
13056
13347
  getPackage: async (packageName) => {
13057
13348
  try {
13058
- return await ipcRenderer$c.invoke("registry:get-package", packageName);
13349
+ return await ipcRenderer$d.invoke("registry:get-package", packageName);
13059
13350
  } catch (error) {
13060
13351
  console.error(
13061
13352
  `[RegistryApi] Error getting package ${packageName}:`,
@@ -13072,7 +13363,7 @@ const registryApi$2 = {
13072
13363
  */
13073
13364
  checkUpdates: async (installedWidgets = []) => {
13074
13365
  try {
13075
- return await ipcRenderer$c.invoke(
13366
+ return await ipcRenderer$d.invoke(
13076
13367
  "registry:check-updates",
13077
13368
  installedWidgets,
13078
13369
  );
@@ -13090,7 +13381,7 @@ const registryApi$2 = {
13090
13381
  */
13091
13382
  searchDashboards: async (query = "", filters = {}) => {
13092
13383
  try {
13093
- return await ipcRenderer$c.invoke(
13384
+ return await ipcRenderer$d.invoke(
13094
13385
  "registry:search-dashboards",
13095
13386
  query,
13096
13387
  filters,
@@ -13110,17 +13401,17 @@ var registryApi_1 = registryApi$2;
13110
13401
  * Handle the theme configuration file
13111
13402
  */
13112
13403
 
13113
- const { ipcRenderer: ipcRenderer$b } = require$$0$1;
13404
+ const { ipcRenderer: ipcRenderer$c } = require$$0$1;
13114
13405
 
13115
13406
  const { THEME_LIST, THEME_SAVE, THEME_DELETE } = events$8;
13116
13407
 
13117
13408
  const themeApi$2 = {
13118
13409
  listThemesForApplication: (appId) =>
13119
- ipcRenderer$b.invoke(THEME_LIST, { appId }),
13410
+ ipcRenderer$c.invoke(THEME_LIST, { appId }),
13120
13411
  saveThemeForApplication: (appId, themeName, themeObject) =>
13121
- ipcRenderer$b.invoke(THEME_SAVE, { appId, themeName, themeObject }),
13412
+ ipcRenderer$c.invoke(THEME_SAVE, { appId, themeName, themeObject }),
13122
13413
  deleteThemeForApplication: (appId, themeKey) =>
13123
- ipcRenderer$b.invoke(THEME_DELETE, { appId, themeKey }),
13414
+ ipcRenderer$c.invoke(THEME_DELETE, { appId, themeKey }),
13124
13415
  };
13125
13416
 
13126
13417
  var themeApi_1 = themeApi$2;
@@ -13132,7 +13423,7 @@ var themeApi_1 = themeApi$2;
13132
13423
  */
13133
13424
 
13134
13425
  // ipcRenderer that must be used to invoke the events
13135
- const { ipcRenderer: ipcRenderer$a } = require$$0$1;
13426
+ const { ipcRenderer: ipcRenderer$b } = require$$0$1;
13136
13427
 
13137
13428
  const {
13138
13429
  ALGOLIA_LIST_INDICES,
@@ -13146,10 +13437,10 @@ const {
13146
13437
 
13147
13438
  const algoliaApi$2 = {
13148
13439
  listIndices: (application) =>
13149
- ipcRenderer$a.invoke(ALGOLIA_LIST_INDICES, application),
13440
+ ipcRenderer$b.invoke(ALGOLIA_LIST_INDICES, application),
13150
13441
 
13151
13442
  browseObjects: (appId, apiKey, indexName) => {
13152
- ipcRenderer$a.invoke(ALGOLIA_BROWSE_OBJECTS, {
13443
+ ipcRenderer$b.invoke(ALGOLIA_BROWSE_OBJECTS, {
13153
13444
  appId,
13154
13445
  apiKey,
13155
13446
  indexName,
@@ -13157,10 +13448,10 @@ const algoliaApi$2 = {
13157
13448
  });
13158
13449
  },
13159
13450
 
13160
- saveSynonyms: () => ipcRenderer$a.invoke(ALGOLIA_SAVE_SYNONYMS, {}),
13451
+ saveSynonyms: () => ipcRenderer$b.invoke(ALGOLIA_SAVE_SYNONYMS, {}),
13161
13452
 
13162
13453
  getAnalyticsForQuery: (application, indexName, query) =>
13163
- ipcRenderer$a.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
13454
+ ipcRenderer$b.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
13164
13455
  application,
13165
13456
  indexName,
13166
13457
  query,
@@ -13173,7 +13464,7 @@ const algoliaApi$2 = {
13173
13464
  dir,
13174
13465
  createIfNotExists = false,
13175
13466
  ) =>
13176
- ipcRenderer$a.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
13467
+ ipcRenderer$b.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
13177
13468
  appId,
13178
13469
  apiKey,
13179
13470
  indexName,
@@ -13182,7 +13473,7 @@ const algoliaApi$2 = {
13182
13473
  }),
13183
13474
 
13184
13475
  createBatchesFromFile: (filepath, batchFilepath, batchSize) => {
13185
- ipcRenderer$a.invoke(ALGOLIA_CREATE_BATCH, {
13476
+ ipcRenderer$b.invoke(ALGOLIA_CREATE_BATCH, {
13186
13477
  filepath,
13187
13478
  batchFilepath,
13188
13479
  batchSize,
@@ -13190,7 +13481,7 @@ const algoliaApi$2 = {
13190
13481
  },
13191
13482
 
13192
13483
  browseObjectsToFile: (appId, apiKey, indexName, toFilename, query = "") => {
13193
- ipcRenderer$a.invoke(ALGOLIA_BROWSE_OBJECTS, {
13484
+ ipcRenderer$b.invoke(ALGOLIA_BROWSE_OBJECTS, {
13194
13485
  appId,
13195
13486
  apiKey,
13196
13487
  indexName,
@@ -13200,7 +13491,7 @@ const algoliaApi$2 = {
13200
13491
  },
13201
13492
 
13202
13493
  search: (appId, apiKey, indexName, query = "", options = {}) =>
13203
- ipcRenderer$a.invoke(ALGOLIA_SEARCH, {
13494
+ ipcRenderer$b.invoke(ALGOLIA_SEARCH, {
13204
13495
  appId,
13205
13496
  apiKey,
13206
13497
  indexName,
@@ -13215,14 +13506,14 @@ var algoliaApi_1 = algoliaApi$2;
13215
13506
  * openAI
13216
13507
  */
13217
13508
 
13218
- const { ipcRenderer: ipcRenderer$9 } = require$$0$1;
13509
+ const { ipcRenderer: ipcRenderer$a } = require$$0$1;
13219
13510
 
13220
13511
  const { OPENAI_DESCRIBE_IMAGE } = openaiEvents$1;
13221
13512
 
13222
13513
  const openaiApi$2 = {
13223
13514
  // convert a json array of objects to a csv string and save to file
13224
13515
  describeImage: (imageUrl, apiKey, prompt = "What's in this image?") =>
13225
- ipcRenderer$9.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
13516
+ ipcRenderer$a.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
13226
13517
  };
13227
13518
 
13228
13519
  var openaiApi_1 = openaiApi$2;
@@ -13233,14 +13524,14 @@ var openaiApi_1 = openaiApi$2;
13233
13524
  */
13234
13525
 
13235
13526
  // ipcRenderer that must be used to invoke the events
13236
- const { ipcRenderer: ipcRenderer$8 } = require$$0$1;
13527
+ const { ipcRenderer: ipcRenderer$9 } = require$$0$1;
13237
13528
 
13238
13529
  const { MENU_ITEMS_SAVE, MENU_ITEMS_LIST } = events$8;
13239
13530
 
13240
13531
  const menuItemsApi$2 = {
13241
13532
  saveMenuItem: (appId, menuItem) =>
13242
- ipcRenderer$8.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
13243
- listMenuItems: (appId) => ipcRenderer$8.invoke(MENU_ITEMS_LIST, { appId }),
13533
+ ipcRenderer$9.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
13534
+ listMenuItems: (appId) => ipcRenderer$9.invoke(MENU_ITEMS_LIST, { appId }),
13244
13535
  };
13245
13536
 
13246
13537
  var menuItemsApi_1 = menuItemsApi$2;
@@ -13252,12 +13543,12 @@ var menuItemsApi_1 = menuItemsApi$2;
13252
13543
  */
13253
13544
 
13254
13545
  // ipcRenderer that must be used to invoke the events
13255
- const { ipcRenderer: ipcRenderer$7 } = require$$0$1;
13546
+ const { ipcRenderer: ipcRenderer$8 } = require$$0$1;
13256
13547
 
13257
13548
  const pluginApi$2 = {
13258
13549
  install: (packageName, filepath) =>
13259
- ipcRenderer$7.invoke("plugin-install", { packageName, filepath }),
13260
- uninstall: (filepath) => ipcRenderer$7.invoke("plugin-uninstall", filepath),
13550
+ ipcRenderer$8.invoke("plugin-install", { packageName, filepath }),
13551
+ uninstall: (filepath) => ipcRenderer$8.invoke("plugin-uninstall", filepath),
13261
13552
  };
13262
13553
 
13263
13554
  var pluginApi_1 = pluginApi$2;
@@ -13270,7 +13561,7 @@ var pluginApi_1 = pluginApi$2;
13270
13561
  * tool-use events, and request cancellation.
13271
13562
  */
13272
13563
 
13273
- const { ipcRenderer: ipcRenderer$6 } = require$$0$1;
13564
+ const { ipcRenderer: ipcRenderer$7 } = require$$0$1;
13274
13565
  const {
13275
13566
  LLM_SEND_MESSAGE,
13276
13567
  LLM_ABORT_REQUEST,
@@ -13292,7 +13583,7 @@ const _listenerMap = new Map();
13292
13583
  function _addListener(channel, callback) {
13293
13584
  const id = String(++_nextListenerId);
13294
13585
  const wrapped = (_event, data) => callback(data);
13295
- ipcRenderer$6.on(channel, wrapped);
13586
+ ipcRenderer$7.on(channel, wrapped);
13296
13587
  _listenerMap.set(id, { channel, wrapped });
13297
13588
  return id;
13298
13589
  }
@@ -13307,7 +13598,7 @@ const llmApi$2 = {
13307
13598
  * @returns {Promise<void>}
13308
13599
  */
13309
13600
  sendMessage: (requestId, params) =>
13310
- ipcRenderer$6.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
13601
+ ipcRenderer$7.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
13311
13602
 
13312
13603
  /**
13313
13604
  * abortRequest
@@ -13317,7 +13608,7 @@ const llmApi$2 = {
13317
13608
  * @returns {Promise<{ success: boolean }>}
13318
13609
  */
13319
13610
  abortRequest: (requestId) =>
13320
- ipcRenderer$6.invoke(LLM_ABORT_REQUEST, { requestId }),
13611
+ ipcRenderer$7.invoke(LLM_ABORT_REQUEST, { requestId }),
13321
13612
 
13322
13613
  /**
13323
13614
  * listConnectedTools
@@ -13325,7 +13616,7 @@ const llmApi$2 = {
13325
13616
  *
13326
13617
  * @returns {Promise<Array<{ serverName, tools, resources, status }>>}
13327
13618
  */
13328
- listConnectedTools: () => ipcRenderer$6.invoke(LLM_LIST_CONNECTED_TOOLS),
13619
+ listConnectedTools: () => ipcRenderer$7.invoke(LLM_LIST_CONNECTED_TOOLS),
13329
13620
 
13330
13621
  /**
13331
13622
  * checkCliAvailable
@@ -13333,7 +13624,7 @@ const llmApi$2 = {
13333
13624
  *
13334
13625
  * @returns {Promise<{ available: boolean, path?: string }>}
13335
13626
  */
13336
- checkCliAvailable: () => ipcRenderer$6.invoke(LLM_CHECK_CLI_AVAILABLE),
13627
+ checkCliAvailable: () => ipcRenderer$7.invoke(LLM_CHECK_CLI_AVAILABLE),
13337
13628
 
13338
13629
  /**
13339
13630
  * clearCliSession
@@ -13343,7 +13634,7 @@ const llmApi$2 = {
13343
13634
  * @returns {Promise<{ success: boolean }>}
13344
13635
  */
13345
13636
  clearCliSession: (widgetUuid) =>
13346
- ipcRenderer$6.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
13637
+ ipcRenderer$7.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
13347
13638
 
13348
13639
  /**
13349
13640
  * getCliSessionStatus
@@ -13353,7 +13644,7 @@ const llmApi$2 = {
13353
13644
  * @returns {Promise<{ hasSession: boolean, sessionId?: string, isProcessActive: boolean }>}
13354
13645
  */
13355
13646
  getCliSessionStatus: (widgetUuid) =>
13356
- ipcRenderer$6.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
13647
+ ipcRenderer$7.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
13357
13648
 
13358
13649
  /**
13359
13650
  * endCliSession
@@ -13363,7 +13654,7 @@ const llmApi$2 = {
13363
13654
  * @returns {Promise<{ success: boolean }>}
13364
13655
  */
13365
13656
  endCliSession: (widgetUuid) =>
13366
- ipcRenderer$6.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
13657
+ ipcRenderer$7.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
13367
13658
 
13368
13659
  // --- Stream event listeners ---
13369
13660
  // Each on* method returns an opaque string ID. Strings cross the
@@ -13397,7 +13688,7 @@ const llmApi$2 = {
13397
13688
  const listenerId = id !== undefined ? String(id) : String(idOrChannel);
13398
13689
  const entry = _listenerMap.get(listenerId);
13399
13690
  if (entry) {
13400
- ipcRenderer$6.removeListener(entry.channel, entry.wrapped);
13691
+ ipcRenderer$7.removeListener(entry.channel, entry.wrapped);
13401
13692
  _listenerMap.delete(listenerId);
13402
13693
  }
13403
13694
  },
@@ -13409,14 +13700,14 @@ const llmApi$2 = {
13409
13700
  */
13410
13701
  removeAllStreamListeners: () => {
13411
13702
  for (const [, entry] of _listenerMap) {
13412
- ipcRenderer$6.removeListener(entry.channel, entry.wrapped);
13703
+ ipcRenderer$7.removeListener(entry.channel, entry.wrapped);
13413
13704
  }
13414
13705
  _listenerMap.clear();
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);
13706
+ ipcRenderer$7.removeAllListeners(LLM_STREAM_DELTA);
13707
+ ipcRenderer$7.removeAllListeners(LLM_STREAM_TOOL_CALL);
13708
+ ipcRenderer$7.removeAllListeners(LLM_STREAM_TOOL_RESULT);
13709
+ ipcRenderer$7.removeAllListeners(LLM_STREAM_COMPLETE);
13710
+ ipcRenderer$7.removeAllListeners(LLM_STREAM_ERROR);
13420
13711
  },
13421
13712
  };
13422
13713
 
@@ -13430,7 +13721,7 @@ var llmApi_1 = llmApi$2;
13430
13721
  * and manage the response cache.
13431
13722
  */
13432
13723
 
13433
- const { ipcRenderer: ipcRenderer$5 } = require$$0$1;
13724
+ const { ipcRenderer: ipcRenderer$6 } = require$$0$1;
13434
13725
  const {
13435
13726
  CLIENT_CACHE_INVALIDATE,
13436
13727
  CLIENT_CACHE_INVALIDATE_ALL,
@@ -13447,28 +13738,28 @@ const clientCacheApi$2 = {
13447
13738
  * @returns {Promise<{success: boolean}>}
13448
13739
  */
13449
13740
  invalidate: (appId, providerName) =>
13450
- ipcRenderer$5.invoke(CLIENT_CACHE_INVALIDATE, { appId, providerName }),
13741
+ ipcRenderer$6.invoke(CLIENT_CACHE_INVALIDATE, { appId, providerName }),
13451
13742
 
13452
13743
  /**
13453
13744
  * Invalidate all cached clients.
13454
13745
  *
13455
13746
  * @returns {Promise<{success: boolean}>}
13456
13747
  */
13457
- invalidateAll: () => ipcRenderer$5.invoke(CLIENT_CACHE_INVALIDATE_ALL),
13748
+ invalidateAll: () => ipcRenderer$6.invoke(CLIENT_CACHE_INVALIDATE_ALL),
13458
13749
 
13459
13750
  /**
13460
13751
  * Clear the response cache.
13461
13752
  *
13462
13753
  * @returns {Promise<{success: boolean}>}
13463
13754
  */
13464
- clearResponseCache: () => ipcRenderer$5.invoke(RESPONSE_CACHE_CLEAR),
13755
+ clearResponseCache: () => ipcRenderer$6.invoke(RESPONSE_CACHE_CLEAR),
13465
13756
 
13466
13757
  /**
13467
13758
  * Get response cache statistics.
13468
13759
  *
13469
13760
  * @returns {Promise<{entries: number, inflight: number, keys: string[]}>}
13470
13761
  */
13471
- responseCacheStats: () => ipcRenderer$5.invoke(RESPONSE_CACHE_STATS),
13762
+ responseCacheStats: () => ipcRenderer$6.invoke(RESPONSE_CACHE_STATS),
13472
13763
  };
13473
13764
 
13474
13765
  var clientCacheApi_1 = clientCacheApi$2;
@@ -13480,7 +13771,7 @@ var clientCacheApi_1 = clientCacheApi$2;
13480
13771
  * Exposed via contextBridge through mainApi.
13481
13772
  */
13482
13773
 
13483
- const { ipcRenderer: ipcRenderer$4 } = require$$0$1;
13774
+ const { ipcRenderer: ipcRenderer$5 } = require$$0$1;
13484
13775
  const {
13485
13776
  DASHBOARD_CONFIG_EXPORT,
13486
13777
  DASHBOARD_CONFIG_IMPORT,
@@ -13503,7 +13794,7 @@ const dashboardConfigApi$2 = {
13503
13794
  * @returns {Promise<Object>} Result with success, filePath, and config
13504
13795
  */
13505
13796
  exportDashboardConfig: (appId, workspaceId, options = {}) =>
13506
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_EXPORT, {
13797
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_EXPORT, {
13507
13798
  appId,
13508
13799
  workspaceId,
13509
13800
  options,
@@ -13518,7 +13809,7 @@ const dashboardConfigApi$2 = {
13518
13809
  * @returns {Promise<Object>} Result with success, workspace, and summary
13519
13810
  */
13520
13811
  importDashboardConfig: (appId) =>
13521
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_IMPORT, { appId }),
13812
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_IMPORT, { appId }),
13522
13813
 
13523
13814
  /**
13524
13815
  * Install a dashboard from the registry by package name.
@@ -13530,7 +13821,7 @@ const dashboardConfigApi$2 = {
13530
13821
  * @returns {Promise<Object>} Result with success, workspace, and summary
13531
13822
  */
13532
13823
  installDashboardFromRegistry: (appId, packageName) =>
13533
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_INSTALL, {
13824
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_INSTALL, {
13534
13825
  appId,
13535
13826
  packageName,
13536
13827
  }),
@@ -13543,7 +13834,7 @@ const dashboardConfigApi$2 = {
13543
13834
  * @returns {Promise<Object>} Compatibility report with per-widget status
13544
13835
  */
13545
13836
  checkDashboardCompatibility: (appId, dashboardWidgets) =>
13546
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
13837
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
13547
13838
  appId,
13548
13839
  dashboardWidgets,
13549
13840
  }),
@@ -13559,7 +13850,7 @@ const dashboardConfigApi$2 = {
13559
13850
  * @returns {Promise<Object>} Result with success, manifest, filePath
13560
13851
  */
13561
13852
  prepareDashboardForPublish: (appId, workspaceId, options = {}) =>
13562
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_PUBLISH, {
13853
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_PUBLISH, {
13563
13854
  appId,
13564
13855
  workspaceId,
13565
13856
  options,
@@ -13573,7 +13864,7 @@ const dashboardConfigApi$2 = {
13573
13864
  * @returns {Promise<Object>} Preview with metadata, widgets, wiring, compatibility
13574
13865
  */
13575
13866
  getDashboardPreview: (packageName) =>
13576
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
13867
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
13577
13868
 
13578
13869
  /**
13579
13870
  * Check installed dashboards for available updates.
@@ -13582,7 +13873,7 @@ const dashboardConfigApi$2 = {
13582
13873
  * @returns {Promise<Object>} Result with updates array
13583
13874
  */
13584
13875
  checkDashboardUpdates: (appId) =>
13585
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
13876
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
13586
13877
 
13587
13878
  /**
13588
13879
  * Get provider setup manifest for a dashboard's requirements.
@@ -13592,7 +13883,7 @@ const dashboardConfigApi$2 = {
13592
13883
  * @returns {Promise<Object>} Setup manifest with per-provider status
13593
13884
  */
13594
13885
  getProviderSetupManifest: (appId, requiredProviders) =>
13595
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
13886
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
13596
13887
  appId,
13597
13888
  requiredProviders,
13598
13889
  }),
@@ -13606,7 +13897,7 @@ const dashboardConfigApi$2 = {
13606
13897
  * @returns {Promise<Object>} Preview with dashboardName, widgetCount, widgets, componentNames
13607
13898
  */
13608
13899
  getPublishPreview: (appId, workspaceId) =>
13609
- ipcRenderer$4.invoke(DASHBOARD_CONFIG_PUBLISH_PREVIEW, {
13900
+ ipcRenderer$5.invoke(DASHBOARD_CONFIG_PUBLISH_PREVIEW, {
13610
13901
  appId,
13611
13902
  workspaceId,
13612
13903
  }),
@@ -13621,7 +13912,7 @@ var dashboardConfigApi_1 = dashboardConfigApi$2;
13621
13912
  * Exposed via contextBridge through mainApi.
13622
13913
  */
13623
13914
 
13624
- const { ipcRenderer: ipcRenderer$3 } = require$$0$1;
13915
+ const { ipcRenderer: ipcRenderer$4 } = require$$0$1;
13625
13916
  const {
13626
13917
  REGISTRY_AUTH_INITIATE_LOGIN,
13627
13918
  REGISTRY_AUTH_POLL_TOKEN,
@@ -13642,7 +13933,7 @@ const registryAuthApi$2 = {
13642
13933
  *
13643
13934
  * @returns {Promise<Object>} { deviceCode, userCode, verificationUrl, verificationUrlComplete, expiresIn, interval }
13644
13935
  */
13645
- initiateLogin: () => ipcRenderer$3.invoke(REGISTRY_AUTH_INITIATE_LOGIN),
13936
+ initiateLogin: () => ipcRenderer$4.invoke(REGISTRY_AUTH_INITIATE_LOGIN),
13646
13937
 
13647
13938
  /**
13648
13939
  * Poll for token after user completes browser auth.
@@ -13651,26 +13942,26 @@ const registryAuthApi$2 = {
13651
13942
  * @returns {Promise<Object>} { status: 'pending' | 'authorized' | 'expired', token?, userId? }
13652
13943
  */
13653
13944
  pollToken: (deviceCode) =>
13654
- ipcRenderer$3.invoke(REGISTRY_AUTH_POLL_TOKEN, { deviceCode }),
13945
+ ipcRenderer$4.invoke(REGISTRY_AUTH_POLL_TOKEN, { deviceCode }),
13655
13946
 
13656
13947
  /**
13657
13948
  * Get current auth status.
13658
13949
  *
13659
13950
  * @returns {Promise<Object>} { authenticated: boolean, userId?: string }
13660
13951
  */
13661
- getStatus: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_STATUS),
13952
+ getStatus: () => ipcRenderer$4.invoke(REGISTRY_AUTH_GET_STATUS),
13662
13953
 
13663
13954
  /**
13664
13955
  * Get the authenticated user's registry profile.
13665
13956
  *
13666
13957
  * @returns {Promise<Object|null>} User profile or null
13667
13958
  */
13668
- getProfile: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_PROFILE),
13959
+ getProfile: () => ipcRenderer$4.invoke(REGISTRY_AUTH_GET_PROFILE),
13669
13960
 
13670
13961
  /**
13671
13962
  * Logout from registry.
13672
13963
  */
13673
- logout: () => ipcRenderer$3.invoke(REGISTRY_AUTH_LOGOUT),
13964
+ logout: () => ipcRenderer$4.invoke(REGISTRY_AUTH_LOGOUT),
13674
13965
 
13675
13966
  /**
13676
13967
  * Publish a ZIP to the registry.
@@ -13680,7 +13971,7 @@ const registryAuthApi$2 = {
13680
13971
  * @returns {Promise<Object>} { success, registryUrl, packageId, version, error? }
13681
13972
  */
13682
13973
  publish: (zipPath, manifest) =>
13683
- ipcRenderer$3.invoke(REGISTRY_AUTH_PUBLISH, { zipPath, manifest }),
13974
+ ipcRenderer$4.invoke(REGISTRY_AUTH_PUBLISH, { zipPath, manifest }),
13684
13975
 
13685
13976
  /**
13686
13977
  * Update the authenticated user's profile.
@@ -13689,14 +13980,14 @@ const registryAuthApi$2 = {
13689
13980
  * @returns {Promise<Object|null>} Updated user or null
13690
13981
  */
13691
13982
  updateProfile: (updates) =>
13692
- ipcRenderer$3.invoke(REGISTRY_AUTH_UPDATE_PROFILE, updates),
13983
+ ipcRenderer$4.invoke(REGISTRY_AUTH_UPDATE_PROFILE, updates),
13693
13984
 
13694
13985
  /**
13695
13986
  * Get the authenticated user's published packages.
13696
13987
  *
13697
13988
  * @returns {Promise<Object|null>} { packages: [...] } or null
13698
13989
  */
13699
- getPackages: () => ipcRenderer$3.invoke(REGISTRY_AUTH_GET_PACKAGES),
13990
+ getPackages: () => ipcRenderer$4.invoke(REGISTRY_AUTH_GET_PACKAGES),
13700
13991
 
13701
13992
  /**
13702
13993
  * Update a published package's metadata.
@@ -13707,7 +13998,7 @@ const registryAuthApi$2 = {
13707
13998
  * @returns {Promise<Object|null>} Updated package or null
13708
13999
  */
13709
14000
  updatePackage: (scope, name, updates) =>
13710
- ipcRenderer$3.invoke(REGISTRY_AUTH_UPDATE_PACKAGE, {
14001
+ ipcRenderer$4.invoke(REGISTRY_AUTH_UPDATE_PACKAGE, {
13711
14002
  scope,
13712
14003
  name,
13713
14004
  updates,
@@ -13721,11 +14012,76 @@ const registryAuthApi$2 = {
13721
14012
  * @returns {Promise<Object|null>} Response or null
13722
14013
  */
13723
14014
  deletePackage: (scope, name) =>
13724
- ipcRenderer$3.invoke(REGISTRY_AUTH_DELETE_PACKAGE, { scope, name }),
14015
+ ipcRenderer$4.invoke(REGISTRY_AUTH_DELETE_PACKAGE, { scope, name }),
13725
14016
  };
13726
14017
 
13727
14018
  var registryAuthApi_1 = registryAuthApi$2;
13728
14019
 
14020
+ /**
14021
+ * notificationApi.js
14022
+ *
14023
+ * Preload-side IPC bindings for the notification system.
14024
+ * Exposed to the renderer via mainApi.notifications.
14025
+ */
14026
+
14027
+ const { ipcRenderer: ipcRenderer$3 } = require$$0$1;
14028
+ const {
14029
+ NOTIFICATION_SEND,
14030
+ NOTIFICATION_GET_PREFERENCES,
14031
+ NOTIFICATION_SET_PREFERENCES,
14032
+ NOTIFICATION_SET_GLOBAL,
14033
+ } = events$8;
14034
+
14035
+ const notificationApi$2 = {
14036
+ /**
14037
+ * Send a notification to the OS.
14038
+ *
14039
+ * @param {Object} payload - { widgetName, widgetId, workspaceId, type, title, body, data?, silent?, urgency? }
14040
+ * @returns {Promise<{ success: boolean, reason?: string }>}
14041
+ */
14042
+ send: (payload) => ipcRenderer$3.invoke(NOTIFICATION_SEND, payload),
14043
+
14044
+ /**
14045
+ * Get all notification preferences (global + per-instance).
14046
+ *
14047
+ * @returns {Promise<{ globalEnabled: boolean, doNotDisturb: boolean, instances: Object }>}
14048
+ */
14049
+ getPreferences: () => ipcRenderer$3.invoke(NOTIFICATION_GET_PREFERENCES),
14050
+
14051
+ /**
14052
+ * Set per-widget-instance notification preferences.
14053
+ *
14054
+ * @param {string} widgetId - widget instance UUID
14055
+ * @param {Object} prefs - { [notificationType]: boolean }
14056
+ * @returns {Promise<{ success: boolean }>}
14057
+ */
14058
+ setPreferences: (widgetId, prefs) =>
14059
+ ipcRenderer$3.invoke(NOTIFICATION_SET_PREFERENCES, { widgetId, prefs }),
14060
+
14061
+ /**
14062
+ * Set global notification settings (enabled, DND).
14063
+ *
14064
+ * @param {Object} settings - { globalEnabled?: boolean, doNotDisturb?: boolean }
14065
+ * @returns {Promise<{ success: boolean }>}
14066
+ */
14067
+ setGlobal: (settings) =>
14068
+ ipcRenderer$3.invoke(NOTIFICATION_SET_GLOBAL, settings),
14069
+
14070
+ /**
14071
+ * Listen for notification click events from the main process.
14072
+ *
14073
+ * @param {Function} callback - ({ widgetName, widgetId, workspaceId, type, data }) => void
14074
+ * @returns {Function} removeListener function
14075
+ */
14076
+ onClicked: (callback) => {
14077
+ const handler = (_event, data) => callback(data);
14078
+ ipcRenderer$3.on("notification:clicked", handler);
14079
+ return () => ipcRenderer$3.removeListener("notification:clicked", handler);
14080
+ },
14081
+ };
14082
+
14083
+ var notificationApi_1 = notificationApi$2;
14084
+
13729
14085
  /**
13730
14086
  * dashboardRatingsApi.js
13731
14087
  *
@@ -13859,6 +14215,7 @@ const dashboardConfigApi$1 = dashboardConfigApi_1;
13859
14215
  const dashboardRatingsApi = dashboardRatingsApi_1;
13860
14216
  const registryAuthApi$1 = registryAuthApi_1;
13861
14217
  const sessionApi = sessionApi_1;
14218
+ const notificationApi$1 = notificationApi_1;
13862
14219
 
13863
14220
  // Events constants
13864
14221
  const events$1 = events$8;
@@ -13934,6 +14291,7 @@ function createMainApi$1(extensions = {}) {
13934
14291
  dashboardRatings: dashboardRatingsApi,
13935
14292
  registryAuth: registryAuthApi$1,
13936
14293
  session: sessionApi,
14294
+ notifications: notificationApi$1,
13937
14295
 
13938
14296
  widgetEvent: {
13939
14297
  publish: (eventType, content) => {
@@ -13982,6 +14340,7 @@ const cliController = cliController_1;
13982
14340
  const dashboardConfigController = dashboardConfigController$1;
13983
14341
  const registryAuthController = registryAuthController$1;
13984
14342
  const registryApiController = registryApiController$1;
14343
+ const notificationController = notificationController_1;
13985
14344
 
13986
14345
  // --- Utils ---
13987
14346
  const clientCache = requireClientCache();
@@ -14011,6 +14370,7 @@ const llmApi = llmApi_1;
14011
14370
  const clientCacheApi = clientCacheApi_1;
14012
14371
  const dashboardConfigApi = dashboardConfigApi_1;
14013
14372
  const registryAuthApi = registryAuthApi_1;
14373
+ const notificationApi = notificationApi_1;
14014
14374
 
14015
14375
  // --- Events ---
14016
14376
  const events = events$8;
@@ -14048,6 +14408,7 @@ var electron = {
14048
14408
  dashboardConfigController,
14049
14409
  registryAuthController,
14050
14410
  registryApiController,
14411
+ notificationController,
14051
14412
 
14052
14413
  // Controller functions (flat) — spread for convenient destructuring
14053
14414
  ...controllers,
@@ -14072,6 +14433,7 @@ var electron = {
14072
14433
  clientCacheApi,
14073
14434
  dashboardConfigApi,
14074
14435
  registryAuthApi,
14436
+ notificationApi,
14075
14437
 
14076
14438
  // Events
14077
14439
  events,