@vedtechsolutions/engram-mcp 1.0.13 → 1.0.14

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 +16 -7
  2. package/package.json +1 -1
package/dist/hook.js CHANGED
@@ -6305,15 +6305,24 @@ ${distillLines}`
6305
6305
  }
6306
6306
  }
6307
6307
  try {
6308
- if (content.length >= 20 && !state.cognitive_state.current_approach) {
6308
+ if (content.length >= 20) {
6309
6309
  const approach = extractApproachFromPrompt(content);
6310
6310
  if (approach) {
6311
- state.cognitive_state = updateCognitiveState(
6312
- state.cognitive_state,
6313
- { type: "agent_prompt", prompt: content },
6314
- state.recent_tool_names,
6315
- state.recent_errors
6316
- );
6311
+ const currentLen = state.cognitive_state.current_approach?.length ?? 0;
6312
+ if (!state.cognitive_state.current_approach || approach.length > currentLen * 1.5) {
6313
+ state.cognitive_state = updateCognitiveState(
6314
+ state.cognitive_state,
6315
+ { type: "agent_prompt", prompt: content },
6316
+ state.recent_tool_names,
6317
+ state.recent_errors
6318
+ );
6319
+ }
6320
+ }
6321
+ if (content.length >= 30 && content.length <= 500) {
6322
+ const firstSentence = content.split(/[.!?\n]/)[0]?.trim();
6323
+ if (firstSentence && firstSentence.length >= 15 && firstSentence.length <= 200) {
6324
+ state.active_task = firstSentence;
6325
+ }
6317
6326
  }
6318
6327
  }
6319
6328
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedtechsolutions/engram-mcp",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Cognitive memory system for AI — persistent, cross-session learning via MCP",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",