@vheins/local-memory-mcp 0.7.4 → 0.8.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.
@@ -8,7 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com">
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
10
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
11
- <script type="module" crossorigin src="/assets/index-CkSUOqPH.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-CUiLXjvg.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-OXSJZbwn.css">
13
13
  </head>
14
14
  <body>
@@ -6,7 +6,7 @@ import {
6
6
  TOOL_DEFINITIONS,
7
7
  listResources,
8
8
  logger
9
- } from "../chunk-BSASVWKJ.js";
9
+ } from "../chunk-CQK2B6SF.js";
10
10
 
11
11
  // src/dashboard/server.ts
12
12
  import express from "express";
@@ -344,7 +344,8 @@ var SystemController = class {
344
344
  id: tool.name,
345
345
  attributes: tool
346
346
  }));
347
- const resources = (listResources().resources || []).map((resource) => ({
347
+ const resourceList = listResources();
348
+ const resources = (resourceList.resources || []).map((resource) => ({
348
349
  type: "resource",
349
350
  id: resource.uri,
350
351
  attributes: resource
@@ -42,7 +42,7 @@ import {
42
42
  setLogLevel,
43
43
  updateSessionFromInitialize,
44
44
  updateSessionRoots
45
- } from "../chunk-BSASVWKJ.js";
45
+ } from "../chunk-CQK2B6SF.js";
46
46
 
47
47
  // src/mcp/server.ts
48
48
  import readline from "readline";
@@ -726,37 +726,35 @@ async function handleMemoryRecap(params, db2) {
726
726
  }
727
727
  }
728
728
  let contentSummary;
729
- if (!validated.structured) {
730
- if (total > 0) {
731
- const parts = [];
732
- for (const [memType, count] of Object.entries(byType)) {
733
- if (count > 0) {
734
- parts.push(`${capitalize2(memType)}: ${count}`);
735
- }
736
- }
737
- const memoriesByType = {};
738
- for (const row of rows) {
739
- const typeLabel = row.type || "unknown";
740
- if (!memoriesByType[typeLabel]) {
741
- memoriesByType[typeLabel] = [];
742
- }
743
- memoriesByType[typeLabel].push(row);
729
+ if (total > 0) {
730
+ const parts = [];
731
+ for (const [memType, count] of Object.entries(byType)) {
732
+ if (count > 0) {
733
+ parts.push(`${capitalize2(memType)}: ${count}`);
744
734
  }
745
- for (const [memType, items] of Object.entries(memoriesByType)) {
746
- parts.push("");
747
- parts.push(`${capitalize2(memType)}:`);
748
- parts.push("- code|importance|title");
749
- for (const row of items) {
750
- const code = row.code || "-";
751
- parts.push(`- ${code}|${row.importance}|${row.title}`);
752
- }
735
+ }
736
+ const memoriesByType = {};
737
+ for (const row of rows) {
738
+ const typeLabel = row.type || "unknown";
739
+ if (!memoriesByType[typeLabel]) {
740
+ memoriesByType[typeLabel] = [];
753
741
  }
742
+ memoriesByType[typeLabel].push(row);
743
+ }
744
+ for (const [memType, items] of Object.entries(memoriesByType)) {
754
745
  parts.push("");
755
- parts.push("Use memory-detail with memory_id (or code) for full content.");
756
- contentSummary = parts.join("\n").trim();
757
- } else {
758
- contentSummary = `No memories found for repo "${validated.repo}".`;
746
+ parts.push(`${capitalize2(memType)}:`);
747
+ parts.push("- code|importance|title");
748
+ for (const row of items) {
749
+ const code = row.code || "-";
750
+ parts.push(`- ${code}|${row.importance}|${row.title}`);
751
+ }
759
752
  }
753
+ parts.push("");
754
+ parts.push("Use memory-detail with memory_id (or code) for full content.");
755
+ contentSummary = parts.join("\n").trim();
756
+ } else {
757
+ contentSummary = `No memories found for repo "${validated.repo}".`;
760
758
  }
761
759
  const structuredData = {
762
760
  schema: "memory-recap",
@@ -1195,7 +1193,8 @@ async function handleTaskCreateInteractive(args, storage, options = {}) {
1195
1193
  {
1196
1194
  ...completedDraft,
1197
1195
  status: completedDraft.status ?? "backlog",
1198
- priority: completedDraft.priority ?? 3
1196
+ priority: completedDraft.priority ?? 3,
1197
+ structured: true
1199
1198
  },
1200
1199
  storage
1201
1200
  );
@@ -1528,7 +1527,7 @@ ${contextBlock || "No additional context provided."}`
1528
1527
  `Synthesized answer for "${validated.objective}" using repository "${repo}".`,
1529
1528
  {
1530
1529
  structuredContentPathHint: "answer",
1531
- includeSerializedStructuredContent: validated.structured
1530
+ includeSerializedStructuredContent: true
1532
1531
  }
1533
1532
  );
1534
1533
  }
@@ -1690,7 +1689,7 @@ async function handleMemoryDelete(params, db2, vectors2, onProgress) {
1690
1689
  deletedCount,
1691
1690
  deletedCodes: deletedCount > 10 ? [...deletedCodes.slice(0, 10), "..."] : deletedCodes
1692
1691
  },
1693
- `Deleted ${deletedCount} memory entry(ies) ${deletedCount > 0 ? `([${deletedCodes.slice(0, 10).join(", ")}${deletedCount > 10 ? ", ..." : ""}]) ` : ""}from repo "${lastRepo}".`,
1692
+ `Deleted ${deletedCount} memory entry(ies) from repo "${lastRepo}".`,
1694
1693
  {
1695
1694
  structuredContentPathHint: "deletedCount",
1696
1695
  includeSerializedStructuredContent: structured,
@@ -1847,8 +1846,13 @@ function createRouter(db2, vectors2, options) {
1847
1846
  return listResources(getSessionContext?.(), params);
1848
1847
  case "resources/templates/list":
1849
1848
  return listResourceTemplates(params);
1850
- case "resources/read":
1851
- return readResource(params?.uri, db2, getSessionContext?.());
1849
+ case "resources/read": {
1850
+ const result = readResource(params?.uri, db2, getSessionContext?.());
1851
+ if (result && Array.isArray(result.contents) && !result.content) {
1852
+ result.content = result.contents;
1853
+ }
1854
+ return result;
1855
+ }
1852
1856
  // ---- prompts ----
1853
1857
  case "prompts/list":
1854
1858
  return listPrompts(db2, getSessionContext?.(), params);
@@ -2180,7 +2184,9 @@ var logNotificationsEnabled = false;
2180
2184
  var handleMethod = createRouter(db, vectors, {
2181
2185
  getSessionContext: () => session,
2182
2186
  sampleMessage: (params) => requestClient("sampling/createMessage", params),
2187
+ // eslint-disable-line @typescript-eslint/no-explicit-any
2183
2188
  elicit: (params) => requestClient("elicitation/create", params),
2189
+ // eslint-disable-line @typescript-eslint/no-explicit-any
2184
2190
  onResourcesMutated: (uris) => notifyUpdatedResources(uris)
2185
2191
  });
2186
2192
  addLogSink((payload) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vheins/local-memory-mcp",
3
- "version": "0.7.4",
3
+ "version": "0.8.0",
4
4
  "description": "MCP Local Memory Service for coding copilot agents",
5
5
  "mcpName": "io.github.vheins/local-memory-mcp",
6
6
  "type": "module",
@@ -45,31 +45,32 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@xenova/transformers": "^2.17.2",
48
+ "better-sqlite3": "^12.9.0",
48
49
  "chart.js": "^4.5.1",
49
50
  "dompurify": "^3.3.3",
50
51
  "express": "^5.2.1",
51
52
  "gray-matter": "^4.0.3",
52
53
  "marked": "^18.0.0",
53
54
  "qs": "^6.15.0",
54
- "sql.js": "^1.14.1",
55
55
  "zod": "^4.3.5"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@eslint/js": "^10.0.1",
59
59
  "@fast-check/vitest": "^0.3.0",
60
60
  "@sveltejs/vite-plugin-svelte": "^7.0.0",
61
+ "@types/better-sqlite3": "^7.6.13",
61
62
  "@types/dompurify": "^3.0.5",
62
63
  "@types/express": "^5.0.6",
63
64
  "@types/marked": "^5.0.2",
64
65
  "@types/node": "^22.19.7",
65
66
  "@typescript-eslint/eslint-plugin": "^8.58.1",
66
67
  "@typescript-eslint/parser": "^8.58.1",
67
- "eslint": "^9.39.4",
68
+ "eslint": "^10.2.0",
68
69
  "eslint-config-prettier": "^10.1.8",
69
70
  "eslint-plugin-prettier": "^5.5.5",
70
71
  "eslint-plugin-svelte": "^2.46.1",
71
72
  "fast-check": "^4.6.0",
72
- "globals": "^17.4.0",
73
+ "globals": "^17.5.0",
73
74
  "prettier": "^3.8.2",
74
75
  "prettier-plugin-svelte": "^3.5.1",
75
76
  "shx": "^0.4.0",