@danainnovations/cortex-mcp 1.0.128 → 1.0.130

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
@@ -897,12 +897,12 @@ function getWizardHtml() {
897
897
  <!-- Step 5: Connect Cortex to Claude -->
898
898
  <div id="step-manual-setup" class="step">
899
899
  <div class="card">
900
- <div id="manual-setup-content"></div>
901
- <div style="text-align:center; margin-top:8px; margin-bottom:12px;">
900
+ <div style="text-align:center; margin-bottom:16px;">
902
901
  <span style="font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.1em; color:#FF5252; background:rgba(255,82,82,0.12); border:1px solid rgba(255,82,82,0.3); padding:3px 10px; border-radius:4px;">Must Read</span>
903
902
  </div>
903
+ <div id="manual-setup-content"></div>
904
904
  <div class="btn-row">
905
- <button class="btn btn-primary btn-block" id="btn-manual-continue" disabled onclick="completeManualSetup()" style="opacity:0.4; cursor:not-allowed;">Continue (15)</button>
905
+ <button class="btn btn-primary btn-block" id="btn-manual-continue" disabled onclick="completeManualSetup()" style="opacity:0.4; cursor:not-allowed;">Next (15)</button>
906
906
  </div>
907
907
  </div>
908
908
  </div>
@@ -1383,17 +1383,7 @@ function getWizardHtml() {
1383
1383
  }
1384
1384
 
1385
1385
  // Manual clients (CoWork, Claude.ai) moved to dedicated step 5
1386
-
1387
- // \u2500\u2500 Section 3: Additional clients (collapsed) \u2500\u2500
1388
- if (additionalClients.length > 0) {
1389
- html += '<div class="client-section-divider">' +
1390
- '<div class="client-section-title">Additional Clients</div>' +
1391
- '<div class="client-section-subtitle">Perplexity, OpenClaw, and other stdio clients</div>' +
1392
- '</div>';
1393
- html += '<div class="client-grid">';
1394
- html += additionalClients.map(renderClientItem).join('');
1395
- html += '</div>';
1396
- }
1386
+ // Additional clients (Perplexity, OpenClaw) moved to Cortex Control Center
1397
1387
 
1398
1388
  el.innerHTML = html;
1399
1389
 
@@ -1510,59 +1500,107 @@ function getWizardHtml() {
1510
1500
  return '';
1511
1501
  }
1512
1502
 
1503
+ var manualSubStep = 0;
1504
+ var MANUAL_STEPS = [
1505
+ {
1506
+ title: 'Connect Cortex Enterprise',
1507
+ subtitle: 'This step is only for <strong style="color:#fff;">Organization / Enterprise</strong> Claude accounts',
1508
+ badge: 'Step 1 of 4',
1509
+ content: function() {
1510
+ return '<div style="border: 2px solid #00A3E1; border-radius: 14px; padding: 24px; background: rgba(0,163,225,0.04);">' +
1511
+ '<p style="font-size:15px; font-weight:600; color:#fff; margin-bottom:8px;">Open Claude Desktop \\u2192 Settings \\u2192 Connectors</p>' +
1512
+ '<p style="font-size:13px; color:#8f999f; line-height:1.6;">In Claude Desktop, click the menu icon (top-left), go to <strong style="color:#fff;">Settings</strong>, then select <strong style="color:#fff;">Connectors</strong> from the left sidebar.</p>' +
1513
+ '</div>' +
1514
+ '<p style="font-size:12px; color:#FFB74D; margin-top:12px; text-align:center;">If you are on a personal account (not Enterprise), you can skip all 4 steps \\u2014 your setup is already complete.</p>';
1515
+ }
1516
+ },
1517
+ {
1518
+ title: 'Connect Cortex Enterprise',
1519
+ subtitle: 'This step is only for <strong style="color:#fff;">Organization / Enterprise</strong> Claude accounts',
1520
+ badge: 'Step 2 of 4',
1521
+ content: function() {
1522
+ return '<div style="border: 2px solid #00A3E1; border-radius: 14px; padding: 24px; background: rgba(0,163,225,0.04);">' +
1523
+ '<p style="font-size:15px; font-weight:600; color:#fff; margin-bottom:8px;">Find Cortex MCP Enterprise and click Connect</p>' +
1524
+ '<p style="font-size:13px; color:#8f999f; line-height:1.6;">Scroll to the bottom of the Connectors list. You should see <strong style="color:#fff;">Cortex MCP Enterprise</strong> with a <strong style="color:#fff;">Connect</strong> button. Click it.</p>' +
1525
+ '</div>';
1526
+ }
1527
+ },
1528
+ {
1529
+ title: 'Connect Cortex Enterprise',
1530
+ subtitle: 'This step is only for <strong style="color:#fff;">Organization / Enterprise</strong> Claude accounts',
1531
+ badge: 'Step 3 of 4',
1532
+ content: function() {
1533
+ return '<div style="border: 2px solid #00A3E1; border-radius: 14px; padding: 24px; background: rgba(0,163,225,0.04);">' +
1534
+ '<p style="font-size:15px; font-weight:600; color:#fff; margin-bottom:8px;">Sign in and close the browser tab</p>' +
1535
+ '<p style="font-size:13px; color:#8f999f; line-height:1.6;">A browser window will open for sign-in. Log in with your <strong style="color:#fff;">company account</strong>, then click <strong style="color:#fff;">Open Claude</strong> when prompted.</p>' +
1536
+ '<p style="font-size:13px; color:#8f999f; line-height:1.6; margin-top:8px;">The browser tab will show a spinner \\u2014 this is normal. <strong style="color:#fff;">Close the browser tab</strong>. The connection is already complete.</p>' +
1537
+ '</div>';
1538
+ }
1539
+ },
1540
+ {
1541
+ title: 'Connect Cortex Enterprise',
1542
+ subtitle: 'This step is only for <strong style="color:#fff;">Organization / Enterprise</strong> Claude accounts',
1543
+ badge: 'Step 4 of 4',
1544
+ content: function() {
1545
+ return '<div style="border: 2px solid #00A3E1; border-radius: 14px; padding: 24px; background: rgba(0,163,225,0.04);">' +
1546
+ '<p style="font-size:15px; font-weight:600; color:#fff; margin-bottom:8px;">Set Tool permissions to Always allow</p>' +
1547
+ '<p style="font-size:13px; color:#8f999f; line-height:1.6;">Back in <strong style="color:#fff;">Settings \\u2192 Connectors</strong>, click on <strong style="color:#fff;">Cortex</strong>. Change the Tool permissions dropdown from \\u201CCustom\\u201D to <strong style="color:#fff;">Always allow</strong>.</p>' +
1548
+ '<p style="font-size:12px; color:#8f999f; margin-top:12px;">This one connection enables Cortex in CoWork, claude.ai (web), and the Claude mobile app.</p>' +
1549
+ '</div>';
1550
+ }
1551
+ }
1552
+ ];
1553
+
1513
1554
  function renderManualSetup() {
1514
1555
  var el = document.getElementById('manual-setup-content');
1515
- var mcpUrl = (state.serverUrl || 'https://cortex-bice.vercel.app') + '/mcp/cortex';
1516
- var coworkIcon = CLIENT_ICONS['claude-cowork'] || '';
1517
- var claudeAiIcon = CLIENT_ICONS['claude-ai'] || '';
1556
+ var step = MANUAL_STEPS[manualSubStep];
1518
1557
 
1519
1558
  el.innerHTML =
1520
- '<h2 style="margin-bottom:4px;">Connect Cortex Enterprise</h2>' +
1521
- '<p class="subtitle" style="margin-bottom:20px;">This step is only for <strong style="color:#fff;">Organization / Enterprise</strong> Claude accounts</p>' +
1522
-
1523
- '<div style="border: 2px solid #00A3E1; border-radius: 14px; padding: 20px; background: rgba(0,163,225,0.04);">' +
1524
- '<div style="display:flex; align-items:center; gap:10px; margin-bottom:14px;">' +
1525
- (coworkIcon ? '<div class="client-icon" style="width:28px;height:28px;">' + coworkIcon + '</div>' : '') +
1526
- '<span style="font-size:16px; font-weight:600; color:#fff;">Cortex MCP Enterprise</span>' +
1527
- '<span style="font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:#fff; background:#00A3E1; padding:3px 10px; border-radius:4px; margin-left:auto;">Enterprise only</span>' +
1528
- '</div>' +
1529
- '<p style="font-size:13px; color:#FFB74D; margin-bottom:12px; font-weight:500;">If you are on a company Claude Enterprise or Organization plan, you must complete this step. The local \\u201Ccortex\\u201D config from the previous step only works for personal accounts.</p>' +
1530
- '<ol class="manual-client-steps" style="font-size:14px; line-height:2;">' +
1531
- '<li>Open <strong>Claude Desktop</strong> \\u2192 <strong>Settings</strong> \\u2192 <strong>Connectors</strong></li>' +
1532
- '<li>Find <strong>Cortex MCP Enterprise</strong> at the bottom and click <strong>Connect</strong></li>' +
1533
- '<li>Sign in with your company account, click <strong>Open Claude</strong>, then close the browser tab</li>' +
1534
- '<li>Back in Connectors, click on <strong>Cortex</strong> \\u2192 set Tool permissions to <strong>Always allow</strong></li>' +
1535
- '</ol>' +
1536
- '<p style="font-size:12px; color:#8f999f; margin-top:12px;">This one connection enables Cortex in CoWork, claude.ai (web), and the Claude mobile app.</p>' +
1559
+ '<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:4px;">' +
1560
+ '<h2 style="margin:0;">' + step.title + '</h2>' +
1561
+ '<span style="font-size:11px; font-weight:600; color:#00A3E1; background:rgba(0,163,225,0.1); padding:3px 10px; border-radius:4px;">' + step.badge + '</span>' +
1537
1562
  '</div>' +
1563
+ '<p class="subtitle" style="margin-bottom:20px;">' + step.subtitle + '</p>' +
1564
+ step.content();
1538
1565
 
1539
- '<p style="font-size:12px; color:#6b7780; margin-top:16px; text-align:center;">Not on an Enterprise account? Wait for the timer, then click Continue \\u2014 the local setup from the previous step is all you need.</p>';
1566
+ // Start 15-second countdown
1567
+ startManualCountdown();
1568
+ }
1540
1569
 
1541
- // Start 15-second countdown on the Continue button
1542
- var continueBtn = document.getElementById('btn-manual-continue');
1543
- if (continueBtn) {
1544
- var countdown = 15;
1545
- continueBtn.textContent = 'Continue (' + countdown + ')';
1546
- var timer = setInterval(function() {
1547
- countdown--;
1548
- if (countdown <= 0) {
1549
- clearInterval(timer);
1550
- continueBtn.disabled = false;
1551
- continueBtn.style.opacity = '1';
1552
- continueBtn.style.cursor = 'pointer';
1553
- continueBtn.textContent = 'Continue';
1554
- } else {
1555
- continueBtn.textContent = 'Continue (' + countdown + ')';
1556
- }
1557
- }, 1000);
1558
- }
1570
+ function startManualCountdown() {
1571
+ var btn = document.getElementById('btn-manual-continue');
1572
+ if (!btn) return;
1573
+ btn.disabled = true;
1574
+ btn.style.opacity = '0.4';
1575
+ btn.style.cursor = 'not-allowed';
1576
+ var countdown = 15;
1577
+ btn.textContent = 'Next (' + countdown + ')';
1578
+ var timer = setInterval(function() {
1579
+ countdown--;
1580
+ if (countdown <= 0) {
1581
+ clearInterval(timer);
1582
+ btn.disabled = false;
1583
+ btn.style.opacity = '1';
1584
+ btn.style.cursor = 'pointer';
1585
+ btn.textContent = manualSubStep >= MANUAL_STEPS.length - 1 ? 'Continue' : 'Next';
1586
+ } else {
1587
+ btn.textContent = (manualSubStep >= MANUAL_STEPS.length - 1 ? 'Continue' : 'Next') + ' (' + countdown + ')';
1588
+ }
1589
+ }, 1000);
1559
1590
  }
1560
1591
 
1561
1592
  function completeManualSetup() {
1562
- goToStep('connect');
1593
+ manualSubStep++;
1594
+ if (manualSubStep >= MANUAL_STEPS.length) {
1595
+ manualSubStep = 0;
1596
+ goToStep('connect');
1597
+ } else {
1598
+ renderManualSetup();
1599
+ }
1563
1600
  }
1564
1601
 
1565
1602
  function skipManualSetup() {
1603
+ manualSubStep = 0;
1566
1604
  goToStep('connect');
1567
1605
  }
1568
1606
 
@@ -1715,6 +1753,12 @@ function getWizardHtml() {
1715
1753
  });
1716
1754
  html += '</div>';
1717
1755
 
1756
+ // Dashboard callout
1757
+ html += '<div style="margin-top: 24px; text-align: center; padding: 20px; border-radius: 12px; background: rgba(0,163,225,0.06); border: 1px solid rgba(0,163,225,0.2);">' +
1758
+ '<p style="font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 6px;">Go back to <a href="https://cortex.sonance.com" target="_blank" style="color: #00A3E1; text-decoration: none;">cortex.sonance.com</a></p>' +
1759
+ '<p style="font-size: 13px; color: #8f999f;">For further instructions, managing connections, and accessing your dashboard</p>' +
1760
+ '</div>';
1761
+
1718
1762
  el.innerHTML = html;
1719
1763
 
1720
1764
  // Start 10-second countdown on the Close button