@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.
- package/dist/{chunk-HDBGZ6GG.js → chunk-JWJOO5N5.js} +33 -3
- package/dist/dashboard/public/assets/index-mXYdB6rj.js +86 -0
- package/dist/dashboard/public/index.html +1 -1
- package/dist/dashboard/server.js +7 -6
- package/dist/mcp/server.js +10 -8
- package/dist/prompts/task-memory-executor.md +3 -1
- package/package.json +1 -1
- package/dist/dashboard/public/assets/index-CYmjkCmr.js +0 -86
|
@@ -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-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-mXYdB6rj.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-BbuGTan5.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/dist/dashboard/server.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
createFileSink,
|
|
9
9
|
listResources,
|
|
10
10
|
logger
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-JWJOO5N5.js";
|
|
12
12
|
|
|
13
13
|
// src/dashboard/server.ts
|
|
14
14
|
import express from "express";
|
|
@@ -551,9 +551,9 @@ var MemoriesController = class {
|
|
|
551
551
|
updated_at: item.updated_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
552
552
|
}));
|
|
553
553
|
const count = await db.withWrite(() => {
|
|
554
|
-
const
|
|
555
|
-
db.actions.logAction("write", repo, { query: `Bulk imported ${
|
|
556
|
-
return
|
|
554
|
+
const insertedCount = db.memories.bulkInsertMemories(entries);
|
|
555
|
+
db.actions.logAction("write", repo, { query: `Bulk imported ${insertedCount} memories` });
|
|
556
|
+
return insertedCount;
|
|
557
557
|
});
|
|
558
558
|
res.json(jsonApiRes({ count }, "status"));
|
|
559
559
|
} catch (err) {
|
|
@@ -568,7 +568,7 @@ var MemoriesController = class {
|
|
|
568
568
|
if (!Array.isArray(ids) || !action)
|
|
569
569
|
return res.status(400).json(jsonApiError("Invalid payload: requires 'ids' array and 'action'", 400));
|
|
570
570
|
const count = await db.withWrite(() => {
|
|
571
|
-
let n
|
|
571
|
+
let n;
|
|
572
572
|
if (action === "delete") {
|
|
573
573
|
n = db.memories.bulkDeleteMemories(ids);
|
|
574
574
|
} else if (action === "update" || action === "archive") {
|
|
@@ -945,10 +945,11 @@ app.use((req, res, next) => {
|
|
|
945
945
|
`);
|
|
946
946
|
}
|
|
947
947
|
});
|
|
948
|
-
app.use((err, req, res,
|
|
948
|
+
app.use((err, req, res, next) => {
|
|
949
949
|
if (err.status === 404) return res.status(404).end();
|
|
950
950
|
logger.error("Unhandled error", { error: err.message });
|
|
951
951
|
res.status(500).end();
|
|
952
|
+
next();
|
|
952
953
|
});
|
|
953
954
|
if (process.env.DASHBOARD_ENABLE_MCP === "true") {
|
|
954
955
|
mcpClient.start().catch((e) => logger.error("MCP Client failed", { error: e.message }));
|
package/dist/mcp/server.js
CHANGED
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
setLogLevel,
|
|
44
44
|
updateSessionFromInitialize,
|
|
45
45
|
updateSessionRoots
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-JWJOO5N5.js";
|
|
47
47
|
|
|
48
48
|
// src/mcp/server.ts
|
|
49
49
|
import readline from "readline";
|
|
@@ -902,6 +902,8 @@ async function handleTaskCreate(args, storage) {
|
|
|
902
902
|
const createdTasks = [];
|
|
903
903
|
const now2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
904
904
|
const codesInRequest = /* @__PURE__ */ new Set();
|
|
905
|
+
const initialStats = storage.tasks.getTaskStats(repo);
|
|
906
|
+
let pendingInRequestCount = 0;
|
|
905
907
|
for (const taskData of bulkTasks) {
|
|
906
908
|
if (codesInRequest.has(taskData.task_code)) {
|
|
907
909
|
throw new Error(`Duplicate task_code in request: '${taskData.task_code}'`);
|
|
@@ -917,12 +919,7 @@ async function handleTaskCreate(args, storage) {
|
|
|
917
919
|
);
|
|
918
920
|
}
|
|
919
921
|
if (normalizedStatus === "pending") {
|
|
920
|
-
|
|
921
|
-
const pendingInRequest = createdTasks.filter((c) => {
|
|
922
|
-
const t = bulkTasks.find((bt) => bt.task_code === c);
|
|
923
|
-
return t?.status === "pending";
|
|
924
|
-
}).length;
|
|
925
|
-
if (stats.todo + pendingInRequest >= 10) {
|
|
922
|
+
if (initialStats.todo + pendingInRequestCount >= 10) {
|
|
926
923
|
throw new Error(
|
|
927
924
|
`Cannot create task '${taskData.task_code}' as 'pending'. Maximum of 10 pending tasks reached.`
|
|
928
925
|
);
|
|
@@ -959,6 +956,9 @@ async function handleTaskCreate(args, storage) {
|
|
|
959
956
|
};
|
|
960
957
|
storage.tasks.insertTask(task2);
|
|
961
958
|
createdTasks.push(task2.task_code);
|
|
959
|
+
if (normalizedStatus === "pending") {
|
|
960
|
+
pendingInRequestCount++;
|
|
961
|
+
}
|
|
962
962
|
task2._temp_id = task2.id;
|
|
963
963
|
}
|
|
964
964
|
return createMcpResponse(
|
|
@@ -1162,8 +1162,10 @@ async function handleTaskUpdate(args, storage, vectors2) {
|
|
|
1162
1162
|
const completedTaskIds = [];
|
|
1163
1163
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1164
1164
|
const isStatusChangingGlobal = updates.status !== void 0;
|
|
1165
|
+
const existingTasks = storage.tasks.getTasksByIds(targetIds);
|
|
1166
|
+
const taskMap = new Map(existingTasks.map((t) => [t.id, t]));
|
|
1165
1167
|
for (const targetId of targetIds) {
|
|
1166
|
-
const existingTask =
|
|
1168
|
+
const existingTask = taskMap.get(targetId);
|
|
1167
1169
|
if (!existingTask) {
|
|
1168
1170
|
if (id) throw new Error(`Task not found: ${targetId}`);
|
|
1169
1171
|
continue;
|
|
@@ -37,7 +37,9 @@ agent: Task Executor
|
|
|
37
37
|
- **Evidence**: `task-update` status to `completed` with detailed 'comment' (inspected files, verified logic, test results).
|
|
38
38
|
- **Memory**: Store insights as `code_fact`/`pattern` via `memory-store`.
|
|
39
39
|
- **Retrospective**: Invoke `learning-retrospective`.
|
|
40
|
-
- **Commit**: Atomic git commit
|
|
40
|
+
- **Commit**: Atomic git commit. The commit message MUST include the task code (for example: `fix: ... [TASK-123]`).
|
|
41
|
+
- **GitHub Issue Traceability**: If task metadata contains a GitHub Issue reference, the commit message MUST also include the issue hashtag in `#123` format.
|
|
42
|
+
- **Issue Number Extraction**: Read the issue number from task metadata when available. If metadata only contains a GitHub Issue URL, extract the trailing issue number from that URL before committing.
|
|
41
43
|
8. **Repeat**: Claim next task from `task-list`.
|
|
42
44
|
|
|
43
45
|
## 3. BACKLOG MAINTENANCE
|