@aeriondyseti/vector-memory-mcp 2.3.0 → 2.4.4
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 +6 -6
- package/server/core/connection.ts +1 -1
- package/server/core/conversation.repository.ts +91 -2
- package/server/core/conversation.service.ts +19 -19
- package/server/core/conversation.ts +2 -5
- package/server/core/embeddings.service.ts +108 -17
- package/server/core/memory.repository.ts +35 -9
- package/server/core/memory.service.ts +37 -36
- package/server/core/migration.service.ts +3 -3
- package/server/core/migrations.ts +60 -20
- package/server/core/parsers/claude-code.parser.ts +3 -3
- package/server/core/parsers/types.ts +1 -1
- package/server/core/sqlite-utils.ts +22 -0
- package/server/index.ts +13 -15
- package/server/transports/http/mcp-transport.ts +5 -5
- package/server/transports/http/server.ts +18 -6
- package/server/transports/mcp/handlers.ts +47 -23
- package/server/transports/mcp/server.ts +5 -5
- package/scripts/lancedb-extract.ts +0 -181
- package/scripts/smoke-test.ts +0 -699
- package/scripts/sync-version.ts +0 -35
- package/scripts/test-runner.ts +0 -76
- package/scripts/warmup.ts +0 -72
package/scripts/sync-version.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* Sync version into .claude-plugin/ manifest files.
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* bun scripts/sync-version.ts # reads version from package.json
|
|
7
|
-
* bun scripts/sync-version.ts 2.2.3-dev.4 # uses explicit version
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { readFileSync, writeFileSync } from "fs";
|
|
11
|
-
import { join } from "path";
|
|
12
|
-
|
|
13
|
-
const ROOT = join(import.meta.dir, "..");
|
|
14
|
-
const PKG_PATH = join(ROOT, "package.json");
|
|
15
|
-
const PLUGIN_PATH = join(ROOT, ".claude-plugin", "plugin.json");
|
|
16
|
-
const MARKETPLACE_PATH = join(ROOT, ".claude-plugin", "marketplace.json");
|
|
17
|
-
|
|
18
|
-
const explicit = process.argv[2];
|
|
19
|
-
const pkg = JSON.parse(readFileSync(PKG_PATH, "utf-8"));
|
|
20
|
-
const version: string = explicit ?? pkg.version;
|
|
21
|
-
|
|
22
|
-
// Stamp plugin.json
|
|
23
|
-
const plugin = JSON.parse(readFileSync(PLUGIN_PATH, "utf-8"));
|
|
24
|
-
plugin.version = version;
|
|
25
|
-
writeFileSync(PLUGIN_PATH, JSON.stringify(plugin, null, 2) + "\n");
|
|
26
|
-
|
|
27
|
-
// Stamp marketplace.json
|
|
28
|
-
const marketplace = JSON.parse(readFileSync(MARKETPLACE_PATH, "utf-8"));
|
|
29
|
-
marketplace.metadata.version = version;
|
|
30
|
-
for (const p of marketplace.plugins) {
|
|
31
|
-
p.version = version;
|
|
32
|
-
}
|
|
33
|
-
writeFileSync(MARKETPLACE_PATH, JSON.stringify(marketplace, null, 2) + "\n");
|
|
34
|
-
|
|
35
|
-
console.error(`Synced version ${version} → plugin.json, marketplace.json`);
|
package/scripts/test-runner.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* Test runner wrapper that handles Bun's post-test crash gracefully.
|
|
4
|
-
*
|
|
5
|
-
* Bun crashes during native module cleanup after tests complete successfully.
|
|
6
|
-
* This wrapper captures the output, verifies tests passed, and exits cleanly.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { spawn } from "bun";
|
|
10
|
-
|
|
11
|
-
// Exclude benchmark tests — they're probabilistic quality metrics, not pass/fail gates.
|
|
12
|
-
// Run benchmarks separately with: bun run benchmark
|
|
13
|
-
const args = ["bun", "test", "--preload", "./tests/preload.ts"];
|
|
14
|
-
|
|
15
|
-
// Collect all test files except benchmarks
|
|
16
|
-
const glob = new Bun.Glob("tests/**/*.test.ts");
|
|
17
|
-
for (const path of glob.scanSync(".")) {
|
|
18
|
-
if (!path.includes("benchmark")) args.push(path);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const proc = spawn(args, {
|
|
22
|
-
stdout: "pipe",
|
|
23
|
-
stderr: "pipe",
|
|
24
|
-
env: { ...process.env, FORCE_COLOR: "1" },
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
let stdout = "";
|
|
28
|
-
let stderr = "";
|
|
29
|
-
|
|
30
|
-
const decoder = new TextDecoder();
|
|
31
|
-
|
|
32
|
-
// Stream stdout in real-time
|
|
33
|
-
const stdoutReader = proc.stdout.getReader();
|
|
34
|
-
(async () => {
|
|
35
|
-
while (true) {
|
|
36
|
-
const { done, value } = await stdoutReader.read();
|
|
37
|
-
if (done) break;
|
|
38
|
-
const text = decoder.decode(value);
|
|
39
|
-
stdout += text;
|
|
40
|
-
process.stdout.write(text);
|
|
41
|
-
}
|
|
42
|
-
})();
|
|
43
|
-
|
|
44
|
-
// Stream stderr in real-time
|
|
45
|
-
const stderrReader = proc.stderr.getReader();
|
|
46
|
-
(async () => {
|
|
47
|
-
while (true) {
|
|
48
|
-
const { done, value } = await stderrReader.read();
|
|
49
|
-
if (done) break;
|
|
50
|
-
const text = decoder.decode(value);
|
|
51
|
-
stderr += text;
|
|
52
|
-
process.stderr.write(text);
|
|
53
|
-
}
|
|
54
|
-
})();
|
|
55
|
-
|
|
56
|
-
await proc.exited;
|
|
57
|
-
|
|
58
|
-
// Check if tests actually passed by looking for the summary line
|
|
59
|
-
const output = stdout + stderr;
|
|
60
|
-
const passMatch = output.match(/(\d+) pass/);
|
|
61
|
-
const failMatch = output.match(/(\d+) fail/);
|
|
62
|
-
|
|
63
|
-
const passed = passMatch ? parseInt(passMatch[1], 10) : 0;
|
|
64
|
-
const failed = failMatch ? parseInt(failMatch[1], 10) : 0;
|
|
65
|
-
|
|
66
|
-
// Exit based on test results, not Bun's crash
|
|
67
|
-
if (failed > 0) {
|
|
68
|
-
console.error(`\n❌ ${failed} test(s) failed`);
|
|
69
|
-
process.exit(1);
|
|
70
|
-
} else if (passed > 0) {
|
|
71
|
-
console.log(`\n✅ All ${passed} tests passed (ignoring Bun cleanup crash)`);
|
|
72
|
-
process.exit(0);
|
|
73
|
-
} else {
|
|
74
|
-
console.error("\n⚠️ Could not determine test results");
|
|
75
|
-
process.exit(1);
|
|
76
|
-
}
|
package/scripts/warmup.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Warmup script to pre-download ML models and verify dependencies
|
|
5
|
-
* This runs during installation to ensure everything is ready to use
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { config } from "../server/config/index.js";
|
|
9
|
-
import { EmbeddingsService } from "../server/core/embeddings.service.js";
|
|
10
|
-
|
|
11
|
-
async function warmup(): Promise<void> {
|
|
12
|
-
console.log("🔥 Warming up vector-memory-mcp...");
|
|
13
|
-
console.log();
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
// Check native dependencies
|
|
17
|
-
console.log("✓ Checking native dependencies...");
|
|
18
|
-
try {
|
|
19
|
-
await import("onnxruntime-node");
|
|
20
|
-
console.log(" ✓ onnxruntime-node loaded");
|
|
21
|
-
} catch (e) {
|
|
22
|
-
console.error(" ✗ onnxruntime-node failed:", (e as Error).message);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
await import("sharp");
|
|
28
|
-
console.log(" ✓ sharp loaded");
|
|
29
|
-
} catch (e) {
|
|
30
|
-
console.error(" ✗ sharp failed:", (e as Error).message);
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
console.log();
|
|
35
|
-
|
|
36
|
-
// Initialize embeddings service to download model
|
|
37
|
-
console.log("📥 Downloading ML model (this may take a minute)...");
|
|
38
|
-
console.log(` Model: ${config.embeddingModel}`);
|
|
39
|
-
console.log(` Cache: ~/.cache/huggingface/`);
|
|
40
|
-
console.log();
|
|
41
|
-
|
|
42
|
-
const embeddings = new EmbeddingsService(
|
|
43
|
-
config.embeddingModel,
|
|
44
|
-
config.embeddingDimension
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
// Trigger model download by generating a test embedding
|
|
48
|
-
const startTime = Date.now();
|
|
49
|
-
await embeddings.embed("warmup test");
|
|
50
|
-
const duration = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
51
|
-
|
|
52
|
-
console.log();
|
|
53
|
-
console.log(`✅ Warmup complete! (${duration}s)`);
|
|
54
|
-
console.log();
|
|
55
|
-
console.log("Ready to use! Configure your MCP client and restart to get started.");
|
|
56
|
-
console.log();
|
|
57
|
-
} catch (error) {
|
|
58
|
-
console.error();
|
|
59
|
-
console.error("❌ Warmup failed:", error);
|
|
60
|
-
console.error();
|
|
61
|
-
console.error("This is not a critical error - the server will download models on first run.");
|
|
62
|
-
console.error("You can try running 'vector-memory-mcp warmup' manually later.");
|
|
63
|
-
process.exit(0); // Exit successfully to not block installation
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Only run if this is the main module
|
|
68
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
69
|
-
warmup();
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { warmup };
|