@trops/dash-core 0.1.533 → 0.1.534

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
@@ -4931,6 +4931,17 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4931
4931
  }, [pkg.name, onInstallComplete]);
4932
4932
  var widgetDeps = (preview === null || preview === void 0 ? void 0 : preview.widgets) || pkg.widgets || [];
4933
4933
  var providers = (preview === null || preview === void 0 ? void 0 : preview.providers) || [];
4934
+ // Slice 13c: aggregated MCP permissions for the dashboard, computed
4935
+ // by the publisher at publish time across every widget's local
4936
+ // package.json. Empty/missing means the dashboard either ships no
4937
+ // tool-using widgets or pre-dates the aggregation.
4938
+ var aggregatedPermissions = (preview === null || preview === void 0 ? void 0 : preview.permissions) || pkg.permissions || null;
4939
+ // Per-widget permissions live on each widget dep itself —
4940
+ // version-pinned next to the widget so the disclosure can't drift
4941
+ // from the actual installed package.
4942
+ var widgetsWithPermissions = widgetDeps.filter(function (w) {
4943
+ return w.permissions && _typeof(w.permissions) === "object" && Object.keys(w.permissions).length > 0;
4944
+ });
4934
4945
 
4935
4946
  // Augment compatibility: check renderer-side ComponentManager for
4936
4947
  // built-in widgets that the electron-side WidgetRegistry doesn't know about
@@ -5135,6 +5146,62 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
5135
5146
  }, idx);
5136
5147
  })
5137
5148
  })]
5149
+ }), (aggregatedPermissions || widgetsWithPermissions.length > 0) && /*#__PURE__*/jsxRuntime.jsxs("div", {
5150
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
5151
+ className: "text-xs font-semibold opacity-50 mb-1 block",
5152
+ children: "REQUIRED TOOLS"
5153
+ }), aggregatedPermissions && Object.entries(aggregatedPermissions).map(function (_ref3) {
5154
+ var _ref4 = _slicedToArray(_ref3, 2),
5155
+ server = _ref4[0],
5156
+ block = _ref4[1];
5157
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
5158
+ className: "mb-2",
5159
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
5160
+ className: "text-xs font-mono uppercase tracking-wider opacity-70",
5161
+ children: server
5162
+ }), Array.isArray(block.tools) && block.tools.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
5163
+ className: "text-xs opacity-80 ml-2 break-all",
5164
+ children: block.tools.join(", ")
5165
+ }), Array.isArray(block.readPaths) && block.readPaths.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
5166
+ className: "text-xs opacity-60 ml-2 break-all",
5167
+ children: ["Read paths: ", block.readPaths.join(", ")]
5168
+ }), Array.isArray(block.writePaths) && block.writePaths.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
5169
+ className: "text-xs opacity-60 ml-2 break-all",
5170
+ children: ["Write paths: ", block.writePaths.join(", ")]
5171
+ })]
5172
+ }, server);
5173
+ }), widgetsWithPermissions.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("details", {
5174
+ className: "mt-1",
5175
+ children: [/*#__PURE__*/jsxRuntime.jsxs("summary", {
5176
+ className: "text-xs opacity-60 cursor-pointer",
5177
+ children: ["Per-widget breakdown (", widgetsWithPermissions.length, " widget", widgetsWithPermissions.length === 1 ? "" : "s", ")"]
5178
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
5179
+ className: "mt-1 space-y-2 ml-2",
5180
+ children: widgetsWithPermissions.map(function (w, idx) {
5181
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
5182
+ className: "text-xs opacity-80",
5183
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
5184
+ className: "font-mono break-all",
5185
+ children: [w["package"] || w.packageName, w.version ? /*#__PURE__*/jsxRuntime.jsxs("span", {
5186
+ className: "opacity-50",
5187
+ children: [" v", w.version]
5188
+ }) : null]
5189
+ }), Object.entries(w.permissions).map(function (_ref5) {
5190
+ var _ref6 = _slicedToArray(_ref5, 2),
5191
+ server = _ref6[0],
5192
+ block = _ref6[1];
5193
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
5194
+ className: "ml-2 break-all",
5195
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
5196
+ className: "opacity-60",
5197
+ children: [server, ":"]
5198
+ }), " ", (block.tools || []).join(", ")]
5199
+ }, server);
5200
+ })]
5201
+ }, idx);
5202
+ })
5203
+ })]
5204
+ })]
5138
5205
  }), wiring.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
5139
5206
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
5140
5207
  className: "text-xs font-semibold opacity-50 mb-1 block",
@@ -21223,6 +21290,33 @@ var RegistryPackageDetail = function RegistryPackageDetail(_ref) {
21223
21290
  }, idx);
21224
21291
  })
21225
21292
  })]
21293
+ }), widget.permissions && _typeof(widget.permissions) === "object" && Object.keys(widget.permissions).length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
21294
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
21295
+ className: "text-xs font-semibold opacity-50 mb-1 block",
21296
+ children: "REQUIRED TOOLS"
21297
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
21298
+ className: "space-y-2",
21299
+ children: Object.entries(widget.permissions).map(function (_ref2) {
21300
+ var _ref3 = _slicedToArray(_ref2, 2),
21301
+ server = _ref3[0],
21302
+ block = _ref3[1];
21303
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
21304
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
21305
+ className: "text-xs font-mono uppercase tracking-wider opacity-70",
21306
+ children: server
21307
+ }), Array.isArray(block.tools) && block.tools.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
21308
+ className: "text-xs opacity-80 ml-2 break-all",
21309
+ children: block.tools.join(", ")
21310
+ }), Array.isArray(block.readPaths) && block.readPaths.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
21311
+ className: "text-xs opacity-60 ml-2 break-all",
21312
+ children: ["Read paths: ", block.readPaths.join(", ")]
21313
+ }), Array.isArray(block.writePaths) && block.writePaths.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
21314
+ className: "text-xs opacity-60 ml-2 break-all",
21315
+ children: ["Write paths: ", block.writePaths.join(", ")]
21316
+ })]
21317
+ }, server);
21318
+ })
21319
+ })]
21226
21320
  }), widget.appOrigin && /*#__PURE__*/jsxRuntime.jsxs("div", {
21227
21321
  className: "flex items-center gap-1.5 text-xs opacity-50",
21228
21322
  children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {