agentcache 0.1.1 → 0.1.2

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.
@@ -48,26 +48,32 @@ function detectInstalledIdes() {
48
48
  import { existsSync as existsSync2, mkdirSync, readFileSync, writeFileSync } from "fs";
49
49
  import { join as join2, dirname } from "path";
50
50
  import { homedir as homedir2 } from "os";
51
- var MCP_ENTRY = {
51
+ var MCP_ENTRY_STDIO = {
52
+ type: "stdio",
53
+ command: "agentcache",
54
+ args: ["serve"],
55
+ env: {}
56
+ };
57
+ var MCP_ENTRY_SIMPLE = {
52
58
  command: "agentcache",
53
59
  args: ["serve"]
54
60
  };
55
61
  function registerMcpServer(ide) {
56
62
  if (!ide.detected) return false;
57
63
  if (ide.mcpConfigFormat === "claude-settings") {
58
- let settings = {};
59
- if (existsSync2(ide.mcpConfigPath)) {
64
+ const claudeJsonPath = join2(homedir2(), ".claude.json");
65
+ let config = {};
66
+ if (existsSync2(claudeJsonPath)) {
60
67
  try {
61
- settings = JSON.parse(readFileSync(ide.mcpConfigPath, "utf-8"));
68
+ config = JSON.parse(readFileSync(claudeJsonPath, "utf-8"));
62
69
  } catch {
63
- settings = {};
70
+ config = {};
64
71
  }
65
72
  }
66
- if (!settings.mcpServers) settings.mcpServers = {};
67
- if (settings.mcpServers.agentcache) return false;
68
- settings.mcpServers.agentcache = MCP_ENTRY;
69
- mkdirSync(dirname(ide.mcpConfigPath), { recursive: true });
70
- writeFileSync(ide.mcpConfigPath, JSON.stringify(settings, null, 2));
73
+ if (!config.mcpServers) config.mcpServers = {};
74
+ if (config.mcpServers.agentcache) return false;
75
+ config.mcpServers.agentcache = MCP_ENTRY_STDIO;
76
+ writeFileSync(claudeJsonPath, JSON.stringify(config, null, 2));
71
77
  return true;
72
78
  }
73
79
  if (ide.mcpConfigFormat === "mcp-json") {
@@ -81,7 +87,7 @@ function registerMcpServer(ide) {
81
87
  }
82
88
  if (!config.mcpServers) config.mcpServers = {};
83
89
  if (config.mcpServers.agentcache) return false;
84
- config.mcpServers.agentcache = MCP_ENTRY;
90
+ config.mcpServers.agentcache = MCP_ENTRY_SIMPLE;
85
91
  mkdirSync(dirname(ide.mcpConfigPath), { recursive: true });
86
92
  writeFileSync(ide.mcpConfigPath, JSON.stringify(config, null, 2));
87
93
  return true;
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import { Command } from "commander";
5
5
  var program = new Command();
6
6
  program.name("agentcache").description("Engineering Knowledge Compiler \u2014 universal, zero-config").version("0.3.0");
7
7
  program.command("setup").description("Detect IDEs and register Loop (runs automatically on install)").action(async () => {
8
- const { runSetup } = await import("./setup-QB36C2TH.js");
8
+ const { runSetup } = await import("./setup-5Z5AHD2U.js");
9
9
  await runSetup();
10
10
  });
11
11
  program.command("serve").description("Start Loop MCP server (spawned by IDEs automatically)").action(async () => {
@@ -2,7 +2,7 @@ import {
2
2
  detectInstalledIdes,
3
3
  registerClaudeHooks,
4
4
  registerMcpServer
5
- } from "./chunk-RUBNVM6W.js";
5
+ } from "./chunk-LYEV4B2E.js";
6
6
  import {
7
7
  getDbPath,
8
8
  getGlobalLoopDir
@@ -2,7 +2,7 @@ import {
2
2
  detectInstalledIdes,
3
3
  registerClaudeHooks,
4
4
  registerMcpServer
5
- } from "./chunk-RUBNVM6W.js";
5
+ } from "./chunk-LYEV4B2E.js";
6
6
  import {
7
7
  getDbPath,
8
8
  getGlobalLoopDir
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentcache",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Knowledge cache for AI agents — learns how you work, remembers across sessions, works everywhere",
5
5
  "type": "module",
6
6
  "license": "MIT",