@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.js CHANGED
@@ -954,6 +954,8 @@ var MCP_GET_CATALOG_COMPLETE = "mcp:get-catalog:complete";
954
954
  var MCP_GET_CATALOG_ERROR = "mcp:get-catalog:error";
955
955
  var MCP_RUN_AUTH_COMPLETE = "mcp:run-auth:complete";
956
956
  var MCP_RUN_AUTH_ERROR = "mcp:run-auth:error";
957
+ var MCP_AUTHORIZE_COMPLETE = "mcp:authorize:complete";
958
+ var MCP_AUTHORIZE_ERROR = "mcp:authorize:error";
957
959
 
958
960
  var DATA_JSON_TO_CSV_FILE = "data-json-to-csv-file";
959
961
  var DATA_JSON_TO_CSV_FILE_COMPLETE = "data-json-to-csv-file-complete";
@@ -1049,6 +1051,8 @@ var apiEvents = /*#__PURE__*/Object.freeze({
1049
1051
  LAYOUT_LIST: LAYOUT_LIST,
1050
1052
  LAYOUT_LIST_COMPLETE: LAYOUT_LIST_COMPLETE,
1051
1053
  LAYOUT_LIST_ERROR: LAYOUT_LIST_ERROR,
1054
+ MCP_AUTHORIZE_COMPLETE: MCP_AUTHORIZE_COMPLETE,
1055
+ MCP_AUTHORIZE_ERROR: MCP_AUTHORIZE_ERROR,
1052
1056
  MCP_CALL_TOOL_COMPLETE: MCP_CALL_TOOL_COMPLETE,
1053
1057
  MCP_CALL_TOOL_ERROR: MCP_CALL_TOOL_ERROR,
1054
1058
  MCP_GET_CATALOG_COMPLETE: MCP_GET_CATALOG_COMPLETE,
@@ -1653,9 +1657,10 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
1653
1657
  var _this20 = this;
1654
1658
  var workspaceId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
1655
1659
  var pathScope = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
1660
+ var appId = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
1656
1661
  if (this.api !== null) {
1657
1662
  try {
1658
- this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope).then(function (result) {
1663
+ this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
1659
1664
  onSuccess(_this20.events.MCP_START_SERVER_COMPLETE, result);
1660
1665
  })["catch"](function (error) {
1661
1666
  onError(_this20.events.MCP_START_SERVER_ERROR, error);
@@ -1881,6 +1886,28 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
1881
1886
  return false;
1882
1887
  }
1883
1888
  }
1889
+ }, {
1890
+ key: "mcpAuthorize",
1891
+ value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
1892
+ var _this30 = this;
1893
+ var appId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
1894
+ if (this.api !== null) {
1895
+ try {
1896
+ this.api.mcp.authorize(serverName, mcpConfig, credentials, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
1897
+ onSuccess(_this30.events.MCP_AUTHORIZE_COMPLETE, result);
1898
+ })["catch"](function (error) {
1899
+ onError(_this30.events.MCP_AUTHORIZE_ERROR, error);
1900
+ });
1901
+ return true;
1902
+ } catch (e) {
1903
+ onError(this.events.MCP_AUTHORIZE_ERROR, e);
1904
+ return false;
1905
+ }
1906
+ } else {
1907
+ onError(this.events.MCP_AUTHORIZE_ERROR, new Error("No Api found"));
1908
+ return false;
1909
+ }
1910
+ }
1884
1911
  }]);
1885
1912
  }();
1886
1913
 
@@ -2154,6 +2181,12 @@ var WebDashboardApi = /*#__PURE__*/function () {
2154
2181
  onError === null || onError === void 0 ? void 0 : onError("mcp:run-auth:error", new Error("MCP not available in web mode"));
2155
2182
  return false;
2156
2183
  }
2184
+ }, {
2185
+ key: "mcpAuthorize",
2186
+ value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
2187
+ onError === null || onError === void 0 ? void 0 : onError("mcp:authorize:error", new Error("MCP not available in web mode"));
2188
+ return false;
2189
+ }
2157
2190
  }]);
2158
2191
  }();
2159
2192
 
