@danainnovations/cortex-mcp 1.0.111 → 1.0.112
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 +176 -27
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -512,11 +512,18 @@ function getWizardHtml() {
|
|
|
512
512
|
gap: 8px;
|
|
513
513
|
margin-bottom: 8px;
|
|
514
514
|
}
|
|
515
|
+
.client-grid {
|
|
516
|
+
display: grid;
|
|
517
|
+
grid-template-columns: repeat(2, 1fr);
|
|
518
|
+
gap: 6px;
|
|
519
|
+
margin-bottom: 8px;
|
|
520
|
+
}
|
|
521
|
+
@media (max-width: 640px) { .client-grid { grid-template-columns: 1fr; } }
|
|
515
522
|
.client-item {
|
|
516
523
|
display: flex;
|
|
517
524
|
align-items: center;
|
|
518
|
-
gap:
|
|
519
|
-
padding: 14px
|
|
525
|
+
gap: 10px;
|
|
526
|
+
padding: 10px 14px;
|
|
520
527
|
border-radius: 12px;
|
|
521
528
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
522
529
|
cursor: pointer;
|
|
@@ -539,16 +546,16 @@ function getWizardHtml() {
|
|
|
539
546
|
.client-item.already-configured .client-status { color: #4CAF50; }
|
|
540
547
|
|
|
541
548
|
.client-icon {
|
|
542
|
-
width:
|
|
543
|
-
height:
|
|
549
|
+
width: 24px;
|
|
550
|
+
height: 24px;
|
|
544
551
|
display: flex;
|
|
545
552
|
align-items: center;
|
|
546
553
|
justify-content: center;
|
|
547
|
-
border-radius:
|
|
554
|
+
border-radius: 6px;
|
|
548
555
|
background: rgba(255, 255, 255, 0.04);
|
|
549
556
|
flex-shrink: 0;
|
|
550
557
|
}
|
|
551
|
-
.client-icon svg { width:
|
|
558
|
+
.client-icon svg { width: 14px; height: 14px; fill: #8f999f; }
|
|
552
559
|
.client-item.checked .client-icon svg { fill: #00A3E1; }
|
|
553
560
|
|
|
554
561
|
.client-name { font-size: 13px; font-weight: 500; color: #fff; }
|
|
@@ -561,6 +568,71 @@ function getWizardHtml() {
|
|
|
561
568
|
letter-spacing: 0.05em;
|
|
562
569
|
}
|
|
563
570
|
|
|
571
|
+
/* \u2500\u2500 Manual Client Cards \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
572
|
+
.manual-client-card {
|
|
573
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
574
|
+
border-radius: 12px;
|
|
575
|
+
padding: 16px;
|
|
576
|
+
margin-bottom: 8px;
|
|
577
|
+
background: rgba(255, 255, 255, 0.02);
|
|
578
|
+
}
|
|
579
|
+
.manual-client-header {
|
|
580
|
+
display: flex;
|
|
581
|
+
align-items: center;
|
|
582
|
+
gap: 10px;
|
|
583
|
+
margin-bottom: 12px;
|
|
584
|
+
}
|
|
585
|
+
.manual-client-header .client-name { font-size: 14px; }
|
|
586
|
+
.manual-client-badge {
|
|
587
|
+
font-size: 9px;
|
|
588
|
+
font-weight: 600;
|
|
589
|
+
text-transform: uppercase;
|
|
590
|
+
letter-spacing: 0.5px;
|
|
591
|
+
color: #00A3E1;
|
|
592
|
+
background: rgba(0, 163, 225, 0.1);
|
|
593
|
+
padding: 2px 8px;
|
|
594
|
+
border-radius: 4px;
|
|
595
|
+
margin-left: auto;
|
|
596
|
+
}
|
|
597
|
+
.manual-client-steps {
|
|
598
|
+
margin: 0;
|
|
599
|
+
padding-left: 18px;
|
|
600
|
+
font-size: 13px;
|
|
601
|
+
line-height: 1.8;
|
|
602
|
+
color: #b0b8c0;
|
|
603
|
+
}
|
|
604
|
+
.manual-client-steps li { margin-bottom: 2px; }
|
|
605
|
+
.manual-client-steps strong { color: #fff; font-weight: 500; }
|
|
606
|
+
.manual-client-steps a { color: #00A3E1; text-decoration: none; }
|
|
607
|
+
.manual-client-steps a:hover { text-decoration: underline; }
|
|
608
|
+
.manual-url-box {
|
|
609
|
+
display: flex;
|
|
610
|
+
align-items: center;
|
|
611
|
+
gap: 8px;
|
|
612
|
+
background: rgba(0, 163, 225, 0.06);
|
|
613
|
+
border: 1px solid rgba(0, 163, 225, 0.15);
|
|
614
|
+
border-radius: 8px;
|
|
615
|
+
padding: 8px 12px;
|
|
616
|
+
margin-top: 10px;
|
|
617
|
+
}
|
|
618
|
+
.manual-url-box code {
|
|
619
|
+
flex: 1;
|
|
620
|
+
font-size: 12px;
|
|
621
|
+
color: #b0b8c0;
|
|
622
|
+
word-break: break-all;
|
|
623
|
+
}
|
|
624
|
+
.manual-url-box .copy-btn {
|
|
625
|
+
background: rgba(0, 163, 225, 0.15);
|
|
626
|
+
border: 1px solid rgba(0, 163, 225, 0.3);
|
|
627
|
+
color: #00A3E1;
|
|
628
|
+
padding: 4px 12px;
|
|
629
|
+
border-radius: 6px;
|
|
630
|
+
cursor: pointer;
|
|
631
|
+
font-size: 11px;
|
|
632
|
+
font-weight: 500;
|
|
633
|
+
white-space: nowrap;
|
|
634
|
+
}
|
|
635
|
+
|
|
564
636
|
/* \u2500\u2500 Connection List \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
565
637
|
.conn-list {
|
|
566
638
|
display: flex;
|
|
@@ -1260,46 +1332,115 @@ function getWizardHtml() {
|
|
|
1260
1332
|
document.getElementById('btn-configure').textContent = 'Configure';
|
|
1261
1333
|
|
|
1262
1334
|
// Pre-select already-configured clients (exclude manual/additional ones)
|
|
1263
|
-
var
|
|
1335
|
+
var manualTypes = ['perplexity', 'stdio', 'claude-ai', 'claude-cowork'];
|
|
1264
1336
|
state.selectedClients = state.configuredClients.filter(function(c) {
|
|
1265
|
-
return
|
|
1337
|
+
return manualTypes.indexOf(c) === -1;
|
|
1266
1338
|
});
|
|
1267
1339
|
|
|
1268
|
-
// Split into
|
|
1269
|
-
var
|
|
1270
|
-
|
|
1340
|
+
// Split clients into groups by setup method
|
|
1341
|
+
var autoClientTypes = ['claude-desktop', 'claude-code', 'cursor', 'vscode', 'antigravity', 'codex'];
|
|
1342
|
+
var manualClientTypes = ['claude-cowork', 'claude-ai'];
|
|
1343
|
+
var additionalTypes = ['perplexity', 'stdio'];
|
|
1344
|
+
|
|
1345
|
+
var autoDetected = state.detectedClients.filter(function(c) {
|
|
1346
|
+
return autoClientTypes.indexOf(c.type) !== -1 && c.detected;
|
|
1271
1347
|
});
|
|
1272
|
-
var
|
|
1273
|
-
return c.type
|
|
1348
|
+
var autoNotFound = state.detectedClients.filter(function(c) {
|
|
1349
|
+
return autoClientTypes.indexOf(c.type) !== -1 && !c.detected;
|
|
1274
1350
|
});
|
|
1275
1351
|
var manualClients = state.detectedClients.filter(function(c) {
|
|
1276
|
-
return
|
|
1352
|
+
return manualClientTypes.indexOf(c.type) !== -1;
|
|
1353
|
+
});
|
|
1354
|
+
var additionalClients = state.detectedClients.filter(function(c) {
|
|
1355
|
+
return additionalTypes.indexOf(c.type) !== -1;
|
|
1277
1356
|
});
|
|
1278
1357
|
|
|
1279
|
-
var
|
|
1358
|
+
var mcpUrl = (state.serverUrl || 'https://cortex-bice.vercel.app') + '/mcp/cortex';
|
|
1359
|
+
var html = '';
|
|
1280
1360
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
'<div class="client-section-
|
|
1361
|
+
// \u2500\u2500 Section 1: Auto-configured (2-column grid) \u2500\u2500
|
|
1362
|
+
if (autoDetected.length > 0) {
|
|
1363
|
+
html += '<div class="client-section-divider" style="margin-top:0;padding-top:0;border:none;">' +
|
|
1364
|
+
'<div class="client-section-title">Auto-configured</div>' +
|
|
1365
|
+
'<div class="client-section-subtitle">Select the apps you use \\u2014 we\\u2019ll configure them automatically</div>' +
|
|
1285
1366
|
'</div>';
|
|
1286
|
-
html +=
|
|
1367
|
+
html += '<div class="client-grid">';
|
|
1368
|
+
html += autoDetected.map(renderClientItem).join('');
|
|
1369
|
+
html += '</div>';
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
// Show not-found auto clients dimmed
|
|
1373
|
+
if (autoNotFound.length > 0) {
|
|
1374
|
+
html += '<div class="client-grid" style="margin-top:4px;">';
|
|
1375
|
+
html += autoNotFound.map(renderClientItem).join('');
|
|
1376
|
+
html += '</div>';
|
|
1287
1377
|
}
|
|
1288
1378
|
|
|
1379
|
+
// \u2500\u2500 Section 2: Manual setup with inline instructions \u2500\u2500
|
|
1289
1380
|
if (manualClients.length > 0) {
|
|
1381
|
+
html += '<div class="client-section-divider">' +
|
|
1382
|
+
'<div class="client-section-title">Connect manually</div>' +
|
|
1383
|
+
'<div class="client-section-subtitle">These need one extra step in the app</div>' +
|
|
1384
|
+
'</div>';
|
|
1385
|
+
|
|
1386
|
+
manualClients.forEach(function(client) {
|
|
1387
|
+
var icon = CLIENT_ICONS[client.type] || '';
|
|
1388
|
+
if (client.type === 'claude-cowork') {
|
|
1389
|
+
html += '<div class="manual-client-card" data-client="claude-cowork">' +
|
|
1390
|
+
'<div class="manual-client-header">' +
|
|
1391
|
+
(icon ? '<div class="client-icon">' + icon + '</div>' : '') +
|
|
1392
|
+
'<span class="client-name">Claude CoWork</span>' +
|
|
1393
|
+
'<span class="manual-client-badge">1 step</span>' +
|
|
1394
|
+
'</div>' +
|
|
1395
|
+
'<ol class="manual-client-steps">' +
|
|
1396
|
+
'<li>Open <strong>Claude Desktop</strong> \\u2192 <strong>Settings</strong> \\u2192 <strong>Connectors</strong></li>' +
|
|
1397
|
+
'<li>Find <strong>Cortex MCP Enterprise</strong> at the bottom</li>' +
|
|
1398
|
+
'<li>Click <strong>Connect</strong> \\u2192 sign in via Okta when prompted</li>' +
|
|
1399
|
+
'</ol>' +
|
|
1400
|
+
'<div class="manual-url-box">' +
|
|
1401
|
+
'<code>' + escapeHtml(mcpUrl) + '</code>' +
|
|
1402
|
+
'<button class="copy-btn" onclick="copySnippet(this)">Copy</button>' +
|
|
1403
|
+
'</div>' +
|
|
1404
|
+
'</div>';
|
|
1405
|
+
}
|
|
1406
|
+
if (client.type === 'claude-ai') {
|
|
1407
|
+
html += '<div class="manual-client-card" data-client="claude-ai">' +
|
|
1408
|
+
'<div class="manual-client-header">' +
|
|
1409
|
+
(icon ? '<div class="client-icon">' + icon + '</div>' : '') +
|
|
1410
|
+
'<span class="client-name">Claude.ai & Mobile</span>' +
|
|
1411
|
+
'<span class="manual-client-badge">1 step</span>' +
|
|
1412
|
+
'</div>' +
|
|
1413
|
+
'<ol class="manual-client-steps">' +
|
|
1414
|
+
'<li>Open <a href="https://claude.ai/settings/integrations" target="_blank">claude.ai/settings/integrations</a></li>' +
|
|
1415
|
+
'<li>Click <strong>Add custom integration</strong></li>' +
|
|
1416
|
+
'<li>Paste the URL below and click <strong>Add</strong></li>' +
|
|
1417
|
+
'</ol>' +
|
|
1418
|
+
'<div class="manual-url-box">' +
|
|
1419
|
+
'<code>' + escapeHtml(mcpUrl) + '</code>' +
|
|
1420
|
+
'<button class="copy-btn" onclick="copySnippet(this)">Copy</button>' +
|
|
1421
|
+
'</div>' +
|
|
1422
|
+
'</div>';
|
|
1423
|
+
}
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
// \u2500\u2500 Section 3: Additional clients (collapsed) \u2500\u2500
|
|
1428
|
+
if (additionalClients.length > 0) {
|
|
1290
1429
|
html += '<div class="client-section-divider">' +
|
|
1291
1430
|
'<div class="client-section-title">Additional Clients</div>' +
|
|
1292
|
-
'<div class="client-section-subtitle">
|
|
1431
|
+
'<div class="client-section-subtitle">Perplexity, OpenClaw, and other stdio clients</div>' +
|
|
1293
1432
|
'</div>';
|
|
1294
|
-
html +=
|
|
1433
|
+
html += '<div class="client-grid">';
|
|
1434
|
+
html += additionalClients.map(renderClientItem).join('');
|
|
1435
|
+
html += '</div>';
|
|
1295
1436
|
}
|
|
1296
1437
|
|
|
1297
1438
|
el.innerHTML = html;
|
|
1298
1439
|
|
|
1299
|
-
|
|
1440
|
+
// Attach click handlers to auto-configured items
|
|
1300
1441
|
el.querySelectorAll('.client-item:not(.disabled):not(.already-configured)').forEach(function(item) {
|
|
1301
|
-
// Auto-select detected clients
|
|
1302
|
-
if (manualTypes.indexOf(item.dataset.client) === -1) {
|
|
1442
|
+
// Auto-select detected auto clients
|
|
1443
|
+
if (manualTypes.indexOf(item.dataset.client) === -1 && !item.classList.contains('disabled')) {
|
|
1303
1444
|
item.classList.add('checked');
|
|
1304
1445
|
}
|
|
1305
1446
|
item.addEventListener('click', function(e) {
|
|
@@ -1310,9 +1451,17 @@ function getWizardHtml() {
|
|
|
1310
1451
|
});
|
|
1311
1452
|
});
|
|
1312
1453
|
|
|
1313
|
-
//
|
|
1314
|
-
|
|
1454
|
+
// Include manual clients in selectedClients so they get configured too
|
|
1455
|
+
manualClients.forEach(function(c) {
|
|
1456
|
+
if (state.selectedClients.indexOf(c.type) === -1) {
|
|
1457
|
+
state.selectedClients.push(c.type);
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1460
|
+
|
|
1461
|
+
// Sync selectedClients with all checked items
|
|
1462
|
+
var checkedAuto = Array.from(el.querySelectorAll('.client-item.checked'))
|
|
1315
1463
|
.map(function(i) { return i.dataset.client; });
|
|
1464
|
+
state.selectedClients = checkedAuto.concat(manualClients.map(function(c) { return c.type; }));
|
|
1316
1465
|
}
|
|
1317
1466
|
|
|
1318
1467
|
async function configureClients() {
|