context-vault 2.8.8 → 2.8.10
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
|
@@ -292,24 +292,29 @@ async function runSetup() {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
let selected;
|
|
295
|
-
|
|
296
|
-
for (let i = 0; i < detected.length; i++) {
|
|
297
|
-
console.log(` ${i + 1}) ${detected[i].name}`);
|
|
298
|
-
}
|
|
299
|
-
console.log();
|
|
300
|
-
const answer = await prompt(
|
|
301
|
-
` Select (${dim("1,2,3")} or ${dim('"all"')}):`,
|
|
302
|
-
"all",
|
|
303
|
-
);
|
|
304
|
-
if (answer === "all" || answer === "") {
|
|
295
|
+
if (detected.length === 1) {
|
|
305
296
|
selected = detected;
|
|
297
|
+
console.log(` ${dim("→")} Auto-selected ${detected[0].name}\n`);
|
|
306
298
|
} else {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
.
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
299
|
+
console.log(bold(" Which tools should context-vault connect to?\n"));
|
|
300
|
+
for (let i = 0; i < detected.length; i++) {
|
|
301
|
+
console.log(` ${i + 1}) ${detected[i].name}`);
|
|
302
|
+
}
|
|
303
|
+
console.log();
|
|
304
|
+
const answer = await prompt(
|
|
305
|
+
` Select (${dim("1,2,3")} or ${dim('"all"')}):`,
|
|
306
|
+
"all",
|
|
307
|
+
);
|
|
308
|
+
if (answer === "all" || answer === "") {
|
|
309
|
+
selected = detected;
|
|
310
|
+
} else {
|
|
311
|
+
const nums = answer
|
|
312
|
+
.split(/[,\s]+/)
|
|
313
|
+
.map((n) => parseInt(n, 10) - 1)
|
|
314
|
+
.filter((n) => n >= 0 && n < detected.length);
|
|
315
|
+
selected = nums.map((n) => detected[n]);
|
|
316
|
+
if (selected.length === 0) selected = detected;
|
|
317
|
+
}
|
|
313
318
|
}
|
|
314
319
|
|
|
315
320
|
// Read vault dir from existing config
|
|
@@ -360,8 +365,8 @@ async function runSetup() {
|
|
|
360
365
|
console.log(` ${dim("{")}
|
|
361
366
|
${dim('"mcpServers": {')}
|
|
362
367
|
${dim('"context-vault": {')}
|
|
363
|
-
${dim('"command": "
|
|
364
|
-
${dim(`"args": ["serve", "--vault-dir", "/path/to/vault"]`)}
|
|
368
|
+
${dim('"command": "npx",')}
|
|
369
|
+
${dim(`"args": ["-y", "context-vault", "serve", "--vault-dir", "/path/to/vault"]`)}
|
|
365
370
|
${dim("}")}
|
|
366
371
|
${dim("}")}
|
|
367
372
|
${dim("}")}\n`);
|
|
@@ -388,8 +393,11 @@ async function runSetup() {
|
|
|
388
393
|
|
|
389
394
|
// Select tools
|
|
390
395
|
let selected;
|
|
391
|
-
if (isNonInteractive) {
|
|
396
|
+
if (isNonInteractive || detected.length === 1) {
|
|
392
397
|
selected = detected;
|
|
398
|
+
if (detected.length === 1) {
|
|
399
|
+
console.log(` ${dim("→")} Auto-selected ${detected[0].name}\n`);
|
|
400
|
+
}
|
|
393
401
|
} else {
|
|
394
402
|
console.log(bold(" Which tools should context-vault connect to?\n"));
|
|
395
403
|
for (let i = 0; i < detected.length; i++) {
|
|
@@ -417,7 +425,7 @@ async function runSetup() {
|
|
|
417
425
|
const defaultVaultDir = join(HOME, "vault");
|
|
418
426
|
const vaultDir = isNonInteractive
|
|
419
427
|
? defaultVaultDir
|
|
420
|
-
: await prompt(
|
|
428
|
+
: await prompt(` Vault directory:`, defaultVaultDir);
|
|
421
429
|
const resolvedVaultDir = resolve(vaultDir);
|
|
422
430
|
|
|
423
431
|
// Create vault dir if needed
|
|
@@ -511,7 +519,11 @@ async function runSetup() {
|
|
|
511
519
|
if (isNetwork) {
|
|
512
520
|
console.log(dim(` Check your internet connection and try again.`));
|
|
513
521
|
}
|
|
514
|
-
console.log(
|
|
522
|
+
console.log(
|
|
523
|
+
dim(
|
|
524
|
+
` Retry: ${isNpx() ? "npx context-vault" : "context-vault"} setup`,
|
|
525
|
+
),
|
|
526
|
+
);
|
|
515
527
|
console.log(
|
|
516
528
|
dim(` Semantic search disabled — full-text search still works.`),
|
|
517
529
|
);
|
|
@@ -597,8 +609,8 @@ async function runSetup() {
|
|
|
597
609
|
` "Show my vault status"`,
|
|
598
610
|
``,
|
|
599
611
|
` ${bold("CLI Commands:")}`,
|
|
600
|
-
` context-vault status Show vault health`,
|
|
601
|
-
` context-vault update Check for updates`,
|
|
612
|
+
` ${isNpx() ? "npx context-vault" : "context-vault"} status Show vault health`,
|
|
613
|
+
` ${isNpx() ? "npx context-vault" : "context-vault"} update Check for updates`,
|
|
602
614
|
];
|
|
603
615
|
const innerWidth = Math.max(...boxLines.map((l) => l.length)) + 2;
|
|
604
616
|
const pad = (s) => s + " ".repeat(Math.max(0, innerWidth - s.length));
|
|
@@ -637,14 +649,14 @@ async function configureClaude(tool, vaultDir) {
|
|
|
637
649
|
const cmdArgs = [`"${launcherPath}"`];
|
|
638
650
|
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
639
651
|
execSync(
|
|
640
|
-
`claude mcp add -s user context-vault --
|
|
652
|
+
`claude mcp add -s user context-vault -- ${process.execPath} ${cmdArgs.join(" ")}`,
|
|
641
653
|
{ stdio: "pipe", env },
|
|
642
654
|
);
|
|
643
655
|
} else {
|
|
644
656
|
const cmdArgs = [`"${SERVER_PATH}"`];
|
|
645
657
|
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
646
658
|
execSync(
|
|
647
|
-
`claude mcp add -s user context-vault --
|
|
659
|
+
`claude mcp add -s user context-vault -- ${process.execPath} ${cmdArgs.join(" ")}`,
|
|
648
660
|
{ stdio: "pipe", env },
|
|
649
661
|
);
|
|
650
662
|
}
|
|
@@ -675,15 +687,21 @@ async function configureCodex(tool, vaultDir) {
|
|
|
675
687
|
const launcherPath = join(HOME, ".context-mcp", "server.mjs");
|
|
676
688
|
const cmdArgs = [`"${launcherPath}"`];
|
|
677
689
|
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
678
|
-
execSync(
|
|
679
|
-
|
|
680
|
-
|
|
690
|
+
execSync(
|
|
691
|
+
`codex mcp add context-vault -- ${process.execPath} ${cmdArgs.join(" ")}`,
|
|
692
|
+
{
|
|
693
|
+
stdio: "pipe",
|
|
694
|
+
},
|
|
695
|
+
);
|
|
681
696
|
} else {
|
|
682
697
|
const cmdArgs = [`"${SERVER_PATH}"`];
|
|
683
698
|
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
684
|
-
execSync(
|
|
685
|
-
|
|
686
|
-
|
|
699
|
+
execSync(
|
|
700
|
+
`codex mcp add context-vault -- ${process.execPath} ${cmdArgs.join(" ")}`,
|
|
701
|
+
{
|
|
702
|
+
stdio: "pipe",
|
|
703
|
+
},
|
|
704
|
+
);
|
|
687
705
|
}
|
|
688
706
|
} catch (e) {
|
|
689
707
|
const stderr = e.stderr?.toString().trim();
|
|
@@ -730,14 +748,14 @@ function configureJsonTool(tool, vaultDir) {
|
|
|
730
748
|
const serverArgs = [];
|
|
731
749
|
if (vaultDir) serverArgs.push("--vault-dir", vaultDir);
|
|
732
750
|
config[tool.configKey]["context-vault"] = {
|
|
733
|
-
command:
|
|
751
|
+
command: process.execPath,
|
|
734
752
|
args: [launcherPath, ...serverArgs],
|
|
735
753
|
};
|
|
736
754
|
} else {
|
|
737
755
|
const serverArgs = [SERVER_PATH];
|
|
738
756
|
if (vaultDir) serverArgs.push("--vault-dir", vaultDir);
|
|
739
757
|
config[tool.configKey]["context-vault"] = {
|
|
740
|
-
command:
|
|
758
|
+
command: process.execPath,
|
|
741
759
|
args: serverArgs,
|
|
742
760
|
};
|
|
743
761
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-vault",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Persistent memory for AI agents — saves and searches knowledge across sessions",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@context-vault/core"
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@context-vault/core": "^2.8.
|
|
58
|
+
"@context-vault/core": "^2.8.10",
|
|
59
59
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
60
60
|
"better-sqlite3": "^12.6.2",
|
|
61
61
|
"sqlite-vec": "^0.1.0"
|