@trops/dash-core 0.1.80 → 0.1.82

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.
@@ -4568,7 +4568,12 @@ function requireProviderController () {
4568
4568
  // Load MCP catalog for merging new config fields into saved providers
4569
4569
  let catalog = [];
4570
4570
  try {
4571
- const catalogPath = path.join(__dirname, "..", "mcp", "mcpServerCatalog.json");
4571
+ const catalogPath = path.join(
4572
+ __dirname,
4573
+ "..",
4574
+ "mcp",
4575
+ "mcpServerCatalog.json",
4576
+ );
4572
4577
  if (existsSync(catalogPath)) {
4573
4578
  const catalogData = JSON.parse(readFileSync(catalogPath, "utf-8"));
4574
4579
  catalog = catalogData.servers || [];
@@ -4602,9 +4607,12 @@ function requireProviderController () {
4602
4607
  // (providers snapshot mcpConfig at creation time; this ensures
4603
4608
  // existing providers pick up new catalog features like argsMapping)
4604
4609
  if (!data.mcpConfig.argsMapping && data.type) {
4605
- const catalogEntry = catalog.find((entry) => entry.id === data.type);
4610
+ const catalogEntry = catalog.find(
4611
+ (entry) => entry.id === data.type,
4612
+ );
4606
4613
  if (catalogEntry?.mcpConfig?.argsMapping) {
4607
- provider.mcpConfig.argsMapping = catalogEntry.mcpConfig.argsMapping;
4614
+ provider.mcpConfig.argsMapping =
4615
+ catalogEntry.mcpConfig.argsMapping;
4608
4616
  }
4609
4617
  }
4610
4618
  }
@@ -5763,8 +5771,16 @@ const mcpController$2 = {
5763
5771
  });
5764
5772
  }
5765
5773
 
5774
+ // Interpolate {{MCP_DIR}} in authCommand args (same as startServer)
5775
+ const mcpDir = path$6.join(__dirname, "..", "mcp");
5776
+ const resolvedArgs = (authCommand.args || []).map((arg) =>
5777
+ typeof arg === "string" && arg.includes("{{MCP_DIR}}")
5778
+ ? arg.replace(/\{\{MCP_DIR\}\}/g, mcpDir)
5779
+ : arg,
5780
+ );
5781
+
5766
5782
  return new Promise((resolve) => {
5767
- const proc = spawn(authCommand.command, authCommand.args || [], {
5783
+ const proc = spawn(authCommand.command, resolvedArgs, {
5768
5784
  env,
5769
5785
  stdio: ["ignore", "pipe", "pipe"],
5770
5786
  });
@@ -8807,11 +8823,11 @@ let _nextListenerId = 0;
8807
8823
  const _listenerMap = new Map();
8808
8824
 
8809
8825
  function _addListener(channel, callback) {
8810
- const id = String(++_nextListenerId);
8811
- const wrapped = (_event, data) => callback(data);
8812
- ipcRenderer$2.on(channel, wrapped);
8813
- _listenerMap.set(id, { channel, wrapped });
8814
- return id;
8826
+ const id = String(++_nextListenerId);
8827
+ const wrapped = (_event, data) => callback(data);
8828
+ ipcRenderer$2.on(channel, wrapped);
8829
+ _listenerMap.set(id, { channel, wrapped });
8830
+ return id;
8815
8831
  }
8816
8832
 
8817
8833
  const llmApi$2 = {
@@ -10104,9 +10120,7 @@ var dynamicWidgetLoaderExports = dynamicWidgetLoader$2.exports;
10104
10120
  try {
10105
10121
  const head = fs.readFileSync(candidate, "utf8").slice(0, 256);
10106
10122
  if (/^\s*(import\s|export\s)/m.test(head)) {
10107
- console.log(
10108
- `[WidgetRegistry] Skipping ESM bundle: ${candidate}`,
10109
- );
10123
+ console.log(`[WidgetRegistry] Skipping ESM bundle: ${candidate}`);
10110
10124
  continue;
10111
10125
  }
10112
10126
  } catch (_) {