@vheins/local-memory-mcp 0.8.40 → 0.8.42

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.
@@ -3,8 +3,8 @@ import { fileURLToPath } from "url";
3
3
  import path from "path";
4
4
  var __dirname = path.dirname(fileURLToPath(import.meta.url));
5
5
  var pkgVersion = "0.1.0";
6
- if ("0.8.40") {
7
- pkgVersion = "0.8.40";
6
+ if ("0.8.42") {
7
+ pkgVersion = "0.8.42";
8
8
  } else {
9
9
  let searchDir = __dirname;
10
10
  for (let i = 0; i < 5; i++) {
@@ -547,7 +547,7 @@ var MigrationManager = class {
547
547
  }
548
548
  };
549
549
 
550
- // src/mcp/utils/normalize.ts
550
+ // src/mcp/utils/stopwords.ts
551
551
  var STOPWORDS = /* @__PURE__ */ new Set([
552
552
  // English stopwords
553
553
  "a",
@@ -779,6 +779,8 @@ var STOPWORDS = /* @__PURE__ */ new Set([
779
779
  "waktu",
780
780
  "tempat"
781
781
  ]);
782
+
783
+ // src/mcp/utils/normalize.ts
782
784
  function normalize(text) {
783
785
  return text.toLowerCase().replace(/[^a-z0-9\s_\-.]/g, " ").replace(/\s+/g, " ").trim();
784
786
  }
@@ -1433,6 +1435,34 @@ var TaskEntity = class extends BaseEntity {
1433
1435
  );
1434
1436
  return row ? { ...this.rowToTask(row), comments: this.getTaskCommentsByTaskId(id) } : null;
1435
1437
  }
1438
+ getTasksByIds(ids) {
1439
+ if (ids.length === 0) return [];
1440
+ const placeholders = ids.map(() => "?").join(",");
1441
+ const rows = this.all(
1442
+ `SELECT t.*, d.task_code as depends_on_code,
1443
+ (SELECT COUNT(*) FROM task_comments WHERE task_id = t.id) as comments_count
1444
+ FROM tasks t
1445
+ LEFT JOIN tasks d ON t.depends_on = d.id
1446
+ WHERE t.id IN (${placeholders})`,
1447
+ ids
1448
+ );
1449
+ const comments = this.all(
1450
+ `SELECT * FROM task_comments WHERE task_id IN (${placeholders}) ORDER BY created_at DESC, id DESC`,
1451
+ ids
1452
+ );
1453
+ const commentsMap = /* @__PURE__ */ new Map();
1454
+ for (const c of comments) {
1455
+ if (!commentsMap.has(c.task_id)) {
1456
+ commentsMap.set(c.task_id, []);
1457
+ }
1458
+ commentsMap.get(c.task_id).push(c);
1459
+ }
1460
+ return rows.map((r) => {
1461
+ const task = this.rowToTask(r);
1462
+ task.comments = commentsMap.get(task.id) || [];
1463
+ return task;
1464
+ });
1465
+ }
1436
1466
  getTaskByCode(repo, taskCode) {
1437
1467
  const row = this.get(
1438
1468
  `SELECT t.*, d.task_code as depends_on_code, p.task_code as parent_code