@trops/dash-core 0.1.72 → 0.1.73

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.
@@ -4442,7 +4442,7 @@ function requireProviderController () {
4442
4442
  hasRequiredProviderController = 1;
4443
4443
  const { app, safeStorage } = require$$0;
4444
4444
  const path = require$$1$1;
4445
- const { writeFileSync } = require$$2;
4445
+ const { writeFileSync, readFileSync, existsSync } = require$$2;
4446
4446
  const {
4447
4447
  ensureDirectoryExistence,
4448
4448
  getFileContents,
@@ -4565,6 +4565,17 @@ function requireProviderController () {
4565
4565
  // Load providers file
4566
4566
  const providersData = getFileContents(filename, {});
4567
4567
 
4568
+ // Load MCP catalog for merging new config fields into saved providers
4569
+ let catalog = [];
4570
+ try {
4571
+ const catalogPath = path.join(__dirname, "..", "mcp", "mcpServerCatalog.json");
4572
+ if (existsSync(catalogPath)) {
4573
+ catalog = JSON.parse(readFileSync(catalogPath, "utf-8"));
4574
+ }
4575
+ } catch (e) {
4576
+ // Catalog is optional — merge is best-effort
4577
+ }
4578
+
4568
4579
  // Decrypt all credentials
4569
4580
  const decryptedProviders = [];
4570
4581
  Object.entries(providersData).forEach(([name, data]) => {
@@ -4585,6 +4596,16 @@ function requireProviderController () {
4585
4596
  // Include mcpConfig for MCP providers
4586
4597
  if (data.mcpConfig) {
4587
4598
  provider.mcpConfig = data.mcpConfig;
4599
+
4600
+ // Merge argsMapping from catalog if missing from saved config
4601
+ // (providers snapshot mcpConfig at creation time; this ensures
4602
+ // existing providers pick up new catalog features like argsMapping)
4603
+ if (!data.mcpConfig.argsMapping && data.type) {
4604
+ const catalogEntry = catalog.find((entry) => entry.id === data.type);
4605
+ if (catalogEntry?.mcpConfig?.argsMapping) {
4606
+ provider.mcpConfig.argsMapping = catalogEntry.mcpConfig.argsMapping;
4607
+ }
4608
+ }
4588
4609
  }
4589
4610
 
4590
4611
  // Include allowedTools for MCP providers