@trops/dash-core 0.1.610 → 0.1.611

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -936,6 +936,8 @@ var MCP_GET_CATALOG_COMPLETE = "mcp:get-catalog:complete";
936
936
  var MCP_GET_CATALOG_ERROR = "mcp:get-catalog:error";
937
937
  var MCP_RUN_AUTH_COMPLETE = "mcp:run-auth:complete";
938
938
  var MCP_RUN_AUTH_ERROR = "mcp:run-auth:error";
939
+ var MCP_AUTHORIZE_COMPLETE = "mcp:authorize:complete";
940
+ var MCP_AUTHORIZE_ERROR = "mcp:authorize:error";
939
941
 
940
942
  var DATA_JSON_TO_CSV_FILE = "data-json-to-csv-file";
941
943
  var DATA_JSON_TO_CSV_FILE_COMPLETE = "data-json-to-csv-file-complete";
@@ -1031,6 +1033,8 @@ var apiEvents = /*#__PURE__*/Object.freeze({
1031
1033
  LAYOUT_LIST: LAYOUT_LIST,
1032
1034
  LAYOUT_LIST_COMPLETE: LAYOUT_LIST_COMPLETE,
1033
1035
  LAYOUT_LIST_ERROR: LAYOUT_LIST_ERROR,
1036
+ MCP_AUTHORIZE_COMPLETE: MCP_AUTHORIZE_COMPLETE,
1037
+ MCP_AUTHORIZE_ERROR: MCP_AUTHORIZE_ERROR,
1034
1038
  MCP_CALL_TOOL_COMPLETE: MCP_CALL_TOOL_COMPLETE,
1035
1039
  MCP_CALL_TOOL_ERROR: MCP_CALL_TOOL_ERROR,
1036
1040
  MCP_GET_CATALOG_COMPLETE: MCP_GET_CATALOG_COMPLETE,
@@ -1635,9 +1639,10 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
1635
1639
  var _this20 = this;
1636
1640
  var workspaceId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
1637
1641
  var pathScope = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
1642
+ var appId = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
1638
1643
  if (this.api !== null) {
1639
1644
  try {
1640
- this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope).then(function (result) {
1645
+ this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
1641
1646
  onSuccess(_this20.events.MCP_START_SERVER_COMPLETE, result);
1642
1647
  })["catch"](function (error) {
1643
1648
  onError(_this20.events.MCP_START_SERVER_ERROR, error);
@@ -1863,6 +1868,28 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
1863
1868
  return false;
1864
1869
  }
1865
1870
  }
1871
+ }, {
1872
+ key: "mcpAuthorize",
1873
+ value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
1874
+ var _this30 = this;
1875
+ var appId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
1876
+ if (this.api !== null) {
1877
+ try {
1878
+ this.api.mcp.authorize(serverName, mcpConfig, credentials, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
1879
+ onSuccess(_this30.events.MCP_AUTHORIZE_COMPLETE, result);
1880
+ })["catch"](function (error) {
1881
+ onError(_this30.events.MCP_AUTHORIZE_ERROR, error);
1882
+ });
1883
+ return true;
1884
+ } catch (e) {
1885
+ onError(this.events.MCP_AUTHORIZE_ERROR, e);
1886
+ return false;
1887
+ }
1888
+ } else {
1889
+ onError(this.events.MCP_AUTHORIZE_ERROR, new Error("No Api found"));
1890
+ return false;
1891
+ }
1892
+ }
1866
1893
  }]);
1867
1894
  }();
1868
1895
 
@@ -2136,6 +2163,12 @@ var WebDashboardApi = /*#__PURE__*/function () {
2136
2163
  onError === null || onError === void 0 ? void 0 : onError("mcp:run-auth:error", new Error("MCP not available in web mode"));
2137
2164
  return false;
2138
2165
  }
2166
+ }, {
2167
+ key: "mcpAuthorize",
2168
+ value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
2169
+ onError === null || onError === void 0 ? void 0 : onError("mcp:authorize:error", new Error("MCP not available in web mode"));
2170
+ return false;
2171
+ }
2139
2172
  }]);
2140
2173
  }();
2141
2174
 
@@ -33478,7 +33511,7 @@ var useMcpProvider = function useMcpProvider(providerType) {
33478
33511
  consumerCount: 0
33479
33512
  });
33480
33513
  reject(err);
33481
- }, workspaceId, pathScope);
33514
+ }, workspaceId, pathScope, app === null || app === void 0 ? void 0 : app.appId);
33482
33515
  });
33483
33516
  pendingConnects$1.set(stateKey, connectPromise);
33484
33517
  _context.prev = 24;
@@ -43333,7 +43366,7 @@ var ProviderDetail = function ProviderDetail(_ref) {
43333
43366
  });
43334
43367
  };
43335
43368
 
43336
- var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers"];
43369
+ var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers", "auth", "oauth"];
43337
43370
  function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
43338
43371
  function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
