context-vault 3.12.0 → 3.13.0
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/cli.js
CHANGED
|
@@ -85,12 +85,15 @@ function isNpx() {
|
|
|
85
85
|
return ROOT.includes('/_npx/') || ROOT.includes('\\_npx\\');
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/** Check if a global install of context-vault exists
|
|
88
|
+
/** Check if a global install of context-vault exists (not npx cache) */
|
|
89
89
|
function hasGlobalInstall() {
|
|
90
90
|
try {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
// Can't use `which` here because npx prepends its cache to PATH,
|
|
92
|
+
// so `which context-vault` returns the npx cache path, not the global one.
|
|
93
|
+
// Instead, check the npm global prefix bin directory directly.
|
|
94
|
+
const prefix = execSync('npm prefix -g', { encoding: 'utf-8', stdio: 'pipe', timeout: 5000 }).trim();
|
|
95
|
+
const bin = platform() === 'win32' ? 'context-vault.cmd' : 'context-vault';
|
|
96
|
+
return existsSync(join(prefix, 'bin', bin));
|
|
94
97
|
} catch { return false; }
|
|
95
98
|
}
|
|
96
99
|
|
|
@@ -806,14 +809,7 @@ async function runSetup() {
|
|
|
806
809
|
// MCP server binary is on PATH. This makes tool configs reliable (no npx
|
|
807
810
|
// cache dependency) and startup faster (no npx overhead on every spawn).
|
|
808
811
|
if (isNpx() && !isDryRun) {
|
|
809
|
-
const hasGlobal = (
|
|
810
|
-
try {
|
|
811
|
-
const cmd = platform() === 'win32' ? 'where context-vault' : 'which context-vault';
|
|
812
|
-
const which = execSync(cmd, { encoding: 'utf-8', stdio: 'pipe', timeout: 3000 }).trim();
|
|
813
|
-
// Verify it's not pointing back to the npx cache
|
|
814
|
-
return which && !which.includes('/_npx/') && !which.includes('\\_npx\\');
|
|
815
|
-
} catch { return false; }
|
|
816
|
-
})();
|
|
812
|
+
const hasGlobal = hasGlobalInstall();
|
|
817
813
|
|
|
818
814
|
if (!hasGlobal) {
|
|
819
815
|
if (!isNonInteractive) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-vault",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Persistent memory for AI agents — saves and searches knowledge across sessions",
|
|
6
6
|
"bin": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@context-vault/core"
|
|
68
68
|
],
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@context-vault/core": "^3.
|
|
70
|
+
"@context-vault/core": "^3.13.0",
|
|
71
71
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
72
72
|
"adm-zip": "^0.5.16",
|
|
73
73
|
"sqlite-vec": "^0.1.0"
|