@vheins/local-memory-mcp 0.8.45 → 0.8.46
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-Z4FZBRE2.js → chunk-OEO4T525.js} +1824 -1777
- package/dist/dashboard/public/assets/{index-DSdSQ0sh.css → index-BaWIMG1g.css} +1 -1
- package/dist/dashboard/public/assets/{index-BESxlve8.js → index-DEY6a44I.js} +2 -2
- package/dist/dashboard/public/index.html +2 -2
- package/dist/dashboard/server.js +1 -1
- package/dist/mcp/server.js +44 -3
- package/dist/prompts/create-task.md +1 -1
- package/dist/prompts/memory-agent-core.md +2 -2
- package/dist/prompts/memory-index-policy.md +3 -2
- package/dist/prompts/project-briefing.md +1 -1
- package/dist/prompts/review-and-audit.md +2 -2
- package/dist/prompts/session-planner.md +1 -1
- package/dist/prompts/task-management-guidelines.md +3 -2
- package/dist/prompts/task-memory-executor.md +3 -2
- package/dist/prompts/tool-usage-guidelines.md +4 -1
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@
|
|
|
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-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-DEY6a44I.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BaWIMG1g.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="app"></div>
|
package/dist/dashboard/server.js
CHANGED
package/dist/mcp/server.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
CAPABILITIES,
|
|
4
4
|
HandoffCreateSchema,
|
|
5
5
|
HandoffListSchema,
|
|
6
|
+
HandoffUpdateSchema,
|
|
6
7
|
LOG_LEVEL_VALUES,
|
|
7
8
|
MCP_PROTOCOL_VERSION,
|
|
8
9
|
MemoryAcknowledgeSchema,
|
|
@@ -48,7 +49,7 @@ import {
|
|
|
48
49
|
setLogLevel,
|
|
49
50
|
updateSessionFromInitialize,
|
|
50
51
|
updateSessionRoots
|
|
51
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-OEO4T525.js";
|
|
52
53
|
|
|
53
54
|
// src/mcp/server.ts
|
|
54
55
|
import readline from "readline";
|
|
@@ -1165,6 +1166,8 @@ async function handleTaskUpdate(args, storage, vectors2) {
|
|
|
1165
1166
|
let updatedCount = 0;
|
|
1166
1167
|
const updatedTasks = [];
|
|
1167
1168
|
const completedTaskIds = [];
|
|
1169
|
+
let releasedClaims = 0;
|
|
1170
|
+
let expiredHandoffs = 0;
|
|
1168
1171
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1169
1172
|
const isStatusChangingGlobal = updates.status !== void 0;
|
|
1170
1173
|
const existingTasks = storage.tasks.getTasksByIds(targetIds);
|
|
@@ -1228,11 +1231,18 @@ async function handleTaskUpdate(args, storage, vectors2) {
|
|
|
1228
1231
|
if (updates.status === "completed" && existingTask.status !== "completed") {
|
|
1229
1232
|
completedTaskIds.push(targetId);
|
|
1230
1233
|
}
|
|
1234
|
+
if (isStatusChanging && (updates.status === "completed" || updates.status === "canceled")) {
|
|
1235
|
+
releasedClaims += storage.handoffs.releaseClaimsForTask(targetId);
|
|
1236
|
+
expiredHandoffs += storage.handoffs.updatePendingHandoffsForTask(targetId, "expired");
|
|
1237
|
+
}
|
|
1231
1238
|
updatedTasks.push({ id: targetId, code: updates.task_code || existingTask.task_code });
|
|
1232
1239
|
updatedCount++;
|
|
1233
1240
|
}
|
|
1234
1241
|
const isCompleted = updates.status === "completed" && updatedCount > 0;
|
|
1235
|
-
|
|
1242
|
+
let summaryText = isCompleted ? `Updated ${updatedCount} task(s) in repo "${repo}". \u2705 Task marked as completed \u2014 don't forget to commit your changes!` : `Updated ${updatedCount} task(s) in repo "${repo}".`;
|
|
1243
|
+
if (releasedClaims || expiredHandoffs) {
|
|
1244
|
+
summaryText += ` Auto-closed coordination: released ${releasedClaims} claim(s), expired ${expiredHandoffs} handoff(s).`;
|
|
1245
|
+
}
|
|
1236
1246
|
const response = createMcpResponse(
|
|
1237
1247
|
{
|
|
1238
1248
|
success: true,
|
|
@@ -1241,7 +1251,11 @@ async function handleTaskUpdate(args, storage, vectors2) {
|
|
|
1241
1251
|
repo,
|
|
1242
1252
|
status: updates.status,
|
|
1243
1253
|
updatedCount,
|
|
1244
|
-
updatedFields: Object.keys(updates)
|
|
1254
|
+
updatedFields: Object.keys(updates),
|
|
1255
|
+
coordinationCleanup: {
|
|
1256
|
+
releasedClaims,
|
|
1257
|
+
expiredHandoffs
|
|
1258
|
+
}
|
|
1245
1259
|
},
|
|
1246
1260
|
summaryText,
|
|
1247
1261
|
{ includeSerializedStructuredContent: updateData.structured }
|
|
@@ -1713,6 +1727,30 @@ async function handleHandoffList(args, storage) {
|
|
|
1713
1727
|
includeSerializedStructuredContent: structured
|
|
1714
1728
|
});
|
|
1715
1729
|
}
|
|
1730
|
+
async function handleHandoffUpdate(args, storage) {
|
|
1731
|
+
const validated = HandoffUpdateSchema.parse(args);
|
|
1732
|
+
const { id, status, structured } = validated;
|
|
1733
|
+
const existing = storage.handoffs.getHandoffById(id);
|
|
1734
|
+
if (!existing) {
|
|
1735
|
+
throw new Error(`Handoff not found: ${id}`);
|
|
1736
|
+
}
|
|
1737
|
+
const success = storage.handoffs.updateHandoffStatus(id, status);
|
|
1738
|
+
if (!success) {
|
|
1739
|
+
throw new Error(`Failed to update handoff: ${id}`);
|
|
1740
|
+
}
|
|
1741
|
+
const updated = storage.handoffs.getHandoffById(id);
|
|
1742
|
+
const result = {
|
|
1743
|
+
success,
|
|
1744
|
+
id,
|
|
1745
|
+
status,
|
|
1746
|
+
handoff: updated
|
|
1747
|
+
};
|
|
1748
|
+
const contentSummary = [`Updated handoff ${id}.`, `Status: ${status}`].join("\n");
|
|
1749
|
+
return createMcpResponse(result, contentSummary, {
|
|
1750
|
+
contentSummary,
|
|
1751
|
+
includeSerializedStructuredContent: structured
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1716
1754
|
async function handleTaskClaim(args, storage) {
|
|
1717
1755
|
const validated = TaskClaimSchema.parse(args);
|
|
1718
1756
|
const { repo, task_id, task_code, agent, role, metadata, structured } = validated;
|
|
@@ -1972,6 +2010,7 @@ function createRouter(db2, vectors2, options) {
|
|
|
1972
2010
|
"memory-bulk-delete",
|
|
1973
2011
|
"memory-summarize",
|
|
1974
2012
|
"handoff-create",
|
|
2013
|
+
"handoff-update",
|
|
1975
2014
|
"standard-store",
|
|
1976
2015
|
"task-create",
|
|
1977
2016
|
"task-create-interactive",
|
|
@@ -2016,6 +2055,8 @@ function createRouter(db2, vectors2, options) {
|
|
|
2016
2055
|
return await handleHandoffCreate(args, db2);
|
|
2017
2056
|
case "handoff-list":
|
|
2018
2057
|
return await handleHandoffList(args, db2);
|
|
2058
|
+
case "handoff-update":
|
|
2059
|
+
return await handleHandoffUpdate(args, db2);
|
|
2019
2060
|
case "task-claim":
|
|
2020
2061
|
return await handleTaskClaim(args, db2);
|
|
2021
2062
|
case "standard-store":
|
|
@@ -19,7 +19,7 @@ ONLY call MCP tools. No prose, no code, no plans outside MCP.
|
|
|
19
19
|
## 1. PRE-ANALYSIS
|
|
20
20
|
1. **Search Memory**: Call `memory-search` (architecture/history).
|
|
21
21
|
2. **Search Standards**: Call `standard-search` when coding conventions may constrain the task.
|
|
22
|
-
3. **Check Handoffs**: Call `handoff-list` for pending context that may already describe
|
|
22
|
+
3. **Check Handoffs**: Call `handoff-list` for pending context that may already describe unfinished work. Ignore or close stale handoffs that only describe completed work.
|
|
23
23
|
4. **Research Codebase**: Read relevant source files to verify current implementation and paths.
|
|
24
24
|
5. **De-duplicate**: Call `task-list`. DO NOT duplicate existing tasks. Link related tasks via `parent_id`/`depends_on`.
|
|
25
25
|
|
|
@@ -17,7 +17,7 @@ You are a memory-aware agent. Memory is project truth, not a suggestion.
|
|
|
17
17
|
6. **Search Mechanics**: Hybrid Search (70% Cosine, 30% BM25). 0.55 similarity threshold prevents duplication.
|
|
18
18
|
|
|
19
19
|
## Execution Policy
|
|
20
|
-
1. **Orient**: Call `task-list` for active work and `handoff-list` for pending transfers when starting a repository session.
|
|
20
|
+
1. **Orient**: Call `task-list` for active work and `handoff-list` for pending transfers when starting a repository session. Close stale pending handoffs with `handoff-update` when they no longer describe unfinished work.
|
|
21
21
|
2. **Claim**: Use `task-claim` before taking ownership of a concrete task.
|
|
22
22
|
3. **Search**: Call `memory-search` with `current_file_path` and `current_tags` before coding.
|
|
23
23
|
4. **Standards**: Call `standard-search` when implementation may be governed by coding standards.
|
|
@@ -28,6 +28,6 @@ You are a memory-aware agent. Memory is project truth, not a suggestion.
|
|
|
28
28
|
Store memory ONLY if knowledge is durable (architecture, patterns, fixes) and affects future behavior.
|
|
29
29
|
1. **Categorize**: Use technology `tags`.
|
|
30
30
|
2. **Maintain**: Use `supersedes` for overrides.
|
|
31
|
-
3. **Separate concerns**: Use `standard-store` for normative coding rules and `handoff-create` for agent transfer context. Do not store these as generic memories.
|
|
31
|
+
3. **Separate concerns**: Use `standard-store` for normative coding rules and `handoff-create`/`handoff-update` for agent transfer context. Do not store these as generic memories.
|
|
32
32
|
|
|
33
33
|
Protect codebase health by respecting project history.
|
|
@@ -13,14 +13,15 @@ agent: Memory Auditor
|
|
|
13
13
|
|
|
14
14
|
## ✅ MANDATORY
|
|
15
15
|
Only store durable, project-specific knowledge.
|
|
16
|
-
- **Types**: `code_fact`, `decision`, `mistake`, `pattern`, `
|
|
16
|
+
- **Types**: `code_fact`, `decision`, `mistake`, `pattern`, `task_archive`.
|
|
17
17
|
- **Content**: Architecture, UI/UX choices, stack patterns, hard-won bug fixes.
|
|
18
18
|
- **Global**: Set `is_global` only if applicable across repositories (e.g., framework anti-patterns).
|
|
19
19
|
- **Categorization**: Use accurate technology tags.
|
|
20
20
|
|
|
21
21
|
## Operational Note
|
|
22
22
|
- Do **not** store agent coordination state as memory.
|
|
23
|
-
- Use `handoff-create` and `handoff-
|
|
23
|
+
- Use `handoff-create`, `handoff-list`, and `handoff-update` for agent handoffs.
|
|
24
24
|
- Use `task-claim` for task ownership instead of encoding claims in memory metadata.
|
|
25
|
+
- File ownership/claims are coordination state; never store them as `file_claim` memory entries.
|
|
25
26
|
- Use `standard-store` for normative coding standards; do not bury implementation rules in generic `decision` memories.
|
|
26
27
|
- Use `standard-search` as the standards navigation layer before applying or creating standards.
|
|
@@ -9,7 +9,7 @@ Initialize session in repository.
|
|
|
9
9
|
Briefing Steps:
|
|
10
10
|
1. **Repository**: Identify current repo from context.
|
|
11
11
|
2. **Tasks**: Call `task-list` for `in_progress,pending` tasks.
|
|
12
|
-
3. **Handoffs**: Call `handoff-list` with `status=pending` to surface transfer context.
|
|
12
|
+
3. **Handoffs**: Call `handoff-list` with `status=pending` to surface transfer context. Treat only handoffs with unfinished work, blockers, next owner, or linked task as active.
|
|
13
13
|
4. **Memory**: Call `memory-search` or `memory-recap` for recent decisions, patterns, and mistakes; hydrate important entries with `memory-detail`.
|
|
14
14
|
5. **Standards**: Call `standard-search` with current repo/stack when implementation guidance is needed.
|
|
15
15
|
6. **Core Context**: Summarize active task, pending handoffs, applicable standards, and top architectural decisions.
|
|
@@ -17,7 +17,7 @@ agent: Quality Auditor
|
|
|
17
17
|
|
|
18
18
|
## 🚫 FORBIDDEN: NON-EXECUTION
|
|
19
19
|
DO NOT edit/create/delete files, run commands, or implement code.
|
|
20
|
-
**Allowed**: Read code, `chrome-dev-tools`, `task-create`, `memory-store`, `task-list`, `memory-search`, `standard-search`, `handoff-list`.
|
|
20
|
+
**Allowed**: Read code, `chrome-dev-tools`, `task-create`, `memory-store`, `task-list`, `memory-search`, `standard-search`, `handoff-list`, `handoff-update`.
|
|
21
21
|
|
|
22
22
|
## ✅ OUTPUT: MCP ONLY
|
|
23
23
|
ONLY call MCP tools. No prose, code, or external plans.
|
|
@@ -25,7 +25,7 @@ ONLY call MCP tools. No prose, code, or external plans.
|
|
|
25
25
|
## 2. PRE-TASK ANALYSIS
|
|
26
26
|
1. **Search**: Call `memory-search` (Hybrid Search). 0.55 similarity threshold.
|
|
27
27
|
2. **Standards**: Call `standard-search` when implementation conventions are relevant.
|
|
28
|
-
3. **Handoffs**: Call `handoff-list` for pending transfer context related to the target.
|
|
28
|
+
3. **Handoffs**: Call `handoff-list` for pending transfer context related to the target. Treat handoffs as active only when they contain unfinished work, blockers, a next owner, or a linked task.
|
|
29
29
|
4. **De-duplicate**: Call `task-list`. Skip existing/redundant tasks. Link via `parent_id`/`depends_on`.
|
|
30
30
|
|
|
31
31
|
## 3. TASK DESIGN & FORMAT
|
|
@@ -12,7 +12,7 @@ Plan execution for: '{{objective}}'.
|
|
|
12
12
|
Steps:
|
|
13
13
|
1. **Orient**: Call `task-list` to avoid duplicate active/backlog work.
|
|
14
14
|
2. **Standards**: Call `standard-search` if the objective touches implementation conventions.
|
|
15
|
-
3. **Handoffs**: Call `handoff-list` for pending context that may affect sequencing.
|
|
15
|
+
3. **Handoffs**: Call `handoff-list` for pending context that may affect sequencing. Stale pending handoffs that only summarize completed work should be closed with `handoff-update`, not planned as queue work.
|
|
16
16
|
4. **Analyze**: Break into 3-7 atomic, verifiable tasks.
|
|
17
17
|
5. **Phase**: Group into `research`, `implementation`, and `validation`.
|
|
18
18
|
6. **Hierarchy**: Use `parent_id` / `depends_on` for sequencing.
|
|
@@ -16,12 +16,13 @@ agent: Project Manager
|
|
|
16
16
|
- **Tasks**: Call `task-detail` for history/comments (ID or `task_code`).
|
|
17
17
|
- **Memory**: Call `memory-detail` for full entry content.
|
|
18
18
|
- **Standards**: Call `standard-search` before implementation when coding standards may apply.
|
|
19
|
-
- **Handoffs**: Call `handoff-list` to discover pending context transfers before starting a task.
|
|
19
|
+
- **Handoffs**: Call `handoff-list` to discover pending context transfers before starting a task. Close stale handoffs with `handoff-update` when no concrete next owner, unfinished task, or blocker remains.
|
|
20
20
|
|
|
21
21
|
## 3. WORKFLOW
|
|
22
22
|
- **Planning**: Create tasks for full lifecycle (Research → Strategy → Execution → Validation).
|
|
23
23
|
- **Transition Safety**: MUST move from `backlog/pending` → `in_progress` → `completed`. Skipping `in_progress` is forbidden.
|
|
24
|
+
- **Automatic Cleanup**: `task-update` to `completed` or `canceled` automatically releases active claims and expires pending handoffs linked to that task.
|
|
24
25
|
- **Claiming**: Use `task-claim` when taking ownership of a task, with `task_code` when working from human-visible queues.
|
|
25
|
-
- **Handoff**: Use `handoff-create` when pausing
|
|
26
|
+
- **Handoff**: Use `handoff-create` only when pausing or transferring unfinished work. Do not use pending handoffs for completion summaries; close consumed/stale handoffs with `handoff-update`.
|
|
26
27
|
- **Validation**: Only mark `completed` after passing tests or explicitly documenting why verification could not run.
|
|
27
28
|
- **Archiving**: Completion triggers auto-archive to `task_archive` memory with token reporting.
|
|
@@ -9,7 +9,7 @@ agent: Task Executor
|
|
|
9
9
|
## 1. SYNC & FILTER
|
|
10
10
|
1. **Identify**: Get repo name (git/context).
|
|
11
11
|
2. **List**: Call `task-list` ONCE for active tasks.
|
|
12
|
-
3. **Handoffs**: Call `handoff-list` with `status=pending` and inspect relevant transfer context before selecting work.
|
|
12
|
+
3. **Handoffs**: Call `handoff-list` with `status=pending` and inspect relevant transfer context before selecting work. Treat a pending handoff as active only when it has unfinished work, a blocker, a next owner, or a linked task. If it is obsolete or only describes completed work, close it with `handoff-update status=expired`.
|
|
13
13
|
4. **Audit**: Identify stale `in_progress` tasks (>30m no update). Hydrate via `task-detail` to check timestamps.
|
|
14
14
|
|
|
15
15
|
## Task Cache (MANDATORY)
|
|
@@ -38,9 +38,10 @@ agent: Task Executor
|
|
|
38
38
|
- **Browser Verification (MANDATORY)**: If the task involves UI/UX changes, use Playwright or Chrome DevTools to verify the feature is functional and consumable by the user. Check console errors, layout overflow, responsive behavior, and core interactions.
|
|
39
39
|
9. **Finalize**:
|
|
40
40
|
- **Evidence**: `task-update` status to `completed` with detailed 'comment' (inspected files, verified logic, test results).
|
|
41
|
+
- **Cleanup**: Completing/canceling a task automatically releases active claims and expires linked pending handoffs.
|
|
41
42
|
- **Memory**: Store insights as `code_fact`/`pattern` via `memory-store`.
|
|
42
43
|
- **Standards**: Store durable implementation rules via `standard-store`, not generic memory.
|
|
43
|
-
- **Handoff**: If work remains or ownership changes, create `handoff-create` with concise summary and structured context.
|
|
44
|
+
- **Handoff**: If work remains or ownership changes, create `handoff-create` with concise summary and structured context containing next steps/blockers/remaining work. Do not create handoffs for completed-work summaries.
|
|
44
45
|
- **Retrospective**: Invoke `learning-retrospective`.
|
|
45
46
|
- **Commit**: Atomic git commit. The commit message MUST include the task code (for example: `fix: ... [TASK-123]`).
|
|
46
47
|
- **GitHub Issue Traceability**: If task metadata contains a GitHub Issue reference, the commit message MUST also include the issue hashtag in `#123` format.
|
|
@@ -21,6 +21,7 @@ Use the tools in the same flow exposed by the dashboard: navigate with compact l
|
|
|
21
21
|
- **Hydrate**: Use `task-detail` after selecting a task from the list. Do not treat list rows as full task context.
|
|
22
22
|
- **Mutate**: Use `task-create`, `task-update`, and `task-delete` for lifecycle changes.
|
|
23
23
|
- **Transitions**: Move `backlog/pending/blocked` to `in_progress` before `completed`; include validation evidence and token estimate on completion.
|
|
24
|
+
- **Automatic cleanup**: Moving a task to `completed` or `canceled` automatically releases active claims and expires pending handoffs linked to that task.
|
|
24
25
|
|
|
25
26
|
## 3. Standards Flow
|
|
26
27
|
- **Search first**: Use `standard-search` to find coding standards by `query`, `language`, `stack`, `repo`, and `is_global`.
|
|
@@ -30,7 +31,9 @@ Use the tools in the same flow exposed by the dashboard: navigate with compact l
|
|
|
30
31
|
|
|
31
32
|
## 4. Handoff & Claim Flow
|
|
32
33
|
- **Queue**: Use `handoff-list` as the handoff navigation layer. Filter by `status`, `from_agent`, or `to_agent`.
|
|
33
|
-
- **Create handoff**: Use `handoff-create` when work needs context transfer. Include `from_agent`, optional `to_agent`, optional `task_code` or `task_id`, concise `summary`, and structured `context`.
|
|
34
|
+
- **Create handoff**: Use `handoff-create` only when unfinished work needs context transfer. Include `from_agent`, optional `to_agent`, optional `task_code` or `task_id`, concise `summary`, and structured `context` with `next_steps`, `blockers`, or `remaining_work`.
|
|
35
|
+
- **Close handoff**: Use `handoff-update` to move stale or consumed handoffs out of `pending`. Use `accepted` when consumed, `rejected` when declined, and `expired` when obsolete or only a completed-work summary.
|
|
36
|
+
- **No completion handoff**: Do not create pending handoffs for completed-work summaries, release notes, validation notes, or archive records. Put those on `task-update` comments or durable memory.
|
|
34
37
|
- **Claim task**: Use `task-claim` for task ownership. Do not encode claims in memory metadata.
|
|
35
38
|
- **Linkage**: Prefer `task_code` for human workflows and `task_id` when already hydrated.
|
|
36
39
|
|