@infinitedusky/indusk-mcp 1.11.2 → 1.11.3
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/dist/bin/commands/update.js +44 -0
- package/package.json +1 -1
|
@@ -241,6 +241,50 @@ export async function update(projectRoot) {
|
|
|
241
241
|
else {
|
|
242
242
|
console.info(" not installed (run init to install)");
|
|
243
243
|
}
|
|
244
|
+
// 5b. Migrate stale MCP configs
|
|
245
|
+
const mcpJsonPath = join(projectRoot, ".mcp.json");
|
|
246
|
+
if (existsSync(mcpJsonPath)) {
|
|
247
|
+
try {
|
|
248
|
+
const mcpConfig = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
|
|
249
|
+
let mcpChanged = false;
|
|
250
|
+
// Migrate CGC: falkordb.orb.local → localhost (indusk-infra)
|
|
251
|
+
const cgcEnv = mcpConfig.mcpServers?.codegraphcontext?.env;
|
|
252
|
+
if (cgcEnv?.FALKORDB_HOST === "falkordb.orb.local") {
|
|
253
|
+
const { basename } = await import("node:path");
|
|
254
|
+
const projectName = basename(projectRoot);
|
|
255
|
+
const graphName = cgcEnv.FALKORDB_GRAPH_NAME || `cgc-${projectName}`;
|
|
256
|
+
try {
|
|
257
|
+
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`);
|
|
258
|
+
console.info(" migrated: codegraphcontext FALKORDB_HOST → localhost");
|
|
259
|
+
mcpChanged = true;
|
|
260
|
+
}
|
|
261
|
+
catch {
|
|
262
|
+
console.info(" could not migrate codegraphcontext — update .mcp.json manually");
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// Migrate indusk: npx without --yes → npx --yes
|
|
266
|
+
const induskArgs = mcpConfig.mcpServers?.indusk?.args;
|
|
267
|
+
if (induskArgs &&
|
|
268
|
+
Array.isArray(induskArgs) &&
|
|
269
|
+
induskArgs[0] === "@infinitedusky/indusk-mcp" &&
|
|
270
|
+
!induskArgs.includes("--yes")) {
|
|
271
|
+
try {
|
|
272
|
+
run("claude mcp add -t stdio -s project -e PROJECT_ROOT=. -- indusk npx --yes @infinitedusky/indusk-mcp serve");
|
|
273
|
+
console.info(" migrated: indusk MCP → npx --yes");
|
|
274
|
+
mcpChanged = true;
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
console.info(" could not migrate indusk MCP — update .mcp.json manually");
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (!mcpChanged) {
|
|
281
|
+
console.info(" MCP config: current");
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
// ignore parse errors
|
|
286
|
+
}
|
|
287
|
+
}
|
|
244
288
|
// 6. Sync built-in extensions
|
|
245
289
|
console.info("\n[Built-in Extensions]\n");
|
|
246
290
|
const builtinDir = join(packageRoot, "extensions");
|