klypix-mcp 1.38.2 → 1.38.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/package.json +1 -1
- package/src/agent-rules.mjs +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "klypix-mcp",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.3",
|
|
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/agent-rules.mjs
CHANGED
|
@@ -214,9 +214,11 @@ export function safeReadCodexConfig(configPath) {
|
|
|
214
214
|
const block = raw.slice(table.start, table.end);
|
|
215
215
|
const commandLine = block.match(/^[ \t]*command[ \t]*=[ \t]*(.+)$/m);
|
|
216
216
|
const command = commandLine ? parseTomlStringValue(commandLine[1]) : null;
|
|
217
|
+
const cwdLine = block.match(/^[ \t]*cwd[ \t]*=[ \t]*(.+)$/m);
|
|
218
|
+
const cwd = cwdLine ? parseTomlStringValue(cwdLine[1]) : null;
|
|
217
219
|
const launchesKlypix = /(?:klypix-mcp-server\.mjs|(?:^|["'\s,])klypix-mcp(?:["'\s,]|$))/i.test(block)
|
|
218
220
|
&& !!command && /(?:^|[\\/])(node|node\.exe|npx|npx\.cmd|cmd|cmd\.exe)$/i.test(command);
|
|
219
|
-
servers[name] = { command, launchesKlypix, raw: block };
|
|
221
|
+
servers[name] = { command, cwd, launchesKlypix, raw: block };
|
|
220
222
|
}
|
|
221
223
|
return { ok: true, raw, servers, tables: scanned.tables };
|
|
222
224
|
}
|
|
@@ -650,7 +652,17 @@ export function linkProject(projectDir, opts = {}) {
|
|
|
650
652
|
if (!parsed.ok) return { tool: m.tool, file, status: 'hand-edited', why: parsed.error };
|
|
651
653
|
const name = Object.keys(parsed.servers).find(k => /klypix/i.test(k));
|
|
652
654
|
const entry = name ? parsed.servers[name] : null;
|
|
653
|
-
|
|
655
|
+
const escapesProject = entry?.cwd === '..';
|
|
656
|
+
return {
|
|
657
|
+
tool: m.tool,
|
|
658
|
+
file,
|
|
659
|
+
status: entry ? (entry.launchesKlypix && !escapesProject ? 'ok' : 'hand-edited') : 'missing',
|
|
660
|
+
why: entry && !entry.launchesKlypix
|
|
661
|
+
? 'entry no longer launches klypix-mcp'
|
|
662
|
+
: escapesProject
|
|
663
|
+
? 'legacy cwd = ".." starts Codex MCP outside the project'
|
|
664
|
+
: undefined,
|
|
665
|
+
};
|
|
654
666
|
}
|
|
655
667
|
// Project config is commonly committed. Keep it machine-portable; the
|
|
656
668
|
// 120s Codex startup timeout covers the one-time npx bootstrap.
|