@vheins/local-memory-mcp 0.8.29 → 0.8.32
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/{chunk-HVIOJXRW.js → chunk-NVK5O7VL.js} +88 -18
- package/dist/dashboard/public/assets/index-C2Zuk5Bn.js +86 -0
- package/dist/dashboard/public/assets/{index-OXSJZbwn.css → index-Don00sJ3.css} +1 -1
- package/dist/dashboard/public/index.html +2 -2
- package/dist/dashboard/server.js +8 -3
- package/dist/mcp/server.js +1 -1
- package/dist/prompts/architecture-design.md +8 -8
- package/dist/prompts/create-task.md +49 -121
- package/dist/prompts/documentation-sync.md +6 -6
- package/dist/prompts/export-task-to-github.md +27 -48
- package/dist/prompts/fix-suggestion.md +13 -14
- package/dist/prompts/import-github-issues.md +21 -20
- package/dist/prompts/learning-retrospective.md +11 -8
- package/dist/prompts/memory-agent-core.md +19 -32
- package/dist/prompts/memory-guided-review.md +7 -7
- package/dist/prompts/memory-index-policy.md +12 -12
- package/dist/prompts/project-briefing.md +7 -7
- package/dist/prompts/review-and-audit.md +41 -124
- package/dist/prompts/review-and-post-issue.md +39 -92
- package/dist/prompts/root-cause-analysis.md +13 -13
- package/dist/prompts/security-triage.md +12 -12
- package/dist/prompts/senior-code-review.md +17 -18
- package/dist/prompts/session-planner.md +9 -9
- package/dist/prompts/task-management-guidelines.md +15 -20
- package/dist/prompts/task-memory-executor.md +35 -53
- package/dist/prompts/tech-affinity-scout.md +7 -7
- package/dist/prompts/technical-planning.md +11 -11
- package/dist/prompts/tool-usage-guidelines.md +13 -13
- package/package.json +2 -2
- package/dist/dashboard/public/assets/index-CX52Iqkx.js +0 -84
|
@@ -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.
|
|
7
|
-
pkgVersion = "0.8.
|
|
6
|
+
if ("0.8.32") {
|
|
7
|
+
pkgVersion = "0.8.32";
|
|
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];
|
|
@@ -1678,10 +1705,11 @@ var TaskEntity = class extends BaseEntity {
|
|
|
1678
1705
|
const added = this.get(`SELECT COUNT(*) as count FROM tasks WHERE repo = ? ${addedDateFilter}`, [
|
|
1679
1706
|
repo
|
|
1680
1707
|
]);
|
|
1708
|
+
const avgDurationMinutes = stats?.avg_duration_seconds ? stats.avg_duration_seconds / 60 : 0;
|
|
1681
1709
|
return {
|
|
1682
1710
|
completed: stats?.completed_count || 0,
|
|
1683
1711
|
tokens: stats?.total_tokens || 0,
|
|
1684
|
-
avgDuration:
|
|
1712
|
+
avgDuration: avgDurationMinutes,
|
|
1685
1713
|
added: added?.count || 0
|
|
1686
1714
|
};
|
|
1687
1715
|
}
|
|
@@ -1823,43 +1851,85 @@ var SystemEntity = class extends BaseEntity {
|
|
|
1823
1851
|
const memoryCountRow = this.get("SELECT COUNT(*) as count FROM memories WHERE repo = ?", [
|
|
1824
1852
|
repo
|
|
1825
1853
|
]);
|
|
1826
|
-
const taskCountRow = this.get("SELECT COUNT(*) as count FROM tasks WHERE repo = ?", [repo]);
|
|
1827
1854
|
const lastActivityRow = this.get(
|
|
1828
1855
|
`SELECT MAX(created_at) as last FROM (SELECT created_at FROM memories WHERE repo = ? UNION ALL SELECT created_at FROM tasks WHERE repo = ? UNION ALL SELECT created_at FROM action_log WHERE repo = ?)`,
|
|
1829
1856
|
[repo, repo, repo]
|
|
1830
1857
|
);
|
|
1858
|
+
const taskStatusRows = this.all(
|
|
1859
|
+
"SELECT status, COUNT(*) as count FROM tasks WHERE repo = ? GROUP BY status",
|
|
1860
|
+
[repo]
|
|
1861
|
+
);
|
|
1862
|
+
const taskStatusMap = {};
|
|
1863
|
+
taskStatusRows.forEach((r) => {
|
|
1864
|
+
taskStatusMap[r.status] = r.count;
|
|
1865
|
+
});
|
|
1866
|
+
const taskCount = taskStatusRows.reduce((sum, r) => sum + r.count, 0);
|
|
1831
1867
|
return {
|
|
1832
1868
|
repo,
|
|
1833
1869
|
memoryCount: memoryCountRow?.count ?? 0,
|
|
1834
|
-
taskCount
|
|
1870
|
+
taskCount,
|
|
1871
|
+
inProgressCount: taskStatusMap["in_progress"] ?? 0,
|
|
1872
|
+
pendingCount: taskStatusMap["pending"] ?? 0,
|
|
1873
|
+
blockedCount: taskStatusMap["blocked"] ?? 0,
|
|
1874
|
+
backlogCount: taskStatusMap["backlog"] ?? 0,
|
|
1835
1875
|
lastActivity: lastActivityRow?.last ?? null
|
|
1836
1876
|
};
|
|
1837
1877
|
});
|
|
1838
1878
|
}
|
|
1839
1879
|
getDashboardStats(repo) {
|
|
1840
|
-
const
|
|
1841
|
-
|
|
1880
|
+
const totalCountRow = this.get("SELECT COUNT(*) as count FROM memories WHERE repo = ?", [repo]);
|
|
1881
|
+
const avgImportanceRow = this.get("SELECT AVG(importance) as avg FROM memories WHERE repo = ?", [
|
|
1882
|
+
repo
|
|
1883
|
+
]);
|
|
1884
|
+
const totalHitCountRow = this.get(
|
|
1885
|
+
"SELECT SUM(hit_count) as count FROM memories WHERE repo = ?",
|
|
1842
1886
|
[repo]
|
|
1843
1887
|
);
|
|
1844
|
-
const
|
|
1845
|
-
"SELECT
|
|
1888
|
+
const expiringSoonRow = this.get(
|
|
1889
|
+
"SELECT COUNT(*) as count FROM memories WHERE repo = ? AND expires_at IS NOT NULL AND expires_at > ? AND expires_at <= ?",
|
|
1890
|
+
[repo, (/* @__PURE__ */ new Date()).toISOString(), new Date(Date.now() + 7 * 86400 * 1e3).toISOString()]
|
|
1891
|
+
);
|
|
1892
|
+
const typeStats = this.all(
|
|
1893
|
+
"SELECT type, COUNT(*) as count FROM memories WHERE repo = ? GROUP BY type",
|
|
1846
1894
|
[repo]
|
|
1847
1895
|
);
|
|
1848
|
-
const
|
|
1849
|
-
|
|
1896
|
+
const byType = {};
|
|
1897
|
+
typeStats.forEach((t) => {
|
|
1898
|
+
byType[t.type] = t.count;
|
|
1899
|
+
});
|
|
1900
|
+
const taskRows = this.all(
|
|
1901
|
+
"SELECT status, COUNT(*) as count FROM tasks WHERE repo = ? GROUP BY status",
|
|
1850
1902
|
[repo]
|
|
1851
1903
|
);
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1854
|
-
|
|
1904
|
+
const taskStats = {
|
|
1905
|
+
total: 0,
|
|
1906
|
+
backlog: 0,
|
|
1907
|
+
pending: 0,
|
|
1908
|
+
in_progress: 0,
|
|
1909
|
+
completed: 0,
|
|
1910
|
+
blocked: 0
|
|
1911
|
+
};
|
|
1912
|
+
taskRows.forEach((r) => {
|
|
1913
|
+
taskStats.total += r.count;
|
|
1914
|
+
if (r.status === "backlog") taskStats.backlog = r.count;
|
|
1915
|
+
else if (r.status === "pending") taskStats.pending = r.count;
|
|
1916
|
+
else if (r.status === "in_progress") taskStats.in_progress = r.count;
|
|
1917
|
+
else if (r.status === "completed") taskStats.completed = r.count;
|
|
1918
|
+
else if (r.status === "blocked") taskStats.blocked = r.count;
|
|
1919
|
+
});
|
|
1920
|
+
const topMemoriesRows = this.all(
|
|
1921
|
+
"SELECT * FROM memories WHERE repo = ? ORDER BY importance DESC, created_at DESC LIMIT 5",
|
|
1855
1922
|
[repo]
|
|
1856
1923
|
);
|
|
1857
|
-
const
|
|
1924
|
+
const topMemories = topMemoriesRows.map((r) => this.rowToMemoryEntry(r));
|
|
1858
1925
|
return {
|
|
1859
|
-
|
|
1926
|
+
total: totalCountRow?.count ?? 0,
|
|
1927
|
+
avgImportance: (avgImportanceRow?.avg ?? 0).toFixed(1),
|
|
1928
|
+
totalHitCount: totalHitCountRow?.count ?? 0,
|
|
1929
|
+
expiringSoon: expiringSoonRow?.count ?? 0,
|
|
1930
|
+
byType,
|
|
1860
1931
|
taskStats,
|
|
1861
|
-
|
|
1862
|
-
activeTasks
|
|
1932
|
+
topMemories
|
|
1863
1933
|
};
|
|
1864
1934
|
}
|
|
1865
1935
|
getGlobalStats() {
|