@trops/dash-core 0.1.596 → 0.1.598

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.
@@ -917,6 +917,23 @@ var publisherKeyEvents$1 = {
917
917
  PUBLISHER_KEY_REVOKE: PUBLISHER_KEY_REVOKE$1,
918
918
  };
919
919
 
920
+ /**
921
+ * Event Constants — Onboarding Events
922
+ *
923
+ * IPC event constants for the first-run onboarding flow (Phase 3A).
924
+ * The renderer calls these via `window.mainApi.onboarding.*`; the main
925
+ * process registers handlers in the host shell against the
926
+ * onboardingController.
927
+ */
928
+
929
+ const ONBOARDING_GET_STATUS$1 = "onboarding:get-status";
930
+ const ONBOARDING_MARK_COMPLETED$1 = "onboarding:mark-completed";
931
+
932
+ var onboardingEvents$1 = {
933
+ ONBOARDING_GET_STATUS: ONBOARDING_GET_STATUS$1,
934
+ ONBOARDING_MARK_COMPLETED: ONBOARDING_MARK_COMPLETED$1,
935
+ };
936
+
920
937
  /**
921
938
  * Events
922
939
  *
@@ -947,6 +964,7 @@ const themeFromUrlEvents = themeFromUrlEvents$1;
947
964
  const webSocketEvents = requireWebSocketEvents();
948
965
  const mcpDashServerEvents = mcpDashServerEvents$1;
949
966
  const publisherKeyEvents = publisherKeyEvents$1;
967
+ const onboardingEvents = onboardingEvents$1;
950
968
 
951
969
  const publicEvents = {
952
970
  ...dataEvents,
@@ -971,6 +989,7 @@ const API_GROUPS = {
971
989
  openai: Object.values(openaiEvents),
972
990
  providers: Object.values(providerEvents),
973
991
  "publisher-key": Object.values(publisherKeyEvents),
992
+ onboarding: Object.values(onboardingEvents),
974
993
  registry: Object.values(registryEvents),
975
994
  "registry-auth": Object.values(registryAuthEvents),
976
995
  scheduler: Object.values(schedulerEvents),
@@ -1010,6 +1029,7 @@ var events$8 = {
1010
1029
  ...webSocketEvents,
1011
1030
  ...mcpDashServerEvents,
1012
1031
  ...publisherKeyEvents,
1032
+ ...onboardingEvents,
1013
1033
  };
1014
1034
 
1015
1035
  /**
@@ -3203,16 +3223,16 @@ const REGISTRY_BASE_URL$2 =
3203
3223
  "https://main.d919rwhuzp7rj.amplifyapp.com";
3204
3224
 
3205
3225
  // Lazy-load electron-store to avoid issues when not installed
3206
- let store$4 = null;
3207
- function getStore$2() {
3208
- if (!store$4) {
3226
+ let store$5 = null;
3227
+ function getStore$3() {
3228
+ if (!store$5) {
3209
3229
  const Store = require$$0$5;
3210
- store$4 = new Store({
3230
+ store$5 = new Store({
3211
3231
  name: "dash-registry-auth",
3212
3232
  encryptionKey: "dash-registry-v1",
3213
3233
  });
3214
3234
  }
3215
- return store$4;
3235
+ return store$5;
3216
3236
  }
3217
3237
 
3218
3238
  /**
@@ -3270,7 +3290,7 @@ async function pollForToken$1(deviceCode) {
3270
3290
  const data = await response.json();
3271
3291
 
3272
3292
  // Store the token securely
3273
- const s = getStore$2();
3293
+ const s = getStore$3();
3274
3294
  s.set("accessToken", data.access_token);
3275
3295
  s.set("userId", data.user_id);
3276
3296
  s.set("tokenType", data.token_type);
@@ -3293,7 +3313,7 @@ async function pollForToken$1(deviceCode) {
3293
3313
  */
