@plur-ai/mcp 0.8.3 → 0.9.1

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
@@ -4,7 +4,7 @@
4
4
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
5
5
  import { join } from "path";
6
6
  import { homedir } from "os";
7
- var VERSION = "0.8.3";
7
+ var VERSION = "0.9.1";
8
8
  var HELP = `plur-mcp v${VERSION} \u2014 persistent memory for AI agents
9
9
 
10
10
  Usage:
@@ -212,7 +212,7 @@ if (arg === "init") {
212
212
  process.exit(0);
213
213
  }
214
214
  if (arg === "serve" || arg === void 0) {
215
- const { runStdio } = await import("./server-YEWTBXTD.js");
215
+ const { runStdio } = await import("./server-N3YPGZYN.js");
216
216
  runStdio().catch((err) => {
217
217
  console.error("Failed to start PLUR MCP server:", err);
218
218
  process.exit(1);
@@ -827,6 +827,7 @@ 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();
830
831
  const status = plur.status();
831
832
  const store_stats = {
832
833
  engram_count: status.engram_count,
@@ -875,6 +876,8 @@ You have ${store_stats.engram_count} engrams but none matched this task. Call pl
875
876
  guide,
876
877
  // Ask LLM to check back — MCP can't push, but we can request a follow-up
877
878
  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,
878
881
  // On fresh install, suggest hook setup for reliable injection
879
882
  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
880
883
  };
@@ -1203,6 +1206,55 @@ Include at least one engram_suggestion if ANYTHING was learned. An empty suggest
1203
1206
  };
1204
1207
  }
1205
1208
  },
1209
+ {
1210
+ name: "plur_similarity_search",
1211
+ description: "Search engrams by cosine similarity, returning scores. Used for dedup classification \u2014 scores > 0.9 indicate duplicates, 0.7-0.9 related, < 0.7 new.",
1212
+ annotations: { title: "Similarity search", readOnlyHint: true, idempotentHint: true },
1213
+ inputSchema: {
1214
+ type: "object",
1215
+ properties: {
1216
+ query: { type: "string", description: "Search query to find similar engrams" },
1217
+ limit: { type: "number", description: "Max results to return (default 20)" },
1218
+ scope: { type: "string", description: "Filter by scope (also includes global)" }
1219
+ },
1220
+ required: ["query"]
1221
+ },
1222
+ handler: async (args, plur) => {
1223
+ const results = await plur.similaritySearch(args.query, {
1224
+ limit: args.limit,
1225
+ scope: args.scope
1226
+ });
1227
+ return {
1228
+ results: results.map((r) => ({
1229
+ engram_id: r.engram.id,
1230
+ statement: r.engram.statement,
1231
+ scope: r.engram.scope,
1232
+ cosine_score: Math.round(r.score * 1e3) / 1e3,
1233
+ type: r.engram.type,
1234
+ polarity: r.engram.polarity,
1235
+ tags: r.engram.tags
1236
+ })),
1237
+ count: results.length
1238
+ };
1239
+ }
1240
+ },
1241
+ {
1242
+ name: "plur_batch_decay",
1243
+ description: "Apply ACT-R decay to all engrams. Run weekly. Returns status transitions only.",
1244
+ annotations: { title: "Batch decay", destructiveHint: false, idempotentHint: false },
1245
+ inputSchema: {
1246
+ type: "object",
1247
+ properties: {
1248
+ context_scope: { type: "string", description: "Scope to skip during decay (engrams in active scope are not decayed)" }
1249
+ }
1250
+ },
1251
+ handler: async (args, plur) => {
1252
+ const result = plur.batchDecay({
1253
+ contextScope: args.context_scope
1254
+ });
1255
+ return result;
1256
+ }
1257
+ },
1206
1258
  {
1207
1259
  name: "plur_profile",
1208
1260
  description: "Generate or retrieve a cognitive profile \u2014 a narrative summary synthesized from stored engrams. Cached for 24h.",
@@ -1241,7 +1293,7 @@ Include at least one engram_suggestion if ANYTHING was learned. An empty suggest
1241
1293
 
1242
1294
  // src/server.ts
1243
1295
  import { z } from "zod";
1244
- var VERSION = "0.8.3";
1296
+ var VERSION = "0.9.1";
1245
1297
  var INSTRUCTIONS = `PLUR is your persistent memory. Corrections, preferences, and conventions persist across sessions as engrams.
1246
1298
 
1247
1299
  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,6 +1,6 @@
1
1
  {
2
2
  "name": "@plur-ai/mcp",
3
- "version": "0.8.3",
3
+ "version": "0.9.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "plur-mcp": "dist/index.js"
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@modelcontextprotocol/sdk": "^1.12.0",
14
14
  "zod": "^3.23.0",
15
- "@plur-ai/core": "0.8.3"
15
+ "@plur-ai/core": "0.9.1"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^25.5.0"