@danainnovations/cortex-mcp 1.0.97 → 1.0.98

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
@@ -901,6 +901,7 @@ function getWizardHtml() {
901
901
  antigravity: '<svg viewBox="0 0 16 16"><path d="M8 1l2 5h5l-4 3 1.5 5L8 11l-4.5 3L5 9 1 6h5z"/></svg>',
902
902
  codex: '<svg viewBox="0 0 16 16"><circle cx="8" cy="8" r="3" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 1v3M8 12v3M1 8h3M12 8h3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
903
903
  'claude-ai': '<svg viewBox="0 0 16 16"><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.2a5.8 5.8 0 110 11.6A5.8 5.8 0 018 2.2z"/><path d="M2.5 8h11M8 2.5c-1.8 2-2.7 3.5-2.7 5.5S6.2 12 8 13.5c1.8-1.5 2.7-3.5 2.7-5.5S9.8 4.5 8 2.5z" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round"/></svg>',
904
+ 'claude-cowork': '<svg viewBox="0 0 16 16"><path d="M4 3a2 2 0 00-2 2v6a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2H4z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M5 7h2v2H5zM9 7h2v2H9z" fill="currentColor"/><path d="M6 10.5c0-.3.4-1 2-1s2 .7 2 1" fill="none" stroke="currentColor" stroke-width="0.8" stroke-linecap="round"/></svg>',
904
905
  perplexity: '<svg viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M8 2v12M2 8h12M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1" stroke-linecap="round"/></svg>',
905
906
  stdio: '<svg viewBox="0 0 16 16"><path d="M2 3h12a1 1 0 011 1v8a1 1 0 01-1 1H2a1 1 0 01-1-1V4a1 1 0 011-1zm1 2v6h10V5H3z"/></svg>',
906
907
  };
