harness-evolver 4.2.8 → 4.2.9

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-evolver",
3
3
  "description": "LangSmith-native autonomous agent optimization — evolves LLM agent code using multi-agent proposers, LangSmith experiments, and git worktrees",
4
- "version": "4.2.8",
4
+ "version": "4.2.9",
5
5
  "author": {
6
6
  "name": "Raphael Valdetaro"
7
7
  },
package/bin/install.js CHANGED
@@ -481,21 +481,40 @@ async function configureOptionalIntegrations(rl, nonInteractive) {
481
481
  step(c.bold("Optional Integrations"));
482
482
  barEmpty();
483
483
 
484
- // Context7 MCP check settings files AND plugin marketplace
485
- const hasContext7 = (() => {
484
+ // Helper: check if an MCP server is configured anywhere
485
+ function hasMcpServer(...names) {
486
486
  try {
487
- // Check settings.json / .claude.json
488
487
  for (const p of [path.join(HOME, ".claude", "settings.json"), path.join(HOME, ".claude.json")]) {
489
- if (fs.existsSync(p)) {
490
- const s = JSON.parse(fs.readFileSync(p, "utf8"));
491
- if (s.mcpServers && (s.mcpServers.context7 || s.mcpServers.Context7)) return true;
488
+ if (!fs.existsSync(p)) continue;
489
+ const s = JSON.parse(fs.readFileSync(p, "utf8"));
490
+ // Check top-level mcpServers
491
+ if (s.mcpServers) {
492
+ for (const name of names) {
493
+ if (s.mcpServers[name]) return true;
494
+ }
495
+ }
496
+ // Check per-project mcpServers (claude mcp add saves here)
497
+ if (s.projects) {
498
+ for (const proj of Object.values(s.projects)) {
499
+ if (proj && proj.mcpServers) {
500
+ for (const name of names) {
501
+ if (proj.mcpServers[name]) return true;
502
+ }
503
+ }
504
+ }
492
505
  }
493
506
  }
494
- // Check plugin marketplace install
495
- const pluginMcp = path.join(HOME, ".claude", "plugins", "marketplaces", "claude-plugins-official", "external_plugins", "context7", ".mcp.json");
496
- if (fs.existsSync(pluginMcp)) return true;
497
507
  } catch {}
498
508
  return false;
509
+ }
510
+
511
+ // Context7 MCP — check settings, per-project, AND plugin marketplace
512
+ const hasContext7 = (() => {
513
+ if (hasMcpServer("context7", "Context7")) return true;
514
+ // Check plugin marketplace install
515
+ const pluginMcp = path.join(HOME, ".claude", "plugins", "marketplaces", "claude-plugins-official", "external_plugins", "context7", ".mcp.json");
516
+ if (fs.existsSync(pluginMcp)) return true;
517
+ return false;
499
518
  })();
500
519
 
501
520
  if (hasContext7) {
@@ -517,19 +536,11 @@ async function configureOptionalIntegrations(rl, nonInteractive) {
517
536
 
518
537
  barEmpty();
519
538
 
520
- // LangChain Docs MCP — check settings files AND plugin marketplace
539
+ // LangChain Docs MCP — check settings, per-project, AND plugin marketplace
521
540
  const hasLcDocs = (() => {
522
- try {
523
- for (const p of [path.join(HOME, ".claude", "settings.json"), path.join(HOME, ".claude.json")]) {
524
- if (fs.existsSync(p)) {
525
- const s = JSON.parse(fs.readFileSync(p, "utf8"));
526
- if (s.mcpServers && (s.mcpServers["docs-langchain"] || s.mcpServers["LangChain Docs"])) return true;
527
- }
528
- }
529
- // Check plugin marketplace install
530
- const pluginMcp = path.join(HOME, ".claude", "plugins", "marketplaces", "claude-plugins-official", "external_plugins", "docs-langchain", ".mcp.json");
531
- if (fs.existsSync(pluginMcp)) return true;
532
- } catch {}
541
+ if (hasMcpServer("docs-langchain", "LangChain Docs")) return true;
542
+ const pluginMcp = path.join(HOME, ".claude", "plugins", "marketplaces", "claude-plugins-official", "external_plugins", "docs-langchain", ".mcp.json");
543
+ if (fs.existsSync(pluginMcp)) return true;
533
544
  return false;
534
545
  })();
535
546
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-evolver",
3
- "version": "4.2.8",
3
+ "version": "4.2.9",
4
4
  "description": "LangSmith-native autonomous agent optimization for Claude Code",
5
5
  "author": "Raphael Valdetaro",
6
6
  "license": "MIT",