@@ -33496,7 +33529,7 @@ var useMcpProvider = function useMcpProvider(providerType) {
33496
33529
  consumerCount: 0
33497
33530
  });
33498
33531
  reject(err);
33499
- }, workspaceId, pathScope);
33532
+ }, workspaceId, pathScope, app === null || app === void 0 ? void 0 : app.appId);
33500
33533
  });
33501
33534
  pendingConnects$1.set(stateKey, connectPromise);
33502
33535
  _context.prev = 24;
@@ -43351,7 +43384,7 @@ var ProviderDetail = function ProviderDetail(_ref) {
43351
43384
  });
43352
43385
  };
43353
43386
 
43354
- var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers"];
43387
+ var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers", "auth", "oauth"];
43355
43388
  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; }
43356
43389
  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; }
43357
43390
  var DirectoryListField = function DirectoryListField(_ref) {
@@ -43479,9 +43512,20 @@ function buildMcpConfig(transport, _ref3) {
43479
43512
  args = _ref3.args,
43480
43513
  envMappingRows = _ref3.envMappingRows,
43481
43514
  url = _ref3.url,
43482
- headerRows = _ref3.headerRows;
43515
+ headerRows = _ref3.headerRows,
43516
+ _ref3$authType = _ref3.authType,
43517
+ authType = _ref3$authType === void 0 ? "apiKey" : _ref3$authType,
43518
+ _ref3$oauthScopes = _ref3.oauthScopes,
43519
+ oauthScopes = _ref3$oauthScopes === void 0 ? "" : _ref3$oauthScopes,
43520
+ _ref3$oauthClientId = _ref3.oauthClientId,
43521
+ oauthClientId = _ref3$oauthClientId === void 0 ? "" : _ref3$oauthClientId,
43522
+ _ref3$oauthClientSecr = _ref3.oauthClientSecret,
43523
+ oauthClientSecret = _ref3$oauthClientSecr === void 0 ? "" : _ref3$oauthClientSecr;
43483
43524
  var baseConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
43484
43525
  // Everything on baseConfig that the form doesn't own gets preserved.
43526
+ // `auth`/`oauth` are owned by the form's auth-type selector, so they're
43527
+ // excluded here and re-emitted below based on the current selection
43528
+ // (this is how toggling away from OAuth clears them).
43485
43529
  baseConfig.transport;
43486
43530
  baseConfig.command;
43487
43531
  baseConfig.args;
@@ -43489,6 +43533,8 @@ function buildMcpConfig(transport, _ref3) {
43489
43533
  baseConfig.url;
43490
43534
  baseConfig.headerTemplate;
43491
43535
  baseConfig.headers;
43536
+ baseConfig.auth;
43537
+ baseConfig.oauth;
43492
43538
  var passThrough = _objectWithoutProperties(baseConfig, _excluded$1);
43493
43539
  if (transport === "stdio") {
43494
43540
  var envMapping = {};
@@ -43508,6 +43554,23 @@ function buildMcpConfig(transport, _ref3) {
43508
43554
  }
43509
43555
 
43510
43556
  // streamable_http
43557
+ var config = _objectSpread$v(_objectSpread$v({}, passThrough), {}, {
43558
+ transport: "streamable_http",
43559
+ url: url.trim()
43560
+ });
43561
+ if (authType === "oauth") {
43562
+ // Interactive OAuth 2.0 (SDK-native). Scopes optional; clientId/secret
43563
+ // only for servers without Dynamic Client Registration.
43564
+ config.auth = "oauth";
43565
+ var oauth = {};
43566
+ if (oauthScopes.trim()) oauth.scopes = oauthScopes.trim();
43567
+ if (oauthClientId.trim()) oauth.clientId = oauthClientId.trim();
43568
+ if (oauthClientSecret.trim()) oauth.clientSecret = oauthClientSecret.trim();
43569
+ config.oauth = oauth;
43570
+ return config;
43571
+ }
43572
+
43573
+ // apiKey (header template) — also the path for "none" (no headers added)
43511
43574
  var headerTemplate = {};
43512
43575
  headerRows.forEach(function (row) {
43513
43576
  var name = row.headerName.trim();
@@ -43516,11 +43579,7 @@ function buildMcpConfig(transport, _ref3) {
43516
43579
  headerTemplate[name] = value;
43517
43580
  }
43518
43581
  });
43519
- var config = _objectSpread$v(_objectSpread$v({}, passThrough), {}, {
43520
- transport: "streamable_http",
43521
- url: url.trim()
43522
- });
43523
- if (Object.keys(headerTemplate).length > 0) {
43582
+ if (authType === "apiKey" && Object.keys(headerTemplate).length > 0) {
43524
43583
  config.headerTemplate = headerTemplate;
43525
43584
  }
43526
43585
  return config;
@@ -43549,7 +43608,7 @@ function buildMcpConfig(transport, _ref3) {
43549
43608
  * preserved verbatim on save so editing never silently drops them.
43550
43609
  */
43551
43610
  var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43552
- var _testResult$tools;
43611
+ var _initialMcpConfig$oau, _initialMcpConfig$oau2, _initialMcpConfig$oau3, _initialMcpConfig$oau4, _initialMcpConfig$oau5, _testResult$tools;
43553
43612
  var onSave = _ref4.onSave,
43554
43613
  onBack = _ref4.onBack,
43555
43614
  _ref4$isEditMode = _ref4.isEditMode,
@@ -43635,41 +43694,67 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43635
43694
  headerRows = _useState22[0],
43636
43695
  setHeaderRows = _useState22[1];
43637
43696
 
43638
- // Tool selection state
43639
- var _useState23 = React.useState(initialAllowedTools),
43697
+ // HTTP auth type: "none" | "apiKey" | "oauth"
43698
+ var _useState23 = React.useState(function () {
43699
+ var cfg = initialMcpConfig || {};
43700
+ if (cfg.auth === "oauth" || cfg.oauth) return "oauth";
43701
+ return "apiKey";
43702
+ }),
43640
43703
  _useState24 = _slicedToArray(_useState23, 2),
43641
- selectedTools = _useState24[0],
43642
- setSelectedTools = _useState24[1];
43643
-
43644
- // Wizard step state
43645
- var _useState25 = React.useState(0),
43704
+ authType = _useState24[0],
43705
+ setAuthType = _useState24[1];
43706
+ var _useState25 = React.useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau = initialMcpConfig.oauth) === null || _initialMcpConfig$oau === void 0 ? void 0 : _initialMcpConfig$oau.scopes) || ""),
43646
43707
  _useState26 = _slicedToArray(_useState25, 2),
43647
- wizardStep = _useState26[0],
43648
- setWizardStep = _useState26[1];
43649
-
43650
- // Auth state
43651
- var _useState27 = React.useState(false),
43708
+ oauthScopes = _useState26[0],
43709
+ setOauthScopes = _useState26[1];
43710
+ var _useState27 = React.useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau2 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau2 === void 0 ? void 0 : _initialMcpConfig$oau2.clientId) || ""),
43652
43711
  _useState28 = _slicedToArray(_useState27, 2),
43653
- isAuthorizing = _useState28[0],
43654
- setIsAuthorizing = _useState28[1];
43655
- var _useState29 = React.useState(null),
43712
+ oauthClientId = _useState28[0],
43713
+ setOauthClientId = _useState28[1];
43714
+ var _useState29 = React.useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau3 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau3 === void 0 ? void 0 : _initialMcpConfig$oau3.clientSecret) || ""),
43656
43715
  _useState30 = _slicedToArray(_useState29, 2),