43339
43372
  var DirectoryListField = function DirectoryListField(_ref) {
@@ -43461,9 +43494,20 @@ function buildMcpConfig(transport, _ref3) {
43461
43494
  args = _ref3.args,
43462
43495
  envMappingRows = _ref3.envMappingRows,
43463
43496
  url = _ref3.url,
43464
- headerRows = _ref3.headerRows;
43497
+ headerRows = _ref3.headerRows,
43498
+ _ref3$authType = _ref3.authType,
43499
+ authType = _ref3$authType === void 0 ? "apiKey" : _ref3$authType,
43500
+ _ref3$oauthScopes = _ref3.oauthScopes,
43501
+ oauthScopes = _ref3$oauthScopes === void 0 ? "" : _ref3$oauthScopes,
43502
+ _ref3$oauthClientId = _ref3.oauthClientId,
43503
+ oauthClientId = _ref3$oauthClientId === void 0 ? "" : _ref3$oauthClientId,
43504
+ _ref3$oauthClientSecr = _ref3.oauthClientSecret,
43505
+ oauthClientSecret = _ref3$oauthClientSecr === void 0 ? "" : _ref3$oauthClientSecr;
43465
43506
  var baseConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
43466
43507
  // Everything on baseConfig that the form doesn't own gets preserved.
43508
+ // `auth`/`oauth` are owned by the form's auth-type selector, so they're
43509
+ // excluded here and re-emitted below based on the current selection
43510
+ // (this is how toggling away from OAuth clears them).
43467
43511
  baseConfig.transport;
43468
43512
  baseConfig.command;
43469
43513
  baseConfig.args;
@@ -43471,6 +43515,8 @@ function buildMcpConfig(transport, _ref3) {
43471
43515
  baseConfig.url;
43472
43516
  baseConfig.headerTemplate;
43473
43517
  baseConfig.headers;
43518
+ baseConfig.auth;
43519
+ baseConfig.oauth;
43474
43520
  var passThrough = _objectWithoutProperties(baseConfig, _excluded$1);
43475
43521
  if (transport === "stdio") {
43476
43522
  var envMapping = {};
@@ -43490,6 +43536,23 @@ function buildMcpConfig(transport, _ref3) {
43490
43536
  }
43491
43537
 
43492
43538
  // streamable_http
43539
+ var config = _objectSpread$v(_objectSpread$v({}, passThrough), {}, {
43540
+ transport: "streamable_http",
43541
+ url: url.trim()
43542
+ });
43543
+ if (authType === "oauth") {
43544
+ // Interactive OAuth 2.0 (SDK-native). Scopes optional; clientId/secret
43545
+ // only for servers without Dynamic Client Registration.
43546
+ config.auth = "oauth";
43547
+ var oauth = {};
43548
+ if (oauthScopes.trim()) oauth.scopes = oauthScopes.trim();
43549
+ if (oauthClientId.trim()) oauth.clientId = oauthClientId.trim();
43550
+ if (oauthClientSecret.trim()) oauth.clientSecret = oauthClientSecret.trim();
43551
+ config.oauth = oauth;
43552
+ return config;
43553
+ }
43554
+
43555
+ // apiKey (header template) — also the path for "none" (no headers added)
43493
43556
  var headerTemplate = {};
43494
43557
  headerRows.forEach(function (row) {
43495
43558
  var name = row.headerName.trim();
@@ -43498,11 +43561,7 @@ function buildMcpConfig(transport, _ref3) {
43498
43561
  headerTemplate[name] = value;
43499
43562
  }
43500
43563
  });
43501
- var config = _objectSpread$v(_objectSpread$v({}, passThrough), {}, {
43502
- transport: "streamable_http",
43503
- url: url.trim()
43504
- });
43505
- if (Object.keys(headerTemplate).length > 0) {
43564
+ if (authType === "apiKey" && Object.keys(headerTemplate).length > 0) {
43506
43565
  config.headerTemplate = headerTemplate;
43507
43566
  }
43508
43567
  return config;
@@ -43531,7 +43590,7 @@ function buildMcpConfig(transport, _ref3) {
43531
43590
  * preserved verbatim on save so editing never silently drops them.
43532
43591
  */
43533
43592
  var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43534
- var _testResult$tools;
43593
+ var _initialMcpConfig$oau, _initialMcpConfig$oau2, _initialMcpConfig$oau3, _initialMcpConfig$oau4, _initialMcpConfig$oau5, _testResult$tools;
43535
43594
  var onSave = _ref4.onSave,
43536
43595
  onBack = _ref4.onBack,
43537
43596
  _ref4$isEditMode = _ref4.isEditMode,
@@ -43617,41 +43676,67 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43617
43676
  headerRows = _useState22[0],
43618
43677
  setHeaderRows = _useState22[1];
43619
43678
 
43620
- // Tool selection state
43621
- var _useState23 = useState(initialAllowedTools),
43679
+ // HTTP auth type: "none" | "apiKey" | "oauth"
43680
+ var _useState23 = useState(function () {
43681
+ var cfg = initialMcpConfig || {};
43682
+ if (cfg.auth === "oauth" || cfg.oauth) return "oauth";
43683
+ return "apiKey";
43684
+ }),
43622
43685
  _useState24 = _slicedToArray(_useState23, 2),
43623
- selectedTools = _useState24[0],
43624
- setSelectedTools = _useState24[1];
43625
-
43626
- // Wizard step state
43627
- var _useState25 = useState(0),
43686
+ authType = _useState24[0],
43687
+ setAuthType = _useState24[1];
43688
+ var _useState25 = useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau = initialMcpConfig.oauth) === null || _initialMcpConfig$oau === void 0 ? void 0 : _initialMcpConfig$oau.scopes) || ""),
43628
43689
  _useState26 = _slicedToArray(_useState25, 2),
43629
- wizardStep = _useState26[0],
43630
- setWizardStep = _useState26[1];
43631
-
43632
- // Auth state
43633
- var _useState27 = useState(false),
43690
+ oauthScopes = _useState26[0],
43691
+ setOauthScopes = _useState26[1];
43692
+ var _useState27 = useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau2 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau2 === void 0 ? void 0 : _initialMcpConfig$oau2.clientId) || ""),
43634
43693
  _useState28 = _slicedToArray(_useState27, 2),
43635
- isAuthorizing = _useState28[0],
43636
- setIsAuthorizing = _useState28[1];
43637
- var _useState29 = useState(null),
43694
+ oauthClientId = _useState28[0],
43695
+ setOauthClientId = _useState28[1];
43696
+ var _useState29 = useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau3 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau3 === void 0 ? void 0 : _initialMcpConfig$oau3.clientSecret) || ""),
43638
43697
  _useState30 = _slicedToArray(_useState29, 2),
