klypix-mcp 1.4.0 → 1.4.1
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/bin/klypix-a2a.mjs +10 -1
- package/package.json +1 -1
package/bin/klypix-a2a.mjs
CHANGED
|
@@ -36,7 +36,16 @@ import {
|
|
|
36
36
|
} from '../src/klypix-core.mjs';
|
|
37
37
|
|
|
38
38
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
39
|
-
|
|
39
|
+
// Resolve the package version across layouts: the published package (bin/ →
|
|
40
|
+
// ../package.json) and the desktop-bundled FLAT layout (~/.claude/project-brain/,
|
|
41
|
+
// ./package.json, which may carry no version) — degrade gracefully either way.
|
|
42
|
+
function readVersion() {
|
|
43
|
+
for (const p of [path.join(__dirname, '..', 'package.json'), path.join(__dirname, 'package.json')]) {
|
|
44
|
+
try { const v = JSON.parse(fs.readFileSync(p, 'utf8')).version; if (v) return v; } catch { /* try next */ }
|
|
45
|
+
}
|
|
46
|
+
return '1.x';
|
|
47
|
+
}
|
|
48
|
+
const PKG = { version: readVersion() };
|
|
40
49
|
const log = (...a) => console.error('[klypix-a2a]', ...a);
|
|
41
50
|
|
|
42
51
|
const arg = (flag) => { const i = process.argv.indexOf(flag); return i >= 0 ? process.argv[i + 1] : undefined; };
|
package/package.json
CHANGED