43657
- authResult = _useState30[0],
43658
- setAuthResult = _useState30[1];
43659
-
43660
- // JSON editor state
43661
- var _useState31 = React.useState("form"),
43716
+ oauthClientSecret = _useState30[0],
43717
+ setOauthClientSecret = _useState30[1];
43718
+ var _useState31 = React.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)),
43662
43719
  _useState32 = _slicedToArray(_useState31, 2),
43663
- viewMode = _useState32[0],
43664
- setViewMode = _useState32[1]; // "form" | "json"
43665
- var _useState33 = React.useState(""),
43720
+ showOauthAdvanced = _useState32[0],
43721
+ setShowOauthAdvanced = _useState32[1];
43722
+
43723
+ // Tool selection state
43724
+ var _useState33 = React.useState(initialAllowedTools),
43666
43725
  _useState34 = _slicedToArray(_useState33, 2),
43667
- jsonText = _useState34[0],
43668
- setJsonText = _useState34[1];
43669
- var _useState35 = React.useState(null),
43726
+ selectedTools = _useState34[0],
43727
+ setSelectedTools = _useState34[1];
43728
+
43729
+ // Wizard step state
43730
+ var _useState35 = React.useState(0),
43670
43731
  _useState36 = _slicedToArray(_useState35, 2),