43639
- authResult = _useState30[0],
43640
- setAuthResult = _useState30[1];
43641
-
43642
- // JSON editor state
43643
- var _useState31 = useState("form"),
43698
+ oauthClientSecret = _useState30[0],
43699
+ setOauthClientSecret = _useState30[1];
43700
+ var _useState31 = useState(!!(initialMcpConfig !== null && initialMcpConfig !== void 0 && (_initialMcpConfig$oau4 = initialMcpConfig.oauth) !== null && _initialMcpConfig$oau4 !== void 0 && _initialMcpConfig$oau4.clientId || initialMcpConfig !== null && initialMcpConfig !== void 0 && (_initialMcpConfig$oau5 = initialMcpConfig.oauth) !== null && _initialMcpConfig$oau5 !== void 0 && _initialMcpConfig$oau5.clientSecret)),
43644
43701
  _useState32 = _slicedToArray(_useState31, 2),
43645
- viewMode = _useState32[0],
43646
- setViewMode = _useState32[1]; // "form" | "json"
43647
- var _useState33 = useState(""),
43702
+ showOauthAdvanced = _useState32[0],
43703
+ setShowOauthAdvanced = _useState32[1];
43704
+
43705
+ // Tool selection state
43706
+ var _useState33 = useState(initialAllowedTools),
43648
43707
  _useState34 = _slicedToArray(_useState33, 2),
43649
- jsonText = _useState34[0],
43650
- setJsonText = _useState34[1];
43651
- var _useState35 = useState(null),
43708
+ selectedTools = _useState34[0],
43709
+ setSelectedTools = _useState34[1];
43710
+
43711
+ // Wizard step state
43712
+ var _useState35 = useState(0),
43652
43713
  _useState36 = _slicedToArray(_useState35, 2),
43653
- jsonError = _useState36[0],
43654
- setJsonError = _useState36[1];
43714
+ wizardStep = _useState36[0],
43715
+ setWizardStep = _useState36[1];
43716
+
43717
+ // Auth state
43718
+ var _useState37 = useState(false),
43719
+ _useState38 = _slicedToArray(_useState37, 2),
43720
+ isAuthorizing = _useState38[0],
43721
+ setIsAuthorizing = _useState38[1];
43722
+ var _useState39 = useState(null),
43723
+ _useState40 = _slicedToArray(_useState39, 2),
43724
+ authResult = _useState40[0],
43725
+ setAuthResult = _useState40[1];
43726
+
43727
+ // JSON editor state
43728
+ var _useState41 = useState("form"),
43729
+ _useState42 = _slicedToArray(_useState41, 2),
43730
+ viewMode = _useState42[0],
43731
+ setViewMode = _useState42[1]; // "form" | "json"
43732
+ var _useState43 = useState(""),
43733
+ _useState44 = _slicedToArray(_useState43, 2),
43734
+ jsonText = _useState44[0],
43735
+ setJsonText = _useState44[1];
43736
+ var _useState45 = useState(null),
43737
+ _useState46 = _slicedToArray(_useState45, 2),
43738
+ jsonError = _useState46[0],
43739
+ setJsonError = _useState46[1];
43655
43740
 
43656
43741
  // Clear credential data when transport changes (derived fields change entirely)
43657
43742
  // Only in create mode — in edit mode the initial transport is set correctly
@@ -43663,8 +43748,11 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43663
43748
  }
43664
43749
  }, [transport, isEditMode]);
43665
43750
 
43666
- // Dynamic wizard steps based on whether auth is needed
43667
- var hasAuth = !!initialAuthCommand;
43751
+ // Dynamic wizard steps based on whether auth is needed. Either a
43752
+ // catalog-provided subprocess authCommand (legacy) or an OAuth 2.0
43753
+ // custom server adds an "Authorize" step before Test & Tools.
43754
+ var isOAuth = transport === "streamable_http" && authType === "oauth";
43755
+ var hasAuth = !!initialAuthCommand || isOAuth;
43668
43756
  var wizardSteps = hasAuth ? ["configure", "authorize", "testTools"] : ["configure", "testTools"];
43669
43757
  var totalSteps = wizardSteps.length;
43670
43758
  var currentStepType = wizardSteps[wizardStep];
@@ -43693,9 +43781,13 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43693
43781
  args: args,
43694
43782
  envMappingRows: envMappingRows,
43695
43783
  url: url,
43696
- headerRows: headerRows
43784
+ headerRows: headerRows,
43785
+ authType: authType,
43786
+ oauthScopes: oauthScopes,
43787
+ oauthClientId: oauthClientId,
43788
+ oauthClientSecret: oauthClientSecret
43697
43789
  }, initialMcpConfig || {});
43698
- }, [transport, command, args, envMappingRows, url, headerRows, initialMcpConfig]);
43790
+ }, [transport, command, args, envMappingRows, url, headerRows, authType, oauthScopes, oauthClientId, oauthClientSecret, initialMcpConfig]);
43699
43791
 
