mcp-simple-memory 0.2.0 → 0.2.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/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -217,7 +217,7 @@ async function handleSave(args) {
|
|
|
217
217
|
if (GEMINI_API_KEY) {
|
|
218
218
|
getEmbedding(`${title}\n${content}`).then((vec) => {
|
|
219
219
|
if (vec) {
|
|
220
|
-
runSql(`INSERT OR REPLACE INTO embeddings (memory_id, vector) VALUES (?, ?)`, [id, vec.buffer]);
|
|
220
|
+
runSql(`INSERT OR REPLACE INTO embeddings (memory_id, vector) VALUES (?, ?)`, [id, new Uint8Array(vec.buffer)]);
|
|
221
221
|
persist();
|
|
222
222
|
}
|
|
223
223
|
});
|
|
@@ -425,7 +425,7 @@ async function handleUpdate(args) {
|
|
|
425
425
|
const newTitle = args.title || existing[0].title;
|
|
426
426
|
getEmbedding(`${newTitle}\n${newContent}`).then((vec) => {
|
|
427
427
|
if (vec) {
|
|
428
|
-
runSql(`INSERT OR REPLACE INTO embeddings (memory_id, vector) VALUES (?, ?)`, [id, vec.buffer]);
|
|
428
|
+
runSql(`INSERT OR REPLACE INTO embeddings (memory_id, vector) VALUES (?, ?)`, [id, new Uint8Array(vec.buffer)]);
|
|
429
429
|
persist();
|
|
430
430
|
}
|
|
431
431
|
});
|
|
@@ -462,7 +462,7 @@ async function handleTags(args) {
|
|
|
462
462
|
return ok(`# Tags (${rows.length})\n\n${lines.join("\n")}`);
|
|
463
463
|
}
|
|
464
464
|
// ---- MCP Server -----------------------------------------------------------
|
|
465
|
-
const server = new Server({ name: "mcp-simple-memory", version: "0.2.
|
|
465
|
+
const server = new Server({ name: "mcp-simple-memory", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
466
466
|
const tools = [
|
|
467
467
|
{
|
|
468
468
|
name: "mem_save",
|
|
@@ -620,7 +620,7 @@ async function main() {
|
|
|
620
620
|
await initDb();
|
|
621
621
|
const transport = new StdioServerTransport();
|
|
622
622
|
await server.connect(transport);
|
|
623
|
-
console.error(`[mcp-simple-memory] v0.2.
|
|
623
|
+
console.error(`[mcp-simple-memory] v0.2.1 | DB: ${DB_PATH} | Embeddings: ${GEMINI_API_KEY ? "ON" : "OFF"}`);
|
|
624
624
|
}
|
|
625
625
|
main().catch((e) => {
|
|
626
626
|
console.error(`[mcp-simple-memory] Fatal: ${e}`);
|
package/package.json
CHANGED