mindlink 2.0.2 → 2.0.4

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/README.md CHANGED
@@ -22,9 +22,9 @@ Git gave every developer a shared version history. MindLink gives your AI team a
22
22
 
23
23
  ---
24
24
 
25
- > ### ◉ Latest — v2.0.0
25
+ > ### ◉ Latest — v2.0.2
26
26
  > **MCP integration for 6 agents · Smart loading · `mindlink verify` · `mindlink profile` · `mindlink prune`**
27
- > [→ Full release notes](https://github.com/404-not-found/mindlink/releases/tag/v2.0.0)
27
+ > [→ Full release notes](https://github.com/404-not-found/mindlink/releases/tag/v2.0.2)
28
28
 
29
29
  ---
30
30
 
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import { Command as Command20 } from "commander";
6
6
  import chalk20 from "chalk";
7
7
 
8
8
  // src/utils/version.ts
9
- var VERSION = "2.0.2";
9
+ var VERSION = "2.0.4";
10
10
 
11
11
  // src/commands/init.ts
12
12
  import { Command } from "commander";
@@ -45,6 +45,7 @@ var BRAIN_DIR = ".brain";
45
45
  var GLOBAL_MINDLINK_DIR = join(homedir(), ".mindlink");
46
46
  var GLOBAL_USER_PROFILE_PATH = join(GLOBAL_MINDLINK_DIR, "USER.md");
47
47
  var GLOBAL_WINDSURF_MCP_PATH = join(homedir(), ".codeium", "windsurf", "mcp_config.json");
48
+ var GLOBAL_CLINE_MCP_PATH = join(homedir(), ".cline", "data", "settings", "cline_mcp_settings.json");
48
49
 
49
50
  // src/utils/banner.ts
50
51
  import chalk from "chalk";
@@ -385,6 +386,32 @@ Examples:
385
386
  restored.push(".mcp.json");
386
387
  }
387
388
  }
389
+ if (toRestore.includes("cline")) {
390
+ try {
391
+ mkdirSync2(dirname2(GLOBAL_CLINE_MCP_PATH), { recursive: true });
392
+ let existingCline = {};
393
+ if (existsSync2(GLOBAL_CLINE_MCP_PATH)) {
394
+ try {
395
+ existingCline = JSON.parse(readFileSync2(GLOBAL_CLINE_MCP_PATH, "utf8"));
396
+ } catch {
397
+ }
398
+ }
399
+ const mergedCline = {
400
+ ...existingCline,
401
+ mcpServers: {
402
+ ...typeof existingCline.mcpServers === "object" && existingCline.mcpServers !== null ? existingCline.mcpServers : {},
403
+ mindlink: {
404
+ command: "mindlink",
405
+ args: ["mcp"],
406
+ alwaysAllow: ["mindlink_read_memory", "mindlink_write_memory", "mindlink_session_update", "mindlink_verify"]
407
+ }
408
+ }
409
+ };
410
+ writeFileSync2(GLOBAL_CLINE_MCP_PATH, JSON.stringify(mergedCline, null, 2));
411
+ restored.push("~/.cline/data/settings/cline_mcp_settings.json");
412
+ } catch {
413
+ }
414
+ }
388
415
  const configPath = join3(brainDir, "config.json");
389
416
  if (!existsSync2(configPath)) {
390
417
  const config = {
@@ -637,6 +664,32 @@ Examples:
637
664
  created.push(`.kiro/settings/mcp.json${" ".repeat(13)} ${chalk2.dim("Kiro MCP server")}`);
638
665
  }
639
666
  }
667
+ if (selectedAgents.includes("cline")) {
668
+ try {
669
+ mkdirSync2(dirname2(GLOBAL_CLINE_MCP_PATH), { recursive: true });
670
+ let existingCline = {};
671
+ if (existsSync2(GLOBAL_CLINE_MCP_PATH)) {
672
+ try {
673
+ existingCline = JSON.parse(readFileSync2(GLOBAL_CLINE_MCP_PATH, "utf8"));
674
+ } catch {
675
+ }
676
+ }
677
+ const mergedCline = {
678
+ ...existingCline,
679
+ mcpServers: {
680
+ ...typeof existingCline.mcpServers === "object" && existingCline.mcpServers !== null ? existingCline.mcpServers : {},
681
+ mindlink: {
682
+ command: "mindlink",
683
+ args: ["mcp"],
684
+ alwaysAllow: ["mindlink_read_memory", "mindlink_write_memory", "mindlink_session_update", "mindlink_verify"]
685
+ }
686
+ }
687
+ };
688
+ writeFileSync2(GLOBAL_CLINE_MCP_PATH, JSON.stringify(mergedCline, null, 2));
689
+ created.push(`~/.cline/data/settings/cline_mcp_settings.json ${chalk2.dim("Cline MCP server (global, pre-authorized)")}`);
690
+ } catch {
691
+ }
692
+ }
640
693
  if (selectedAgents.includes("windsurf")) {
641
694
  try {
642
695
  mkdirSync2(dirname2(GLOBAL_WINDSURF_MCP_PATH), { recursive: true });
@@ -689,11 +742,6 @@ Examples:
689
742
  console.log("");
690
743
  for (const err of errors) console.log(` ${chalk2.red("\u2717")} ${err}`);
691
744
  }
692
- if (selectedAgents.includes("cline")) {
693
- console.log(` ${chalk2.yellow("\u2192")} Cline: add the MCP server manually in Cline's settings UI (MCP Servers tab)`);
694
- console.log(` ${chalk2.dim("Command: mindlink Args: mcp Env: MINDLINK_PROJECT_PATH=" + projectPath)}`);
695
- console.log("");
696
- }
697
745
  if (!existsSync2(GLOBAL_USER_PROFILE_PATH)) {
698
746
  console.log(` ${chalk2.dim("\u2192")} Run ${chalk2.cyan("mindlink profile")} to set up a global user profile \u2014 imported into every new project automatically.`);
699
747
  console.log("");
@@ -1698,6 +1746,32 @@ Examples:
1698
1746
  } catch {
1699
1747
  }
1700
1748
  }
1749
+ if (agentValues.includes("cline")) {
1750
+ try {
1751
+ mkdirSync4(dirname4(GLOBAL_CLINE_MCP_PATH), { recursive: true });
1752
+ let existing = {};
1753
+ if (existsSync9(GLOBAL_CLINE_MCP_PATH)) {
1754
+ try {
1755
+ existing = JSON.parse(readFileSync9(GLOBAL_CLINE_MCP_PATH, "utf8"));
1756
+ } catch {
1757
+ }
1758
+ }
1759
+ const merged = {
1760
+ ...existing,
1761
+ mcpServers: {
1762
+ ...typeof existing.mcpServers === "object" && existing.mcpServers !== null ? existing.mcpServers : {},
1763
+ mindlink: {
1764
+ command: "mindlink",
1765
+ args: ["mcp"],
1766
+ alwaysAllow: ["mindlink_read_memory", "mindlink_write_memory", "mindlink_session_update", "mindlink_verify"]
1767
+ }
1768
+ }
1769
+ };
1770
+ writeFileSync6(GLOBAL_CLINE_MCP_PATH, JSON.stringify(merged, null, 2));
1771
+ refreshed.push("~/.cline/data/settings/cline_mcp_settings.json");
1772
+ } catch {
1773
+ }
1774
+ }
1701
1775
  const memoryPath = join10(projectPath, BRAIN_DIR, "MEMORY.md");
1702
1776
  if (existsSync9(memoryPath)) {
1703
1777
  try {