@vedtechsolutions/engram-mcp 1.0.18 → 1.0.19

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 +15 -4
  2. package/package.json +1 -1
package/dist/hook.js CHANGED
@@ -3244,11 +3244,22 @@ function sanitizeCognitiveState(state) {
3244
3244
  if (cog.current_approach && cog.current_approach.length < 5) {
3245
3245
  cog.current_approach = null;
3246
3246
  }
3247
- if (cog.current_approach && cog.current_approach.startsWith("Pre-compaction")) {
3248
- cog.current_approach = null;
3247
+ const templatePrefixes = ["Pre-compaction", "chronologically analyze", "This session is being continued"];
3248
+ if (cog.current_approach) {
3249
+ for (const prefix of templatePrefixes) {
3250
+ if (cog.current_approach.startsWith(prefix)) {
3251
+ cog.current_approach = null;
3252
+ break;
3253
+ }
3254
+ }
3249
3255
  }
3250
- if (cog.recent_discovery && cog.recent_discovery.startsWith("Pre-compaction")) {
3251
- cog.recent_discovery = null;
3256
+ if (cog.recent_discovery) {
3257
+ for (const prefix of templatePrefixes) {
3258
+ if (cog.recent_discovery.startsWith(prefix)) {
3259
+ cog.recent_discovery = null;
3260
+ break;
3261
+ }
3262
+ }
3252
3263
  }
3253
3264
  if (state.active_task && state.active_task.startsWith("<")) {
3254
3265
  state.active_task = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedtechsolutions/engram-mcp",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Cognitive memory system for AI — persistent, cross-session learning via MCP",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",