43671
- jsonError = _useState36[0],
43672
- setJsonError = _useState36[1];
43732
+ wizardStep = _useState36[0],
43733
+ setWizardStep = _useState36[1];
43734
+
43735
+ // Auth state
43736
+ var _useState37 = React.useState(false),
43737
+ _useState38 = _slicedToArray(_useState37, 2),
43738
+ isAuthorizing = _useState38[0],
43739
+ setIsAuthorizing = _useState38[1];
43740
+ var _useState39 = React.useState(null),
43741
+ _useState40 = _slicedToArray(_useState39, 2),
43742
+ authResult = _useState40[0],
43743
+ setAuthResult = _useState40[1];
43744
+
43745
+ // JSON editor state
43746
+ var _useState41 = React.useState("form"),
43747
+ _useState42 = _slicedToArray(_useState41, 2),
43748
+ viewMode = _useState42[0],
43749
+ setViewMode = _useState42[1]; // "form" | "json"
43750
+ var _useState43 = React.useState(""),
43751
+ _useState44 = _slicedToArray(_useState43, 2),
43752
+ jsonText = _useState44[0],
43753
+ setJsonText = _useState44[1];
43754
+ var _useState45 = React.useState(null),
43755
+ _useState46 = _slicedToArray(_useState45, 2),
43756
+ jsonError = _useState46[0],
43757
+ setJsonError = _useState46[1];
43673
43758
 
43674
43759
  // Clear credential data when transport changes (derived fields change entirely)
43675
43760
  // Only in create mode — in edit mode the initial transport is set correctly
@@ -43681,8 +43766,11 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43681
43766
  }
43682
43767
  }, [transport, isEditMode]);
43683
43768
 
43684
- // Dynamic wizard steps based on whether auth is needed
43685
- var hasAuth = !!initialAuthCommand;
43769
+ // Dynamic wizard steps based on whether auth is needed. Either a
43770
+ // catalog-provided subprocess authCommand (legacy) or an OAuth 2.0
43771
+ // custom server adds an "Authorize" step before Test & Tools.
43772
+ var isOAuth = transport === "streamable_http" && authType === "oauth";
43773
+ var hasAuth = !!initialAuthCommand || isOAuth;
43686
43774
  var wizardSteps = hasAuth ? ["configure", "authorize", "testTools"] : ["configure", "testTools"];
43687
43775
  var totalSteps = wizardSteps.length;
43688
43776
  var currentStepType = wizardSteps[wizardStep];
@@ -43711,9 +43799,13 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43711
43799
  args: args,
43712
43800
  envMappingRows: envMappingRows,
43713
43801
  url: url,
43714
- headerRows: headerRows
43802
+ headerRows: headerRows,
43803
+ authType: authType,
43804
+ oauthScopes: oauthScopes,
43805
+ oauthClientId: oauthClientId,
43806
+ oauthClientSecret: oauthClientSecret
43715
43807
  }, initialMcpConfig || {});
43716
- }, [transport, command, args, envMappingRows, url, headerRows, initialMcpConfig]);
43808
+ }, [transport, command, args, envMappingRows, url, headerRows, authType, oauthScopes, oauthClientId, oauthClientSecret, initialMcpConfig]);
43717
43809
 
43718
43810
  // Invalidate test result when config changes after a test
43719
43811
  var mcpConfigRef = React.useRef(mcpConfig);
@@ -43911,10 +44003,10 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43911
44003
 