@@ -1212,7 +1213,7 @@ function getWizardHtml() {
1212
1213
  function renderClientItem(client) {
1213
1214
  var detected = client.detected;
1214
1215
  var icon = CLIENT_ICONS[client.type] || '';
1215
- var isManual = client.type === 'perplexity' || client.type === 'stdio' || client.type === 'claude-ai';
1216
+ var isManual = client.type === 'perplexity' || client.type === 'stdio' || client.type === 'claude-ai' || client.type === 'claude-cowork';
1216
1217
  var alreadyConfigured = !isManual && state.configuredClients.indexOf(client.type) !== -1;
1217
1218
  var statusText = alreadyConfigured ? 'Configured' : (detected ? 'Detected' : 'Not found');
1218
1219
  return (
@@ -1233,17 +1234,17 @@ function getWizardHtml() {
1233
1234
  document.getElementById('btn-configure').textContent = 'Configure';
1234
1235
 
1235
1236
  // Pre-select already-configured clients (exclude manual/additional ones)
1236
- var nonAutoTypes = ['perplexity', 'stdio', 'claude-ai'];
1237
+ var nonAutoTypes = ['perplexity', 'stdio', 'claude-ai', 'claude-cowork'];
1237
1238
  state.selectedClients = state.configuredClients.filter(function(c) {
1238
1239
  return nonAutoTypes.indexOf(c) === -1;
1239
1240
  });
1240
1241
 
1241
- // Split into auto-configured, web/mobile, and manual-setup clients
1242
+ // Split into auto-configured, web/mobile/cowork, and manual-setup clients
1242
1243
  var autoClients = state.detectedClients.filter(function(c) {
1243
- return c.type !== 'perplexity' && c.type !== 'stdio' && c.type !== 'claude-ai';
1244
+ return c.type !== 'perplexity' && c.type !== 'stdio' && c.type !== 'claude-ai' && c.type !== 'claude-cowork';
1244
1245
  });
1245
1246
  var webClients = state.detectedClients.filter(function(c) {
1246
- return c.type === 'claude-ai';
1247
+ return c.type === 'claude-ai' || c.type === 'claude-cowork';
1247
1248
  });
1248
1249
  var manualClients = state.detectedClients.filter(function(c) {
1249
1250
  return c.type === 'perplexity' || c.type === 'stdio';
@@ -1254,7 +1255,7 @@ function getWizardHtml() {
1254
1255
  if (webClients.length > 0) {
1255
1256
  html += '<div class="client-section-divider">' +
1256
1257
  '<div class="client-section-title">Web & Mobile</div>' +
1257
- '<div class="client-section-subtitle">Use Cortex tools on claude.ai and the Claude mobile app</div>' +
1258
+ '<div class="client-section-subtitle">Use Cortex tools on claude.ai, Claude mobile, and Claude CoWork</div>' +
1258
1259
  '</div>';
1259
1260
  html += webClients.map(renderClientItem).join('');
1260
1261
  }
@@ -1269,7 +1270,7 @@ function getWizardHtml() {
1269
1270
 
1270
1271
  el.innerHTML = html;
1271
1272
 
1272
- var manualTypes = ['perplexity', 'stdio', 'claude-ai'];
1273
+ var manualTypes = ['perplexity', 'stdio', 'claude-ai', 'claude-cowork'];
1273
1274
  el.querySelectorAll('.client-item:not(.disabled):not(.already-configured)').forEach(function(item) {
1274
1275
  // Auto-select detected clients, but NOT manual/additional/web ones
1275
1276
  if (manualTypes.indexOf(item.dataset.client) === -1) {
@@ -1337,6 +1338,22 @@ function getWizardHtml() {
1337
1338
  '<span>' + (r.success ? '&#10003;' : '&#10007;') + '</span>' +
1338
1339
  '<span>' + (r.success ? escapeHtml(r.message || 'Configured') : escapeHtml(r.client) + ': ' + (r.error || 'Failed')) + '</span>' +
1339
1340
  '</div>';
1341
+ // Show Claude CoWork instructions with copyable URL
1342
+ if (r.client === 'claude-cowork' && r.success && r.message) {
1343
+ var coworkUrl = (state.serverUrl || 'https://cortex-bice.vercel.app') + '/mcp/cortex';
1344
+ html += '<div class="stdio-snippet" style="text-align: left;">' +
1345
+ '<ol style="margin: 0 0 12px 0; padding-left: 20px; line-height: 1.8;">' +
1346
+ '<li>Open Claude Desktop \u2192 <strong>Settings</strong> \u2192 <strong>Connectors</strong></li>' +
1347
+ '<li>Click <strong>Add connector</strong> \u2192 <strong>Custom connector</strong></li>' +
1348
+ '<li>Paste this URL and click Add:</li>' +
1349
+ '</ol>' +
1350
+ '<div style="display: flex; align-items: center; gap: 8px; background: rgba(0,163,225,0.08); border: 1px solid rgba(0,163,225,0.2); border-radius: 6px; padding: 8px 12px;">' +
1351
+ '<code style="flex: 1; font-size: 12px; word-break: break-all;">' + escapeHtml(coworkUrl) + '</code>' +
1352
+ '<button class="copy-btn" onclick="copySnippet(this)">Copy</button>' +
1353
+ '</div>' +
1354
+ '<p style="margin: 10px 0 0 0; font-size: 12px; opacity: 0.7;">Sign in via Okta when prompted. Tools are available in all CoWork sessions.</p>' +
1355
+ '</div>';
1356
+ }
1340
1357
  // Show Claude.ai instructions with copyable URL
1341
1358
  if (r.client === 'claude-ai' && r.success && r.message) {
1342
1359
  var mcpUrl = (state.serverUrl || 'https://cortex-bice.vercel.app') + '/mcp/cortex';
@@ -1710,6 +1727,12 @@ function detectClients() {
1710
1727
  configPath: null,
1711
1728
  detected: true
1712
1729
  });
1730
+ clients.push({
1731
+ type: "claude-cowork",
1732
+ name: "Claude CoWork",
1733
+ configPath: null,
1734
+ detected: true
1735
+ });
1713
1736
  clients.push({
1714
1737
  type: "stdio",
1715
1738
  name: "OpenClaw",
@@ -1974,6 +1997,10 @@ function configureClaudeAi(serverUrl, _apiKey, _mcps) {
1974
1997
  const url = `${serverUrl}/mcp/cortex`;
1975
1998
  return 'Add Cortex to Claude.ai & Mobile:\n\n1. Open claude.ai/settings/integrations\n2. Click "Add custom integration"\n3. Paste this URL: ' + url + "\n4. Click Add \u2014 Claude handles SSO authentication automatically\n\nOnce added, Cortex tools are available on claude.ai, Claude Desktop (web), and the Claude mobile app.";
1976
1999
  }
2000
+ function configureClaudeCowork(serverUrl, _apiKey, _mcps) {
2001
+ const url = `${serverUrl}/mcp/cortex`;
2002
+ return 'Add Cortex to Claude CoWork:\n\n1. Open Claude Desktop \u2192 Settings \u2192 Connectors\n2. Click "Add connector" \u2192 "Custom connector"\n3. Paste this URL: ' + url + "\n4. Click Add \u2014 sign in via Okta when prompted\n5. Cortex tools are now available in CoWork sessions";
2003
+ }
1977
2004
  function generateStdioSnippet(_apiKey) {
1978
2005
  const isWindowsTarget = getPlatform() === "windows" || isWSL();
1979
2006
  const config = {
@@ -2091,6 +2118,8 @@ function configureClient(clientType, serverUrl, apiKey, mcps) {
2091
2118
  return configurePerplexity(serverUrl, apiKey, mcps);
2092
2119
  case "claude-ai":
2093
2120
  return configureClaudeAi(serverUrl, apiKey, mcps);
2121
+ case "claude-cowork":
2122
+ return configureClaudeCowork(serverUrl, apiKey, mcps);
2094
2123
  case "stdio":
2095
2124
  return "Add this to your client config:\n\n" + generateStdioSnippet(apiKey);
2096
2125
  }