@vheins/local-memory-mcp 0.18.3 → 0.18.5
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.
|
@@ -81,8 +81,8 @@ function loadServerInstructions() {
|
|
|
81
81
|
// src/mcp/capabilities.ts
|
|
82
82
|
var __dirname2 = path2.dirname(fileURLToPath2(import.meta.url));
|
|
83
83
|
var pkgVersion = "0.1.0";
|
|
84
|
-
if ("0.18.
|
|
85
|
-
pkgVersion = "0.18.
|
|
84
|
+
if ("0.18.5") {
|
|
85
|
+
pkgVersion = "0.18.5";
|
|
86
86
|
} else {
|
|
87
87
|
let searchDir = __dirname2;
|
|
88
88
|
for (let i = 0; i < 5; i++) {
|
|
@@ -678,20 +678,27 @@ var MigrationManager = class {
|
|
|
678
678
|
if (dupRows.length > 0) {
|
|
679
679
|
console.log(`Found ${dupRows.length} duplicate task_code(s). Deduplicating...`);
|
|
680
680
|
for (const dup of dupRows) {
|
|
681
|
-
const
|
|
682
|
-
`SELECT id FROM tasks
|
|
683
|
-
WHERE owner = ? AND repo = ? AND task_code = ?
|
|
684
|
-
|
|
685
|
-
|
|
681
|
+
const idsToDelete = this.all(
|
|
682
|
+
`SELECT t1.id FROM tasks t1
|
|
683
|
+
WHERE t1.owner = ? AND t1.repo = ? AND t1.task_code = ?
|
|
684
|
+
AND t1.id != (
|
|
685
|
+
SELECT t2.id FROM tasks t2
|
|
686
|
+
WHERE t2.owner = ? AND t2.repo = ? AND t2.task_code = ?
|
|
687
|
+
ORDER BY t2.updated_at DESC
|
|
688
|
+
LIMIT 1
|
|
689
|
+
)`,
|
|
690
|
+
dup.owner,
|
|
691
|
+
dup.repo,
|
|
692
|
+
dup.task_code,
|
|
686
693
|
dup.owner,
|
|
687
694
|
dup.repo,
|
|
688
695
|
dup.task_code
|
|
689
696
|
);
|
|
690
|
-
for (const row of
|
|
697
|
+
for (const row of idsToDelete) {
|
|
691
698
|
this.run("DELETE FROM task_comments WHERE task_id = ?", row.id);
|
|
692
699
|
this.run("DELETE FROM tasks WHERE id = ?", row.id);
|
|
693
700
|
}
|
|
694
|
-
console.log(` Deduplicated ${dup.task_code}: kept 1, removed ${
|
|
701
|
+
console.log(` Deduplicated ${dup.task_code}: kept 1, removed ${idsToDelete.length}`);
|
|
695
702
|
}
|
|
696
703
|
}
|
|
697
704
|
this.exec(`CREATE UNIQUE INDEX IF NOT EXISTS idx_tasks_code_owner_repo ON tasks(owner, repo, task_code);`);
|
|
@@ -1889,20 +1896,22 @@ var TaskEntity = class extends BaseEntity {
|
|
|
1889
1896
|
});
|
|
1890
1897
|
}
|
|
1891
1898
|
getTaskByCode(owner, repo, taskCode) {
|
|
1892
|
-
const
|
|
1893
|
-
|
|
1899
|
+
const baseQuery = `SELECT t.*, d.task_code as depends_on_code, p.task_code as parent_code,
|
|
1900
|
+
${this.coordinationSelect("t")}
|
|
1901
|
+
FROM tasks t
|
|
1902
|
+
LEFT JOIN tasks d ON t.depends_on = d.id
|
|
1903
|
+
LEFT JOIN tasks p ON t.parent_id = p.id `;
|
|
1904
|
+
let row;
|
|
1894
1905
|
if (owner) {
|
|
1895
|
-
|
|
1906
|
+
row = this.get(baseQuery + `WHERE t.owner = ? AND t.repo = ? AND t.task_code = ?`, [
|
|
1907
|
+
owner,
|
|
1908
|
+
repo,
|
|
1909
|
+
taskCode
|
|
1910
|
+
]);
|
|
1911
|
+
}
|
|
1912
|
+
if (!row) {
|
|
1913
|
+
row = this.get(baseQuery + `WHERE t.repo = ? AND t.task_code = ?`, [repo, taskCode]);
|
|
1896
1914
|
}
|
|
1897
|
-
const row = this.get(
|
|
1898
|
-
`SELECT t.*, d.task_code as depends_on_code, p.task_code as parent_code,
|
|
1899
|
-
${this.coordinationSelect("t")}
|
|
1900
|
-
FROM tasks t
|
|
1901
|
-
LEFT JOIN tasks d ON t.depends_on = d.id
|
|
1902
|
-
LEFT JOIN tasks p ON t.parent_id = p.id
|
|
1903
|
-
WHERE ${ownerClause}t.repo = ? AND t.task_code = ?`,
|
|
1904
|
-
params
|
|
1905
|
-
);
|
|
1906
1915
|
return row ? {
|
|
1907
1916
|
...this.rowToTask(row),
|
|
1908
1917
|
comments: this.all(
|
package/dist/dashboard/server.js
CHANGED
package/dist/mcp/server.js
CHANGED