neuronlayer 0.2.2 → 0.2.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 +3 -1
- package/dist/index.js +34 -0
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -37,7 +37,9 @@ cd your-project
|
|
|
37
37
|
neuronlayer init
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
This registers your project and configures Claude Desktop, Claude Code, and
|
|
40
|
+
This registers your project and configures Claude Desktop, Claude Code, OpenCode, and Cursor automatically. Restart your AI tool and you're ready.
|
|
41
|
+
|
|
42
|
+
> **Windows users**: If upgrading, close any AI tools using NeuronLayer first (or run `taskkill /f /im node.exe`) before reinstalling. Windows locks native binaries while they're in use.
|
|
41
43
|
|
|
42
44
|
---
|
|
43
45
|
|
package/dist/index.js
CHANGED
|
@@ -39270,6 +39270,7 @@ function configureProjectMCP(configPath, projectPath) {
|
|
|
39270
39270
|
if (!config2.mcpServers) {
|
|
39271
39271
|
config2.mcpServers = {};
|
|
39272
39272
|
}
|
|
39273
|
+
delete config2.mcpServers["memorylayer"];
|
|
39273
39274
|
const absoluteProjectPath = resolve3(projectPath);
|
|
39274
39275
|
config2.mcpServers["neuronlayer"] = {
|
|
39275
39276
|
command: "npx",
|
|
@@ -39282,6 +39283,33 @@ function configureProjectMCP(configPath, projectPath) {
|
|
|
39282
39283
|
return { success: false, message: `Claude Code / OpenCode: Failed - ${err instanceof Error ? err.message : String(err)}` };
|
|
39283
39284
|
}
|
|
39284
39285
|
}
|
|
39286
|
+
function configureOpenCode(projectPath) {
|
|
39287
|
+
const configPath = join15(projectPath, "opencode.json");
|
|
39288
|
+
let config2 = {};
|
|
39289
|
+
try {
|
|
39290
|
+
if (existsSync15(configPath)) {
|
|
39291
|
+
const content = readFileSync12(configPath, "utf-8");
|
|
39292
|
+
config2 = JSON.parse(content);
|
|
39293
|
+
}
|
|
39294
|
+
} catch {
|
|
39295
|
+
}
|
|
39296
|
+
if (!config2.mcp || typeof config2.mcp !== "object") {
|
|
39297
|
+
config2.mcp = {};
|
|
39298
|
+
}
|
|
39299
|
+
delete config2.mcp["memorylayer"];
|
|
39300
|
+
const absoluteProjectPath = resolve3(projectPath);
|
|
39301
|
+
config2.mcp["neuronlayer"] = {
|
|
39302
|
+
type: "local",
|
|
39303
|
+
command: ["npx", "-y", "neuronlayer", "--project", absoluteProjectPath],
|
|
39304
|
+
enabled: true
|
|
39305
|
+
};
|
|
39306
|
+
try {
|
|
39307
|
+
writeFileSync6(configPath, JSON.stringify(config2, null, 2));
|
|
39308
|
+
return { success: true, message: `OpenCode: ${configPath}` };
|
|
39309
|
+
} catch (err) {
|
|
39310
|
+
return { success: false, message: `OpenCode: Failed - ${err instanceof Error ? err.message : String(err)}` };
|
|
39311
|
+
}
|
|
39312
|
+
}
|
|
39285
39313
|
function initProject(projectPath) {
|
|
39286
39314
|
const targetPath = projectPath || process.cwd();
|
|
39287
39315
|
const addResult = addProject(targetPath);
|
|
@@ -39307,6 +39335,12 @@ function initProject(projectPath) {
|
|
|
39307
39335
|
} else {
|
|
39308
39336
|
failedClients.push(claudeResult.message);
|
|
39309
39337
|
}
|
|
39338
|
+
const openCodeResult = configureOpenCode(targetPath);
|
|
39339
|
+
if (openCodeResult.success) {
|
|
39340
|
+
configuredClients.push(openCodeResult.message);
|
|
39341
|
+
} else {
|
|
39342
|
+
failedClients.push(openCodeResult.message);
|
|
39343
|
+
}
|
|
39310
39344
|
const claudeCodeConfigPath = join15(targetPath, ".mcp.json");
|
|
39311
39345
|
const claudeCodeResult = configureProjectMCP(claudeCodeConfigPath, targetPath);
|
|
39312
39346
|
if (claudeCodeResult.success) {
|