@vedtechsolutions/engram-mcp 1.0.14 → 1.0.15

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.
Files changed (2) hide show
  1. package/dist/hook.js +7 -4
  2. package/package.json +1 -1
package/dist/hook.js CHANGED
@@ -3250,6 +3250,9 @@ function sanitizeCognitiveState(state) {
3250
3250
  if (cog.recent_discovery && cog.recent_discovery.startsWith("Pre-compaction")) {
3251
3251
  cog.recent_discovery = null;
3252
3252
  }
3253
+ if (state.active_task && state.active_task.startsWith("<")) {
3254
+ state.active_task = null;
3255
+ }
3253
3256
  if (!state.active_task || state.active_task === "unknown task") {
3254
3257
  const editedFiles = state.recent_actions.filter((a) => a.tool === "Edit" || a.tool === "Write").map((a) => a.target.split(/[/\\]/).pop() ?? a.target);
3255
3258
  const uniqueFiles = [...new Set(editedFiles)].slice(-5);
@@ -6298,14 +6301,14 @@ ${distillLines}`
6298
6301
  }
6299
6302
  }
6300
6303
  }
6301
- if (content.length >= 10) {
6304
+ if (content.length >= 10 && !content.startsWith("<")) {
6302
6305
  state.recent_prompts.push(truncate(content, 300));
6303
6306
  if (state.recent_prompts.length > 8) {
6304
6307
  state.recent_prompts = state.recent_prompts.slice(-8);
6305
6308
  }
6306
6309
  }
6307
6310
  try {
6308
- if (content.length >= 20) {
6311
+ if (content.length >= 20 && !content.startsWith("<")) {
6309
6312
  const approach = extractApproachFromPrompt(content);
6310
6313
  if (approach) {
6311
6314
  const currentLen = state.cognitive_state.current_approach?.length ?? 0;
@@ -6318,9 +6321,9 @@ ${distillLines}`
6318
6321
  );
6319
6322
  }
6320
6323
  }
6321
- if (content.length >= 30 && content.length <= 500) {
6324
+ if (content.length >= 30 && content.length <= 500 && !content.startsWith("<")) {
6322
6325
  const firstSentence = content.split(/[.!?\n]/)[0]?.trim();
6323
- if (firstSentence && firstSentence.length >= 15 && firstSentence.length <= 200) {
6326
+ if (firstSentence && firstSentence.length >= 15 && firstSentence.length <= 200 && !firstSentence.startsWith("<")) {
6324
6327
  state.active_task = firstSentence;
6325
6328
  }
6326
6329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedtechsolutions/engram-mcp",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Cognitive memory system for AI — persistent, cross-session learning via MCP",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",