43700
43792
  // Invalidate test result when config changes after a test
43701
43793
  var mcpConfigRef = useRef(mcpConfig);
@@ -43893,10 +43985,10 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43893
43985
 
43894
43986
  // --- authorize (OAuth browser flow) ---
43895
43987
  var handleAuthorize = function handleAuthorize() {
43896
- if (!dashApi || !initialAuthCommand) return;
43988
+ if (!dashApi) return;
43897
43989
  setIsAuthorizing(true);
43898
43990
  setAuthResult(null);
43899
- dashApi.mcpRunAuth(mcpConfig, credentialData, initialAuthCommand, function (event, result) {
43991
+ var onComplete = function onComplete(event, result) {
43900
43992
  if (result.error) {
43901
43993
  setAuthResult({
43902
43994
  success: false,
@@ -43909,13 +44001,22 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43909
44001
  });
43910
44002
  }
43911
44003
  setIsAuthorizing(false);
43912
- }, function (event, err) {
44004
+ };
44005
+ var onFail = function onFail(event, err) {
43913
44006
  setAuthResult({
43914
44007
  success: false,
43915
44008
  message: (err === null || err === void 0 ? void 0 : err.message) || "Authorization failed"
43916
44009
  });
43917
44010
  setIsAuthorizing(false);
43918
- });
44011
+ };
44012
+ if (isOAuth) {
44013
+ // SDK-native OAuth 2.0: opens the system browser, persists tokens.
44014
+ dashApi.mcpAuthorize(providerName.trim() || "__test__custom", mcpConfig, credentialData, onComplete, onFail, appContext === null || appContext === void 0 ? void 0 : appContext.appId);
44015
+ return;
44016
+ }
44017
+ if (!initialAuthCommand) return;
44018
+ // Legacy catalog subprocess auth (e.g. bundled Google servers).
44019
+ dashApi.mcpRunAuth(mcpConfig, credentialData, initialAuthCommand, onComplete, onFail);
43919
44020
  };
43920
44021
 
43921
44022
  // --- save ---
@@ -44224,7 +44325,82 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
44224
44325
  className: "text-sm text-red-400",
44225
44326
  children: formErrors.url
44226
44327
  })]
