@plur-ai/mcp 0.9.1 → 0.9.3
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/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, statSync } from "fs";
|
|
5
5
|
import { join } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
6
7
|
import { homedir } from "os";
|
|
7
|
-
var VERSION = "0.9.
|
|
8
|
+
var VERSION = "0.9.3";
|
|
8
9
|
var HELP = `plur-mcp v${VERSION} \u2014 persistent memory for AI agents
|
|
9
10
|
|
|
10
11
|
Usage:
|
|
@@ -178,6 +179,27 @@ async function runInit() {
|
|
|
178
179
|
results.push(`Hooks: ${hooksStatus}`);
|
|
179
180
|
const claudeMdStatus = installClaudeMd();
|
|
180
181
|
results.push(`CLAUDE.md: ${claudeMdStatus}`);
|
|
182
|
+
const { Plur } = await import("@plur-ai/core");
|
|
183
|
+
const plur = new Plur({ path: paths.root });
|
|
184
|
+
const bundledPacksDir = join(fileURLToPath(import.meta.url), "..", "..", "packs");
|
|
185
|
+
let packsStatus = "no bundled packs found";
|
|
186
|
+
if (existsSync(bundledPacksDir)) {
|
|
187
|
+
const installed = plur.listPacks();
|
|
188
|
+
const installedNames = new Set(installed.map((p) => p.name));
|
|
189
|
+
const entries = readdirSync(bundledPacksDir).filter((e) => statSync(join(bundledPacksDir, e)).isDirectory());
|
|
190
|
+
const newPacks = [];
|
|
191
|
+
for (const entry of entries) {
|
|
192
|
+
if (!installedNames.has(entry)) {
|
|
193
|
+
try {
|
|
194
|
+
plur.installPack(join(bundledPacksDir, entry));
|
|
195
|
+
newPacks.push(entry);
|
|
196
|
+
} catch {
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
packsStatus = newPacks.length > 0 ? `installed ${newPacks.join(", ")}` : `${entries.length} pack(s) already installed`;
|
|
201
|
+
}
|
|
202
|
+
results.push(`Packs: ${packsStatus}`);
|
|
181
203
|
process.stdout.write(`PLUR initialized.
|
|
182
204
|
|
|
183
205
|
Architecture: PLUR is a global tool \u2014 one MCP server, one engram
|
|
@@ -212,7 +234,7 @@ if (arg === "init") {
|
|
|
212
234
|
process.exit(0);
|
|
213
235
|
}
|
|
214
236
|
if (arg === "serve" || arg === void 0) {
|
|
215
|
-
const { runStdio } = await import("./server-
|
|
237
|
+
const { runStdio } = await import("./server-SKNKYZ7O.js");
|
|
216
238
|
runStdio().catch((err) => {
|
|
217
239
|
console.error("Failed to start PLUR MCP server:", err);
|
|
218
240
|
process.exit(1);
|
|
@@ -827,7 +827,6 @@ function getToolDefinitions() {
|
|
|
827
827
|
const session_id = crypto.randomUUID();
|
|
828
828
|
const task = args.task;
|
|
829
829
|
const tags = args.tags;
|
|
830
|
-
const discovered = plur.autoDiscoverStores();
|
|
831
830
|
const status = plur.status();
|
|
832
831
|
const store_stats = {
|
|
833
832
|
engram_count: status.engram_count,
|
|
@@ -876,8 +875,6 @@ You have ${store_stats.engram_count} engrams but none matched this task. Call pl
|
|
|
876
875
|
guide,
|
|
877
876
|
// Ask LLM to check back — MCP can't push, but we can request a follow-up
|
|
878
877
|
follow_up: store_stats.engram_count === 0 ? "This is a fresh store with 0 engrams. After your first exchange with the user, review what you learned and call plur_learn for any corrections, preferences, or patterns. Build the memory from this session." : void 0,
|
|
879
|
-
// Report auto-discovered project stores
|
|
880
|
-
discovered_stores: discovered.length > 0 ? discovered : void 0,
|
|
881
878
|
// On fresh install, suggest hook setup for reliable injection
|
|
882
879
|
setup_hint: isFreshInstall ? "IMPORTANT: For reliable memory injection, ask the user to run: npx @plur-ai/cli init \u2014 this installs Claude Code hooks that automatically inject engrams at conversation start and after context compaction. Without hooks, memory injection depends on you remembering to call plur_session_start." : void 0
|
|
883
880
|
};
|
|
@@ -1293,7 +1290,7 @@ Include at least one engram_suggestion if ANYTHING was learned. An empty suggest
|
|
|
1293
1290
|
|
|
1294
1291
|
// src/server.ts
|
|
1295
1292
|
import { z } from "zod";
|
|
1296
|
-
var VERSION = "0.9.
|
|
1293
|
+
var VERSION = "0.9.3";
|
|
1297
1294
|
var INSTRUCTIONS = `PLUR is your persistent memory. Corrections, preferences, and conventions persist across sessions as engrams.
|
|
1298
1295
|
|
|
1299
1296
|
PLUR is a GLOBAL tool \u2014 one MCP server, one engram store (~/.plur/), available in every project. Multi-project scoping uses domain/scope fields on engrams, not separate installations.
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plur-ai/mcp",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"plur-mcp": "dist/index.js"
|
|
7
7
|
},
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"packs"
|
|
11
12
|
],
|
|
12
13
|
"dependencies": {
|
|
13
14
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
14
15
|
"zod": "^3.23.0",
|
|
15
|
-
"@plur-ai/core": "0.9.
|
|
16
|
+
"@plur-ai/core": "0.9.3"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"@types/node": "^25.5.0"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Effective Memory
|
|
3
|
+
description: Make your AI agent remember what matters. Session boundaries, learning triggers, feedback loops, and anti-patterns — the habits that turn raw memory into compounding intelligence.
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
creator: plur-ai
|
|
6
|
+
license: MIT
|
|
7
|
+
tags: [memory, learning, best-practices, session-management, feedback]
|
|
8
|
+
x-datacore:
|
|
9
|
+
id: effective-memory
|
|
10
|
+
injection_policy: on_match
|
|
11
|
+
match_terms: [memory, learn, remember, session, feedback, engram, forget, correction, preference]
|
|
12
|
+
domain: plur.best-practices
|
|
13
|
+
engram_count: 8
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Effective Memory
|
|
17
|
+
|
|
18
|
+
Your agent has memory. These habits make it actually useful.
|
|
19
|
+
|
|
20
|
+
Without them, memory is a growing pile of assertions nobody retrieves. With them, memory compounds — each session builds on the last, corrections stick, and the agent gets measurably better over time.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @plur-ai/cli packs install effective-memory
|
|
26
|
+
```
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
engrams:
|
|
2
|
+
- id: ENG-PACK-EM-001
|
|
3
|
+
version: 1
|
|
4
|
+
status: active
|
|
5
|
+
type: procedural
|
|
6
|
+
scope: global
|
|
7
|
+
visibility: public
|
|
8
|
+
statement: "Every session must bookend with plur_session_start (beginning) and plur_session_end (end). Session start injects relevant engrams into context. Session end captures what was learned, what failed, and what to continue. Without bookends, the agent starts every conversation from zero."
|
|
9
|
+
rationale: "Session boundaries are the minimum viable memory habit. Everything else builds on this."
|
|
10
|
+
domain: plur.session
|
|
11
|
+
tags: [session, lifecycle, start, end]
|
|
12
|
+
activation: { retrieval_strength: 0.95, storage_strength: 0.95, frequency: 0, last_accessed: "2026-04-22" }
|
|
13
|
+
dual_coding:
|
|
14
|
+
example: "User says 'fix the auth bug'. Agent calls plur_session_start('fixing auth bug') — gets injected with 'OAuth tokens expire after 1h, not 24h' from last week's session. Fixes it in 5 minutes instead of rediscovering the issue."
|
|
15
|
+
analogy: "Like reading your notes before a meeting vs walking in cold every time."
|
|
16
|
+
pack: effective-memory
|
|
17
|
+
|
|
18
|
+
- id: ENG-PACK-EM-002
|
|
19
|
+
version: 1
|
|
20
|
+
status: active
|
|
21
|
+
type: behavioral
|
|
22
|
+
scope: global
|
|
23
|
+
visibility: public
|
|
24
|
+
statement: "When the user corrects you, call plur_learn immediately — before continuing the task. Corrections are the highest-value engrams because they prevent repeated mistakes. Don't wait until end of session. Don't batch them. Learn the correction the instant it happens."
|
|
25
|
+
rationale: "Corrections decay from working memory fast. Capturing them immediately is the difference between learning once and being corrected forever."
|
|
26
|
+
domain: plur.learning
|
|
27
|
+
tags: [correction, learn, immediate]
|
|
28
|
+
activation: { retrieval_strength: 0.95, storage_strength: 0.95, frequency: 0, last_accessed: "2026-04-22" }
|
|
29
|
+
dual_coding:
|
|
30
|
+
example: "User: 'No, use snake_case not camelCase in this repo.' Agent immediately calls plur_learn('This repo uses snake_case, not camelCase') before proceeding with the fix."
|
|
31
|
+
pack: effective-memory
|
|
32
|
+
|
|
33
|
+
- id: ENG-PACK-EM-003
|
|
34
|
+
version: 1
|
|
35
|
+
status: active
|
|
36
|
+
type: behavioral
|
|
37
|
+
scope: global
|
|
38
|
+
visibility: public
|
|
39
|
+
statement: "Call plur_feedback on injected engrams — positive when helpful, negative when wrong or stale. Feedback trains the injection algorithm. Without it, irrelevant engrams keep appearing and relevant ones get buried. This is how memory gets smarter, not just bigger."
|
|
40
|
+
rationale: "Feedback is the training signal for retrieval quality. Memory without feedback is a search engine that never improves its ranking."
|
|
41
|
+
domain: plur.feedback
|
|
42
|
+
tags: [feedback, relevance, training]
|
|
43
|
+
activation: { retrieval_strength: 0.9, storage_strength: 0.9, frequency: 0, last_accessed: "2026-04-22" }
|
|
44
|
+
dual_coding:
|
|
45
|
+
example: "Session starts, 8 engrams injected. 2 were directly useful for the task — call plur_feedback with positive. 1 was about a project you finished last month — call plur_feedback with negative. The rest were fine but not remarkable — skip or neutral."
|
|
46
|
+
pack: effective-memory
|
|
47
|
+
|
|
48
|
+
- id: ENG-PACK-EM-004
|
|
49
|
+
version: 1
|
|
50
|
+
status: active
|
|
51
|
+
type: behavioral
|
|
52
|
+
scope: global
|
|
53
|
+
visibility: public
|
|
54
|
+
statement: "Learn preferences, not just corrections. When the user says 'always X', 'never Y', 'I prefer Z' — that is a preference engram. Preferences shape how you work, not just what you know. They are high-value because they affect every future interaction."
|
|
55
|
+
rationale: "Preferences are the difference between a tool and an assistant that knows you."
|
|
56
|
+
domain: plur.learning
|
|
57
|
+
tags: [preference, learn, personalization]
|
|
58
|
+
activation: { retrieval_strength: 0.9, storage_strength: 0.9, frequency: 0, last_accessed: "2026-04-22" }
|
|
59
|
+
dual_coding:
|
|
60
|
+
example: "User: 'I like terse responses, skip the summaries.' Call plur_learn with type behavioral. Next session, this preference is injected and you're already concise."
|
|
61
|
+
pack: effective-memory
|
|
62
|
+
|
|
63
|
+
- id: ENG-PACK-EM-005
|
|
64
|
+
version: 1
|
|
65
|
+
status: active
|
|
66
|
+
type: behavioral
|
|
67
|
+
scope: global
|
|
68
|
+
visibility: public
|
|
69
|
+
statement: "Do NOT learn trivial facts, session-specific state, or things derivable from the codebase. Bad engrams: 'the user said hello', 'we are working on file X', 'function foo is on line 42'. Good engrams: 'this API returns snake_case despite the docs saying camelCase', 'user prefers DCA over single entries', 'deploy requires VPN connection first'."
|
|
70
|
+
rationale: "Memory quality matters more than quantity. Noisy engrams dilute injection relevance and waste context window."
|
|
71
|
+
domain: plur.learning
|
|
72
|
+
tags: [quality, anti-pattern, noise]
|
|
73
|
+
activation: { retrieval_strength: 0.9, storage_strength: 0.9, frequency: 0, last_accessed: "2026-04-22" }
|
|
74
|
+
pack: effective-memory
|
|
75
|
+
|
|
76
|
+
- id: ENG-PACK-EM-006
|
|
77
|
+
version: 1
|
|
78
|
+
status: active
|
|
79
|
+
type: procedural
|
|
80
|
+
scope: global
|
|
81
|
+
visibility: public
|
|
82
|
+
statement: "Before answering factual questions about past work, decisions, or conventions — call plur_recall_hybrid first. The answer may already be in memory. This prevents contradicting past decisions, rediscovering known patterns, and giving generic answers when specific learned context exists."
|
|
83
|
+
rationale: "Recall before reasoning. The most common memory failure is not forgetting — it's not checking."
|
|
84
|
+
domain: plur.recall
|
|
85
|
+
tags: [recall, search, before-answering]
|
|
86
|
+
activation: { retrieval_strength: 0.9, storage_strength: 0.9, frequency: 0, last_accessed: "2026-04-22" }
|
|
87
|
+
dual_coding:
|
|
88
|
+
example: "User asks 'how do we deploy to production?' — call plur_recall_hybrid('deployment production') before answering. You might find 'deploy requires git push to nightshift server, not GitHub' from a previous session."
|
|
89
|
+
analogy: "Like checking your notes before answering a question in a meeting, instead of guessing."
|
|
90
|
+
pack: effective-memory
|
|
91
|
+
|
|
92
|
+
- id: ENG-PACK-EM-007
|
|
93
|
+
version: 1
|
|
94
|
+
status: active
|
|
95
|
+
type: architectural
|
|
96
|
+
scope: global
|
|
97
|
+
visibility: public
|
|
98
|
+
statement: "Long-horizon agents — agents that run repeatedly on the same domain across days or weeks — MUST call plur_timeline at startup to read past episodes. Without timeline context, the agent rediscovers the same blockers, repeats failed approaches, and loses coherence across runs. This is 'coherence failure' — distinct from intelligence failure and the dominant failure mode for long-running agents."
|
|
99
|
+
rationale: "A doctor with amnesia is competent each visit but never builds on the previous one. Timeline is the patient chart."
|
|
100
|
+
domain: plur.agents
|
|
101
|
+
tags: [timeline, long-horizon, coherence, episodic]
|
|
102
|
+
activation: { retrieval_strength: 0.9, storage_strength: 0.9, frequency: 0, last_accessed: "2026-04-22" }
|
|
103
|
+
dual_coding:
|
|
104
|
+
example: "Project manager agent runs Monday, escalates blocker to teammate, no response. Without timeline: Tuesday it escalates again. With timeline: Tuesday it sees Monday's episode, knows escalation failed, tries different approach."
|
|
105
|
+
analogy: "Like having a doctor with anterograde amnesia treating the same patient daily — competent each visit but never builds on the previous one."
|
|
106
|
+
pack: effective-memory
|
|
107
|
+
|
|
108
|
+
- id: ENG-PACK-EM-008
|
|
109
|
+
version: 1
|
|
110
|
+
status: active
|
|
111
|
+
type: behavioral
|
|
112
|
+
scope: global
|
|
113
|
+
visibility: public
|
|
114
|
+
statement: "When memory and current reality conflict, trust what you observe now — then update the stale engram. Call plur_learn with the correction and plur_feedback with negative on the old engram. Memory is a starting point for reasoning, not a substitute for verification."
|
|
115
|
+
rationale: "Stale memory acted on without verification causes worse outcomes than no memory at all."
|
|
116
|
+
domain: plur.maintenance
|
|
117
|
+
tags: [staleness, verification, update, conflict]
|
|
118
|
+
activation: { retrieval_strength: 0.9, storage_strength: 0.9, frequency: 0, last_accessed: "2026-04-22" }
|
|
119
|
+
dual_coding:
|
|
120
|
+
example: "Memory says 'deploy to server at 10.0.0.5'. You SSH and it times out. Don't keep trying — the IP changed. Verify, update the engram, then proceed."
|
|
121
|
+
pack: effective-memory
|