@trops/dash-core 0.1.67 → 0.1.69
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/electron/index.js +19 -0
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +197 -119
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +197 -119
- package/dist/index.js.map +1 -1
- package/dist/mcp/mcpServerCatalog.json +11 -9
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -25981,7 +25981,7 @@ var ToolSelector = function ToolSelector(_ref) {
|
|
|
25981
25981
|
}
|
|
25982
25982
|
};
|
|
25983
25983
|
return /*#__PURE__*/jsxs("div", {
|
|
25984
|
-
className: "space-y-2",
|
|
25984
|
+
className: "space-y-2 flex-1 flex flex-col min-h-0",
|
|
25985
25985
|
children: [/*#__PURE__*/jsxs("div", {
|
|
25986
25986
|
className: "flex items-center justify-between",
|
|
25987
25987
|
children: [/*#__PURE__*/jsx("p", {
|
|
@@ -25996,7 +25996,7 @@ var ToolSelector = function ToolSelector(_ref) {
|
|
|
25996
25996
|
className: "text-sm opacity-50",
|
|
25997
25997
|
children: "Choose which tools this provider can expose to widgets"
|
|
25998
25998
|
}), /*#__PURE__*/jsx("div", {
|
|
25999
|
-
className: "space-y-1
|
|
25999
|
+
className: "space-y-1 flex-1 min-h-0 overflow-y-auto",
|
|
26000
26000
|
children: tools.map(function (tool) {
|
|
26001
26001
|
var checked = selectedTools.includes(tool.name);
|
|
26002
26002
|
return /*#__PURE__*/jsxs("label", {
|
|
@@ -26747,7 +26747,9 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
26747
26747
|
_ref2$initialCredenti2 = _ref2.initialCredentials,
|
|
26748
26748
|
initialCredentials = _ref2$initialCredenti2 === void 0 ? {} : _ref2$initialCredenti2,
|
|
26749
26749
|
_ref2$initialAllowedT = _ref2.initialAllowedTools,
|
|
26750
|
-
initialAllowedTools = _ref2$initialAllowedT === void 0 ? null : _ref2$initialAllowedT
|
|
26750
|
+
initialAllowedTools = _ref2$initialAllowedT === void 0 ? null : _ref2$initialAllowedT,
|
|
26751
|
+
_ref2$initialAuthComm = _ref2.initialAuthCommand,
|
|
26752
|
+
initialAuthCommand = _ref2$initialAuthComm === void 0 ? null : _ref2$initialAuthComm;
|
|
26751
26753
|
var appContext = useContext(AppContext);
|
|
26752
26754
|
var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
|
|
26753
26755
|
|
|
@@ -26815,19 +26817,29 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
26815
26817
|
wizardStep = _useState24[0],
|
|
26816
26818
|
setWizardStep = _useState24[1];
|
|
26817
26819
|
|
|
26818
|
-
//
|
|
26819
|
-
var _useState25 = useState(
|
|
26820
|
+
// Auth state
|
|
26821
|
+
var _useState25 = useState(false),
|
|
26820
26822
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
26821
|
-
|
|
26822
|
-
|
|
26823
|
-
var _useState27 = useState(
|
|
26823
|
+
isAuthorizing = _useState26[0],
|
|
26824
|
+
setIsAuthorizing = _useState26[1];
|
|
26825
|
+
var _useState27 = useState(null),
|
|
26824
26826
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
26825
|
-
|
|
26826
|
-
|
|
26827
|
-
|
|
26827
|
+
authResult = _useState28[0],
|
|
26828
|
+
setAuthResult = _useState28[1];
|
|
26829
|
+
|
|
26830
|
+
// JSON editor state
|
|
26831
|
+
var _useState29 = useState("form"),
|
|
26828
26832
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
26829
|
-
|
|
26830
|
-
|
|
26833
|
+
viewMode = _useState30[0],
|
|
26834
|
+
setViewMode = _useState30[1]; // "form" | "json"
|
|
26835
|
+
var _useState31 = useState(""),
|
|
26836
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
26837
|
+
jsonText = _useState32[0],
|
|
26838
|
+
setJsonText = _useState32[1];
|
|
26839
|
+
var _useState33 = useState(null),
|
|
26840
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
26841
|
+
jsonError = _useState34[0],
|
|
26842
|
+
setJsonError = _useState34[1];
|
|
26831
26843
|
|
|
26832
26844
|
// Clear credential data when transport changes (derived fields change entirely)
|
|
26833
26845
|
// Only in create mode — in edit mode the initial transport is set correctly
|
|
@@ -26835,22 +26847,27 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
26835
26847
|
if (!isEditMode) {
|
|
26836
26848
|
setCredentialData({});
|
|
26837
26849
|
setTestResult(null);
|
|
26850
|
+
setAuthResult(null);
|
|
26838
26851
|
}
|
|
26839
26852
|
}, [transport, isEditMode]);
|
|
26840
26853
|
|
|
26854
|
+
// Dynamic wizard steps based on whether auth is needed
|
|
26855
|
+
var hasAuth = !!initialAuthCommand;
|
|
26856
|
+
var wizardSteps = hasAuth ? ["configure", "authorize", "testTools"] : ["configure", "testTools"];
|
|
26857
|
+
var totalSteps = wizardSteps.length;
|
|
26858
|
+
var currentStepType = wizardSteps[wizardStep];
|
|
26859
|
+
|
|
26841
26860
|
// Wizard step navigation with validation gates
|
|
26842
26861
|
var handleWizardStepChange = function handleWizardStepChange(newStep) {
|
|
26843
26862
|
if (newStep < wizardStep) {
|
|
26844
26863
|
setWizardStep(newStep);
|
|
26845
26864
|
return;
|
|
26846
26865
|
}
|
|
26847
|
-
|
|
26848
|
-
if (wizardStep === 0 && newStep >= 1) {
|
|
26866
|
+
if (currentStepType === "configure" && newStep > wizardStep) {
|
|
26849
26867
|
if (viewMode === "form" && !validateForm()) return;
|
|
26850
26868
|
}
|
|
26851
|
-
|
|
26852
|
-
|
|
26853
|
-
if (!(testResult !== null && testResult !== void 0 && testResult.success) && !(isEditMode && initialAllowedTools)) return;
|
|
26869
|
+
if (currentStepType === "authorize" && newStep > wizardStep) {
|
|
26870
|
+
if (!(authResult !== null && authResult !== void 0 && authResult.success)) return;
|
|
26854
26871
|
}
|
|
26855
26872
|
setWizardStep(newStep);
|
|
26856
26873
|
};
|
|
@@ -27046,6 +27063,33 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
27046
27063
|
});
|
|
27047
27064
|
};
|
|
27048
27065
|
|
|
27066
|
+
// --- authorize (OAuth browser flow) ---
|
|
27067
|
+
var handleAuthorize = function handleAuthorize() {
|
|
27068
|
+
if (!dashApi || !initialAuthCommand) return;
|
|
27069
|
+
setIsAuthorizing(true);
|
|
27070
|
+
setAuthResult(null);
|
|
27071
|
+
dashApi.mcpRunAuth(mcpConfig, credentialData, initialAuthCommand, function (event, result) {
|
|
27072
|
+
if (result.error) {
|
|
27073
|
+
setAuthResult({
|
|
27074
|
+
success: false,
|
|
27075
|
+
message: result.message
|
|
27076
|
+
});
|
|
27077
|
+
} else {
|
|
27078
|
+
setAuthResult({
|
|
27079
|
+
success: true,
|
|
27080
|
+
message: "Authorized!"
|
|
27081
|
+
});
|
|
27082
|
+
}
|
|
27083
|
+
setIsAuthorizing(false);
|
|
27084
|
+
}, function (event, err) {
|
|
27085
|
+
setAuthResult({
|
|
27086
|
+
success: false,
|
|
27087
|
+
message: (err === null || err === void 0 ? void 0 : err.message) || "Authorization failed"
|
|
27088
|
+
});
|
|
27089
|
+
setIsAuthorizing(false);
|
|
27090
|
+
});
|
|
27091
|
+
};
|
|
27092
|
+
|
|
27049
27093
|
// --- save ---
|
|
27050
27094
|
var handleSave = function handleSave() {
|
|
27051
27095
|
// If in JSON mode, parse JSON first to update form state
|
|
@@ -27467,46 +27511,76 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
27467
27511
|
})]
|
|
27468
27512
|
})]
|
|
27469
27513
|
})
|
|
27470
|
-
}), /*#__PURE__*/jsx(Stepper.Step, {
|
|
27471
|
-
label: "
|
|
27472
|
-
description: "
|
|
27514
|
+
}), hasAuth && /*#__PURE__*/jsx(Stepper.Step, {
|
|
27515
|
+
label: "Authorize",
|
|
27516
|
+
description: "OAuth authentication",
|
|
27473
27517
|
children: /*#__PURE__*/jsxs("div", {
|
|
27474
27518
|
className: "flex-1 min-h-0 overflow-y-auto pb-4 space-y-5",
|
|
27475
27519
|
children: [/*#__PURE__*/jsxs("div", {
|
|
27476
27520
|
className: "flex flex-col items-center justify-center py-8 space-y-4",
|
|
27477
27521
|
children: [/*#__PURE__*/jsx("p", {
|
|
27478
|
-
className: "text-sm opacity-60 text-center",
|
|
27479
|
-
children: "
|
|
27522
|
+
className: "text-sm opacity-60 text-center max-w-md",
|
|
27523
|
+
children: "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
|
|
27480
27524
|
}), /*#__PURE__*/jsx(Button, {
|
|
27481
|
-
title:
|
|
27482
|
-
onClick:
|
|
27525
|
+
title: isAuthorizing ? "Authorizing..." : "Authorize",
|
|
27526
|
+
onClick: handleAuthorize,
|
|
27483
27527
|
size: "md"
|
|
27484
27528
|
})]
|
|
27485
|
-
}),
|
|
27486
|
-
className: "p-3 rounded-lg text-sm ".concat(
|
|
27529
|
+
}), authResult && /*#__PURE__*/jsx("div", {
|
|
27530
|
+
className: "p-3 rounded-lg text-sm ".concat(authResult.success ? "bg-green-900/30 border border-green-700 text-green-300" : "bg-red-900/30 border border-red-700 text-red-300"),
|
|
27487
27531
|
children: /*#__PURE__*/jsxs("div", {
|
|
27488
27532
|
className: "flex items-center gap-2",
|
|
27489
27533
|
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
27490
|
-
icon:
|
|
27534
|
+
icon: authResult.success ? "circle-check" : "circle-exclamation"
|
|
27491
27535
|
}), /*#__PURE__*/jsx("span", {
|
|
27492
|
-
children:
|
|
27536
|
+
children: authResult.message
|
|
27493
27537
|
})]
|
|
27494
27538
|
})
|
|
27539
|
+
}), authResult && !authResult.success && /*#__PURE__*/jsxs("div", {
|
|
27540
|
+
className: "bg-white/5 border border-white/10 rounded-lg p-4 space-y-2",
|
|
27541
|
+
children: [/*#__PURE__*/jsx("p", {
|
|
27542
|
+
className: "text-xs font-semibold opacity-40 uppercase tracking-wider",
|
|
27543
|
+
children: "Troubleshooting"
|
|
27544
|
+
}), /*#__PURE__*/jsxs("ul", {
|
|
27545
|
+
className: "text-sm opacity-60 space-y-1 list-disc list-inside",
|
|
27546
|
+
children: [/*#__PURE__*/jsx("li", {
|
|
27547
|
+
children: "Ensure Node.js and npx are available in your PATH"
|
|
27548
|
+
}), /*#__PURE__*/jsx("li", {
|
|
27549
|
+
children: "Try running the auth command manually in your terminal"
|
|
27550
|
+
}), /*#__PURE__*/jsx("li", {
|
|
27551
|
+
children: "Check that your OAuth credentials file is valid"
|
|
27552
|
+
}), /*#__PURE__*/jsx("li", {
|
|
27553
|
+
children: "If using nvm, ensure the correct Node version is active"
|
|
27554
|
+
})]
|
|
27555
|
+
})]
|
|
27495
27556
|
})]
|
|
27496
27557
|
})
|
|
27497
27558
|
}), /*#__PURE__*/jsx(Stepper.Step, {
|
|
27498
|
-
label: "Tools",
|
|
27499
|
-
description: "
|
|
27500
|
-
children: /*#__PURE__*/
|
|
27501
|
-
className: "flex-1 min-h-0
|
|
27502
|
-
children:
|
|
27559
|
+
label: "Test & Tools",
|
|
27560
|
+
description: "Verify & select tools",
|
|
27561
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
27562
|
+
className: "flex-1 min-h-0 flex flex-col pb-4 space-y-4",
|
|
27563
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
27564
|
+
className: "flex items-center gap-3",
|
|
27565
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
27566
|
+
title: isTesting ? "Fetching..." : "Fetch Tools",
|
|
27567
|
+
onClick: handleTestConnection,
|
|
27568
|
+
size: "sm"
|
|
27569
|
+
}), testResult && /*#__PURE__*/jsxs("span", {
|
|
27570
|
+
className: "text-sm ".concat(testResult.success ? "text-green-400" : "text-red-400"),
|
|
27571
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
27572
|
+
icon: testResult.success ? "circle-check" : "circle-exclamation",
|
|
27573
|
+
className: "mr-1"
|
|
27574
|
+
}), testResult.message]
|
|
27575
|
+
})]
|
|
27576
|
+
}), (testResult === null || testResult === void 0 ? void 0 : testResult.success) && ((_testResult$tools = testResult.tools) === null || _testResult$tools === void 0 ? void 0 : _testResult$tools.length) > 0 && selectedTools && /*#__PURE__*/jsx(ToolSelector, {
|
|
27503
27577
|
tools: testResult.tools,
|
|
27504
27578
|
selectedTools: selectedTools,
|
|
27505
27579
|
onSelectionChange: setSelectedTools
|
|
27506
|
-
})
|
|
27580
|
+
}), !testResult && /*#__PURE__*/jsx("div", {
|
|
27507
27581
|
className: "text-center py-8 opacity-50",
|
|
27508
|
-
children: "
|
|
27509
|
-
})
|
|
27582
|
+
children: "Click \"Fetch Tools\" to test the connection and discover available tools."
|
|
27583
|
+
})]
|
|
27510
27584
|
})
|
|
27511
27585
|
})]
|
|
27512
27586
|
})
|
|
@@ -27529,30 +27603,24 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
27529
27603
|
className: "flex-1 text-center",
|
|
27530
27604
|
children: /*#__PURE__*/jsxs("span", {
|
|
27531
27605
|
className: "text-xs opacity-40",
|
|
27532
|
-
children: ["Step ", wizardStep + 1, " of
|
|
27606
|
+
children: ["Step ", wizardStep + 1, " of ", totalSteps]
|
|
27533
27607
|
})
|
|
27534
27608
|
}), /*#__PURE__*/jsxs("div", {
|
|
27535
27609
|
className: "flex flex-row gap-2",
|
|
27536
|
-
children: [
|
|
27610
|
+
children: [currentStepType === "configure" && /*#__PURE__*/jsx(Button, {
|
|
27537
27611
|
title: "Next",
|
|
27538
27612
|
onClick: function onClick() {
|
|
27539
|
-
return handleWizardStepChange(1);
|
|
27613
|
+
return handleWizardStepChange(wizardStep + 1);
|
|
27540
27614
|
},
|
|
27541
27615
|
size: "sm"
|
|
27542
|
-
}),
|
|
27543
|
-
|
|
27544
|
-
|
|
27545
|
-
|
|
27546
|
-
|
|
27547
|
-
|
|
27548
|
-
|
|
27549
|
-
|
|
27550
|
-
return handleWizardStepChange(2);
|
|
27551
|
-
},
|
|
27552
|
-
disabled: !(testResult !== null && testResult !== void 0 && testResult.success) && !(isEditMode && initialAllowedTools),
|
|
27553
|
-
size: "sm"
|
|
27554
|
-
})]
|
|
27555
|
-
}), wizardStep === 2 && /*#__PURE__*/jsx(Button, {
|
|
27616
|
+
}), currentStepType === "authorize" && /*#__PURE__*/jsx(Button, {
|
|
27617
|
+
title: "Next",
|
|
27618
|
+
onClick: function onClick() {
|
|
27619
|
+
return handleWizardStepChange(wizardStep + 1);
|
|
27620
|
+
},
|
|
27621
|
+
disabled: !(authResult !== null && authResult !== void 0 && authResult.success),
|
|
27622
|
+
size: "sm"
|
|
27623
|
+
}), currentStepType === "testTools" && /*#__PURE__*/jsx(Button, {
|
|
27556
27624
|
title: isEditMode ? "Save Changes" : "Save MCP Server",
|
|
27557
27625
|
onClick: handleSave,
|
|
27558
27626
|
size: "sm"
|
|
@@ -27711,21 +27779,23 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
27711
27779
|
});
|
|
27712
27780
|
});
|
|
27713
27781
|
|
|
27782
|
+
// Dynamic wizard steps based on whether auth is needed
|
|
27783
|
+
var hasAuth = !!(selectedServer !== null && selectedServer !== void 0 && selectedServer.authCommand);
|
|
27784
|
+
var wizardSteps = hasAuth ? ["configure", "authorize", "testTools"] : ["configure", "testTools"];
|
|
27785
|
+
var totalSteps = wizardSteps.length;
|
|
27786
|
+
var currentStepType = wizardSteps[wizardStep];
|
|
27787
|
+
|
|
27714
27788
|
// Wizard step navigation with validation gates
|
|
27715
27789
|
var handleWizardStepChange = function handleWizardStepChange(newStep) {
|
|
27716
|
-
// Allow backward navigation freely
|
|
27717
27790
|
if (newStep < wizardStep) {
|
|
27718
27791
|
setWizardStep(newStep);
|
|
27719
27792
|
return;
|
|
27720
27793
|
}
|
|
27721
|
-
|
|
27722
|
-
if (wizardStep === 0 && newStep >= 1) {
|
|
27794
|
+
if (currentStepType === "configure" && newStep > wizardStep) {
|
|
27723
27795
|
if (!validateForm()) return;
|
|
27724
|
-
if (selectedServer !== null && selectedServer !== void 0 && selectedServer.authCommand && !(authResult !== null && authResult !== void 0 && authResult.success)) return;
|
|
27725
27796
|
}
|
|
27726
|
-
|
|
27727
|
-
|
|
27728
|
-
if (!(testResult !== null && testResult !== void 0 && testResult.success)) return;
|
|
27797
|
+
if (currentStepType === "authorize" && newStep > wizardStep) {
|
|
27798
|
+
if (!(authResult !== null && authResult !== void 0 && authResult.success)) return;
|
|
27729
27799
|
}
|
|
27730
27800
|
setWizardStep(newStep);
|
|
27731
27801
|
};
|
|
@@ -28065,58 +28135,78 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
28065
28135
|
})]
|
|
28066
28136
|
}, field.key);
|
|
28067
28137
|
})]
|
|
28068
|
-
}), authResult && /*#__PURE__*/jsx("div", {
|
|
28069
|
-
className: "p-3 rounded-lg text-sm ".concat(authResult.success ? "bg-green-900/30 border border-green-700 text-green-300" : "bg-red-900/30 border border-red-700 text-red-300"),
|
|
28070
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
28071
|
-
className: "flex items-center gap-2",
|
|
28072
|
-
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
28073
|
-
icon: authResult.success ? "circle-check" : "circle-exclamation"
|
|
28074
|
-
}), /*#__PURE__*/jsx("span", {
|
|
28075
|
-
children: authResult.message
|
|
28076
|
-
})]
|
|
28077
|
-
})
|
|
28078
28138
|
})]
|
|
28079
28139
|
})
|
|
28080
|
-
}), /*#__PURE__*/jsx(Stepper.Step, {
|
|
28081
|
-
label: "
|
|
28082
|
-
description: "
|
|
28140
|
+
}), hasAuth && /*#__PURE__*/jsx(Stepper.Step, {
|
|
28141
|
+
label: "Authorize",
|
|
28142
|
+
description: "OAuth authentication",
|
|
28083
28143
|
children: /*#__PURE__*/jsxs("div", {
|
|
28084
28144
|
className: "flex-1 min-h-0 overflow-y-auto pb-4 space-y-5",
|
|
28085
28145
|
children: [/*#__PURE__*/jsxs("div", {
|
|
28086
28146
|
className: "flex flex-col items-center justify-center py-8 space-y-4",
|
|
28087
28147
|
children: [/*#__PURE__*/jsx("p", {
|
|
28088
|
-
className: "text-sm opacity-60 text-center",
|
|
28089
|
-
children: "
|
|
28148
|
+
className: "text-sm opacity-60 text-center max-w-md",
|
|
28149
|
+
children: "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
|
|
28090
28150
|
}), /*#__PURE__*/jsx(Button, {
|
|
28091
|
-
title:
|
|
28092
|
-
onClick:
|
|
28151
|
+
title: isAuthorizing ? "Authorizing..." : "Authorize",
|
|
28152
|
+
onClick: handleAuthorize,
|
|
28093
28153
|
size: "md"
|
|
28094
28154
|
})]
|
|
28095
|
-
}),
|
|
28096
|
-
className: "p-3 rounded-lg text-sm ".concat(
|
|
28155
|
+
}), authResult && /*#__PURE__*/jsx("div", {
|
|
28156
|
+
className: "p-3 rounded-lg text-sm ".concat(authResult.success ? "bg-green-900/30 border border-green-700 text-green-300" : "bg-red-900/30 border border-red-700 text-red-300"),
|
|
28097
28157
|
children: /*#__PURE__*/jsxs("div", {
|
|
28098
28158
|
className: "flex items-center gap-2",
|
|
28099
28159
|
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
28100
|
-
icon:
|
|
28160
|
+
icon: authResult.success ? "circle-check" : "circle-exclamation"
|
|
28101
28161
|
}), /*#__PURE__*/jsx("span", {
|
|
28102
|
-
children:
|
|
28162
|
+
children: authResult.message
|
|
28103
28163
|
})]
|
|
28104
28164
|
})
|
|
28165
|
+
}), authResult && !authResult.success && /*#__PURE__*/jsxs("div", {
|
|
28166
|
+
className: "bg-white/5 border border-white/10 rounded-lg p-4 space-y-2",
|
|
28167
|
+
children: [/*#__PURE__*/jsx("p", {
|
|
28168
|
+
className: "text-xs font-semibold opacity-40 uppercase tracking-wider",
|
|
28169
|
+
children: "Troubleshooting"
|
|
28170
|
+
}), /*#__PURE__*/jsxs("ul", {
|
|
28171
|
+
className: "text-sm opacity-60 space-y-1 list-disc list-inside",
|
|
28172
|
+
children: [/*#__PURE__*/jsx("li", {
|
|
28173
|
+
children: "Ensure Node.js and npx are available in your PATH"
|
|
28174
|
+
}), /*#__PURE__*/jsx("li", {
|
|
28175
|
+
children: "Try running the auth command manually in your terminal"
|
|
28176
|
+
}), /*#__PURE__*/jsx("li", {
|
|
28177
|
+
children: "Check that your OAuth credentials file is valid"
|
|
28178
|
+
}), /*#__PURE__*/jsx("li", {
|
|
28179
|
+
children: "If using nvm, ensure the correct Node version is active"
|
|
28180
|
+
})]
|
|
28181
|
+
})]
|
|
28105
28182
|
})]
|
|
28106
28183
|
})
|
|
28107
28184
|
}), /*#__PURE__*/jsx(Stepper.Step, {
|
|
28108
|
-
label: "Tools",
|
|
28109
|
-
description: "
|
|
28110
|
-
children: /*#__PURE__*/
|
|
28111
|
-
className: "flex-1 min-h-0
|
|
28112
|
-
children:
|
|
28185
|
+
label: "Test & Tools",
|
|
28186
|
+
description: "Verify & select tools",
|
|
28187
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
28188
|
+
className: "flex-1 min-h-0 flex flex-col pb-4 space-y-4",
|
|
28189
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
28190
|
+
className: "flex items-center gap-3",
|
|
28191
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
28192
|
+
title: isTesting ? "Fetching..." : "Fetch Tools",
|
|
28193
|
+
onClick: handleTestConnection,
|
|
28194
|
+
size: "sm"
|
|
28195
|
+
}), testResult && /*#__PURE__*/jsxs("span", {
|
|
28196
|
+
className: "text-sm ".concat(testResult.success ? "text-green-400" : "text-red-400"),
|
|
28197
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
28198
|
+
icon: testResult.success ? "circle-check" : "circle-exclamation",
|
|
28199
|
+
className: "mr-1"
|
|
28200
|
+
}), testResult.message]
|
|
28201
|
+
})]
|
|
28202
|
+
}), (testResult === null || testResult === void 0 ? void 0 : testResult.success) && ((_testResult$tools = testResult.tools) === null || _testResult$tools === void 0 ? void 0 : _testResult$tools.length) > 0 && selectedTools && /*#__PURE__*/jsx(ToolSelector, {
|
|
28113
28203
|
tools: testResult.tools,
|
|
28114
28204
|
selectedTools: selectedTools,
|
|
28115
28205
|
onSelectionChange: setSelectedTools
|
|
28116
|
-
})
|
|
28206
|
+
}), !testResult && /*#__PURE__*/jsx("div", {
|
|
28117
28207
|
className: "text-center py-8 opacity-50",
|
|
28118
|
-
children: "
|
|
28119
|
-
})
|
|
28208
|
+
children: "Click \"Fetch Tools\" to test the connection and discover available tools."
|
|
28209
|
+
})]
|
|
28120
28210
|
})
|
|
28121
28211
|
})]
|
|
28122
28212
|
})
|
|
@@ -28139,37 +28229,24 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
28139
28229
|
className: "flex-1 text-center",
|
|
28140
28230
|
children: /*#__PURE__*/jsxs("span", {
|
|
28141
28231
|
className: "text-xs opacity-40",
|
|
28142
|
-
children: ["Step ", wizardStep + 1, " of
|
|
28232
|
+
children: ["Step ", wizardStep + 1, " of ", totalSteps]
|
|
28143
28233
|
})
|
|
28144
28234
|
}), /*#__PURE__*/jsxs("div", {
|
|
28145
28235
|
className: "flex flex-row gap-2",
|
|
28146
|
-
children: [
|
|
28147
|
-
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
|
|
28154
|
-
|
|
28155
|
-
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
}),
|
|
28160
|
-
children: [/*#__PURE__*/jsx(Button, {
|
|
28161
|
-
title: isTesting ? "Testing..." : "Test Connection",
|
|
28162
|
-
onClick: handleTestConnection,
|
|
28163
|
-
size: "sm"
|
|
28164
|
-
}), /*#__PURE__*/jsx(Button, {
|
|
28165
|
-
title: "Next",
|
|
28166
|
-
onClick: function onClick() {
|
|
28167
|
-
return handleWizardStepChange(2);
|
|
28168
|
-
},
|
|
28169
|
-
disabled: !(testResult !== null && testResult !== void 0 && testResult.success),
|
|
28170
|
-
size: "sm"
|
|
28171
|
-
})]
|
|
28172
|
-
}), wizardStep === 2 && /*#__PURE__*/jsx(Button, {
|
|
28236
|
+
children: [currentStepType === "configure" && /*#__PURE__*/jsx(Button, {
|
|
28237
|
+
title: "Next",
|
|
28238
|
+
onClick: function onClick() {
|
|
28239
|
+
return handleWizardStepChange(wizardStep + 1);
|
|
28240
|
+
},
|
|
28241
|
+
size: "sm"
|
|
28242
|
+
}), currentStepType === "authorize" && /*#__PURE__*/jsx(Button, {
|
|
28243
|
+
title: "Next",
|
|
28244
|
+
onClick: function onClick() {
|
|
28245
|
+
return handleWizardStepChange(wizardStep + 1);
|
|
28246
|
+
},
|
|
28247
|
+
disabled: !(authResult !== null && authResult !== void 0 && authResult.success),
|
|
28248
|
+
size: "sm"
|
|
28249
|
+
}), currentStepType === "testTools" && /*#__PURE__*/jsx(Button, {
|
|
28173
28250
|
title: "Save MCP Server",
|
|
28174
28251
|
onClick: handleSaveProvider,
|
|
28175
28252
|
size: "sm"
|
|
@@ -28615,11 +28692,12 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
28615
28692
|
initialHeaderRows: headerTemplateToRows(mc.headerTemplate, nextRowId),
|
|
28616
28693
|
initialCredentials: selectedProvider.credentials || {},
|
|
28617
28694
|
initialAllowedTools: selectedProvider.allowedTools || null,
|
|
28695
|
+
initialAuthCommand: (editCatalogEntry === null || editCatalogEntry === void 0 ? void 0 : editCatalogEntry.authCommand) || null,
|
|
28618
28696
|
onSave: handleMcpEditSave,
|
|
28619
28697
|
onBack: function onBack() {
|
|
28620
28698
|
return setIsEditingMcp(false);
|
|
28621
28699
|
}
|
|
28622
|
-
});
|
|
28700
|
+
}, selectedName);
|
|
28623
28701
|
} else if (selectedName && selectedProvider) {
|
|
28624
28702
|
// Look up authCommand from the catalog for this provider type
|
|
28625
28703
|
var catalogEntry = catalog.find(function (entry) {
|