@vheins/local-memory-mcp 0.19.8 → 0.19.10
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/mcp/server.js
CHANGED
|
@@ -74,8 +74,8 @@ import path from "path";
|
|
|
74
74
|
import { fileURLToPath } from "url";
|
|
75
75
|
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
76
76
|
var pkgVersion = "0.1.0";
|
|
77
|
-
if ("0.19.
|
|
78
|
-
pkgVersion = "0.19.
|
|
77
|
+
if ("0.19.10") {
|
|
78
|
+
pkgVersion = "0.19.10";
|
|
79
79
|
} else {
|
|
80
80
|
let searchDir = __dirname;
|
|
81
81
|
for (let i = 0; i < 5; i++) {
|
|
@@ -2341,15 +2341,13 @@ async function handleTaskCreate(args, storage) {
|
|
|
2341
2341
|
throw new Error(`Duplicate task_code: '${code}' already exists in repository '${repo}'`);
|
|
2342
2342
|
}
|
|
2343
2343
|
codesInRequest.add(code);
|
|
2344
|
-
|
|
2344
|
+
let normalizedStatus = taskData.status || "backlog";
|
|
2345
2345
|
if (normalizedStatus !== "backlog" && normalizedStatus !== "pending") {
|
|
2346
2346
|
throw new Error(`New tasks must be 'backlog' or 'pending'. Task '${code}' has status '${normalizedStatus}'.`);
|
|
2347
2347
|
}
|
|
2348
2348
|
if (normalizedStatus === "pending") {
|
|
2349
|
-
if (initialStats.todo + pendingInRequestCount
|
|
2350
|
-
|
|
2351
|
-
`Cannot create task '${code}' as 'pending'. Maximum of 10 pending tasks reached. Please use status 'backlog' for new tasks instead.`
|
|
2352
|
-
);
|
|
2349
|
+
if (initialStats.todo + pendingInRequestCount > 10) {
|
|
2350
|
+
normalizedStatus = "backlog";
|
|
2353
2351
|
}
|
|
2354
2352
|
}
|
|
2355
2353
|
const statusTimestamps2 = deriveTaskStatusTimestamps(normalizedStatus, now2);
|
|
@@ -2405,7 +2403,7 @@ async function handleTaskCreate(args, storage) {
|
|
|
2405
2403
|
phase,
|
|
2406
2404
|
title,
|
|
2407
2405
|
description,
|
|
2408
|
-
status,
|
|
2406
|
+
status: requestedStatus,
|
|
2409
2407
|
priority,
|
|
2410
2408
|
agent,
|
|
2411
2409
|
role,
|
|
@@ -2418,24 +2416,23 @@ async function handleTaskCreate(args, storage) {
|
|
|
2418
2416
|
if (!phase || !title || !description) {
|
|
2419
2417
|
throw new Error("Missing required fields for single task creation (phase, title, description)");
|
|
2420
2418
|
}
|
|
2419
|
+
let effectiveStatus = requestedStatus || "backlog";
|
|
2421
2420
|
const resolvedCode = task_code || generateNextCode(owner ?? "", repo, "task", storage);
|
|
2422
2421
|
if (storage.tasks.isTaskCodeDuplicate(owner, repo, resolvedCode)) {
|
|
2423
2422
|
throw new Error(`Duplicate task_code: '${resolvedCode}' already exists in repository '${repo}'`);
|
|
2424
2423
|
}
|
|
2425
|
-
if (
|
|
2424
|
+
if (requestedStatus !== "backlog" && requestedStatus !== "pending" && requestedStatus !== void 0) {
|
|
2426
2425
|
throw new Error("New tasks must be created with status 'backlog' or 'pending'.");
|
|
2427
2426
|
}
|
|
2428
|
-
if (
|
|
2427
|
+
if (requestedStatus === "pending") {
|
|
2429
2428
|
const stats = storage.taskStats.getTaskStats(owner, repo);
|
|
2430
|
-
if (stats.todo
|
|
2431
|
-
|
|
2432
|
-
`Cannot create task as 'pending'. Maximum of 10 pending tasks reached. Please use status 'backlog' for new tasks instead.`
|
|
2433
|
-
);
|
|
2429
|
+
if (stats.todo > 10) {
|
|
2430
|
+
effectiveStatus = "backlog";
|
|
2434
2431
|
}
|
|
2435
2432
|
}
|
|
2436
2433
|
const taskId = randomUUID4();
|
|
2437
2434
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2438
|
-
const statusTimestamps = deriveTaskStatusTimestamps(
|
|
2435
|
+
const statusTimestamps = deriveTaskStatusTimestamps(effectiveStatus, now);
|
|
2439
2436
|
const finalTags = [...singleTask.tags || []];
|
|
2440
2437
|
const phaseTag = `phase:${phase}`;
|
|
2441
2438
|
if (!finalTags.includes(phaseTag)) {
|
|
@@ -2449,7 +2446,7 @@ async function handleTaskCreate(args, storage) {
|
|
|
2449
2446
|
phase,
|
|
2450
2447
|
title,
|
|
2451
2448
|
description,
|
|
2452
|
-
status:
|
|
2449
|
+
status: effectiveStatus,
|
|
2453
2450
|
priority: priority || 3,
|
|
2454
2451
|
agent: agent || "unknown",
|
|
2455
2452
|
role: role || "unknown",
|
|
@@ -23,7 +23,19 @@ The `owner` field MUST be the GitHub username or organization that OWNS the repo
|
|
|
23
23
|
|
|
24
24
|
NEVER use the agent's name (e.g., `sentinel`, `test-executor`, `claude`) as the owner.
|
|
25
25
|
NEVER guess the owner from the working directory path.
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
If unsure, run `git remote -v` in the project directory — the remote URL (e.g., `git@github.com:vheins/sentinel-agent.git`) gives you both `owner` and `repo`.
|
|
28
|
+
|
|
29
|
+
**Two ways to provide owner/repo:**
|
|
30
|
+
|
|
31
|
+
1. **Explicit** (preferred — most reliable):
|
|
32
|
+
```json
|
|
33
|
+
{ "owner": "vheins", "repo": "sentinel-agent" }
|
|
34
|
+
```
|
|
35
|
+
2. **Shorthand** — use `owner/repo` format for `repo`; the server auto-extracts `owner`:
|
|
36
|
+
```json
|
|
37
|
+
{ "repo": "vheins/sentinel-agent" }
|
|
38
|
+
```
|
|
27
39
|
|
|
28
40
|
Violation: tasks created with a wrong owner will be invisible to other agents querying with the correct owner.
|
|
29
41
|
|
|
@@ -62,7 +74,7 @@ S2 | continue to task or respond | S1✅ | ready | —
|
|
|
62
74
|
- Create ONLY for unfinished work (concrete next owner/steps)
|
|
63
75
|
- NO handoff for completion summaries → use task-update comments
|
|
64
76
|
|
|
65
|
-
**Knowledge Graph**:
|
|
77
|
+
**Knowledge Graph**: create_entity | create_relation → delete_entity | delete_relation | delete_observation
|
|
66
78
|
|
|
67
79
|
- Structured entity-relationship storage for domain concepts
|
|
68
80
|
- Auto-extracted via NLP Archivist on every memory-store (people, places, orgs, concepts)
|
|
@@ -22,9 +22,9 @@ S5 | verify: confirm acknowledge called after code gen, no duplicate memories cr
|
|
|
22
22
|
|
|
23
23
|
## Knowledge Graph Tools
|
|
24
24
|
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
25
|
+
- `create_entity(name, type?, description?, owner?, repo?)`, `delete_entity(name, owner?, repo?)`
|
|
26
|
+
- `create_relation(from_entity, to_entity, relation_type, owner?, repo?)`, `delete_relation(from_entity, to_entity, relation_type, owner?, repo?)`
|
|
27
|
+
- `delete_observation(id, owner?, repo?)`
|
|
28
28
|
- Specialized for structured data workflows only (entity-relationship modeling). Not part of standard memory/task flow.
|
|
29
29
|
|
|
30
30
|
## Standards Flow
|