@vheins/local-memory-mcp 0.19.11 → 0.19.13
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.
|
@@ -3758,7 +3758,7 @@ var MEMORY_TOOL_DEFINITIONS = [
|
|
|
3758
3758
|
title: {
|
|
3759
3759
|
type: "string",
|
|
3760
3760
|
minLength: 3,
|
|
3761
|
-
maxLength:
|
|
3761
|
+
maxLength: 255,
|
|
3762
3762
|
description: "Short human-readable title for the memory. Do not embed bracketed metadata like agent/role/date prefixes here."
|
|
3763
3763
|
},
|
|
3764
3764
|
content: {
|
|
@@ -3778,6 +3778,7 @@ var MEMORY_TOOL_DEFINITIONS = [
|
|
|
3778
3778
|
},
|
|
3779
3779
|
role: {
|
|
3780
3780
|
type: "string",
|
|
3781
|
+
default: "unknown",
|
|
3781
3782
|
description: "Role of the agent creating this memory"
|
|
3782
3783
|
},
|
|
3783
3784
|
model: {
|
|
@@ -3805,7 +3806,11 @@ var MEMORY_TOOL_DEFINITIONS = [
|
|
|
3805
3806
|
type: "object",
|
|
3806
3807
|
description: "Structured metadata for non-title context such as source agent, claim fields, or timestamps"
|
|
3807
3808
|
},
|
|
3808
|
-
is_global: {
|
|
3809
|
+
is_global: {
|
|
3810
|
+
type: "boolean",
|
|
3811
|
+
default: false,
|
|
3812
|
+
description: "If true, this memory is shared across all repositories"
|
|
3813
|
+
},
|
|
3809
3814
|
ttlDays: {
|
|
3810
3815
|
type: "number",
|
|
3811
3816
|
minimum: 1,
|
|
@@ -3836,7 +3841,7 @@ var MEMORY_TOOL_DEFINITIONS = [
|
|
|
3836
3841
|
enum: ["code_fact", "decision", "mistake", "pattern", "task_archive"],
|
|
3837
3842
|
description: "Type of durable knowledge being stored"
|
|
3838
3843
|
},
|
|
3839
|
-
title: { type: "string", minLength: 3, maxLength:
|
|
3844
|
+
title: { type: "string", minLength: 3, maxLength: 255, description: "Short human-readable title" },
|
|
3840
3845
|
content: { type: "string", minLength: 10, description: "The memory content" },
|
|
3841
3846
|
importance: { type: "number", minimum: 1, maximum: 5, description: "Importance score (1-5)" },
|
|
3842
3847
|
agent: { type: "string", description: "Name of the agent creating this memory" },
|
|
@@ -6668,14 +6673,14 @@ var StructuredDataSchema = z2.unknown().refine(isJsonSerializable, { message: "V
|
|
|
6668
6673
|
import { z as z3 } from "zod";
|
|
6669
6674
|
var MemoryStoreSchema = z3.object({
|
|
6670
6675
|
code: z3.string().max(20).optional(),
|
|
6671
|
-
type: MemoryTypeSchema
|
|
6672
|
-
title: z3.string().min(3).max(255)
|
|
6673
|
-
content: z3.string().min(10)
|
|
6674
|
-
importance: z3.number().min(1).max(5)
|
|
6675
|
-
agent: z3.string().min(1)
|
|
6676
|
+
type: MemoryTypeSchema,
|
|
6677
|
+
title: z3.string().min(3).max(255),
|
|
6678
|
+
content: z3.string().min(10),
|
|
6679
|
+
importance: z3.number().min(1).max(5),
|
|
6680
|
+
agent: z3.string().min(1),
|
|
6676
6681
|
role: z3.string().optional().default("unknown"),
|
|
6677
|
-
model: z3.string().min(1)
|
|
6678
|
-
scope: MemoryScopeSchema
|
|
6682
|
+
model: z3.string().min(1),
|
|
6683
|
+
scope: MemoryScopeSchema,
|
|
6679
6684
|
ttlDays: z3.number().min(1).optional(),
|
|
6680
6685
|
supersedes: z3.string().optional(),
|
|
6681
6686
|
tags: z3.array(z3.string()).optional(),
|
|
@@ -6683,15 +6688,7 @@ var MemoryStoreSchema = z3.object({
|
|
|
6683
6688
|
is_global: z3.boolean().default(false),
|
|
6684
6689
|
structured: z3.boolean().default(false),
|
|
6685
6690
|
memories: z3.array(SingleMemorySchema).min(1).optional()
|
|
6686
|
-
})
|
|
6687
|
-
(data) => {
|
|
6688
|
-
if (data.memories) return true;
|
|
6689
|
-
return !!(data.type && data.title && data.content && data.importance && data.agent && data.model && data.scope);
|
|
6690
|
-
},
|
|
6691
|
-
{
|
|
6692
|
-
message: "Either 'memories' array or single memory fields (type, title, content, importance, agent, model, scope) must be provided"
|
|
6693
|
-
}
|
|
6694
|
-
);
|
|
6691
|
+
});
|
|
6695
6692
|
var MemoryUpdateSchema = z3.object({
|
|
6696
6693
|
id: z3.string().uuid().optional(),
|
|
6697
6694
|
code: z3.string().max(20).optional(),
|
package/dist/dashboard/server.js
CHANGED
package/dist/mcp/server.js
CHANGED
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
parseRepoInput,
|
|
62
62
|
rankCompletionValues,
|
|
63
63
|
toContextSlug
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-H7BLOZB6.js";
|
|
65
65
|
|
|
66
66
|
// src/mcp/server.ts
|
|
67
67
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
@@ -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.13") {
|
|
78
|
+
pkgVersion = "0.19.13";
|
|
79
79
|
} else {
|
|
80
80
|
let searchDir = __dirname;
|
|
81
81
|
for (let i = 0; i < 5; i++) {
|
|
@@ -3547,9 +3547,11 @@ function validateRootBoundPath(value, field, session) {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
function normalizeToolArgs(args, session) {
|
|
3549
3549
|
const anyArgs = args;
|
|
3550
|
+
const scopeVal = anyArgs.scope;
|
|
3550
3551
|
const nextArgs = {
|
|
3551
3552
|
...anyArgs,
|
|
3552
|
-
scope:
|
|
3553
|
+
// Handle string scope gracefully: "my-repo" → { repo: "my-repo" }
|
|
3554
|
+
scope: typeof scopeVal === "string" ? { repo: scopeVal } : scopeVal ? { ...scopeVal } : void 0
|
|
3553
3555
|
};
|
|
3554
3556
|
validateRootBoundPath(nextArgs.current_file_path, "current_file_path", session);
|
|
3555
3557
|
validateRootBoundPath(nextArgs.doc_path, "doc_path", session);
|
|
@@ -54,9 +54,41 @@ S2 | continue to task or respond | S1✅ | ready | —
|
|
|
54
54
|
- Durable only (arch, patterns, decisions, fixes)
|
|
55
55
|
- memory-acknowledge after code gen from memory
|
|
56
56
|
- Global scope = cross-repo only; prefer repo-specific
|
|
57
|
-
- decision-log = shortcut for storing decision-type memories (auto-sets type=decision, importance=4)
|
|
57
|
+
- decision-log = shortcut for storing decision-type memories (auto-sets type=decision, importance=4, agent=current, model=current, scope=current)
|
|
58
58
|
- session-summarize = archive session as task_archive memory (type=task_archive, importance=3)
|
|
59
59
|
|
|
60
|
+
### memory-store required fields
|
|
61
|
+
|
|
62
|
+
Every `memory-store` call MUST include these fields:
|
|
63
|
+
|
|
64
|
+
| Field | Type | Description |
|
|
65
|
+
| :----------- | :------------------------------------------------------------------ | :------------------------------------------------------------------ |
|
|
66
|
+
| `type` | enum: `code_fact`, `decision`, `mistake`, `pattern`, `task_archive` | Memory category |
|
|
67
|
+
| `title` | string (3-255 chars) | Concise title, no metadata |
|
|
68
|
+
| `content` | string (min 10 chars) | Body of the memory |
|
|
69
|
+
| `importance` | number (1-5) | 1=low, 5=critical |
|
|
70
|
+
| `agent` | string | Identity of the calling agent (e.g., `explore`, `sentinel`, `main`) |
|
|
71
|
+
| `model` | string | Model identifier (e.g., `opencode-go/deepseek-v4-flash`) |
|
|
72
|
+
| `scope` | object `{ owner, repo }` | `owner`=GitHub org/username, `repo`=repo name |
|
|
73
|
+
|
|
74
|
+
Example:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"type": "code_fact",
|
|
79
|
+
"title": "Auth uses JWT",
|
|
80
|
+
"content": "Authentication system uses JWT tokens with 1h expiry.",
|
|
81
|
+
"importance": 3,
|
|
82
|
+
"agent": "explore",
|
|
83
|
+
"model": "opencode-go/deepseek-v4-flash",
|
|
84
|
+
"scope": { "owner": "vheins", "repo": "sentinel-agent" }
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### memory-update optional fields
|
|
89
|
+
|
|
90
|
+
`memory-update` accepts the same fields as `memory-store` but all are optional (only provide the fields to change). Either `id` (UUID) or `code` (string) is required to identify the target memory.
|
|
91
|
+
|
|
60
92
|
**Tasks**: task-list → task-claim(auto → in_progress) → task-update(completed)
|
|
61
93
|
|
|
62
94
|
- Register via task-create before execution
|