clementine-agent 1.18.137 → 1.18.138

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.
@@ -6,6 +6,7 @@
6
6
  * option alongside Clementine's own MCP server.
7
7
  */
8
8
  import type { ManagedMcpServer } from '../types.js';
9
+ export declare const KNOWN_MCP_DESCRIPTIONS: Record<string, string>;
9
10
  /** Discover all available MCP servers from Claude Desktop, Claude Code, and user config. */
10
11
  export declare function discoverMcpServers(): ManagedMcpServer[];
11
12
  /** Get enabled MCP servers as SDK-compatible config, filtered by allowed list. */
@@ -16,7 +16,12 @@ const MCP_SERVERS_FILE = path.join(BASE_DIR, 'mcp-servers.json');
16
16
  const INTEGRATIONS_FILE = path.join(BASE_DIR, 'claude-integrations.json');
17
17
  const CACHE_TTL_MS = 60_000; // 60s cache
18
18
  // ── Known server descriptions ───────────────────────────────────────
19
- const KNOWN_DESCRIPTIONS = {
19
+ //
20
+ // Single source of truth for MCP server descriptions. Exported so the
21
+ // dashboard, builder UI, and any other surface that wants a friendly
22
+ // label for a known server name can pull from one place — keeps chat
23
+ // and dashboard aligned.
24
+ export const KNOWN_MCP_DESCRIPTIONS = {
20
25
  slack: 'Slack workspace messaging and channels',
21
26
  linear: 'Linear issue tracking and project management',
22
27
  notion: 'Notion workspace — pages, databases, search',
@@ -39,7 +44,10 @@ const KNOWN_DESCRIPTIONS = {
39
44
  discord: 'Discord bot integration',
40
45
  imessage: 'iMessage — read and send messages on macOS',
41
46
  figma: 'Figma design files — read, inspect, and export',
47
+ serena: 'Code-aware AI assistant',
42
48
  };
49
+ // Internal alias kept so the existing read sites in this file keep working.
50
+ const KNOWN_DESCRIPTIONS = KNOWN_MCP_DESCRIPTIONS;
43
51
  // ── Cache ────────────────────────────────────────────────────────────
44
52
  let _cachedServers = null;
45
53
  let _cacheExpiry = 0;
@@ -17,7 +17,7 @@ import matter from 'gray-matter';
17
17
  import cron from 'node-cron';
18
18
  import { TunnelManager } from './tunnel.js';
19
19
  import { AgentManager } from '../agent/agent-manager.js';
20
- import { discoverMcpServers, getClaudeIntegrations } from '../agent/mcp-bridge.js';
20
+ import { discoverMcpServers, getClaudeIntegrations, KNOWN_MCP_DESCRIPTIONS } from '../agent/mcp-bridge.js';
21
21
  import { buildBuilderEnrichedMessage, builderSessionKey } from '../dashboard/builder/prompt.js';
22
22
  import { AGENTS_DIR, MEMORY_FILE, SESSIONS_FILE, applyOneMillionContextRecovery, looksLikeClaudeOneMillionContextError, normalizeClaudeSdkOptionsForOneMillionContext, } from '../config.js';
23
23
  import { parseTasks } from '../tools/shared.js';
@@ -862,72 +862,24 @@ function getApiConnectionStatus() {
862
862
  'Web Search': true,
863
863
  };
864
864
  }
865
- const MCP_SERVER_DESCRIPTIONS = {
866
- 'dataforseo': 'SEO data, keyword research, SERP analysis',
867
- 'supabase': 'Supabase database and auth',
868
- 'Bright Data': 'Web scraping and data collection',
869
- 'browsermcp': 'Browser automation via MCP',
870
- 'ElevenLabs': 'Voice synthesis, text-to-speech, audio AI',
871
- 'apify': 'Web scraping actors and automation',
872
- 'vapi': 'Voice AI phone calls and assistants',
873
- 'kernel': 'Kernel browser automation',
874
- 'playwright': 'Browser testing and automation',
875
- 'context7': 'Library documentation lookup',
876
- 'firecrawl': 'Web crawling and scraping',
877
- 'exa': 'Neural web search',
878
- 'linear': 'Linear issue tracking',
879
- 'discord': 'Discord bot integration',
880
- 'gitlab': 'GitLab repository management',
881
- 'greptile': 'Codebase search and understanding',
882
- 'serena': 'Code-aware AI assistant',
883
- 'terraform': 'Infrastructure as code management',
884
- };
865
+ /**
866
+ * Surface global MCP servers for the Tools & MCP catalog.
867
+ *
868
+ * 1.18.138 collapsed onto `discoverMcpServers` from mcp-bridge so the
869
+ * dashboard's view exactly matches what chat actually has access to. The
870
+ * old standalone walker (with its own description table + Claude Code
871
+ * `enabledPlugins` enumeration) was misleading: those plugins live inside
872
+ * Claude Code itself and Clementine cannot launch them, so listing them as
873
+ * "available tools" was a UX bug. Now the same source-of-truth feeds both
874
+ * surfaces KNOWN_MCP_DESCRIPTIONS in mcp-bridge.ts owns the labels.
875
+ */
885
876
  function discoverGlobalMcpServers() {
886
- const servers = [];
887
- const seen = new Set();
888
- // 1. Claude Desktop config
889
- const desktopConfig = path.join(os.homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
890
- try {
891
- if (existsSync(desktopConfig)) {
892
- const data = JSON.parse(readFileSync(desktopConfig, 'utf-8'));
893
- for (const name of Object.keys(data.mcpServers ?? {})) {
894
- if (seen.has(name.toLowerCase()))
895
- continue;
896
- seen.add(name.toLowerCase());
897
- servers.push({
898
- name,
899
- description: MCP_SERVER_DESCRIPTIONS[name] ?? `${name} MCP server`,
900
- type: 'global-mcp',
901
- connected: true,
902
- });
903
- }
904
- }
905
- }
906
- catch { /* ignore */ }
907
- // 2. Claude Code enabled plugins (from settings.json)
908
- try {
909
- const settingsFile = path.join(os.homedir(), '.claude', 'settings.json');
910
- if (existsSync(settingsFile)) {
911
- const settings = JSON.parse(readFileSync(settingsFile, 'utf-8'));
912
- const plugins = settings.enabledPlugins ?? {};
913
- for (const [key, enabled] of Object.entries(plugins)) {
914
- if (!enabled)
915
- continue;
916
- const pluginName = key.split('@')[0];
917
- if (seen.has(pluginName.toLowerCase()))
918
- continue;
919
- seen.add(pluginName.toLowerCase());
920
- servers.push({
921
- name: pluginName,
922
- description: MCP_SERVER_DESCRIPTIONS[pluginName] ?? `${pluginName} plugin`,
923
- type: 'global-mcp',
924
- connected: true,
925
- });
926
- }
927
- }
928
- }
929
- catch { /* ignore */ }
930
- return servers;
877
+ return discoverMcpServers().map(s => ({
878
+ name: s.name,
879
+ description: s.description ?? KNOWN_MCP_DESCRIPTIONS[s.name] ?? `${s.name} MCP server`,
880
+ type: 'global-mcp',
881
+ connected: s.enabled !== false,
882
+ }));
931
883
  }
932
884
  // ── Metrics computation ──────────────────────────────────────────────
933
885
  function computeMetrics() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.18.137",
3
+ "version": "1.18.138",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",