@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.
- package/dist/hook.js +16 -7
- 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
|
|
6308
|
+
if (content.length >= 20) {
|
|
6309
6309
|
const approach = extractApproachFromPrompt(content);
|
|
6310
6310
|
if (approach) {
|
|
6311
|
-
state.cognitive_state
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
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 {
|