@trops/dash-core 0.1.448 → 0.1.449
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 +76 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +76 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1806,16 +1806,47 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
|
|
|
1806
1806
|
return false;
|
|
1807
1807
|
}
|
|
1808
1808
|
}
|
|
1809
|
+
/**
|
|
1810
|
+
* Load the curated allow-list of MCP servers known to exist outside
|
|
1811
|
+
* the built-in catalog. Surfaced in Settings → Providers → Add MCP
|
|
1812
|
+
* alongside the built-in entries so users have one place to install
|
|
1813
|
+
* any catalog-listed provider, regardless of whether the AI Widget
|
|
1814
|
+
* Builder triggered it. Mirrors mcpGetCatalog's callback shape.
|
|
1815
|
+
*/
|
|
1816
|
+
}, {
|
|
1817
|
+
key: "mcpGetKnownExternalCatalog",
|
|
1818
|
+
value: function mcpGetKnownExternalCatalog(onSuccess, onError) {
|
|
1819
|
+
var _this28 = this;
|
|
1820
|
+
if (this.api !== null) {
|
|
1821
|
+
try {
|
|
1822
|
+
this.api.mcp.getKnownExternalCatalog().then(function (result) {
|
|
1823
|
+
// Reuse the existing CATALOG_COMPLETE event — callers
|
|
1824
|
+
// discriminate via the `external: true` flag we add in
|
|
1825
|
+
// ProvidersSection / McpCatalogDetail when merging.
|
|
1826
|
+
onSuccess(_this28.events.MCP_GET_CATALOG_COMPLETE, result);
|
|
1827
|
+
})["catch"](function (error) {
|
|
1828
|
+
onError(_this28.events.MCP_GET_CATALOG_ERROR, error);
|
|
1829
|
+
});
|
|
1830
|
+
return true;
|
|
1831
|
+
} catch (e) {
|
|
1832
|
+
onError(this.events.MCP_GET_CATALOG_ERROR, e);
|
|
1833
|
+
return false;
|
|
1834
|
+
}
|
|
1835
|
+
} else {
|
|
1836
|
+
onError(this.events.MCP_GET_CATALOG_ERROR, new Error("No Api found"));
|
|
1837
|
+
return false;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1809
1840
|
}, {
|
|
1810
1841
|
key: "mcpRunAuth",
|
|
1811
1842
|
value: function mcpRunAuth(mcpConfig, credentials, authCommand, onSuccess, onError) {
|
|
1812
|
-
var
|
|
1843
|
+
var _this29 = this;
|
|
1813
1844
|
if (this.api !== null) {
|
|
1814
1845
|
try {
|
|
1815
1846
|
this.api.mcp.runAuth(mcpConfig, credentials, authCommand).then(function (result) {
|
|
1816
|
-
onSuccess(
|
|
1847
|
+
onSuccess(_this29.events.MCP_RUN_AUTH_COMPLETE, result);
|
|
1817
1848
|
})["catch"](function (error) {
|
|
1818
|
-
onError(
|
|
1849
|
+
onError(_this29.events.MCP_RUN_AUTH_ERROR, error);
|
|
1819
1850
|
});
|
|
1820
1851
|
return true;
|
|
1821
1852
|
} catch (e) {
|
|
@@ -45881,16 +45912,47 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
45881
45912
|
return deriveFormFields(effectiveMcpConfig, selectedServer.credentialSchema || {});
|
|
45882
45913
|
}, [selectedServer, effectiveMcpConfig]);
|
|
45883
45914
|
|
|
45884
|
-
// Load catalog on mount
|
|
45915
|
+
// Load catalog on mount. Merges the built-in catalog (already-bundled
|
|
45916
|
+
// MCP servers) with the curated known-external allow-list so the user
|
|
45917
|
+
// sees everything in one place. Known-external entries are tagged
|
|
45918
|
+
// with `_external: true` so the UI can mark them visually.
|
|
45885
45919
|
React.useEffect(function () {
|
|
45886
|
-
if (dashApi
|
|
45887
|
-
|
|
45888
|
-
|
|
45889
|
-
|
|
45890
|
-
|
|
45891
|
-
|
|
45920
|
+
if (!dashApi || catalog.length > 0) return;
|
|
45921
|
+
setIsLoadingCatalog(true);
|
|
45922
|
+
var pending = 2;
|
|
45923
|
+
var merged = [];
|
|
45924
|
+
var finish = function finish() {
|
|
45925
|
+
if (--pending === 0) {
|
|
45926
|
+
setCatalog(merged);
|
|
45892
45927
|
setIsLoadingCatalog(false);
|
|
45928
|
+
}
|
|
45929
|
+
};
|
|
45930
|
+
dashApi.mcpGetCatalog(function (_event, result) {
|
|
45931
|
+
var builtIn = (result.catalog || []).map(function (s) {
|
|
45932
|
+
return _objectSpread$n(_objectSpread$n({}, s), {}, {
|
|
45933
|
+
_external: false
|
|
45934
|
+
});
|
|
45893
45935
|
});
|
|
45936
|
+
merged = merged.concat(builtIn);
|
|
45937
|
+
finish();
|
|
45938
|
+
}, function (_event, err) {
|
|
45939
|
+
finish();
|
|
45940
|
+
});
|
|
45941
|
+
if (typeof dashApi.mcpGetKnownExternalCatalog === "function") {
|
|
45942
|
+
dashApi.mcpGetKnownExternalCatalog(function (_event, result) {
|
|
45943
|
+
var external = (result.servers || []).map(function (s) {
|
|
45944
|
+
return _objectSpread$n(_objectSpread$n({}, s), {}, {
|
|
45945
|
+
_external: true
|
|
45946
|
+
});
|
|
45947
|
+
});
|
|
45948
|
+
merged = merged.concat(external);
|
|
45949
|
+
finish();
|
|
45950
|
+
}, function (_event, err) {
|
|
45951
|
+
finish();
|
|
45952
|
+
});
|
|
45953
|
+
} else {
|
|
45954
|
+
// Older dashApi without known-external support — skip cleanly.
|
|
45955
|
+
finish();
|
|
45894
45956
|
}
|
|
45895
45957
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45896
45958
|
}, [dashApi]);
|
|
@@ -46435,6 +46497,10 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
46435
46497
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
46436
46498
|
className: "font-semibold text-lg",
|
|
46437
46499
|
children: server.name
|
|
46500
|
+
}), server._external && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
46501
|
+
className: "ml-auto text-xs px-2 py-0.5 rounded bg-indigo-900 text-indigo-200",
|
|
46502
|
+
title: "From the curated known-external allow-list (github.com/modelcontextprotocol/servers). Installs the same way as built-in entries.",
|
|
46503
|
+
children: "external"
|
|
46438
46504
|
})]
|
|
46439
46505
|
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
46440
46506
|
className: "text-sm opacity-70 mb-3",
|