3294
3314
  function getStoredToken$5() {
3295
3315
  try {
3296
- const s = getStore$2();
3316
+ const s = getStore$3();
3297
3317
  const token = s.get("accessToken");
3298
3318
  if (!token) return null;
3299
3319
 
@@ -3360,7 +3380,7 @@ async function getRegistryProfile$3() {
3360
3380
  */
3361
3381
  function clearToken$2() {
3362
3382
  try {
3363
- const s = getStore$2();
3383
+ const s = getStore$3();
3364
3384
  s.clear();
3365
3385
  console.log("[RegistryAuthController] Token cleared");
3366
3386
  } catch (err) {
@@ -6792,7 +6812,7 @@ function requireVerifyRegistryInstall () {
6792
6812
  const Store$1 = require$$0$5;
6793
6813
  const { Cron } = require$$1$3;
6794
6814
 
6795
- const store$3 = new Store$1({ name: "dash-scheduler" });
6815
+ const store$4 = new Store$1({ name: "dash-scheduler" });
6796
6816
 
6797
6817
  // --- In-memory state ---
6798
6818
  const tasks = new Map(); // taskId -> task object
@@ -6953,7 +6973,7 @@ function persistNow() {
6953
6973
  for (const [taskId, task] of tasks) {
6954
6974
  data[taskId] = { ...task };
6955
6975
  }
6956
- store$3.set("tasks", data);
6976
+ store$4.set("tasks", data);
6957
6977
  } catch (err) {
6958
6978
  console.error("[schedulerController] Error persisting tasks:", err);
6959
6979
  }
@@ -6964,7 +6984,7 @@ function persistNow() {
6964
6984
  */
6965
6985
  function loadFromStore() {
6966
6986
  try {
6967
- const data = store$3.get("tasks", {});
6987
+ const data = store$4.get("tasks", {});
6968
6988
  const now = Date.now();
6969
6989
  for (const [taskId, task] of Object.entries(data)) {
6970
6990
  // Recompute nextFireAt if it's in the past
@@ -11056,6 +11076,162 @@ const dataController$1 = {
11056
11076
 
11057
11077
  var dataController_1 = dataController$1;
11058
11078
 
11079
+ /**
11080
+ * v0ToV1 — bootstrap migration for the settings file.
11081
+ *
11082
+ * Phase 2C of the MVP launch audit shipped the migration framework
11083
+ * before any actual schema changes were needed. This migration is
11084
+ * intentionally a no-op on the user's data: it only stamps the
11085
+ * `schemaVersion` field so subsequent loads can find the chain
11086
+ * starting point.
11087
+ *
11088
+ * When the first real settings migration lands (v1 → v2), this file
11089
+ * stays as-is — the chain extends rather than replaces.
11090
+ */
11091
+
11092
+ function apply(settings) {
11093
+ const out = { ...(settings || {}) };
11094
+ return out;
11095
+ }
11096
+
11097
+ var v0ToV1$1 = {
11098
+ from: "0",
11099
+ to: "1",
11100
+ description: "Bootstrap: stamp schemaVersion on the settings file.",
11101
+ apply,
11102
+ };
11103
+
11104
+ /**
11105
+ * Migration registry — declarative list of every schema migration
11106
+ * the app knows how to apply. Add new migrations at the END of the
11107
+ * array and bump `CURRENT_SCHEMA_VERSION` at the same time.
11108
+ *
11109
+ * Format per entry:
11110
+ * { from: "<string>", to: "<string>",
11111
+ * description: "<one-line>", apply: (data) => migratedData }
11112
+ *
11113
+ * The chain runner walks this list in order, applying any entry
11114
+ * whose `from` matches the data's current version, then advancing.
11115
+ * Gaps in the chain throw — see `index.js` for the exact behavior.
11116
+ */
11117
+
11118
+ const v0ToV1 = v0ToV1$1;
11119
+
11120
+ const SETTINGS_MIGRATIONS$1 = [v0ToV1];
11121
+
11122
+ /**
11123
+ * The version every fresh settings write stamps. Bumped each time a
11124
+ * new migration lands. Always equal to the `to` of the last entry
11125
+ * above.
11126
+ */
11127
+ const CURRENT_SCHEMA_VERSION$4 = "1";
11128
+
11129
+ var registry$1 = {
11130
+ SETTINGS_MIGRATIONS: SETTINGS_MIGRATIONS$1,
11131
+ CURRENT_SCHEMA_VERSION: CURRENT_SCHEMA_VERSION$4,
11132
+ };
11133
+
11134
+ /**
11135
+ * Schema migration framework (Phase 2C of the MVP launch audit).
11136
+ *
11137
+ * The runner walks a registry of `{ from, to, apply }` migrations in
11138
+ * order, applying every entry whose `from` matches the data's
11139
+ * current `schemaVersion`. After each step, the version stamp on
11140
+ * the data is bumped to the `to` of the just-applied migration so
11141
+ * the next step can chain off it.
11142
+ *
11143
+ * Why so simple:
11144
+ * - We have one settings file with linear version history.
11145
+ * - "v0" means "the file exists but has no schemaVersion field"
11146
+ * (i.e., a legacy install).
11147
+ * - Future migrations register a new entry at the end of the
11148
+ * SETTINGS_MIGRATIONS array; `CURRENT_SCHEMA_VERSION` is the
11149
+ * `to` of the last entry.
11150
+ *
11151
+ * Loud failures:
11152
+ * - Registered duplicate `from` → throws at module load via the
11153
+ * chain validation in `runMigrations`.
11154
+ * - Data is at a version the registry can't reach
11155
+ * (e.g., downgrade scenario) → throws with an actionable message.
11156
+ * - A migration's apply() throws → propagates; callers should
11157
+ * refuse to start with stale data rather than corrupt it.
11158
+ *
11159
+ * On-disk contract:
11160
+ * - `data.schemaVersion` is a string (e.g., "1"). Missing means
11161
+ * "version 0" (legacy un-stamped file).
11162
+ * - Migrations MUST NOT mutate the input — return a new object.
11163
+ * - The runner stamps `schemaVersion` after each step.
11164
+ */
11165
+
11166
+ const { SETTINGS_MIGRATIONS, CURRENT_SCHEMA_VERSION: CURRENT_SCHEMA_VERSION$3 } = registry$1;
11167
+
11168
+ function readVersion(data) {
11169
+ if (!data || typeof data !== "object") return "0";
11170
+ const v = data.schemaVersion;
11171
+ return typeof v === "string" && v.length > 0 ? v : "0";
11172
+ }
11173
+
11174
+ /**
11175
+ * Run a migration chain.
11176
+ *
11177
+ * @param {Object} data - The data to migrate (e.g., parsed settings JSON).
11178
+ * @param {Array} migrations - Ordered registry, e.g. SETTINGS_MIGRATIONS.
11179
+ * @param {String} targetVersion - The desired terminal version (e.g.,
11180
+ * CURRENT_SCHEMA_VERSION). Migration stops when reached.
11181
+ * @returns {{ data: Object, migrated: Boolean, appliedSteps: Array<{from, to}> }}
11182
+ * `migrated: true` iff at least one step ran. Callers persist back to
11183
+ * disk only when this is true (avoids unnecessary writes).
11184
+ */
11185
+ function runMigrations(data, migrations, targetVersion) {
11186
+ const safeData = data && typeof data === "object" ? data : {};
11187
+ let current = readVersion(safeData);
11188
+ let working = { ...safeData };
11189
+ const applied = [];
11190
+
11191
+ while (current !== targetVersion) {
11192
+ const step = migrations.find((m) => m.from === current);
11193
+ if (!step) {
11194
+ throw new Error(
11195
+ `Cannot migrate from schemaVersion "${current}" to "${targetVersion}" — ` +
11196
+ `no registered migration starts at "${current}". ` +
11197
+ `This may be a downgraded install or a forgotten migration entry.`,
11198
+ );
11199
+ }
11200
+ const next = step.apply(working);
11201
+ if (!next || typeof next !== "object") {
11202
+ throw new Error(
11203
+ `Migration ${step.from} → ${step.to} returned a non-object.`,
11204
+ );
11205
+ }
11206
+ working = { ...next, schemaVersion: step.to };
11207
+ applied.push({ from: step.from, to: step.to });
11208
+ current = step.to;
11209
+ }
11210
+
11211
+ return {
11212
+ data: working,
11213
+ migrated: applied.length > 0,
11214
+ appliedSteps: applied,
11215
+ };
11216
+ }
11217
+
11218
+ /**
11219
+ * Convenience wrapper for the settings registry — the most common
11220
+ * caller. Equivalent to:
11221
+ * runMigrations(data, SETTINGS_MIGRATIONS, CURRENT_SCHEMA_VERSION)
11222
+ */
11223
+ function migrateSettings$1(data) {
11224
+ return runMigrations(data, SETTINGS_MIGRATIONS, CURRENT_SCHEMA_VERSION$3);
11225
+ }
11226
+
11227
+ var migrations = {
11228
+ runMigrations,
11229
+ migrateSettings: migrateSettings$1,
11230
+ readVersion,
11231
+ CURRENT_SCHEMA_VERSION: CURRENT_SCHEMA_VERSION$3,
11232
+ SETTINGS_MIGRATIONS,
11233
+ };
11234
+
11059
11235
  /**
11060
11236
  * settingsController
11061
11237
  */
@@ -11064,6 +11240,7 @@ const { app: app$9 } = require$$0$2;
11064
11240
  const path$c = require$$1$2;
11065
11241
  const fs$9 = require$$0$3;
11066
11242
  const { getFileContents: getFileContents$4, writeToFile: writeToFile$1 } = file;
11243
+ const { migrateSettings, CURRENT_SCHEMA_VERSION: CURRENT_SCHEMA_VERSION$2 } = migrations;
11067
11244
 
11068
11245
  const configFilename$3 = "settings.json";
11069
11246
  const appName$4 = "Dashboard";
@@ -11110,12 +11287,20 @@ const settingsController$4 = {
11110
11287
  appName$4,
11111
11288
  configFilename$3,
11112
11289
  );
11113
- writeToFile$1(filename, JSON.stringify(data, null, 2));
11290
+ // Always stamp the current schema version on every save so the
11291
+ // file on disk advances forward with the framework. Without this
11292
+ // a save right after a migration would overwrite the version
11293
+ // stamp and re-trigger the migration on the next load.
11294
+ const stamped = {
11295
+ ...data,
11296
+ schemaVersion: CURRENT_SCHEMA_VERSION$2,
11297
+ };
11298
+ writeToFile$1(filename, JSON.stringify(stamped, null, 2));
11114
11299
  console.log("[settingsController] Settings saved successfully");
11115
11300
  // Return the data for ipcMain.handle() - modern promise-based approach
11116
11301
  return {
11117
11302
  success: true,
11118
- settings: data,
11303
+ settings: stamped,
11119
11304
  };
11120
11305
  } else {
11121
11306
  return {
@@ -11148,11 +11333,28 @@ const settingsController$4 = {
11148
11333
  );
11149
11334
  // make sure the file exists...
11150
11335
  const fileContents = getFileContents$4(filename, {});
11336
+ // Run the migration chain. Legacy files (no schemaVersion) are
11337
+ // detected as v0 and stamped forward. If a migration ran, persist
11338
+ // the new shape back to disk so subsequent loads start at the
11339
+ // current version. Persistence failure is logged but non-fatal —
11340
+ // the in-memory shape is still correct for the caller.
11341
+ const { data: migrated, migrated: didMigrate } =
11342
+ migrateSettings(fileContents);
11343
+ if (didMigrate) {
11344
+ try {
11345
+ writeToFile$1(filename, JSON.stringify(migrated, null, 2));
11346
+ } catch (writeErr) {
11347
+ console.warn(
11348
+ "[settingsController] Migrated settings could not be persisted:",
11349
+ writeErr && writeErr.message,
11350
+ );
11351
+ }
11352
+ }
11151
11353
  console.log("[settingsController] Settings loaded successfully");
11152
11354
  // Return the data for ipcMain.handle() - modern promise-based approach
11153
11355
  return {
11154
11356
  success: true,
11155
- settings: fileContents,
11357
+ settings: migrated,
11156
11358
  };
11157
11359
  } catch (e) {
11158
11360
  console.error("[settingsController] Error loading settings:", e);
@@ -60263,11 +60465,11 @@ const REGISTRY_BASE_URL$1 =
60263
60465
 
60264
60466
  // Lazy-load electron-store so jest can mock it without booting the
60265
60467
  // app shell.
60266
- let store$2 = null;
60267
- function getStore$1() {
60268
- if (!store$2) {
60468
+ let store$3 = null;
60469
+ function getStore$2() {
60470
+ if (!store$3) {
60269
60471
  const Store = require$$0$5;
60270
- store$2 = new Store({
60472
+ store$3 = new Store({
60271
60473
  name: "dash-publisher-key",
60272
60474
  // encryptionKey is a defense-in-depth layer on the JSON file
60273
60475
  // itself — the private key inside is independently encrypted
@@ -60275,7 +60477,7 @@ function getStore$1() {
60275
60477
  encryptionKey: "dash-publisher-v1",
60276
60478
  });
60277
60479
  }
60278
- return store$2;
60480
+ return store$3;
60279
60481
  }
60280
60482
 
60281
60483
  // Serialize concurrent getOrCreate calls. Without this, two publishes
@@ -60284,15 +60486,15 @@ function getStore$1() {
60284
60486
  let inflightGetOrCreate = null;
60285
60487
 
60286
60488
  function readStored() {
60287
- return getStore$1().get("publisherKey") || null;
60489
+ return getStore$2().get("publisherKey") || null;
60288
60490
  }
60289
60491
 
60290
60492
  function writeStored(record) {
60291
- getStore$1().set("publisherKey", record);
60493
+ getStore$2().set("publisherKey", record);
60292
60494
  }
60293
60495
 
60294
60496
  function clearStored() {
60295
- getStore$1().delete("publisherKey");
60497
+ getStore$2().delete("publisherKey");
60296
60498
  }
60297
60499
 
60298
60500
  function buildMachineLabel() {
@@ -63710,6 +63912,109 @@ var dashboardConfigController$1 = {
63710
63912
  getDashboardPublishPreview: getDashboardPublishPreview$1,
63711
63913
  };
63712
63914
 
63915
+ /**
63916
+ * onboardingController.js
63917
+ *
63918
+ * First-run onboarding state (Phase 3A of the MVP launch audit).
63919
+ *
63920
+ * Owns a tiny `electron-store` JSON that pins whether the user has
63921
+ * already completed (or dismissed) the first-run flow. Persistence
63922
+ * lives in the main process so:
63923
+ * - it survives renderer reloads + Electron auto-update
63924
+ * - a compromised iframe can't reach it (no localStorage)
63925
+ * - the renderer reads it via read-only IPC, never via direct fs
63926
+ *
63927
+ * Storage layout (`dash-onboarding.json` in userData):
63928
+ * {
63929
+ * "onboarding": {
63930
+ * "completed": true,
63931
+ * "completedAt": "<ISO8601>",
63932
+ * "source": "kitchen-sink" | "dismissed"
63933
+ * }
63934
+ * }
63935
+ *
63936
+ * `source` is a freeform breadcrumb so future onboarding variants can
63937
+ * report which path the user took without needing a schema change.
63938
+ *
63939
+ * The controller exposes a get/mark pair; the modal-vs-not-modal
63940
+ * decision lives in the renderer (it also needs workspace + installed-
63941
+ * package counts) so this stays a flat state owner.
63942
+ */
63943
+
63944
+ // Lazy-load electron-store so the test suite can mock it without
63945
+ // booting an Electron shell. Same pattern as publisherKeyController.
63946
+ let store$2 = null;
63947
+ function getStore$1() {
63948
+ if (!store$2) {
63949
+ const Store = require$$0$5;
63950
+ store$2 = new Store({ name: "dash-onboarding" });
63951
+ }
63952
+ return store$2;
63953
+ }
63954
+
63955
+ function readRecord() {
63956
+ return getStore$1().get("onboarding") || null;
63957
+ }
63958
+
63959
+ function writeRecord(record) {
63960
+ getStore$1().set("onboarding", record);
63961
+ }
63962
+
63963
+ /**
63964
+ * Renderer-safe snapshot of the onboarding state.
63965
+ *
63966
+ * `completed:false` is returned for both "never seen" and "explicitly
63967
+ * not done" so the renderer never has to disambiguate. The first-run
63968
+ * detector treats both the same way.
63969
+ */
63970
+ function getOnboardingStatus$1() {
63971
+ const record = readRecord();
63972
+ if (!record || !record.completed) {
63973
+ return { completed: false, completedAt: null, source: null };
63974
+ }
63975
+ return {
63976
+ completed: true,
63977
+ completedAt: record.completedAt || null,
63978
+ source: record.source || null,
63979
+ };
63980
+ }
63981
+
63982
+ /**
63983
+ * Pin onboarding as completed. Idempotent — re-calling on a record
63984
+ * that's already completed keeps the original completedAt so the
63985
+ * audit trail stays accurate.
63986
+ *
63987
+ * @param {Object} [opts]
63988
+ * @param {string} [opts.source] - Breadcrumb identifying which path
63989
+ * completed the flow (e.g. "kitchen-sink", "dismissed").
63990
+ * @returns {{ completed: true, completedAt: string, source: string|null }}
63991
+ */
63992
+ function markOnboardingCompleted$1(opts = {}) {
63993
+ const existing = readRecord();
63994
+ if (existing && existing.completed && existing.completedAt) {
63995
+ return {
63996
+ completed: true,
63997
+ completedAt: existing.completedAt,
63998
+ source: existing.source || null,
63999
+ };
64000
+ }
64001
+ const record = {
64002
+ completed: true,
64003
+ completedAt: new Date().toISOString(),
64004
+ source: typeof opts.source === "string" ? opts.source : null,
64005
+ };
64006
+ writeRecord(record);
64007
+ return record;
64008
+ }
64009
+
64010
+ var onboardingController$1 = {
64011
+ getOnboardingStatus: getOnboardingStatus$1,
64012
+ markOnboardingCompleted: markOnboardingCompleted$1,
64013
+ // exposed for tests
64014
+ _readRecord: readRecord,
64015
+ _clearRecord: () => getStore$1().delete("onboarding"),
64016
+ };
64017
+
63713
64018
  /**
63714
64019
  * notificationController.js
63715
64020
  *
@@ -66535,6 +66840,10 @@ const {
66535
66840
  revokeLocalKey,
66536
66841
  describeLocalKey,
66537
66842
  } = publisherKeyController$1;
66843
+ const {
66844
+ getOnboardingStatus,
66845
+ markOnboardingCompleted,
66846
+ } = onboardingController$1;
66538
66847
  const {
66539
66848
  getRecentDashboards,
66540
66849
  addRecentDashboard,
@@ -66640,6 +66949,8 @@ var controller = {
66640
66949
  signZipBuffer,
66641
66950
  revokeLocalKey,
66642
66951
  describeLocalKey,
66952
+ getOnboardingStatus,
66953
+ markOnboardingCompleted,
66643
66954
  getRecentDashboards,
66644
66955
  addRecentDashboard,
66645
66956
  clearRecentDashboards,
@@ -66661,7 +66972,7 @@ var controller = {
66661
66972
  mcpDashServerController: mcpDashServerController$2,
66662
66973
  };
66663
66974
 
66664
- const { ipcRenderer: ipcRenderer$p } = require$$0$2;
66975
+ const { ipcRenderer: ipcRenderer$q } = require$$0$2;
66665
66976
  const { SECURE_STORE_ENCRYPTION_CHECK } = events$8;
66666
66977
  /**
66667
66978
  * secureStoreApi
@@ -66683,7 +66994,7 @@ const { SECURE_STORE_ENCRYPTION_CHECK } = events$8;
66683
66994
  */
66684
66995
  const secureStoreApi$2 = {
66685
66996
  isEncryptionAvailable: () =>
66686
- ipcRenderer$p.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
66997
+ ipcRenderer$q.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
66687
66998
  };
66688
66999
 
66689
67000
  var secureStoreApi_1 = secureStoreApi$2;
@@ -66694,7 +67005,7 @@ var secureStoreApi_1 = secureStoreApi$2;
66694
67005
  * Handle the workspace configuration file
66695
67006
  */
66696
67007
 
66697
- const { ipcRenderer: ipcRenderer$o } = require$$0$2;
67008
+ const { ipcRenderer: ipcRenderer$p } = require$$0$2;
66698
67009
  const {
66699
67010
  WORKSPACE_LIST,
66700
67011
  WORKSPACE_SAVE,
@@ -66711,7 +67022,7 @@ const workspaceApi$2 = {
66711
67022
  */
66712
67023
  listWorkspacesForApplication: (appId) => {
66713
67024
  console.log("listWorkspacesForApplication called with appId:", appId);
66714
- return ipcRenderer$o.invoke(WORKSPACE_LIST, { appId });
67025
+ return ipcRenderer$p.invoke(WORKSPACE_LIST, { appId });
66715
67026
  },
66716
67027
 
66717
67028
  /**
@@ -66722,7 +67033,7 @@ const workspaceApi$2 = {
66722
67033
  * @returns
66723
67034
  */
66724
67035
  saveWorkspaceForApplication: (appId, data) =>
66725
- ipcRenderer$o.invoke(WORKSPACE_SAVE, { appId, data }),
67036
+ ipcRenderer$p.invoke(WORKSPACE_SAVE, { appId, data }),
66726
67037
 
66727
67038
  /**
66728
67039
  * deleteWorkspaceForApplication
@@ -66732,7 +67043,7 @@ const workspaceApi$2 = {
66732
67043
  * @returns
66733
67044
  */
66734
67045
  deleteWorkspaceForApplication: (appId, workspaceId) =>
66735
- ipcRenderer$o.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
67046
+ ipcRenderer$p.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
66736
67047
  };
66737
67048
 
66738
67049
  var workspaceApi_1 = workspaceApi$2;
@@ -66744,13 +67055,13 @@ var workspaceApi_1 = workspaceApi$2;
66744
67055
  */
66745
67056
 
66746
67057
  // ipcRenderer that must be used to invoke the events
66747
- const { ipcRenderer: ipcRenderer$n } = require$$0$2;
67058
+ const { ipcRenderer: ipcRenderer$o } = require$$0$2;
66748
67059
 
66749
67060
  const { LAYOUT_LIST } = events$8;
66750
67061
 
66751
67062
  const layoutApi$2 = {
66752
67063
  listLayoutsForApplication: (appId) =>
66753
- ipcRenderer$n.invoke(LAYOUT_LIST, { appId }),
67064
+ ipcRenderer$o.invoke(LAYOUT_LIST, { appId }),
66754
67065
  };
66755
67066
 
66756
67067
  var layoutApi_1 = layoutApi$2;
@@ -66762,7 +67073,7 @@ var layoutApi_1 = layoutApi$2;
66762
67073
  */
66763
67074
 
66764
67075
  // ipcRenderer that must be used to invoke the events
66765
- const { ipcRenderer: ipcRenderer$m } = require$$0$2;
67076
+ const { ipcRenderer: ipcRenderer$n } = require$$0$2;
66766
67077
 
66767
67078
  const {
66768
67079
  DATA_JSON_TO_CSV_FILE,
@@ -66780,7 +67091,7 @@ const {
66780
67091
  const dataApi$2 = {
66781
67092
  // convert a json array of objects to a csv string and save to file
66782
67093
  convertJsonToCsvFile: (appId, jsonObject, filename) =>
66783
- ipcRenderer$m.invoke(DATA_JSON_TO_CSV_FILE, {
67094
+ ipcRenderer$n.invoke(DATA_JSON_TO_CSV_FILE, {
66784
67095
  appId,
66785
67096
  jsonObject,
66786
67097
  filename,
@@ -66788,10 +67099,10 @@ const dataApi$2 = {
66788
67099
 
66789
67100
  // convert a json array of objects to a csv string and return a string
66790
67101
  convertJsonToCsvString: (appId, jsonObject) =>
66791
- ipcRenderer$m.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
67102
+ ipcRenderer$n.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
66792
67103
 
66793
67104
  parseXMLStream: (filepath, outpath, start) =>
66794
- ipcRenderer$m.invoke(PARSE_XML_STREAM, {
67105
+ ipcRenderer$n.invoke(PARSE_XML_STREAM, {
66795
67106
  filepath,
66796
67107
  outpath,
66797
67108
  start,
@@ -66805,7 +67116,7 @@ const dataApi$2 = {
66805
67116
  headers = null,
66806
67117
  limit = null,
66807
67118
  ) => {
66808
- ipcRenderer$m.invoke(PARSE_CSV_STREAM, {
67119
+ ipcRenderer$n.invoke(PARSE_CSV_STREAM, {
66809
67120
  filepath,
66810
67121
  outpath,
66811
67122
  delimiter,
@@ -66816,15 +67127,15 @@ const dataApi$2 = {
66816
67127
  },
66817
67128
 
66818
67129
  readLinesFromFile: (filepath, lineCount) => {
66819
- ipcRenderer$m.invoke(READ_LINES, { filepath, lineCount });
67130
+ ipcRenderer$n.invoke(READ_LINES, { filepath, lineCount });
66820
67131
  },
66821
67132
 
66822
67133
  readJSONFromFile: (filepath, objectCount = null) => {
66823
- ipcRenderer$m.invoke(READ_JSON, { filepath, objectCount });
67134
+ ipcRenderer$n.invoke(READ_JSON, { filepath, objectCount });
66824
67135
  },
66825
67136
 
66826
67137
  readDataFromURL: (url, toFilepath, widgetId = null, token = null) => {
66827
- ipcRenderer$m.invoke(READ_DATA_URL, { url, toFilepath, widgetId, token });
67138
+ ipcRenderer$n.invoke(READ_DATA_URL, { url, toFilepath, widgetId, token });
66828
67139
  },
66829
67140
 
66830
67141
  /*
@@ -66840,7 +67151,7 @@ const dataApi$2 = {
66840
67151
  widgetId = null,
66841
67152
  token = null,
66842
67153
  ) =>
66843
- ipcRenderer$m.invoke(DATA_SAVE_TO_FILE, {
67154
+ ipcRenderer$n.invoke(DATA_SAVE_TO_FILE, {
66844
67155
  data,
66845
67156
  filename,
66846
67157
  append,
@@ -66859,7 +67170,7 @@ const dataApi$2 = {
66859
67170
  * gates the gate itself).
66860
67171
  */
66861
67172
  readData: (filename, returnEmpty = [], widgetId = null, token = null) =>
66862
- ipcRenderer$m.invoke(DATA_READ_FROM_FILE, {
67173
+ ipcRenderer$n.invoke(DATA_READ_FROM_FILE, {
66863
67174
  filename,
66864
67175
  returnEmpty,
66865
67176
  widgetId,
@@ -66871,7 +67182,7 @@ const dataApi$2 = {
66871
67182
  * @returns
66872
67183
  */
66873
67184
  transformFile: (filepath, outFilepath, mappingFunctionBody, args) => {
66874
- ipcRenderer$m.invoke(TRANSFORM_FILE, {
67185
+ ipcRenderer$n.invoke(TRANSFORM_FILE, {
66875
67186
  filepath,
66876
67187
  outFilepath,
66877
67188
  mappingFunctionBody,
@@ -66889,7 +67200,7 @@ var dataApi_1 = dataApi$2;
66889
67200
  */
66890
67201
 
66891
67202
  // ipcRenderer that must be used to invoke the events
66892
- const { ipcRenderer: ipcRenderer$l } = require$$0$2;
67203
+ const { ipcRenderer: ipcRenderer$m } = require$$0$2;
66893
67204
 
66894
67205
  const {
66895
67206
  SETTINGS_GET,
@@ -66900,14 +67211,14 @@ const {
66900
67211
  } = events$8;
66901
67212
 
66902
67213
  const settingsApi$2 = {
66903
- getSettingsForApplication: () => ipcRenderer$l.invoke(SETTINGS_GET, {}),
67214
+ getSettingsForApplication: () => ipcRenderer$m.invoke(SETTINGS_GET, {}),
66904
67215
  saveSettingsForApplication: (data) =>
66905
- ipcRenderer$l.invoke(SETTINGS_SAVE, { data }),
66906
- getDataDirectory: () => ipcRenderer$l.invoke(SETTINGS_GET_DATA_DIR, {}),
67216
+ ipcRenderer$m.invoke(SETTINGS_SAVE, { data }),
67217
+ getDataDirectory: () => ipcRenderer$m.invoke(SETTINGS_GET_DATA_DIR, {}),
66907
67218
  setDataDirectory: (dataDirectory) =>
66908
- ipcRenderer$l.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
67219
+ ipcRenderer$m.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
66909
67220
  migrateDataDirectory: (oldDirectory, newDirectory) =>
66910
- ipcRenderer$l.invoke(SETTINGS_MIGRATE_DATA_DIR, {
67221
+ ipcRenderer$m.invoke(SETTINGS_MIGRATE_DATA_DIR, {
66911
67222
  oldDirectory,
66912
67223
  newDirectory,
66913
67224
  }),
@@ -66922,7 +67233,7 @@ var settingsApi_1 = settingsApi$2;
66922
67233
  * Provides file/folder chooser dialogs.
66923
67234
  */
66924
67235
 
66925
- const { ipcRenderer: ipcRenderer$k } = require$$0$2;
67236
+ const { ipcRenderer: ipcRenderer$l } = require$$0$2;
66926
67237
 
66927
67238
  const { CHOOSE_FILE } = events$8;
66928
67239
 
@@ -66935,7 +67246,7 @@ const dialogApi$2 = {
66935
67246
  * @returns {Promise<string|null>} selected file/folder path, or null if cancelled
66936
67247
  */
66937
67248
  chooseFile: (allowFile = true, extensions = ["*"]) => {
66938
- return ipcRenderer$k.invoke(CHOOSE_FILE, { allowFile, extensions });
67249
+ return ipcRenderer$l.invoke(CHOOSE_FILE, { allowFile, extensions });
66939
67250
  },
66940
67251
 
66941
67252
  /**
@@ -66960,7 +67271,7 @@ const dialogApi$2 = {
66960
67271
  typeof options.allowFile === "boolean" ? options.allowFile : allowFile;
66961
67272
  const resolvedExtensions = options.extensions || extensions;
66962
67273
 
66963
- const filePath = await ipcRenderer$k.invoke(CHOOSE_FILE, {
67274
+ const filePath = await ipcRenderer$l.invoke(CHOOSE_FILE, {
66964
67275
  allowFile: resolvedAllowFile,
66965
67276
  extensions: resolvedExtensions,
66966
67277
  });
@@ -66987,7 +67298,7 @@ var dialogApi_1 = dialogApi$2;
66987
67298
  * mainApi.widgets.uninstall('Weather')
66988
67299
  */
66989
67300
 
66990
- const { ipcRenderer: ipcRenderer$j } = require$$0$2;
67301
+ const { ipcRenderer: ipcRenderer$k } = require$$0$2;
66991
67302
 
66992
67303
  const widgetApi$2 = {
66993
67304
  /**
@@ -66996,7 +67307,7 @@ const widgetApi$2 = {
66996
67307
  */
66997
67308
  list: async () => {
66998
67309
  try {
66999
- return await ipcRenderer$j.invoke("widget:list");
67310
+ return await ipcRenderer$k.invoke("widget:list");
67000
67311
  } catch (error) {
67001
67312
  console.error("[WidgetApi] Error listing widgets:", error);
67002
67313
  throw error;
@@ -67010,7 +67321,7 @@ const widgetApi$2 = {
67010
67321
  */
67011
67322
  get: async (widgetName) => {
67012
67323
  try {
67013
- return await ipcRenderer$j.invoke("widget:get", widgetName);
67324
+ return await ipcRenderer$k.invoke("widget:get", widgetName);
67014
67325
  } catch (error) {
67015
67326
  console.error(`[WidgetApi] Error getting widget ${widgetName}:`, error);
67016
67327
  throw error;
@@ -67041,7 +67352,7 @@ const widgetApi$2 = {
67041
67352
  console.log(
67042
67353
  `[WidgetApi] Installing widget: ${widgetName} from ${downloadUrl}`,
67043
67354
  );
67044
- const config = await ipcRenderer$j.invoke(
67355
+ const config = await ipcRenderer$k.invoke(
67045
67356
  "widget:install",
67046
67357
  widgetName,
67047
67358
  downloadUrl,
@@ -67081,7 +67392,7 @@ const widgetApi$2 = {
67081
67392
  console.log(
67082
67393
  `[WidgetApi] Installing local widget: ${widgetName} from ${localPath}`,
67083
67394
  );
67084
- const config = await ipcRenderer$j.invoke(
67395
+ const config = await ipcRenderer$k.invoke(
67085
67396
  "widget:install-local",
67086
67397
  widgetName,
67087
67398
  localPath,
@@ -67112,7 +67423,7 @@ const widgetApi$2 = {
67112
67423
  loadFolder: async (folderPath) => {
67113
67424
  try {
67114
67425
  console.log(`[WidgetApi] Loading widgets from folder: ${folderPath}`);
67115
- const results = await ipcRenderer$j.invoke(
67426
+ const results = await ipcRenderer$k.invoke(
67116
67427
  "widget:load-folder",
67117
67428
  folderPath,
67118
67429
  );
@@ -67136,7 +67447,7 @@ const widgetApi$2 = {
67136
67447
  uninstall: async (widgetName) => {
67137
67448
  try {
67138
67449
  console.log(`[WidgetApi] Uninstalling widget: ${widgetName}`);
67139
- const success = await ipcRenderer$j.invoke("widget:uninstall", widgetName);
67450
+ const success = await ipcRenderer$k.invoke("widget:uninstall", widgetName);
67140
67451
  if (success) {
67141
67452
  console.log(`[WidgetApi] ✓ Widget ${widgetName} uninstalled`);
67142
67453
  } else {
@@ -67159,7 +67470,7 @@ const widgetApi$2 = {
67159
67470
  */
67160
67471
  getCachePath: async () => {
67161
67472
  try {
67162
- return await ipcRenderer$j.invoke("widget:cache-path");
67473
+ return await ipcRenderer$k.invoke("widget:cache-path");
67163
67474
  } catch (error) {
67164
67475
  console.error("[WidgetApi] Error getting cache path:", error);
67165
67476
  throw error;
@@ -67173,7 +67484,7 @@ const widgetApi$2 = {
67173
67484
  */
67174
67485
  getStoragePath: async () => {
67175
67486
  try {
67176
- return await ipcRenderer$j.invoke("widget:storage-path");
67487
+ return await ipcRenderer$k.invoke("widget:storage-path");
67177
67488
  } catch (error) {
67178
67489
  console.error("[WidgetApi] Error getting storage path:", error);
67179
67490
  throw error;
@@ -67190,7 +67501,7 @@ const widgetApi$2 = {
67190
67501
  setStoragePath: async (customPath) => {
67191
67502
  try {
67192
67503
  console.log(`[WidgetApi] Setting storage path to: ${customPath}`);
67193
- const result = await ipcRenderer$j.invoke(
67504
+ const result = await ipcRenderer$k.invoke(
67194
67505
  "widget:set-storage-path",
67195
67506
  customPath,
67196
67507
  );
@@ -67212,7 +67523,7 @@ const widgetApi$2 = {
67212
67523
  */
67213
67524
  getComponentConfigs: async () => {
67214
67525
  try {
67215
- return await ipcRenderer$j.invoke("widget:get-component-configs");
67526
+ return await ipcRenderer$k.invoke("widget:get-component-configs");
67216
67527
  } catch (error) {
67217
67528
  console.error("[WidgetApi] Error getting component configs:", error);
67218
67529
  return [];
@@ -67227,7 +67538,7 @@ const widgetApi$2 = {
67227
67538
  */
67228
67539
  readBundle: async (widgetName) => {
67229
67540
  try {
67230
- return await ipcRenderer$j.invoke("widget:read-bundle", widgetName);
67541
+ return await ipcRenderer$k.invoke("widget:read-bundle", widgetName);
67231
67542
  } catch (error) {
67232
67543
  console.error(
67233
67544
  `[WidgetApi] Error reading bundle for ${widgetName}:`,
@@ -67246,7 +67557,7 @@ const widgetApi$2 = {
67246
67557
  */
67247
67558
  readSources: async (widgetName, componentName) => {
67248
67559
  try {
67249
- return await ipcRenderer$j.invoke("widget:read-sources", {
67560
+ return await ipcRenderer$k.invoke("widget:read-sources", {
67250
67561
  widgetName,
67251
67562
  componentName,
67252
67563
  });
@@ -67266,7 +67577,7 @@ const widgetApi$2 = {
67266
67577
  */
67267
67578
  readAllBundles: async () => {
67268
67579
  try {
67269
- return await ipcRenderer$j.invoke("widget:read-all-bundles");
67580
+ return await ipcRenderer$k.invoke("widget:read-all-bundles");
67270
67581
  } catch (error) {
67271
67582
  console.error("[WidgetApi] Error reading all bundles:", error);
67272
67583
  return [];
@@ -67286,7 +67597,7 @@ const widgetApi$2 = {
67286
67597
  * });
67287
67598
  */
67288
67599
  onInstalled: (callback) => {
67289
- ipcRenderer$j.on("widget:installed", (event, data) => {
67600
+ ipcRenderer$k.on("widget:installed", (event, data) => {
67290
67601
  callback(data);
67291
67602
  });
67292
67603
  },
@@ -67303,7 +67614,7 @@ const widgetApi$2 = {
67303
67614
  * });
67304
67615
  */
67305
67616
  onUninstalled: (callback) => {
67306
- ipcRenderer$j.on("widget:uninstalled", (event, data) => {
67617
+ ipcRenderer$k.on("widget:uninstalled", (event, data) => {
67307
67618
  callback(data);
67308
67619
  });
67309
67620
  },
@@ -67321,7 +67632,7 @@ const widgetApi$2 = {
67321
67632
  * });
67322
67633
  */
67323
67634
  onLoaded: (callback) => {
67324
- ipcRenderer$j.on("widgets:loaded", (event, data) => {
67635
+ ipcRenderer$k.on("widgets:loaded", (event, data) => {
67325
67636
  callback(data);
67326
67637
  });
67327
67638
  },
@@ -67332,7 +67643,7 @@ const widgetApi$2 = {
67332
67643
  * @param {Function} callback - The callback to remove
67333
67644
  */
67334
67645
  removeInstalledListener: (callback) => {
67335
- ipcRenderer$j.removeListener("widget:installed", callback);
67646
+ ipcRenderer$k.removeListener("widget:installed", callback);
67336
67647
  },
67337
67648
 
67338
67649
  /**
@@ -67341,7 +67652,7 @@ const widgetApi$2 = {
67341
67652
  * @param {Function} callback - The callback to remove
67342
67653
  */
67343
67654
  removeUninstalledListener: (callback) => {
67344
- ipcRenderer$j.removeListener("widget:uninstalled", callback);
67655
+ ipcRenderer$k.removeListener("widget:uninstalled", callback);
67345
67656
  },
67346
67657
 
67347
67658
  /**
@@ -67350,7 +67661,7 @@ const widgetApi$2 = {
67350
67661
  * @param {Function} callback - The callback to remove
67351
67662
  */
67352
67663
  removeLoadedListener: (callback) => {
67353
- ipcRenderer$j.removeListener("widgets:loaded", callback);
67664
+ ipcRenderer$k.removeListener("widgets:loaded", callback);
67354
67665
  },
67355
67666
  };
67356
67667
 
@@ -67363,7 +67674,7 @@ var widgetApi_1 = widgetApi$2;
67363
67674
  * Communicates with main process via IPC to handle encryption and file storage
67364
67675
  */
67365
67676
 
67366
- const { ipcRenderer: ipcRenderer$i } = require$$0$2;
67677
+ const { ipcRenderer: ipcRenderer$j } = require$$0$2;
67367
67678
  const {
67368
67679
  PROVIDER_SAVE,
67369
67680
  PROVIDER_LIST,
@@ -67401,7 +67712,7 @@ const providerApi$2 = {
67401
67712
  // value, preserve what's on disk" from "caller explicitly unset it".
67402
67713
  isDefaultForType = undefined,
67403
67714
  ) =>
67404
- ipcRenderer$i.invoke(PROVIDER_SAVE, {
67715
+ ipcRenderer$j.invoke(PROVIDER_SAVE, {
67405
67716
  appId,
67406
67717
  providerName,
67407
67718
  providerType,
@@ -67421,7 +67732,7 @@ const providerApi$2 = {
67421
67732
  * @param {String} appId - the appId specified in the dash initialization
67422
67733
  * @returns {Promise<Array>} Array of provider objects with name, type, credentials
67423
67734
  */
67424
- listProviders: (appId) => ipcRenderer$i.invoke(PROVIDER_LIST, { appId }),
67735
+ listProviders: (appId) => ipcRenderer$j.invoke(PROVIDER_LIST, { appId }),
67425
67736
 
67426
67737
  /**
67427
67738
  * getProvider
@@ -67433,7 +67744,7 @@ const providerApi$2 = {
67433
67744
  * @returns {Promise<Object>} Provider object with name, type, credentials
67434
67745
  */
67435
67746
  getProvider: (appId, providerName) =>
67436
- ipcRenderer$i.invoke(PROVIDER_GET, { appId, providerName }),
67747
+ ipcRenderer$j.invoke(PROVIDER_GET, { appId, providerName }),
67437
67748
 
67438
67749
  /**
67439
67750
  * deleteProvider
@@ -67445,7 +67756,7 @@ const providerApi$2 = {
67445
67756
  * @returns {Promise}
67446
67757
  */
67447
67758
  deleteProvider: (appId, providerName) =>
67448
- ipcRenderer$i.invoke(PROVIDER_DELETE, { appId, providerName }),
67759
+ ipcRenderer$j.invoke(PROVIDER_DELETE, { appId, providerName }),
67449
67760
 
67450
67761
  /**
67451
67762
  * listProvidersForApplication
@@ -67455,14 +67766,14 @@ const providerApi$2 = {
67455
67766
  * @param {String} appId - the appId specified in the dash initialization
67456
67767
  */
67457
67768
  listProvidersForApplication: (appId) => {
67458
- ipcRenderer$i
67769
+ ipcRenderer$j
67459
67770
  .invoke(PROVIDER_LIST, { appId })
67460
67771
  .then((result) => {
67461
67772
  // Emit the event for ElectronDashboardApi to listen to
67462
- ipcRenderer$i.send("PROVIDER_LIST_COMPLETE", result);
67773
+ ipcRenderer$j.send("PROVIDER_LIST_COMPLETE", result);
67463
67774
  })
67464
67775
  .catch((error) => {
67465
- ipcRenderer$i.send("PROVIDER_LIST_ERROR", {
67776
+ ipcRenderer$j.send("PROVIDER_LIST_ERROR", {
67466
67777
  error: error.message,
67467
67778
  });
67468
67779
  });
@@ -67479,7 +67790,7 @@ const providerApi$2 = {
67479
67790
  providerType,
67480
67791
  credentials,
67481
67792
  ) => {
67482
- ipcRenderer$i
67793
+ ipcRenderer$j
67483
67794
  .invoke(PROVIDER_SAVE, {
67484
67795
  appId,
67485
67796
  providerName,
@@ -67487,10 +67798,10 @@ const providerApi$2 = {
67487
67798
  credentials,
67488
67799
  })
67489
67800
  .then((result) => {
67490
- ipcRenderer$i.send("PROVIDER_SAVE_COMPLETE", result);
67801
+ ipcRenderer$j.send("PROVIDER_SAVE_COMPLETE", result);
67491
67802
  })
67492
67803
  .catch((error) => {
67493
- ipcRenderer$i.send("PROVIDER_SAVE_ERROR", {
67804
+ ipcRenderer$j.send("PROVIDER_SAVE_ERROR", {
67494
67805
  error: error.message,
67495
67806
  });
67496
67807
  });
@@ -67502,13 +67813,13 @@ const providerApi$2 = {
67502
67813
  * Event-listener-based version for use with ElectronDashboardApi
67503
67814
  */
67504
67815
  getProviderForApplication: (appId, providerName) => {
67505
- ipcRenderer$i
67816
+ ipcRenderer$j
67506
67817
  .invoke(PROVIDER_GET, { appId, providerName })
67507
67818
  .then((result) => {
67508
- ipcRenderer$i.send("PROVIDER_GET_COMPLETE", result);
67819
+ ipcRenderer$j.send("PROVIDER_GET_COMPLETE", result);
67509
67820
  })
67510
67821
  .catch((error) => {
67511
- ipcRenderer$i.send("PROVIDER_GET_ERROR", {
67822
+ ipcRenderer$j.send("PROVIDER_GET_ERROR", {
67512
67823
  error: error.message,
67513
67824
  });
67514
67825
  });
@@ -67520,13 +67831,13 @@ const providerApi$2 = {
67520
67831
  * Event-listener-based version for use with ElectronDashboardApi
67521
67832
  */
67522
67833
  deleteProviderForApplication: (appId, providerName) => {
67523
- ipcRenderer$i
67834
+ ipcRenderer$j
67524
67835
  .invoke(PROVIDER_DELETE, { appId, providerName })
67525
67836
  .then((result) => {
67526
- ipcRenderer$i.send("PROVIDER_DELETE_COMPLETE", result);
67837
+ ipcRenderer$j.send("PROVIDER_DELETE_COMPLETE", result);
67527
67838
  })
67528
67839
  .catch((error) => {
67529
- ipcRenderer$i.send("PROVIDER_DELETE_ERROR", {
67840
+ ipcRenderer$j.send("PROVIDER_DELETE_ERROR", {
67530
67841
  error: error.message,
67531
67842
  });
67532
67843
  });
@@ -67542,7 +67853,7 @@ var providerApi_1 = providerApi$2;
67542
67853
  * Communicates with main process via IPC to manage MCP server lifecycle.
67543
67854
  */
67544
67855
 
67545
- const { ipcRenderer: ipcRenderer$h } = require$$0$2;
67856
+ const { ipcRenderer: ipcRenderer$i } = require$$0$2;
67546
67857
  const {
67547
67858
  MCP_START_SERVER,
67548
67859
  MCP_STOP_SERVER,
@@ -67581,7 +67892,7 @@ const mcpApi$2 = {
67581
67892
  workspaceId = null,
67582
67893
  pathScope = null,
67583
67894
  ) =>
67584
- ipcRenderer$h.invoke(MCP_START_SERVER, {
67895
+ ipcRenderer$i.invoke(MCP_START_SERVER, {
67585
67896
  serverName,
67586
67897
  mcpConfig,
67587
67898
  credentials,
@@ -67598,7 +67909,7 @@ const mcpApi$2 = {
67598
67909
  * @returns {Promise<{ success, serverName } | { error, message }>}
67599
67910
  */
67600
67911
  stopServer: (serverName, workspaceId = null) =>
67601
- ipcRenderer$h.invoke(MCP_STOP_SERVER, { serverName, workspaceId }),
67912
+ ipcRenderer$i.invoke(MCP_STOP_SERVER, { serverName, workspaceId }),
67602
67913
 
67603
67914
  /**
67604
67915
  * listTools
@@ -67609,7 +67920,7 @@ const mcpApi$2 = {
67609
67920
  * @returns {Promise<{ tools } | { error, message }>}
67610
67921
  */
67611
67922
  listTools: (serverName, workspaceId = null) =>
67612
- ipcRenderer$h.invoke(MCP_LIST_TOOLS, { serverName, workspaceId }),
67923
+ ipcRenderer$i.invoke(MCP_LIST_TOOLS, { serverName, workspaceId }),
67613
67924
 
67614
67925
  /**
67615
67926
  * callTool
@@ -67638,7 +67949,7 @@ const mcpApi$2 = {
67638
67949
  workspaceId = null,
67639
67950
  token = null,
67640
67951
  ) =>
67641
- ipcRenderer$h.invoke(MCP_CALL_TOOL, {
67952
+ ipcRenderer$i.invoke(MCP_CALL_TOOL, {
67642
67953
  serverName,
67643
67954
  toolName,
67644
67955
  args,
@@ -67657,7 +67968,7 @@ const mcpApi$2 = {
67657
67968
  * @returns {Promise<{ resources } | { error, message }>}
67658
67969
  */
67659
67970
  listResources: (serverName, workspaceId = null) =>
67660
- ipcRenderer$h.invoke(MCP_LIST_RESOURCES, { serverName, workspaceId }),
67971
+ ipcRenderer$i.invoke(MCP_LIST_RESOURCES, { serverName, workspaceId }),
67661
67972
 
67662
67973
  /**
67663
67974
  * readResource
@@ -67669,7 +67980,7 @@ const mcpApi$2 = {
67669
67980
  * @returns {Promise<{ resource } | { error, message }>}
67670
67981
  */
67671
67982
  readResource: (serverName, uri, workspaceId = null) =>
67672
- ipcRenderer$h.invoke(MCP_READ_RESOURCE, { serverName, uri, workspaceId }),
67983
+ ipcRenderer$i.invoke(MCP_READ_RESOURCE, { serverName, uri, workspaceId }),
67673
67984
 
67674
67985
  /**
67675
67986
  * getServerStatus
@@ -67680,7 +67991,7 @@ const mcpApi$2 = {
67680
67991
  * @returns {Promise<{ status, tools, error }>}
67681
67992
  */
67682
67993
  getServerStatus: (serverName, workspaceId = null) =>
67683
- ipcRenderer$h.invoke(MCP_SERVER_STATUS, { serverName, workspaceId }),
67994
+ ipcRenderer$i.invoke(MCP_SERVER_STATUS, { serverName, workspaceId }),
67684
67995
 
67685
67996
  /**
67686
67997
  * getCatalog
@@ -67688,7 +67999,7 @@ const mcpApi$2 = {
67688
67999
  *
67689
68000
  * @returns {Promise<{ catalog } | { error, message }>}
67690
68001
  */
67691
- getCatalog: () => ipcRenderer$h.invoke(MCP_GET_CATALOG),
68002
+ getCatalog: () => ipcRenderer$i.invoke(MCP_GET_CATALOG),
67692
68003
 
67693
68004
  /**
67694
68005
  * getKnownExternalCatalog
@@ -67700,7 +68011,7 @@ const mcpApi$2 = {
67700
68011
  *
67701
68012
  * @returns {Promise<{ success, servers } | { error, message, servers }>}
67702
68013
  */
67703
- getKnownExternalCatalog: () => ipcRenderer$h.invoke(MCP_GET_KNOWN_EXTERNAL),
68014
+ getKnownExternalCatalog: () => ipcRenderer$i.invoke(MCP_GET_KNOWN_EXTERNAL),
67704
68015
 
67705
68016
  /**
67706
68017
  * onInstallKnownExternalConfirm
@@ -67714,9 +68025,9 @@ const mcpApi$2 = {
67714
68025
  */
67715
68026
  onInstallKnownExternalConfirm: (callback) => {
67716
68027
  const handler = (_e, data) => callback(data);
67717
- ipcRenderer$h.on(MCP_INSTALL_KNOWN_EXTERNAL_CONFIRM$1, handler);
68028
+ ipcRenderer$i.on(MCP_INSTALL_KNOWN_EXTERNAL_CONFIRM$1, handler);
67718
68029
  return () =>
67719
- ipcRenderer$h.removeListener(MCP_INSTALL_KNOWN_EXTERNAL_CONFIRM$1, handler);
68030
+ ipcRenderer$i.removeListener(MCP_INSTALL_KNOWN_EXTERNAL_CONFIRM$1, handler);
67720
68031
  },
67721
68032
 
67722
68033
  /**
@@ -67727,7 +68038,7 @@ const mcpApi$2 = {
67727
68038
  * @param {{ confirmed: boolean, credentials?: object, error?: string }} result
67728
68039
  */
67729
68040
  sendInstallKnownExternalResult: (requestId, result) =>
67730
- ipcRenderer$h.send(MCP_INSTALL_KNOWN_EXTERNAL_RESULT$1, { requestId, result }),
68041
+ ipcRenderer$i.send(MCP_INSTALL_KNOWN_EXTERNAL_RESULT$1, { requestId, result }),
67731
68042
 
67732
68043
  /**
67733
68044
  * runAuth
@@ -67739,7 +68050,7 @@ const mcpApi$2 = {
67739
68050
  * @returns {Promise<{ success } | { error, message }>}
67740
68051
  */
67741
68052
  runAuth: (mcpConfig, credentials, authCommand) =>
67742
- ipcRenderer$h.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
68053
+ ipcRenderer$i.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
67743
68054
  };
67744
68055
 
67745
68056
  var mcpApi_1 = mcpApi$2;
@@ -67757,7 +68068,7 @@ var mcpApi_1 = mcpApi$2;
67757
68068
  * mainApi.registry.checkUpdates([{ name: "weather-widgets", version: "1.0.0" }])
67758
68069
  */
67759
68070
 
67760
- const { ipcRenderer: ipcRenderer$g } = require$$0$2;
68071
+ const { ipcRenderer: ipcRenderer$h } = require$$0$2;
67761
68072
 
67762
68073
  const registryApi$2 = {
67763
68074
  /**
@@ -67767,7 +68078,7 @@ const registryApi$2 = {
67767
68078
  */
67768
68079
  fetchIndex: async (forceRefresh = false) => {
67769
68080
  try {
67770
- return await ipcRenderer$g.invoke("registry:fetch-index", forceRefresh);
68081
+ return await ipcRenderer$h.invoke("registry:fetch-index", forceRefresh);
67771
68082
  } catch (error) {
67772
68083
  console.error("[RegistryApi] Error fetching index:", error);
67773
68084
  throw error;
@@ -67782,7 +68093,7 @@ const registryApi$2 = {
67782
68093
  */
67783
68094
  search: async (query = "", filters = {}) => {
67784
68095
  try {
67785
- return await ipcRenderer$g.invoke("registry:search", query, filters);
68096
+ return await ipcRenderer$h.invoke("registry:search", query, filters);
67786
68097
  } catch (error) {
67787
68098
  console.error("[RegistryApi] Error searching registry:", error);
67788
68099
  throw error;
@@ -67796,7 +68107,7 @@ const registryApi$2 = {
67796
68107
  */
67797
68108
  getPackage: async (packageName) => {
67798
68109
  try {
67799
- return await ipcRenderer$g.invoke("registry:get-package", packageName);
68110
+ return await ipcRenderer$h.invoke("registry:get-package", packageName);
67800
68111
  } catch (error) {
67801
68112
  console.error(
67802
68113
  `[RegistryApi] Error getting package ${packageName}:`,
@@ -67813,7 +68124,7 @@ const registryApi$2 = {
67813
68124
  */
67814
68125
  checkUpdates: async (installedWidgets = []) => {
67815
68126
  try {
67816
- return await ipcRenderer$g.invoke(
68127
+ return await ipcRenderer$h.invoke(
67817
68128
  "registry:check-updates",
67818
68129
  installedWidgets,
67819
68130
  );
@@ -67831,7 +68142,7 @@ const registryApi$2 = {
67831
68142
  */
67832
68143
  searchDashboards: async (query = "", filters = {}) => {
67833
68144
  try {
67834
- return await ipcRenderer$g.invoke(
68145
+ return await ipcRenderer$h.invoke(
67835
68146
  "registry:search-dashboards",
67836
68147
  query,
67837
68148
  filters,
@@ -67850,7 +68161,7 @@ const registryApi$2 = {
67850
68161
  */
67851
68162
  searchThemes: async (query = "", filters = {}) => {
67852
68163
  try {
67853
- return await ipcRenderer$g.invoke("registry:search-themes", query, filters);
68164
+ return await ipcRenderer$h.invoke("registry:search-themes", query, filters);
67854
68165
  } catch (error) {
67855
68166
  console.error("[RegistryApi] Error searching themes:", error);
67856
68167
  throw error;
@@ -67872,7 +68183,7 @@ const registryApi$2 = {
67872
68183
  */
67873
68184
  publishWidget: async (appId, packageId, options = {}) => {
67874
68185
  try {
67875
- return await ipcRenderer$g.invoke("registry:publish-widget", {
68186
+ return await ipcRenderer$h.invoke("registry:publish-widget", {
67876
68187
  appId,
67877
68188
  packageId,
67878
68189
  options,
@@ -67893,7 +68204,7 @@ const registryApi$2 = {
67893
68204
  */
67894
68205
  inspectWidgetPackage: async (packageId) => {
67895
68206
  try {
67896
- return await ipcRenderer$g.invoke("registry:inspect-widget-package", {
68207
+ return await ipcRenderer$h.invoke("registry:inspect-widget-package", {
67897
68208
  packageId,
67898
68209
  });
67899
68210
  } catch (error) {
@@ -67914,7 +68225,7 @@ const registryApi$2 = {
67914
68225
  */
67915
68226
  scanWidgetDefaults: async (packageId) => {
67916
68227
  try {
67917
- return await ipcRenderer$g.invoke("registry:scan-widget-defaults", {
68228
+ return await ipcRenderer$h.invoke("registry:scan-widget-defaults", {
67918
68229
  packageId,
67919
68230
  });
67920
68231
  } catch (error) {
@@ -67937,7 +68248,7 @@ const registryApi$2 = {
67937
68248
  */
67938
68249
  previewFetch: async (packageName, componentName = null) => {
67939
68250
  try {
67940
- return await ipcRenderer$g.invoke(
68251
+ return await ipcRenderer$h.invoke(
67941
68252
  "registry:preview-fetch",
67942
68253
  packageName,
67943
68254
  componentName,
@@ -67963,7 +68274,7 @@ const registryApi$2 = {
67963
68274
  */
67964
68275
  fetchPackageManifest: async (packageName) => {
67965
68276
  try {
67966
- return await ipcRenderer$g.invoke(
68277
+ return await ipcRenderer$h.invoke(
67967
68278
  "registry:fetch-package-manifest",
67968
68279
  packageName,
67969
68280
  );
@@ -67985,7 +68296,7 @@ var registryApi_1 = registryApi$2;
67985
68296
  * Handle the theme configuration file
67986
68297
  */
67987
68298
 
67988
- const { ipcRenderer: ipcRenderer$f } = require$$0$2;
68299
+ const { ipcRenderer: ipcRenderer$g } = require$$0$2;
67989
68300
 
67990
68301
  const {
67991
68302
  THEME_LIST,
@@ -67998,17 +68309,17 @@ const {
67998
68309
 
67999
68310
  const themeApi$2 = {
68000
68311
  listThemesForApplication: (appId) =>
68001
- ipcRenderer$f.invoke(THEME_LIST, { appId }),
68312
+ ipcRenderer$g.invoke(THEME_LIST, { appId }),
68002
68313
  saveThemeForApplication: (appId, themeName, themeObject) =>
68003
- ipcRenderer$f.invoke(THEME_SAVE, { appId, themeName, themeObject }),
68314
+ ipcRenderer$g.invoke(THEME_SAVE, { appId, themeName, themeObject }),
68004
68315
  deleteThemeForApplication: (appId, themeKey) =>
68005
- ipcRenderer$f.invoke(THEME_DELETE, { appId, themeKey }),
68316
+ ipcRenderer$g.invoke(THEME_DELETE, { appId, themeKey }),
68006
68317
  publishTheme: (appId, themeKey, options) =>
68007
- ipcRenderer$f.invoke(THEME_PUBLISH, { appId, themeKey, options }),
68318
+ ipcRenderer$g.invoke(THEME_PUBLISH, { appId, themeKey, options }),
68008
68319
  installThemeFromRegistry: (appId, packageName) =>
68009
- ipcRenderer$f.invoke(THEME_INSTALL_FROM_REGISTRY, { appId, packageName }),
68320
+ ipcRenderer$g.invoke(THEME_INSTALL_FROM_REGISTRY, { appId, packageName }),
68010
68321
  getThemePublishPreview: (appId, themeKey) =>
68011
- ipcRenderer$f.invoke(THEME_PUBLISH_PREVIEW, { appId, themeKey }),
68322
+ ipcRenderer$g.invoke(THEME_PUBLISH_PREVIEW, { appId, themeKey }),
68012
68323
  };
68013
68324
 
68014
68325
  var themeApi_1 = themeApi$2;
@@ -68020,7 +68331,7 @@ var themeApi_1 = themeApi$2;
68020
68331
  */
68021
68332
 
68022
68333
  // ipcRenderer that must be used to invoke the events
68023
- const { ipcRenderer: ipcRenderer$e } = require$$0$2;
68334
+ const { ipcRenderer: ipcRenderer$f } = require$$0$2;
68024
68335
 
68025
68336
  const {
68026
68337
  ALGOLIA_LIST_INDICES,
@@ -68033,10 +68344,10 @@ const {
68033
68344
 
68034
68345
  const algoliaApi$2 = {
68035
68346
  listIndices: (application) =>
68036
- ipcRenderer$e.invoke(ALGOLIA_LIST_INDICES, application),
68347
+ ipcRenderer$f.invoke(ALGOLIA_LIST_INDICES, application),
68037
68348
 
68038
68349
  browseObjects: (appId, apiKey, indexName) => {
68039
- ipcRenderer$e.invoke(ALGOLIA_BROWSE_OBJECTS, {
68350
+ ipcRenderer$f.invoke(ALGOLIA_BROWSE_OBJECTS, {
68040
68351
  appId,
68041
68352
  apiKey,
68042
68353
  indexName,
@@ -68045,7 +68356,7 @@ const algoliaApi$2 = {
68045
68356
  },
68046
68357
 
68047
68358
  getAnalyticsForQuery: (application, indexName, query) =>
68048
- ipcRenderer$e.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
68359
+ ipcRenderer$f.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
68049
68360
  application,
68050
68361
  indexName,
68051
68362
  query,
@@ -68058,7 +68369,7 @@ const algoliaApi$2 = {
68058
68369
  dir,
68059
68370
  createIfNotExists = false,
68060
68371
  ) =>
68061
- ipcRenderer$e.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
68372
+ ipcRenderer$f.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
68062
68373
  appId,
68063
68374
  apiKey,
68064
68375
  indexName,
@@ -68067,7 +68378,7 @@ const algoliaApi$2 = {
68067
68378
  }),
68068
68379
 
68069
68380
  createBatchesFromFile: (filepath, batchFilepath, batchSize) => {
68070
- ipcRenderer$e.invoke(ALGOLIA_CREATE_BATCH, {
68381
+ ipcRenderer$f.invoke(ALGOLIA_CREATE_BATCH, {
68071
68382
  filepath,
68072
68383
  batchFilepath,
68073
68384
  batchSize,
@@ -68075,7 +68386,7 @@ const algoliaApi$2 = {
68075
68386
  },
68076
68387
 
68077
68388
  browseObjectsToFile: (appId, apiKey, indexName, toFilename, query = "") => {
68078
- ipcRenderer$e.invoke(ALGOLIA_BROWSE_OBJECTS, {
68389
+ ipcRenderer$f.invoke(ALGOLIA_BROWSE_OBJECTS, {
68079
68390
  appId,
68080
68391
  apiKey,
68081
68392
  indexName,
@@ -68085,7 +68396,7 @@ const algoliaApi$2 = {
68085
68396
  },
68086
68397
 
68087
68398
  search: (appId, apiKey, indexName, query = "", options = {}) =>
68088
- ipcRenderer$e.invoke(ALGOLIA_SEARCH, {
68399
+ ipcRenderer$f.invoke(ALGOLIA_SEARCH, {
68089
68400
  appId,
68090
68401
  apiKey,
68091
68402
  indexName,
@@ -68100,14 +68411,14 @@ var algoliaApi_1 = algoliaApi$2;
68100
68411
  * openAI
68101
68412
  */
68102
68413
 
68103
- const { ipcRenderer: ipcRenderer$d } = require$$0$2;
68414
+ const { ipcRenderer: ipcRenderer$e } = require$$0$2;
68104
68415
 
68105
68416
  const { OPENAI_DESCRIBE_IMAGE } = openaiEvents$1;
68106
68417
 
68107
68418
  const openaiApi$2 = {
68108
68419
  // convert a json array of objects to a csv string and save to file
68109
68420
  describeImage: (imageUrl, apiKey, prompt = "What's in this image?") =>
68110
- ipcRenderer$d.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
68421
+ ipcRenderer$e.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
68111
68422
  };
68112
68423
 
68113
68424
  var openaiApi_1 = openaiApi$2;
@@ -68118,14 +68429,14 @@ var openaiApi_1 = openaiApi$2;
68118
68429
  */
68119
68430
 
68120
68431
  // ipcRenderer that must be used to invoke the events
68121
- const { ipcRenderer: ipcRenderer$c } = require$$0$2;
68432
+ const { ipcRenderer: ipcRenderer$d } = require$$0$2;
68122
68433
 
68123
68434
  const { MENU_ITEMS_SAVE, MENU_ITEMS_LIST } = events$8;
68124
68435
 
68125
68436
  const menuItemsApi$2 = {
68126
68437
  saveMenuItem: (appId, menuItem) =>
68127
- ipcRenderer$c.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
68128
- listMenuItems: (appId) => ipcRenderer$c.invoke(MENU_ITEMS_LIST, { appId }),
68438
+ ipcRenderer$d.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
68439
+ listMenuItems: (appId) => ipcRenderer$d.invoke(MENU_ITEMS_LIST, { appId }),
68129
68440
  };
68130
68441
 
68131
68442
  var menuItemsApi_1 = menuItemsApi$2;
@@ -68138,7 +68449,7 @@ var menuItemsApi_1 = menuItemsApi$2;
68138
68449
  * tool-use events, and request cancellation.
68139
68450
  */
68140
68451
 
68141
- const { ipcRenderer: ipcRenderer$b } = require$$0$2;
68452
+ const { ipcRenderer: ipcRenderer$c } = require$$0$2;
68142
68453
  const {
68143
68454
  LLM_SEND_MESSAGE,
68144
68455
  LLM_ABORT_REQUEST,
@@ -68160,7 +68471,7 @@ const _listenerMap = new Map();
68160
68471
  function _addListener(channel, callback) {
68161
68472
  const id = String(++_nextListenerId);
68162
68473
  const wrapped = (_event, data) => callback(data);
68163
- ipcRenderer$b.on(channel, wrapped);
68474
+ ipcRenderer$c.on(channel, wrapped);
68164
68475
  _listenerMap.set(id, { channel, wrapped });
68165
68476
  return id;
68166
68477
  }
@@ -68175,7 +68486,7 @@ const llmApi$2 = {
68175
68486
  * @returns {Promise<void>}
68176
68487
  */
68177
68488
  sendMessage: (requestId, params) =>
68178
- ipcRenderer$b.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
68489
+ ipcRenderer$c.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
68179
68490
 
68180
68491
  /**
68181
68492
  * abortRequest
@@ -68185,7 +68496,7 @@ const llmApi$2 = {
68185
68496
  * @returns {Promise<{ success: boolean }>}
68186
68497
  */
68187
68498
  abortRequest: (requestId) =>
68188
- ipcRenderer$b.invoke(LLM_ABORT_REQUEST, { requestId }),
68499
+ ipcRenderer$c.invoke(LLM_ABORT_REQUEST, { requestId }),
68189
68500
 
68190
68501
  /**
68191
68502
  * listConnectedTools
@@ -68193,7 +68504,7 @@ const llmApi$2 = {
68193
68504
  *
68194
68505
  * @returns {Promise<Array<{ serverName, tools, resources, status }>>}
68195
68506
  */
68196
- listConnectedTools: () => ipcRenderer$b.invoke(LLM_LIST_CONNECTED_TOOLS),
68507
+ listConnectedTools: () => ipcRenderer$c.invoke(LLM_LIST_CONNECTED_TOOLS),
68197
68508
 
68198
68509
  /**
68199
68510
  * checkCliAvailable
@@ -68201,7 +68512,7 @@ const llmApi$2 = {
68201
68512
  *
68202
68513
  * @returns {Promise<{ available: boolean, path?: string }>}
68203
68514
  */
68204
- checkCliAvailable: () => ipcRenderer$b.invoke(LLM_CHECK_CLI_AVAILABLE),
68515
+ checkCliAvailable: () => ipcRenderer$c.invoke(LLM_CHECK_CLI_AVAILABLE),
68205
68516
 
68206
68517
  /**
68207
68518
  * clearCliSession
@@ -68211,7 +68522,7 @@ const llmApi$2 = {
68211
68522
  * @returns {Promise<{ success: boolean }>}
68212
68523
  */
68213
68524
  clearCliSession: (widgetUuid) =>
68214
- ipcRenderer$b.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
68525
+ ipcRenderer$c.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
68215
68526
 
68216
68527
  /**
68217
68528
  * getCliSessionStatus
@@ -68221,7 +68532,7 @@ const llmApi$2 = {
68221
68532
  * @returns {Promise<{ hasSession: boolean, sessionId?: string, isProcessActive: boolean }>}
68222
68533
  */
68223
68534
  getCliSessionStatus: (widgetUuid) =>
68224
- ipcRenderer$b.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
68535
+ ipcRenderer$c.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
68225
68536
 
68226
68537
  /**
68227
68538
  * endCliSession
@@ -68231,7 +68542,7 @@ const llmApi$2 = {
68231
68542
  * @returns {Promise<{ success: boolean }>}
68232
68543
  */
68233
68544
  endCliSession: (widgetUuid) =>
68234
- ipcRenderer$b.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
68545
+ ipcRenderer$c.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
68235
68546
 
68236
68547
  // --- Stream event listeners ---
68237
68548
  // Each on* method returns an opaque string ID. Strings cross the
@@ -68265,7 +68576,7 @@ const llmApi$2 = {
68265
68576
  const listenerId = id !== undefined ? String(id) : String(idOrChannel);
68266
68577
  const entry = _listenerMap.get(listenerId);
68267
68578
  if (entry) {
68268
- ipcRenderer$b.removeListener(entry.channel, entry.wrapped);
68579
+ ipcRenderer$c.removeListener(entry.channel, entry.wrapped);
68269
68580
  _listenerMap.delete(listenerId);
68270
68581
  }
68271
68582
  },
@@ -68277,14 +68588,14 @@ const llmApi$2 = {
68277
68588
  */
68278
68589
  removeAllStreamListeners: () => {
68279
68590
  for (const [, entry] of _listenerMap) {
68280
- ipcRenderer$b.removeListener(entry.channel, entry.wrapped);
68591
+ ipcRenderer$c.removeListener(entry.channel, entry.wrapped);
68281
68592
  }
68282
68593
  _listenerMap.clear();
68283
- ipcRenderer$b.removeAllListeners(LLM_STREAM_DELTA);
68284
- ipcRenderer$b.removeAllListeners(LLM_STREAM_TOOL_CALL);
68285
- ipcRenderer$b.removeAllListeners(LLM_STREAM_TOOL_RESULT);
68286
- ipcRenderer$b.removeAllListeners(LLM_STREAM_COMPLETE);
68287
- ipcRenderer$b.removeAllListeners(LLM_STREAM_ERROR);
68594
+ ipcRenderer$c.removeAllListeners(LLM_STREAM_DELTA);
68595
+ ipcRenderer$c.removeAllListeners(LLM_STREAM_TOOL_CALL);
68596
+ ipcRenderer$c.removeAllListeners(LLM_STREAM_TOOL_RESULT);
68597
+ ipcRenderer$c.removeAllListeners(LLM_STREAM_COMPLETE);
68598
+ ipcRenderer$c.removeAllListeners(LLM_STREAM_ERROR);
68288
68599
  },
68289
68600
  };
68290
68601
 
@@ -68297,7 +68608,7 @@ var llmApi_1 = llmApi$2;
68297
68608
  * Exposed via contextBridge through mainApi.
68298
68609
  */
68299
68610
 
68300
- const { ipcRenderer: ipcRenderer$a } = require$$0$2;
68611
+ const { ipcRenderer: ipcRenderer$b } = require$$0$2;
68301
68612
  const {
68302
68613
  DASHBOARD_CONFIG_EXPORT,
68303
68614
  DASHBOARD_CONFIG_SELECT_FILE,
@@ -68324,7 +68635,7 @@ const dashboardConfigApi$2 = {
68324
68635
  * @returns {Promise<Object>} Result with success, filePath, and config
68325
68636
  */
68326
68637
  exportDashboardConfig: (appId, workspaceId, options = {}) =>
68327
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_EXPORT, {
68638
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_EXPORT, {
68328
68639
  appId,
68329
68640
  workspaceId,
68330
68641
  options,
@@ -68337,7 +68648,7 @@ const dashboardConfigApi$2 = {
68337
68648
  *
68338
68649
  * @returns {Promise<Object>} Result with success, filePath, and dashboardConfig preview
68339
68650
  */
68340
- selectDashboardFile: () => ipcRenderer$a.invoke(DASHBOARD_CONFIG_SELECT_FILE),
68651
+ selectDashboardFile: () => ipcRenderer$b.invoke(DASHBOARD_CONFIG_SELECT_FILE),
68341
68652
 
68342
68653
  /**
68343
68654
  * Import a dashboard config from a ZIP file.
@@ -68349,7 +68660,7 @@ const dashboardConfigApi$2 = {
68349
68660
  * @returns {Promise<Object>} Result with success, workspace, and summary
68350
68661
  */
68351
68662
  importDashboardConfig: (appId, options = {}) =>
68352
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_IMPORT, { appId, ...options }),
68663
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_IMPORT, { appId, ...options }),
68353
68664
 
68354
68665
  /**
68355
68666
  * Install a dashboard from the registry by package name.
@@ -68367,7 +68678,7 @@ const dashboardConfigApi$2 = {
68367
68678
  * @returns {Promise<Object>} Result with success, workspace, and summary
68368
68679
  */
68369
68680
  installDashboardFromRegistry: (appId, packageName, options = {}) =>
68370
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_INSTALL, {
68681
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_INSTALL, {
68371
68682
  appId,
68372
68683
  packageName,
68373
68684
  options,
@@ -68381,7 +68692,7 @@ const dashboardConfigApi$2 = {
68381
68692
  * @returns {Promise<Object>} Compatibility report with per-widget status
68382
68693
  */
68383
68694
  checkDashboardCompatibility: (appId, dashboardWidgets) =>
68384
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
68695
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
68385
68696
  appId,
68386
68697
  dashboardWidgets,
68387
68698
  }),
@@ -68397,7 +68708,7 @@ const dashboardConfigApi$2 = {
68397
68708
  * @returns {Promise<Object>} Result with success, manifest, filePath
68398
68709
  */
68399
68710
  prepareDashboardForPublish: (appId, workspaceId, options = {}) =>
68400
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_PUBLISH, {
68711
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_PUBLISH, {
68401
68712
  appId,
68402
68713
  workspaceId,
68403
68714
  options,
@@ -68416,7 +68727,7 @@ const dashboardConfigApi$2 = {
68416
68727
  * @returns {Promise<Object>} { success, widgets, theme }
68417
68728
  */
68418
68729
  collectDashboardDependencies: (appId, workspaceId, options = {}) =>
68419
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_COLLECT_DEPENDENCIES, {
68730
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_COLLECT_DEPENDENCIES, {
68420
68731
  appId,
68421
68732
  workspaceId,
68422
68733
  options,
@@ -68433,7 +68744,7 @@ const dashboardConfigApi$2 = {
68433
68744
  * @returns {Promise<Object>} { success, widgets, theme, registryError? }
68434
68745
  */
68435
68746
  getDashboardPublishPlan: (appId, workspaceId, options = {}) =>
68436
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_PUBLISH_PLAN, {
68747
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_PUBLISH_PLAN, {
68437
68748
  appId,
68438
68749
  workspaceId,
68439
68750
  options,
@@ -68447,7 +68758,7 @@ const dashboardConfigApi$2 = {
68447
68758
  * @returns {Promise<Object>} Preview with metadata, widgets, wiring, compatibility
68448
68759
  */
68449
68760
  getDashboardPreview: (packageName) =>
68450
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
68761
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
68451
68762
 
68452
68763
  /**
68453
68764
  * Check installed dashboards for available updates.
@@ -68456,7 +68767,7 @@ const dashboardConfigApi$2 = {
68456
68767
  * @returns {Promise<Object>} Result with updates array
68457
68768
  */
68458
68769
  checkDashboardUpdates: (appId) =>
68459
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
68770
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
68460
68771
 
68461
68772
  /**
68462
68773
  * Get provider setup manifest for a dashboard's requirements.
@@ -68466,7 +68777,7 @@ const dashboardConfigApi$2 = {
68466
68777
  * @returns {Promise<Object>} Setup manifest with per-provider status
68467
68778
  */
68468
68779
  getProviderSetupManifest: (appId, requiredProviders) =>
68469
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
68780
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
68470
68781
  appId,
68471
68782
  requiredProviders,
68472
68783
  }),
@@ -68480,7 +68791,7 @@ const dashboardConfigApi$2 = {
68480
68791
  * @returns {Promise<Object>} Preview with dashboardName, widgetCount, widgets, componentNames
68481
68792
  */
68482
68793
  getPublishPreview: (appId, workspaceId) =>
68483
- ipcRenderer$a.invoke(DASHBOARD_CONFIG_PUBLISH_PREVIEW, {
68794
+ ipcRenderer$b.invoke(DASHBOARD_CONFIG_PUBLISH_PREVIEW, {
68484
68795
  appId,
68485
68796
  workspaceId,
68486
68797
  }),
@@ -68494,9 +68805,9 @@ const dashboardConfigApi$2 = {
68494
68805
  */
68495
68806
  onInstallProgress: (callback) => {
68496
68807
  const handler = (_event, data) => callback(data);
68497
- ipcRenderer$a.on(DASHBOARD_CONFIG_INSTALL_PROGRESS, handler);
68808
+ ipcRenderer$b.on(DASHBOARD_CONFIG_INSTALL_PROGRESS, handler);
68498
68809
  return () =>
68499
- ipcRenderer$a.removeListener(DASHBOARD_CONFIG_INSTALL_PROGRESS, handler);
68810
+ ipcRenderer$b.removeListener(DASHBOARD_CONFIG_INSTALL_PROGRESS, handler);
68500
68811
  },
68501
68812
  };
68502
68813
 
@@ -68509,7 +68820,7 @@ var dashboardConfigApi_1 = dashboardConfigApi$2;
68509
68820
  * Exposed via contextBridge through mainApi.
68510
68821
  */
68511
68822
 
68512
- const { ipcRenderer: ipcRenderer$9 } = require$$0$2;
68823
+ const { ipcRenderer: ipcRenderer$a } = require$$0$2;
68513
68824
  const {
68514
68825
  REGISTRY_AUTH_INITIATE_LOGIN,
68515
68826
  REGISTRY_AUTH_POLL_TOKEN,
@@ -68530,7 +68841,7 @@ const registryAuthApi$2 = {
68530
68841
  *
68531
68842
  * @returns {Promise<Object>} { deviceCode, userCode, verificationUrl, verificationUrlComplete, expiresIn, interval }
68532
68843
  */
68533
- initiateLogin: () => ipcRenderer$9.invoke(REGISTRY_AUTH_INITIATE_LOGIN),
68844
+ initiateLogin: () => ipcRenderer$a.invoke(REGISTRY_AUTH_INITIATE_LOGIN),
68534
68845
 
68535
68846
  /**
68536
68847
  * Poll for token after user completes browser auth.
@@ -68539,26 +68850,26 @@ const registryAuthApi$2 = {
68539
68850
  * @returns {Promise<Object>} { status: 'pending' | 'authorized' | 'expired', token?, userId? }
68540
68851
  */
68541
68852
  pollToken: (deviceCode) =>
68542
- ipcRenderer$9.invoke(REGISTRY_AUTH_POLL_TOKEN, { deviceCode }),
68853
+ ipcRenderer$a.invoke(REGISTRY_AUTH_POLL_TOKEN, { deviceCode }),
68543
68854
 
68544
68855
  /**
68545
68856
  * Get current auth status.
68546
68857
  *
68547
68858
  * @returns {Promise<Object>} { authenticated: boolean, userId?: string }
68548
68859
  */
68549
- getStatus: () => ipcRenderer$9.invoke(REGISTRY_AUTH_GET_STATUS),
68860
+ getStatus: () => ipcRenderer$a.invoke(REGISTRY_AUTH_GET_STATUS),
68550
68861
 
68551
68862
  /**
68552
68863
  * Get the authenticated user's registry profile.
68553
68864
  *
68554
68865
  * @returns {Promise<Object|null>} User profile or null
68555
68866
  */
68556
- getProfile: () => ipcRenderer$9.invoke(REGISTRY_AUTH_GET_PROFILE),
68867
+ getProfile: () => ipcRenderer$a.invoke(REGISTRY_AUTH_GET_PROFILE),
68557
68868
 
68558
68869
  /**
68559
68870
  * Logout from registry.
68560
68871
  */
68561
- logout: () => ipcRenderer$9.invoke(REGISTRY_AUTH_LOGOUT),
68872
+ logout: () => ipcRenderer$a.invoke(REGISTRY_AUTH_LOGOUT),
68562
68873
 
68563
68874
  /**
68564
68875
  * Publish a ZIP to the registry.
@@ -68568,7 +68879,7 @@ const registryAuthApi$2 = {
68568
68879
  * @returns {Promise<Object>} { success, registryUrl, packageId, version, error? }
68569
68880
  */
68570
68881
  publish: (zipPath, manifest) =>
68571
- ipcRenderer$9.invoke(REGISTRY_AUTH_PUBLISH, { zipPath, manifest }),
68882
+ ipcRenderer$a.invoke(REGISTRY_AUTH_PUBLISH, { zipPath, manifest }),
68572
68883
 
68573
68884
  /**
68574
68885
  * Update the authenticated user's profile.
@@ -68577,14 +68888,14 @@ const registryAuthApi$2 = {
68577
68888
  * @returns {Promise<Object|null>} Updated user or null
68578
68889
  */
68579
68890
  updateProfile: (updates) =>
68580
- ipcRenderer$9.invoke(REGISTRY_AUTH_UPDATE_PROFILE, updates),
68891
+ ipcRenderer$a.invoke(REGISTRY_AUTH_UPDATE_PROFILE, updates),
68581
68892
 
68582
68893
  /**
68583
68894
  * Get the authenticated user's published packages.
68584
68895
  *
68585
68896
  * @returns {Promise<Object|null>} { packages: [...] } or null
68586
68897
  */
68587
- getPackages: () => ipcRenderer$9.invoke(REGISTRY_AUTH_GET_PACKAGES),
68898
+ getPackages: () => ipcRenderer$a.invoke(REGISTRY_AUTH_GET_PACKAGES),
68588
68899
 
68589
68900
  /**
68590
68901
  * Update a published package's metadata.
@@ -68595,7 +68906,7 @@ const registryAuthApi$2 = {
68595
68906
  * @returns {Promise<Object|null>} Updated package or null
68596
68907
  */
68597
68908
  updatePackage: (scope, name, updates) =>
68598
- ipcRenderer$9.invoke(REGISTRY_AUTH_UPDATE_PACKAGE, {
68909
+ ipcRenderer$a.invoke(REGISTRY_AUTH_UPDATE_PACKAGE, {
68599
68910
  scope,
68600
68911
  name,
68601
68912
  updates,
@@ -68609,7 +68920,7 @@ const registryAuthApi$2 = {
68609
68920
  * @returns {Promise<Object|null>} Response or null
68610
68921
  */
68611
68922
  deletePackage: (scope, name) =>
68612
- ipcRenderer$9.invoke(REGISTRY_AUTH_DELETE_PACKAGE, { scope, name }),
68923
+ ipcRenderer$a.invoke(REGISTRY_AUTH_DELETE_PACKAGE, { scope, name }),
68613
68924
  };
68614
68925
 
68615
68926
  var registryAuthApi_1 = registryAuthApi$2;
@@ -68621,7 +68932,7 @@ var registryAuthApi_1 = registryAuthApi$2;
68621
68932
  * Exposed via contextBridge through `window.mainApi.publisherKey`.
68622
68933
  */
68623
68934
 
68624
- const { ipcRenderer: ipcRenderer$8 } = require$$0$2;
68935
+ const { ipcRenderer: ipcRenderer$9 } = require$$0$2;
68625
68936
  const {
68626
68937
  PUBLISHER_KEY_GET_OR_CREATE,
68627
68938
  PUBLISHER_KEY_DESCRIBE,
@@ -68641,23 +68952,59 @@ const publisherKeyApi$2 = {
68641
68952
  * Rejects with `{ authRequired: true }` if not signed in to the
68642
68953
  * registry; with a generic error otherwise.
68643
68954
  */
68644
- getOrCreate: () => ipcRenderer$8.invoke(PUBLISHER_KEY_GET_OR_CREATE),
68955
+ getOrCreate: () => ipcRenderer$9.invoke(PUBLISHER_KEY_GET_OR_CREATE),
68645
68956
 
68646
68957
  /**
68647
68958
  * Summary of the current local key (or null). Does not trigger
68648
68959
  * registration — purely read-only.
68649
68960
  */
68650
- describe: () => ipcRenderer$8.invoke(PUBLISHER_KEY_DESCRIBE),
68961
+ describe: () => ipcRenderer$9.invoke(PUBLISHER_KEY_DESCRIBE),
68651
68962
 
68652
68963
  /**
68653
68964
  * Revoke the local key on the registry and clear it from disk.
68654
68965
  * Next publish will auto-generate a fresh keypair.
68655
68966
  */
68656
- revoke: () => ipcRenderer$8.invoke(PUBLISHER_KEY_REVOKE),
68967
+ revoke: () => ipcRenderer$9.invoke(PUBLISHER_KEY_REVOKE),
68657
68968
  };
68658
68969
 
68659
68970
  var publisherKeyApi_1 = publisherKeyApi$2;
68660
68971
 
68972
+ /**
68973
+ * onboardingApi.js
68974
+ *
68975
+ * IPC bridge for the first-run onboarding flow (renderer side).
68976
+ * Exposed via contextBridge through `window.mainApi.onboarding`.
68977
+ */
68978
+
68979
+ const { ipcRenderer: ipcRenderer$8 } = require$$0$2;
68980
+ const {
68981
+ ONBOARDING_GET_STATUS,
68982
+ ONBOARDING_MARK_COMPLETED,
68983
+ } = events$8;
68984
+
68985
+ const onboardingApi$2 = {
68986
+ /**
68987
+ * Read the current onboarding state. Always resolves; never rejects.
68988
+ * Returns `{ completed, completedAt, source }`. `completed:false` is
68989
+ * the "never seen" state — the renderer can treat that as the gate
68990
+ * to show the OnboardingModal.
68991
+ */
68992
+ getStatus: () => ipcRenderer$8.invoke(ONBOARDING_GET_STATUS),
68993
+
68994
+ /**
68995
+ * Pin onboarding as completed. Idempotent — safe to call multiple
68996
+ * times; the first stamp wins.
68997
+ *
68998
+ * @param {Object} [opts]
68999
+ * @param {string} [opts.source] - "kitchen-sink", "dismissed", etc.
69000
+ * @returns {Promise<{ completed: true, completedAt: string, source: string|null }>}
69001
+ */
69002
+ markCompleted: (opts = {}) =>
69003
+ ipcRenderer$8.invoke(ONBOARDING_MARK_COMPLETED, opts),
69004
+ };
69005
+
69006
+ var onboardingApi_1 = onboardingApi$2;
69007
+
68661
69008
  /**
68662
69009
  * notificationApi.js
68663
69010
  *
@@ -70277,6 +70624,7 @@ const themeFromUrlApi$1 = themeFromUrlApi_1;
70277
70624
  const webSocketApi$1 = webSocketApi_1;
70278
70625
  const mcpDashServerApi$1 = mcpDashServerApi_1;
70279
70626
  const publisherKeyApi$1 = publisherKeyApi_1;
70627
+ const onboardingApi$1 = onboardingApi_1;
70280
70628
 
70281
70629
  // Events constants
70282
70630
  const events$1 = events$8;
@@ -70350,6 +70698,7 @@ function createMainApi$1(extensions = {}) {
70350
70698
  dashboardRatings: dashboardRatingsApi,
70351
70699
  registryAuth: registryAuthApi$1,
70352
70700
  publisherKey: publisherKeyApi$1,
70701
+ onboarding: onboardingApi$1,
70353
70702
  session: sessionApi,
70354
70703
  notifications: notificationApi$1,
70355
70704
  scheduler: schedulerApi$1,
@@ -70405,6 +70754,7 @@ const dashboardConfigController = dashboardConfigController$1;
70405
70754
  const registryAuthController = registryAuthController$2;
70406
70755
  const registryApiController = registryApiController$3;
70407
70756
  const publisherKeyController = publisherKeyController$1;
70757
+ const onboardingController = onboardingController$1;
70408
70758
  const notificationController = notificationController_1;
70409
70759
  const schedulerController = schedulerController_1;
70410
70760
  const themeRegistryController = themeRegistryController$1;
@@ -70447,6 +70797,7 @@ const llmApi = llmApi_1;
70447
70797
  const dashboardConfigApi = dashboardConfigApi_1;
70448
70798
  const registryAuthApi = registryAuthApi_1;
70449
70799
  const publisherKeyApi = publisherKeyApi_1;
70800
+ const onboardingApi = onboardingApi_1;
70450
70801
  const notificationApi = notificationApi_1;
70451
70802
  const schedulerApi = schedulerApi_1;
70452
70803
  const themeFromUrlApi = themeFromUrlApi_1;
@@ -70511,6 +70862,7 @@ var electron = {
70511
70862
  registryAuthController,
70512
70863
  registryApiController,
70513
70864
  publisherKeyController,
70865
+ onboardingController,
70514
70866
  notificationController,
70515
70867
  schedulerController,
70516
70868
  themeRegistryController,
@@ -70545,6 +70897,7 @@ var electron = {
70545
70897
  dashboardConfigApi,
70546
70898
  registryAuthApi,
70547
70899
  publisherKeyApi,
70900
+ onboardingApi,
70548
70901
  notificationApi,
70549
70902
  schedulerApi,
70550
70903
  themeFromUrlApi,