44227
- }), /*#__PURE__*/jsxs("div", {
44328
+ }), /*#__PURE__*/jsx("div", {
44329
+ className: "flex flex-col gap-2",
44330
+ children: /*#__PURE__*/jsx(RadioGroup, {
44331
+ label: "Authentication",
44332
+ name: "mcp-http-auth-type",
44333
+ value: authType,
44334
+ onChange: function onChange(value) {
44335
+ setAuthType(value);
44336
+ setAuthResult(null);
44337
+ },
44338
+ options: [{
44339
+ value: "none",
44340
+ label: "None"
44341
+ }, {
44342
+ value: "apiKey",
44343
+ label: "API key (headers)"
44344
+ }, {
44345
+ value: "oauth",
44346
+ label: "OAuth 2.0 (browser sign-in)"
44347
+ }]
44348
+ })
44349
+ }), authType === "oauth" && /*#__PURE__*/jsxs("div", {
44350
+ className: "space-y-3",
44351
+ children: [/*#__PURE__*/jsxs("div", {
44352
+ className: "flex flex-col gap-2",
44353
+ children: [/*#__PURE__*/jsx(FormLabel, {
44354
+ label: "Scopes"
44355
+ }), /*#__PURE__*/jsx("p", {
44356
+ className: "text-sm opacity-50",
44357
+ children: "Space-separated OAuth scopes (optional \u2014 many servers grant defaults)."
44358
+ }), /*#__PURE__*/jsx(InputText, {
44359
+ value: oauthScopes,
44360
+ onChange: setOauthScopes,
44361
+ placeholder: "e.g., read write offline_access"
44362
+ })]
44363
+ }), /*#__PURE__*/jsxs("button", {
44364
+ type: "button",
44365
+ onClick: function onClick() {
44366
+ return setShowOauthAdvanced(function (v) {
44367
+ return !v;
44368
+ });
44369
+ },
44370
+ className: "text-sm text-blue-400 hover:text-blue-300 transition-colors flex items-center gap-1 self-start",
44371
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
44372
+ icon: showOauthAdvanced ? "chevron-down" : "chevron-right",
44373
+ className: "text-xs"
44374
+ }), /*#__PURE__*/jsx("span", {
44375
+ children: "Advanced: pre-registered client"
44376
+ })]
44377
+ }), showOauthAdvanced && /*#__PURE__*/jsxs("div", {
44378
+ className: "space-y-3 pl-1",
44379
+ children: [/*#__PURE__*/jsx("p", {
44380
+ className: "text-sm opacity-50",
44381
+ children: "Only needed for servers that don't support Dynamic Client Registration. Leave blank otherwise."
44382
+ }), /*#__PURE__*/jsxs("div", {
44383
+ className: "flex flex-col gap-2",
44384
+ children: [/*#__PURE__*/jsx(FormLabel, {
44385
+ label: "Client ID"
44386
+ }), /*#__PURE__*/jsx(InputText, {
44387
+ value: oauthClientId,
44388
+ onChange: setOauthClientId,
44389
+ placeholder: "Client ID"
44390
+ })]
44391
+ }), /*#__PURE__*/jsxs("div", {
44392
+ className: "flex flex-col gap-2",
44393
+ children: [/*#__PURE__*/jsx(FormLabel, {
44394
+ label: "Client secret"
44395
+ }), /*#__PURE__*/jsx(InputText, {
44396
+ type: "password",
44397
+ value: oauthClientSecret,
44398
+ onChange: setOauthClientSecret,
44399
+ placeholder: "Client secret (if required)"
44400
+ })]
44401
+ })]
44402
+ })]
44403
+ }), authType === "apiKey" && /*#__PURE__*/jsxs("div", {
44228
44404
  className: "space-y-3",
44229
44405
  children: [/*#__PURE__*/jsxs("div", {
44230
44406
  children: [/*#__PURE__*/jsx(FormLabel, {
@@ -44365,7 +44541,7 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
44365
44541
  className: "flex flex-col items-center justify-center py-8 space-y-4",
44366
44542
  children: [/*#__PURE__*/jsx("p", {
44367
44543
  className: "text-sm opacity-60 text-center max-w-md",
44368
- children: "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
44544
+ children: isOAuth ? "This server uses OAuth 2.0. Click below to open your browser, sign in, and approve access. Dash stores the resulting tokens securely and refreshes them automatically." : "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
44369
44545
  }), /*#__PURE__*/jsx(Button, {
44370
44546
  title: isAuthorizing ? "Authorizing..." : "Authorize",
44371
44547
  onClick: handleAuthorize,
@@ -44386,7 +44562,18 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
44386
44562
  children: [/*#__PURE__*/jsx("p", {
44387
44563
  className: "text-xs font-semibold opacity-40 uppercase tracking-wider",
44388
44564
  children: "Troubleshooting"
44389
- }), /*#__PURE__*/jsxs("ul", {
44565
+ }), isOAuth ? /*#__PURE__*/jsxs("ul", {
44566
+ className: "text-sm opacity-60 space-y-1 list-disc list-inside",
44567
+ children: [/*#__PURE__*/jsx("li", {
44568
+ children: "Make sure a browser window opened \u2014 check for a blocked pop-up or default-browser prompt"
44569
+ }), /*#__PURE__*/jsx("li", {
44570
+ children: "Allow Dash to accept the local sign-in redirect if your firewall prompts"
44571
+ }), /*#__PURE__*/jsx("li", {
44572
+ children: "Verify the server URL is correct and the scopes are valid for this server"
44573
+ }), /*#__PURE__*/jsx("li", {
44574
+ children: "For servers without dynamic registration, set a Client ID under \"Advanced\""
44575
+ })]
44576
+ }) : /*#__PURE__*/jsxs("ul", {
44390
44577
  className: "text-sm opacity-60 space-y-1 list-disc list-inside",
44391
44578
  children: [/*#__PURE__*/jsx("li", {
44392
44579
  children: "Ensure Node.js and npx are available in your PATH"
@@ -68349,5 +68536,5 @@ function computeDashboardPreflight(_ref) {
68349
68536
 
68350
68537
  ComponentManager.registerContainerTypes(LayoutContainer, LayoutGridContainer);
68351
68538
 
68352
- export { ALGOLIA_ANALYTICS_FOR_QUERY, ALGOLIA_ANALYTICS_FOR_QUERY_COMPLETE, ALGOLIA_ANALYTICS_FOR_QUERY_ERROR, ALGOLIA_LIST_INDICES, ALGOLIA_LIST_INDICES_COMPLETE, ALGOLIA_LIST_INDICES_ERROR, AVAILABLE_COLORS, AddMenuItemModal, AdvancedMcpConfig, AppContext, AppSettingsModal, AppThemeScope, AppWrapper, CHOOSE_FILE, CHOOSE_FILE_COMPLETE, CHOOSE_FILE_ERROR, ChatCore, ChatInput, ChatMessages, ColorModel, ComponentConfigModel, ComponentManager, ContextModel, DATA_JSON_TO_CSV_FILE, DATA_JSON_TO_CSV_FILE_COMPLETE, DATA_JSON_TO_CSV_FILE_ERROR, DATA_JSON_TO_CSV_STRING, DATA_JSON_TO_CSV_STRING_COMPLETE, DATA_JSON_TO_CSV_STRING_ERROR, DATA_READ_FROM_FILE, DATA_READ_FROM_FILE_COMPLETE, DATA_READ_FROM_FILE_ERROR, DATA_SAVE_TO_FILE, DATA_SAVE_TO_FILE_COMPLETE, DATA_SAVE_TO_FILE_ERROR, DashCommandPalette, DashNavbar, DashSidebar, DashTabBar, DashboardStage as Dashboard, DashboardActionsApi, DashboardApi, DashboardContext, DashboardFooter, DashboardHeader, DashboardMenuItem, DashboardModel, DashboardMonitor, DashboardPublisher, DashboardStage, DashboardThemeProvider, DashboardWizardModal, DashboardWrapper, ElectronDashboardApi, ErrorBoundary, ExternalWidget, GRID_CELL_WIDGET_TYPE, HARMONY_STRATEGIES, LAYOUT_LIST, LAYOUT_LIST_COMPLETE, LAYOUT_LIST_ERROR, Layout, LayoutBuilder, LayoutBuilderAddItemModal, LayoutBuilderConfigContainerMenuItem, LayoutBuilderConfigMenuItem, LayoutBuilderConfigModal, LayoutBuilderEditItemModal, LayoutBuilderEventModal, LayoutBuilderGridItem, LayoutContainer, LayoutDragBuilder, LayoutDragBuilderEdit, LayoutGridContainer, LayoutManagerModal, LayoutModel, LayoutQuickAddMenu, MCP_CALL_TOOL_COMPLETE, MCP_CALL_TOOL_ERROR, MCP_GET_CATALOG_COMPLETE, MCP_GET_CATALOG_ERROR, MCP_LIST_RESOURCES_COMPLETE, MCP_LIST_RESOURCES_ERROR, MCP_LIST_TOOLS_COMPLETE, MCP_LIST_TOOLS_ERROR, MCP_READ_RESOURCE_COMPLETE, MCP_READ_RESOURCE_ERROR, MCP_RUN_AUTH_COMPLETE, MCP_RUN_AUTH_ERROR, MCP_SERVER_STATUS_COMPLETE, MCP_SERVER_STATUS_ERROR, MCP_START_SERVER_COMPLETE, MCP_START_SERVER_ERROR, MCP_STOP_SERVER_COMPLETE, MCP_STOP_SERVER_ERROR, MENU_ITEMS_DELETE, MENU_ITEMS_DELETE_COMPLETE, MENU_ITEMS_DELETE_ERROR, MENU_ITEMS_LIST, MENU_ITEMS_LIST_COMPLETE, MENU_ITEMS_LIST_ERROR, MENU_ITEMS_SAVE, MENU_ITEMS_SAVE_COMPLETE, MENU_ITEMS_SAVE_ERROR, MainMenu, MainMenuItem, MainMenuSection, MarkdownFormEditor, McpServerPicker, MenuItemModel, MenuSlideOverlay, MergeCellsModal, MessageBubble, MissingProviderPrompt, MockDashboardApi, PROVIDER_DELETE_COMPLETE, PROVIDER_DELETE_ERROR, PROVIDER_GET_COMPLETE, PROVIDER_GET_ERROR, PROVIDER_LIST_COMPLETE, PROVIDER_LIST_ERROR, PROVIDER_SAVE_COMPLETE, PROVIDER_SAVE_ERROR, PageTabBar, PanelCode, PanelEditItem, PanelEditItemHandlers, PanelEditItemNotifications, PanelEditItemProviders, PinnedSidebar, ProviderContext, ProviderErrorBoundary, ProviderForm, ProviderSelector, SECURE_STORAGE_ENCRYPT_STRING, SECURE_STORAGE_ENCRYPT_STRING_COMPLETE, SECURE_STORAGE_ENCRYPT_STRING_ERROR, SECURE_STORE_ENCRYPTION_CHECK, SECURE_STORE_ENCRYPTION_CHECK_COMPLETE, SECURE_STORE_ENCRYPTION_CHECK_ERROR, SECURE_STORE_GET_DATA, SECURE_STORE_GET_DATA_COMPLETE, SECURE_STORE_GET_DATA_ERROR, SECURE_STORE_SET_DATA, SECURE_STORE_SET_DATA_COMPLETE, SECURE_STORE_SET_DATA_ERROR, SETTINGS_GET, SETTINGS_GET_COMPLETE, SETTINGS_GET_ERROR, SETTINGS_SAVE, SETTINGS_SAVE_COMPLETE, SETTINGS_SAVE_ERROR, SIDEBAR_WIDGET_TYPE, SettingsModel, SideMenu, SplitCellModal, StreamingText, THEME_DELETE, THEME_DELETE_COMPLETE, THEME_DELETE_ERROR, THEME_EXTRACT_FROM_URL, THEME_EXTRACT_FROM_URL_COMPLETE, THEME_EXTRACT_FROM_URL_ERROR, THEME_LIST, THEME_LIST_COMPLETE, THEME_LIST_ERROR, THEME_MAP_PALETTE, THEME_MAP_PALETTE_COMPLETE, THEME_MAP_PALETTE_ERROR, THEME_SAVE, THEME_SAVE_COMPLETE, THEME_SAVE_ERROR, ThemeApi, ThemeColorDots, ThemeManagerModal, ThemeModel, ThemeWrapper, ToolCallBlock, ToolSelector, WELCOME_STORAGE_KEY, WORKSPACE_DELETE, WORKSPACE_DELETE_COMPLETE, WORKSPACE_DELETE_ERROR, WORKSPACE_LIST, WORKSPACE_LIST_COMPLETE, WORKSPACE_LIST_ERROR, WORKSPACE_SAVE, WORKSPACE_SAVE_COMPLETE, WORKSPACE_SAVE_ERROR, WebDashboardApi, WelcomePrompt, Widget, WidgetApi, WidgetConfigPanel, WidgetContext, WidgetFactory, WidgetNotFound, WidgetPopoutStage, WidgetProviderWrapper, WidgetSidebar, WizardCustomizeStep, WizardDiscoverStep, Workspace, WorkspaceContext, WorkspaceFooter, WorkspaceMenu, WorkspaceModel, WorkspaceScopeContext, addChildToLayoutItem, addItemToItemLayout, bareComponentName, buildMcpConfigFromOverrides, canHaveChildren, changeDirectionForLayoutItem, computeDashboardPreflight, createProviderRegistry, deriveFormFields, envMappingToRows, evaluateBundle, extractWidgetConfigs, formStateToMcpJson, formatFieldName, generateCustomTheme, generateHarmonyTheme, generateRandomHexTheme, generateRandomTheme, generateThemeName, getBorderStyle, getBrandPresets, getChildrenForLayoutItem, getComponentInLayout, getContainerBorderColor, getContainerColor, getIndexOfLayoutChildrenForItem, getIndexOfLayoutItem, getLayoutItemById, getLayoutItemForWorkspace, getNearestParentWorkspace, getNextHighestId, getNextHighestItemInLayout, getNextHighestOrder, getNextHighestParentId, getNextLowestItemInLayout, getParentForLayoutItem, getParentWorkspaceForItem, getThemePresets, getUserConfigurableProviders, getWidgetsForWorkspace, getWorkspacesForWorkspace, headerTemplateToRows, humanizeAction, isContainer, isLikelySecret, isMaxOrderForItem, isMinOrderForItem, isWidget, isWidgetResolvable, isWorkspace, layoutItemHasWorkspaceAsChild, loadWidgetBundle, makeScopedComponentId, mcpJsonToFormState, moveWidgetAcrossContainers, numChildrenForLayout, parse, parseScopedComponentId, removeItemFromLayout, renderComponent, renderGridLayout, renderGridLayoutFlow, _renderLayout as renderLayout, renderLayoutMenu, replaceItemInLayout, resolveIcon, serialize, setHostModules, traverseParentTree, updateLayoutItem, updateParentForItem, useDashboard, useMcpDashServer, useMcpProvider, useNotifications, useProvider, useProviderClient, useScheduler, useWebSocketProvider, useWidgetEvents, useWidgetProviders, useWidgetRegistryVersion, useWidgetSchedulerStatus, useWizardState, validateCellMerge, validateGridCell, validateGridPlacement, validateWidgetPlacement, widgetCountToTemplate, withProviderDetection };
68539
+ export { ALGOLIA_ANALYTICS_FOR_QUERY, ALGOLIA_ANALYTICS_FOR_QUERY_COMPLETE, ALGOLIA_ANALYTICS_FOR_QUERY_ERROR, ALGOLIA_LIST_INDICES, ALGOLIA_LIST_INDICES_COMPLETE, ALGOLIA_LIST_INDICES_ERROR, AVAILABLE_COLORS, AddMenuItemModal, AdvancedMcpConfig, AppContext, AppSettingsModal, AppThemeScope, AppWrapper, CHOOSE_FILE, CHOOSE_FILE_COMPLETE, CHOOSE_FILE_ERROR, ChatCore, ChatInput, ChatMessages, ColorModel, ComponentConfigModel, ComponentManager, ContextModel, DATA_JSON_TO_CSV_FILE, DATA_JSON_TO_CSV_FILE_COMPLETE, DATA_JSON_TO_CSV_FILE_ERROR, DATA_JSON_TO_CSV_STRING, DATA_JSON_TO_CSV_STRING_COMPLETE, DATA_JSON_TO_CSV_STRING_ERROR, DATA_READ_FROM_FILE, DATA_READ_FROM_FILE_COMPLETE, DATA_READ_FROM_FILE_ERROR, DATA_SAVE_TO_FILE, DATA_SAVE_TO_FILE_COMPLETE, DATA_SAVE_TO_FILE_ERROR, DashCommandPalette, DashNavbar, DashSidebar, DashTabBar, DashboardStage as Dashboard, DashboardActionsApi, DashboardApi, DashboardContext, DashboardFooter, DashboardHeader, DashboardMenuItem, DashboardModel, DashboardMonitor, DashboardPublisher, DashboardStage, DashboardThemeProvider, DashboardWizardModal, DashboardWrapper, ElectronDashboardApi, ErrorBoundary, ExternalWidget, GRID_CELL_WIDGET_TYPE, HARMONY_STRATEGIES, LAYOUT_LIST, LAYOUT_LIST_COMPLETE, LAYOUT_LIST_ERROR, Layout, LayoutBuilder, LayoutBuilderAddItemModal, LayoutBuilderConfigContainerMenuItem, LayoutBuilderConfigMenuItem, LayoutBuilderConfigModal, LayoutBuilderEditItemModal, LayoutBuilderEventModal, LayoutBuilderGridItem, LayoutContainer, LayoutDragBuilder, LayoutDragBuilderEdit, LayoutGridContainer, LayoutManagerModal, LayoutModel, LayoutQuickAddMenu, MCP_AUTHORIZE_COMPLETE, MCP_AUTHORIZE_ERROR, MCP_CALL_TOOL_COMPLETE, MCP_CALL_TOOL_ERROR, MCP_GET_CATALOG_COMPLETE, MCP_GET_CATALOG_ERROR, MCP_LIST_RESOURCES_COMPLETE, MCP_LIST_RESOURCES_ERROR, MCP_LIST_TOOLS_COMPLETE, MCP_LIST_TOOLS_ERROR, MCP_READ_RESOURCE_COMPLETE, MCP_READ_RESOURCE_ERROR, MCP_RUN_AUTH_COMPLETE, MCP_RUN_AUTH_ERROR, MCP_SERVER_STATUS_COMPLETE, MCP_SERVER_STATUS_ERROR, MCP_START_SERVER_COMPLETE, MCP_START_SERVER_ERROR, MCP_STOP_SERVER_COMPLETE, MCP_STOP_SERVER_ERROR, MENU_ITEMS_DELETE, MENU_ITEMS_DELETE_COMPLETE, MENU_ITEMS_DELETE_ERROR, MENU_ITEMS_LIST, MENU_ITEMS_LIST_COMPLETE, MENU_ITEMS_LIST_ERROR, MENU_ITEMS_SAVE, MENU_ITEMS_SAVE_COMPLETE, MENU_ITEMS_SAVE_ERROR, MainMenu, MainMenuItem, MainMenuSection, MarkdownFormEditor, McpServerPicker, MenuItemModel, MenuSlideOverlay, MergeCellsModal, MessageBubble, MissingProviderPrompt, MockDashboardApi, PROVIDER_DELETE_COMPLETE, PROVIDER_DELETE_ERROR, PROVIDER_GET_COMPLETE, PROVIDER_GET_ERROR, PROVIDER_LIST_COMPLETE, PROVIDER_LIST_ERROR, PROVIDER_SAVE_COMPLETE, PROVIDER_SAVE_ERROR, PageTabBar, PanelCode, PanelEditItem, PanelEditItemHandlers, PanelEditItemNotifications, PanelEditItemProviders, PinnedSidebar, ProviderContext, ProviderErrorBoundary, ProviderForm, ProviderSelector, SECURE_STORAGE_ENCRYPT_STRING, SECURE_STORAGE_ENCRYPT_STRING_COMPLETE, SECURE_STORAGE_ENCRYPT_STRING_ERROR, SECURE_STORE_ENCRYPTION_CHECK, SECURE_STORE_ENCRYPTION_CHECK_COMPLETE, SECURE_STORE_ENCRYPTION_CHECK_ERROR, SECURE_STORE_GET_DATA, SECURE_STORE_GET_DATA_COMPLETE, SECURE_STORE_GET_DATA_ERROR, SECURE_STORE_SET_DATA, SECURE_STORE_SET_DATA_COMPLETE, SECURE_STORE_SET_DATA_ERROR, SETTINGS_GET, SETTINGS_GET_COMPLETE, SETTINGS_GET_ERROR, SETTINGS_SAVE, SETTINGS_SAVE_COMPLETE, SETTINGS_SAVE_ERROR, SIDEBAR_WIDGET_TYPE, SettingsModel, SideMenu, SplitCellModal, StreamingText, THEME_DELETE, THEME_DELETE_COMPLETE, THEME_DELETE_ERROR, THEME_EXTRACT_FROM_URL, THEME_EXTRACT_FROM_URL_COMPLETE, THEME_EXTRACT_FROM_URL_ERROR, THEME_LIST, THEME_LIST_COMPLETE, THEME_LIST_ERROR, THEME_MAP_PALETTE, THEME_MAP_PALETTE_COMPLETE, THEME_MAP_PALETTE_ERROR, THEME_SAVE, THEME_SAVE_COMPLETE, THEME_SAVE_ERROR, ThemeApi, ThemeColorDots, ThemeManagerModal, ThemeModel, ThemeWrapper, ToolCallBlock, ToolSelector, WELCOME_STORAGE_KEY, WORKSPACE_DELETE, WORKSPACE_DELETE_COMPLETE, WORKSPACE_DELETE_ERROR, WORKSPACE_LIST, WORKSPACE_LIST_COMPLETE, WORKSPACE_LIST_ERROR, WORKSPACE_SAVE, WORKSPACE_SAVE_COMPLETE, WORKSPACE_SAVE_ERROR, WebDashboardApi, WelcomePrompt, Widget, WidgetApi, WidgetConfigPanel, WidgetContext, WidgetFactory, WidgetNotFound, WidgetPopoutStage, WidgetProviderWrapper, WidgetSidebar, WizardCustomizeStep, WizardDiscoverStep, Workspace, WorkspaceContext, WorkspaceFooter, WorkspaceMenu, WorkspaceModel, WorkspaceScopeContext, addChildToLayoutItem, addItemToItemLayout, bareComponentName, buildMcpConfigFromOverrides, canHaveChildren, changeDirectionForLayoutItem, computeDashboardPreflight, createProviderRegistry, deriveFormFields, envMappingToRows, evaluateBundle, extractWidgetConfigs, formStateToMcpJson, formatFieldName, generateCustomTheme, generateHarmonyTheme, generateRandomHexTheme, generateRandomTheme, generateThemeName, getBorderStyle, getBrandPresets, getChildrenForLayoutItem, getComponentInLayout, getContainerBorderColor, getContainerColor, getIndexOfLayoutChildrenForItem, getIndexOfLayoutItem, getLayoutItemById, getLayoutItemForWorkspace, getNearestParentWorkspace, getNextHighestId, getNextHighestItemInLayout, getNextHighestOrder, getNextHighestParentId, getNextLowestItemInLayout, getParentForLayoutItem, getParentWorkspaceForItem, getThemePresets, getUserConfigurableProviders, getWidgetsForWorkspace, getWorkspacesForWorkspace, headerTemplateToRows, humanizeAction, isContainer, isLikelySecret, isMaxOrderForItem, isMinOrderForItem, isWidget, isWidgetResolvable, isWorkspace, layoutItemHasWorkspaceAsChild, loadWidgetBundle, makeScopedComponentId, mcpJsonToFormState, moveWidgetAcrossContainers, numChildrenForLayout, parse, parseScopedComponentId, removeItemFromLayout, renderComponent, renderGridLayout, renderGridLayoutFlow, _renderLayout as renderLayout, renderLayoutMenu, replaceItemInLayout, resolveIcon, serialize, setHostModules, traverseParentTree, updateLayoutItem, updateParentForItem, useDashboard, useMcpDashServer, useMcpProvider, useNotifications, useProvider, useProviderClient, useScheduler, useWebSocketProvider, useWidgetEvents, useWidgetProviders, useWidgetRegistryVersion, useWidgetSchedulerStatus, useWizardState, validateCellMerge, validateGridCell, validateGridPlacement, validateWidgetPlacement, widgetCountToTemplate, withProviderDetection };
68353
68540
  //# sourceMappingURL=index.esm.js.map