@vheins/local-memory-mcp 0.8.30 → 0.8.33

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.30") {
7
- pkgVersion = "0.8.30";
6
+ if ("0.8.33") {
7
+ pkgVersion = "0.8.33";
8
8
  } else {
9
9
  let searchDir = __dirname;
10
10
  for (let i = 0; i < 5; i++) {
@@ -1474,6 +1474,21 @@ var TaskEntity = class extends BaseEntity {
1474
1474
  const rows = this.all(query, params);
1475
1475
  return rows.map((r) => this.rowToTask(r));
1476
1476
  }
1477
+ countTasks(repo, status, search) {
1478
+ let query = "SELECT COUNT(*) as count FROM tasks WHERE repo = ?";
1479
+ const params = [repo];
1480
+ if (status) {
1481
+ query += " AND status = ?";
1482
+ params.push(status);
1483
+ }
1484
+ if (search) {
1485
+ query += " AND (title LIKE ? OR description LIKE ? OR task_code LIKE ?)";
1486
+ const searchPattern = `%${search}%`;
1487
+ params.push(searchPattern, searchPattern, searchPattern);
1488
+ }
1489
+ const row = this.get(query, params);
1490
+ return row?.count ?? 0;
1491
+ }
1477
1492
  listRecentTasks(limit = 50, offset = 0) {
1478
1493
  const query = `
1479
1494
  SELECT t.*, d.task_code as depends_on_code,
@@ -1533,6 +1548,18 @@ var TaskEntity = class extends BaseEntity {
1533
1548
  const rows = this.all(query, params);
1534
1549
  return rows.map((r) => this.rowToTask(r));
1535
1550
  }
1551
+ countTasksByMultipleStatuses(repo, statuses, search) {
1552
+ if (!statuses.length) return this.countTasks(repo, void 0, search);
1553
+ let query = `SELECT COUNT(*) as count FROM tasks WHERE repo = ? AND status IN (${statuses.map(() => "?").join(",")})`;
1554
+ const params = [repo, ...statuses];
1555
+ if (search) {
1556
+ query += " AND (title LIKE ? OR description LIKE ? OR task_code LIKE ?)";
1557
+ const searchPattern = `%${search}%`;
1558
+ params.push(searchPattern, searchPattern, searchPattern);
1559
+ }
1560
+ const row = this.get(query, params);
1561
+ return row?.count ?? 0;
1562
+ }
1536
1563
  isTaskCodeDuplicate(repo, task_code, excludeId) {
1537
1564
  let query = "SELECT COUNT(*) as count FROM tasks WHERE repo = ? AND task_code = ?";
1538
1565
  const params = [repo, task_code];