@infinitedusky/indusk-mcp 1.11.4 → 1.11.6

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.
@@ -283,19 +283,21 @@ export async function init(projectRoot, options = {}) {
283
283
  console.info(" skip: codegraphcontext (pipx not found — install pipx first, then: pipx install codegraphcontext)");
284
284
  }
285
285
  }
286
- // Migrate CGC config: falkordb.orb.local localhost (indusk-infra container)
286
+ // Ensure CGC config is correct: localhost, cgc-{project} graph name
287
287
  if (existingServers.has("codegraphcontext") && !force) {
288
288
  try {
289
289
  const mcpConfig = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
290
290
  const cgcEnv = mcpConfig.mcpServers?.codegraphcontext?.env;
291
- if (cgcEnv?.FALKORDB_HOST === "falkordb.orb.local") {
291
+ const correctGraph = `cgc-${projectName}`;
292
+ if (cgcEnv &&
293
+ (cgcEnv.FALKORDB_HOST !== "localhost" || cgcEnv.FALKORDB_GRAPH_NAME !== correctGraph)) {
292
294
  execSync("claude mcp remove -s project codegraphcontext", {
293
295
  cwd: projectRoot,
294
296
  stdio: "pipe",
295
297
  timeout: 10000,
296
298
  });
297
- execSync(`claude mcp add -t stdio -s project -e DATABASE_TYPE=falkordb-remote -e FALKORDB_HOST=localhost -e FALKORDB_GRAPH_NAME=${cgcEnv.FALKORDB_GRAPH_NAME || `cgc-${projectName}`} -- codegraphcontext cgc mcp start`, { cwd: projectRoot, stdio: "pipe", timeout: 10000 });
298
- console.info(" migrated: codegraphcontext FALKORDB_HOST → localhost (indusk-infra)");
299
+ execSync(`claude mcp add -t stdio -s project -e DATABASE_TYPE=falkordb-remote -e FALKORDB_HOST=localhost -e FALKORDB_GRAPH_NAME=${correctGraph} -- codegraphcontext cgc mcp start`, { cwd: projectRoot, stdio: "pipe", timeout: 10000 });
300
+ console.info(` fixed: codegraphcontext → localhost, ${correctGraph}`);
299
301
  }
300
302
  }
301
303
  catch { }
@@ -661,19 +663,17 @@ export async function init(projectRoot, options = {}) {
661
663
  for (const [event, entries] of Object.entries(hookConfig)) {
662
664
  const existingEntries = existing.hooks[event] || [];
663
665
  // Check if our hook is already present
664
- const hasOurHook = existingEntries.some((e) => e.hooks?.some((h) => h.command?.includes("check-gates") ||
665
- h.command?.includes("gate-reminder") ||
666
- h.command?.includes("validate-impl") ||
667
- h.command?.includes("check-catchup")));
668
- if (!hasOurHook || force) {
669
- // Remove old entries if force, then add
670
- if (force) {
671
- existing.hooks[event] = existingEntries.filter((e) => !e.hooks?.some((h) => h.command?.includes("check-gates") ||
672
- h.command?.includes("gate-reminder") ||
673
- h.command?.includes("validate-impl")));
666
+ // Check each hook entry individually so new hooks get added even if old ones exist
667
+ for (const entry of entries) {
668
+ const alreadyPresent = existingEntries.some((e) => e.matcher === entry.matcher &&
669
+ entry.hooks.every((newHook) => e.hooks?.some((h) => h.command === newHook.command)));
670
+ if (!alreadyPresent || force) {
671
+ if (force) {
672
+ existing.hooks[event] = (existing.hooks[event] || []).filter((e) => e.matcher !== entry.matcher);
673
+ }
674
+ existing.hooks[event] = [...(existing.hooks[event] || []), entry];
675
+ hooksUpdated = true;
674
676
  }
675
- existing.hooks[event] = [...(existing.hooks[event] || []), ...entries];
676
- hooksUpdated = true;
677
677
  }
678
678
  }
679
679
  if (hooksUpdated || permissionsUpdated) {
@@ -247,20 +247,24 @@ export async function update(projectRoot) {
247
247
  try {
248
248
  const mcpConfig = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
249
249
  let mcpChanged = false;
250
- // Migrate CGC: falkordb.orb.local localhost (indusk-infra)
250
+ // Ensure CGC config is correct: localhost, cgc-{project} graph name
251
251
  const cgcEnv = mcpConfig.mcpServers?.codegraphcontext?.env;
252
- if (cgcEnv?.FALKORDB_HOST === "falkordb.orb.local") {
252
+ if (cgcEnv) {
253
253
  const { basename } = await import("node:path");
254
254
  const projectName = basename(projectRoot);
255
- const graphName = cgcEnv.FALKORDB_GRAPH_NAME || `cgc-${projectName}`;
256
- try {
257
- run("claude mcp remove -s project codegraphcontext");
258
- run(`claude mcp add -t stdio -s project -e DATABASE_TYPE=falkordb-remote -e FALKORDB_HOST=localhost -e FALKORDB_GRAPH_NAME=${graphName} -- codegraphcontext cgc mcp start`);
259
- console.info(" migrated: codegraphcontext FALKORDB_HOST → localhost");
260
- mcpChanged = true;
261
- }
262
- catch {
263
- console.info(" could not migrate codegraphcontext — update .mcp.json manually");
255
+ const correctHost = "localhost";
256
+ const correctGraph = `cgc-${projectName}`;
257
+ const needsFix = cgcEnv.FALKORDB_HOST !== correctHost || cgcEnv.FALKORDB_GRAPH_NAME !== correctGraph;
258
+ if (needsFix) {
259
+ try {
260
+ run("claude mcp remove -s project codegraphcontext");
261
+ run(`claude mcp add -t stdio -s project -e DATABASE_TYPE=falkordb-remote -e FALKORDB_HOST=${correctHost} -e FALKORDB_GRAPH_NAME=${correctGraph} -- codegraphcontext cgc mcp start`);
262
+ console.info(` fixed: codegraphcontext → ${correctHost}, ${correctGraph}`);
263
+ mcpChanged = true;
264
+ }
265
+ catch {
266
+ console.info(" could not fix codegraphcontext — update .mcp.json manually");
267
+ }
264
268
  }
265
269
  }
266
270
  // Migrate indusk: npx without --yes → npx --yes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitedusky/indusk-mcp",
3
- "version": "1.11.4",
3
+ "version": "1.11.6",
4
4
  "description": "InDusk development system — skills, MCP tools, and CLI for structured AI-assisted development",
5
5
  "type": "module",
6
6
  "files": [