43912
44004
  // --- authorize (OAuth browser flow) ---
43913
44005
  var handleAuthorize = function handleAuthorize() {
43914
- if (!dashApi || !initialAuthCommand) return;
44006
+ if (!dashApi) return;
43915
44007
  setIsAuthorizing(true);
43916
44008
  setAuthResult(null);
43917
- dashApi.mcpRunAuth(mcpConfig, credentialData, initialAuthCommand, function (event, result) {
44009
+ var onComplete = function onComplete(event, result) {
43918
44010
  if (result.error) {
43919
44011
  setAuthResult({
43920
44012
  success: false,
@@ -43927,13 +44019,22 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
43927
44019
  });
43928
44020
  }
43929
44021
  setIsAuthorizing(false);
43930
- }, function (event, err) {
44022
+ };
44023
+ var onFail = function onFail(event, err) {
43931
44024
  setAuthResult({
43932
44025
  success: false,
43933
44026
  message: (err === null || err === void 0 ? void 0 : err.message) || "Authorization failed"
43934
44027
  });
43935
44028
  setIsAuthorizing(false);
43936
- });
44029
+ };
44030
+ if (isOAuth) {
44031
+ // SDK-native OAuth 2.0: opens the system browser, persists tokens.
44032
+ dashApi.mcpAuthorize(providerName.trim() || "__test__custom", mcpConfig, credentialData, onComplete, onFail, appContext === null || appContext === void 0 ? void 0 : appContext.appId);
44033
+ return;
44034
+ }
44035
+ if (!initialAuthCommand) return;
44036
+ // Legacy catalog subprocess auth (e.g. bundled Google servers).
44037
+ dashApi.mcpRunAuth(mcpConfig, credentialData, initialAuthCommand, onComplete, onFail);
43937
44038
  };
43938
44039
 
43939
44040
  // --- save ---
@@ -44242,7 +44343,82 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
44242
44343
  className: "text-sm text-red-400",
44243
44344
  children: formErrors.url
44244
44345
  })]
