@danainnovations/cortex-mcp 1.0.84 → 1.0.85

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/cli.js CHANGED
@@ -339,7 +339,13 @@ function getWizardHtml() {
339
339
  color: #8f999f;
340
340
  text-transform: uppercase;
341
341
  letter-spacing: 0.08em;
342
- margin-bottom: 8px;
342
+ margin-bottom: 4px;
343
+ }
344
+ .mcp-section-subtitle {
345
+ font-size: 12px;
346
+ color: #6b7780;
347
+ font-weight: 400;
348
+ margin-bottom: 12px;
343
349
  }
344
350
 
345
351
  /* \u2500\u2500 MCP List \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@@ -1062,50 +1068,39 @@ function getWizardHtml() {
1062
1068
  databricks: 'Query data warehouses, explore Unity Catalog, and manage jobs',
1063
1069
  };
1064
1070
 
1065
- async function renderMcps() {
1066
- var container = document.getElementById('mcp-list-container');
1067
-
1068
- // Fetch per-user available MCPs (uses API key from login)
1069
- try {
1070
- var userResp = await fetch('/api/user-mcps');
1071
- var userData = await userResp.json();
1072
- if (userData.mcps && userData.mcps.length > 0) {
1073
- state.enabledMcps = userData.mcps.map(function(m) { return m.name; });
1074
- state.selectedMcps = state.enabledMcps.slice();
1075
- }
1076
- } catch (e) {
1077
- // Fall back to global enabledMcps from initial state
1078
- }
1079
-
1080
- // Fetch existing OAuth connections to show connected status
1081
- try {
1082
- var resp = await fetch('/api/connections');
1083
- var data = await resp.json();
1084
- state.connections = data.connections || [];
1085
- } catch (e) {
1086
- state.connections = state.connections || [];
1087
- }
1088
-
1071
+ function renderMcpList(container) {
1089
1072
  var enabledList = (state.enabledMcps && state.enabledMcps.length > 0)
1090
1073
  ? state.enabledMcps : ['m365'];
1091
1074
  var enabledMcps = state.availableMcps.filter(function(m) { return enabledList.indexOf(m.name) !== -1; });
1092
1075
  var disabledMcps = state.availableMcps.filter(function(m) { return enabledList.indexOf(m.name) === -1; });
1093
1076
 
1077
+ // Split enabled into company vs personal
1078
+ var companyMcps = enabledMcps.filter(function(m) { return m.authMode === 'company'; });
1079
+ var personalMcps = enabledMcps.filter(function(m) { return m.authMode === 'personal'; });
1080
+
1094
1081
  var html = '';
1095
1082
 
1096
- // Enabled section
1097
- if (enabledMcps.length > 0) {
1083
+ if (companyMcps.length > 0) {
1084
+ html += '<div class="mcp-section">';
1085
+ html += '<div class="mcp-section-title">Company Integrations</div>';
1086
+ html += '<div class="mcp-section-subtitle">Ready to use \\u2014 no account connection needed</div>';
1087
+ html += '<div class="mcp-list">';
1088
+ html += companyMcps.map(function(mcp) { return renderMcpItem(mcp, false, false); }).join('');
1089
+ html += '</div></div>';
1090
+ }
1091
+
1092
+ if (personalMcps.length > 0) {
1098
1093
  html += '<div class="mcp-section">';
1099
- html += '<div class="mcp-section-title">Available integrations</div>';
1094
+ html += '<div class="mcp-section-title">Personal Integrations</div>';
1095
+ html += '<div class="mcp-section-subtitle">Connect your personal account to use these</div>';
1100
1096
  html += '<div class="mcp-list">';
1101
- html += enabledMcps.map(function(mcp) { return renderMcpItem(mcp, false, false); }).join('');
1097
+ html += personalMcps.map(function(mcp) { return renderMcpItem(mcp, false, false); }).join('');
1102
1098
  html += '</div></div>';
1103
1099
  }
1104
1100
 
1105
- // Disabled (coming soon) section
1106
1101
  if (disabledMcps.length > 0) {
1107
1102
  html += '<div class="mcp-section">';
1108
- html += '<div class="mcp-section-title">Coming soon</div>';
1103
+ html += '<div class="mcp-section-title">Coming Soon</div>';
1109
1104
  html += '<div class="mcp-list">';
1110
1105
  html += disabledMcps.map(function(mcp) { return renderMcpItem(mcp, false, true); }).join('');
1111
1106
  html += '</div></div>';
@@ -1124,6 +1119,34 @@ function getWizardHtml() {
1124
1119
  });
1125
1120
  }
1126
1121
 
1122
+ async function renderMcps() {
1123
+ var container = document.getElementById('mcp-list-container');
1124
+
1125
+ // Render immediately with data from init() \u2014 no loading delay
1126
+ renderMcpList(container);
1127
+
1128
+ // Fetch updated user MCPs and connections in parallel
1129
+ try {
1130
+ var results = await Promise.all([
1131
+ fetch('/api/user-mcps'),
1132
+ fetch('/api/connections')
1133
+ ]);
1134
+ var userData = await results[0].json();
1135
+ var connData = await results[1].json();
1136
+
1137
+ if (userData.mcps && userData.mcps.length > 0) {
1138
+ state.enabledMcps = userData.mcps.map(function(m) { return m.name; });
1139
+ state.selectedMcps = state.enabledMcps.slice();
1140
+ }
1141
+ state.connections = connData.connections || [];
1142
+
1143
+ // Re-render with fresh data (connection badges, updated enabled list)
1144
+ renderMcpList(container);
1145
+ } catch (e) {
1146
+ // Already rendered with init() data \u2014 no action needed
1147
+ }
1148
+ }
1149
+
1127
1150
  function renderMcpItem(mcp, isRequired, isDisabled) {
1128
1151
  var icon = MCP_ICONS[mcp.name] || '';
1129
1152
  var conn = (state.connections || []).find(function(c) { return c.mcp_name === mcp.name; });
@@ -2568,7 +2591,7 @@ var CortexHttpClient = class {
2568
2591
  humanReadableError(status, body) {
2569
2592
  switch (status) {
2570
2593
  case 401:
2571
- return "Invalid API key. Check your key at https://aidentity.app/settings/keys";
2594
+ return "Invalid API key. Run 'npx @danainnovations/cortex-mcp login' to get a new key.";
2572
2595
  case 403:
2573
2596
  return "API key lacks MCP permissions. Create a new key with MCP access.";
2574
2597
  case 404: