klypix-mcp 1.40.1 → 1.40.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.
- package/package.json +1 -1
- package/src/mcp-auto-update.mjs +20 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "klypix-mcp",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.2",
|
|
4
4
|
"description": "Every project gets a brain — one open .klypix file your AI agents read, write, and argue from, over MCP. Works with Claude, Codex, Cursor, Cline, any model.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
package/src/mcp-auto-update.mjs
CHANGED
|
@@ -229,7 +229,25 @@ export function installExactRuntime(version, {
|
|
|
229
229
|
};
|
|
230
230
|
let child;
|
|
231
231
|
try {
|
|
232
|
-
|
|
232
|
+
let command = 'npx';
|
|
233
|
+
let args = ['-y', `klypix-mcp@${version}`, 'install', '--runtime-only'];
|
|
234
|
+
if (process.platform === 'win32') {
|
|
235
|
+
// .cmd files require a shell on Windows, but Node 24 correctly warns
|
|
236
|
+
// that shell:true concatenates arguments. Invoke npm's JS entry with
|
|
237
|
+
// this exact Node binary instead: no quoting ambiguity, no shell, and
|
|
238
|
+
// the strict-semver gate above leaves no command-injection surface.
|
|
239
|
+
const npxCli = path.join(path.dirname(process.execPath), 'node_modules', 'npm', 'bin', 'npx-cli.js');
|
|
240
|
+
if (fs.existsSync(npxCli)) {
|
|
241
|
+
command = process.execPath;
|
|
242
|
+
args = [npxCli, ...args];
|
|
243
|
+
} else {
|
|
244
|
+
// Portable fallback for unusual Windows Node layouts. The only
|
|
245
|
+
// interpolated value is strict x.y.z semver.
|
|
246
|
+
command = process.env.ComSpec || 'cmd.exe';
|
|
247
|
+
args = ['/d', '/s', '/c', `npx -y klypix-mcp@${version} install --runtime-only`];
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
child = spawnProcess(command, args, {
|
|
233
251
|
cwd: brainDir,
|
|
234
252
|
env: {
|
|
235
253
|
...process.env,
|
|
@@ -237,7 +255,7 @@ export function installExactRuntime(version, {
|
|
|
237
255
|
KLYPIX_MCP_AUTO_UPDATE_CHILD: '1',
|
|
238
256
|
},
|
|
239
257
|
stdio: 'ignore',
|
|
240
|
-
shell:
|
|
258
|
+
shell: false,
|
|
241
259
|
windowsHide: true,
|
|
242
260
|
});
|
|
243
261
|
} catch (error) {
|