44245
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
44346
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
44347
+ className: "flex flex-col gap-2",
44348
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.RadioGroup, {
44349
+ label: "Authentication",
44350
+ name: "mcp-http-auth-type",
44351
+ value: authType,
44352
+ onChange: function onChange(value) {
44353
+ setAuthType(value);
44354
+ setAuthResult(null);
44355
+ },
44356
+ options: [{
44357
+ value: "none",
44358
+ label: "None"
44359
+ }, {
44360
+ value: "apiKey",
44361
+ label: "API key (headers)"
44362
+ }, {
44363
+ value: "oauth",
44364
+ label: "OAuth 2.0 (browser sign-in)"
44365
+ }]
44366
+ })
44367
+ }), authType === "oauth" && /*#__PURE__*/jsxRuntime.jsxs("div", {
44368
+ className: "space-y-3",
44369
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
44370
+ className: "flex flex-col gap-2",
44371
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
44372
+ label: "Scopes"
44373
+ }), /*#__PURE__*/jsxRuntime.jsx("p", {
44374
+ className: "text-sm opacity-50",
44375
+ children: "Space-separated OAuth scopes (optional \u2014 many servers grant defaults)."
44376
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
44377
+ value: oauthScopes,
44378
+ onChange: setOauthScopes,
44379
+ placeholder: "e.g., read write offline_access"
44380
+ })]
44381
+ }), /*#__PURE__*/jsxRuntime.jsxs("button", {
44382
+ type: "button",
44383
+ onClick: function onClick() {
44384
+ return setShowOauthAdvanced(function (v) {
44385
+ return !v;
44386
+ });
44387
+ },
44388
+ className: "text-sm text-blue-400 hover:text-blue-300 transition-colors flex items-center gap-1 self-start",
44389
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
44390
+ icon: showOauthAdvanced ? "chevron-down" : "chevron-right",
44391
+ className: "text-xs"
44392
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
44393
+ children: "Advanced: pre-registered client"
44394
+ })]
44395
+ }), showOauthAdvanced && /*#__PURE__*/jsxRuntime.jsxs("div", {
44396
+ className: "space-y-3 pl-1",
44397
+ children: [/*#__PURE__*/jsxRuntime.jsx("p", {
44398
+ className: "text-sm opacity-50",
44399
+ children: "Only needed for servers that don't support Dynamic Client Registration. Leave blank otherwise."
44400
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
44401
+ className: "flex flex-col gap-2",
44402
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
44403
+ label: "Client ID"
44404
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
44405
+ value: oauthClientId,
44406
+ onChange: setOauthClientId,
44407
+ placeholder: "Client ID"
44408
+ })]
44409
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
44410
+ className: "flex flex-col gap-2",
44411
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
44412
+ label: "Client secret"
44413
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
44414
+ type: "password",
44415
+ value: oauthClientSecret,
44416
+ onChange: setOauthClientSecret,
44417
+ placeholder: "Client secret (if required)"
44418
+ })]
44419
+ })]
44420
+ })]
44421
+ }), authType === "apiKey" && /*#__PURE__*/jsxRuntime.jsxs("div", {
44246
44422
  className: "space-y-3",
44247
44423
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
44248
44424
  children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
@@ -44383,7 +44559,7 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
44383
44559
  className: "flex flex-col items-center justify-center py-8 space-y-4",
44384
44560
  children: [/*#__PURE__*/jsxRuntime.jsx("p", {
44385
44561
  className: "text-sm opacity-60 text-center max-w-md",
44386
- children: "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
44562
+ 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."
44387
44563
  }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
44388
44564
  title: isAuthorizing ? "Authorizing..." : "Authorize",
44389
44565
  onClick: handleAuthorize,
@@ -44404,7 +44580,18 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
44404
44580
  children: [/*#__PURE__*/jsxRuntime.jsx("p", {
44405
44581
  className: "text-xs font-semibold opacity-40 uppercase tracking-wider",
44406
44582
  children: "Troubleshooting"
44407
- }), /*#__PURE__*/jsxRuntime.jsxs("ul", {
44583
+ }), isOAuth ? /*#__PURE__*/jsxRuntime.jsxs("ul", {
44584
+ className: "text-sm opacity-60 space-y-1 list-disc list-inside",
44585
+ children: [/*#__PURE__*/jsxRuntime.jsx("li", {
44586
+ children: "Make sure a browser window opened \u2014 check for a blocked pop-up or default-browser prompt"
44587
+ }), /*#__PURE__*/jsxRuntime.jsx("li", {
44588
+ children: "Allow Dash to accept the local sign-in redirect if your firewall prompts"
44589
+ }), /*#__PURE__*/jsxRuntime.jsx("li", {
44590
+ children: "Verify the server URL is correct and the scopes are valid for this server"
44591
+ }), /*#__PURE__*/jsxRuntime.jsx("li", {
44592
+ children: "For servers without dynamic registration, set a Client ID under \"Advanced\""
44593
+ })]
44594
+ }) : /*#__PURE__*/jsxRuntime.jsxs("ul", {
44408
44595
  className: "text-sm opacity-60 space-y-1 list-disc list-inside",
44409
44596
  children: [/*#__PURE__*/jsxRuntime.jsx("li", {
44410
44597
  children: "Ensure Node.js and npx are available in your PATH"
@@ -68452,6 +68639,8 @@ exports.LayoutGridContainer = LayoutGridContainer;
68452
68639
  exports.LayoutManagerModal = LayoutManagerModal;
68453
68640
  exports.LayoutModel = LayoutModel;
68454
68641
  exports.LayoutQuickAddMenu = LayoutQuickAddMenu;
68642
+ exports.MCP_AUTHORIZE_COMPLETE = MCP_AUTHORIZE_COMPLETE;
68643
+ exports.MCP_AUTHORIZE_ERROR = MCP_AUTHORIZE_ERROR;
68455
68644
  exports.MCP_CALL_TOOL_COMPLETE = MCP_CALL_TOOL_COMPLETE;
68456
68645
  exports.MCP_CALL_TOOL_ERROR = MCP_CALL_TOOL_ERROR;
68457
68646
  exports.MCP_GET_CATALOG_COMPLETE = MCP_GET_CATALOG_COMPLETE;