@vedtechsolutions/engram-mcp 1.0.12 → 1.0.13
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 +5 -4
- package/package.json +1 -1
package/dist/hook.js
CHANGED
|
@@ -3313,18 +3313,19 @@ function writeSessionHandoff(state, narrative) {
|
|
|
3313
3313
|
const queries = state.search_queries.slice(-5);
|
|
3314
3314
|
reasoningTrail.push(`Investigated: ${queries.join(" \u2192 ")}`);
|
|
3315
3315
|
}
|
|
3316
|
+
const brief = state.continuation_brief ?? buildContinuationBrief(state);
|
|
3316
3317
|
const handoff = {
|
|
3317
3318
|
ended_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3318
3319
|
project: state.active_project,
|
|
3319
3320
|
domain: state.active_domain,
|
|
3320
|
-
task: state.active_task,
|
|
3321
|
+
task: brief.task !== "unknown task" ? brief.task : state.active_task,
|
|
3321
3322
|
approach: (state.cognitive_state.current_approach ?? narrative?.approach ?? null)?.substring(0, SESSION_HANDOFF.MAX_APPROACH_LENGTH) ?? null,
|
|
3322
3323
|
hypothesis: state.cognitive_state.active_hypothesis?.substring(0, SESSION_HANDOFF.MAX_APPROACH_LENGTH) ?? null,
|
|
3323
3324
|
discoveries: state.cognitive_state.recent_discovery ? [state.cognitive_state.recent_discovery.substring(0, SESSION_HANDOFF.MAX_LESSON_LENGTH)] : [],
|
|
3324
|
-
decisions,
|
|
3325
|
-
unfinished: narrative?.unfinished && narrative.unfinished.length > 0 ? narrative.unfinished.join("; ").substring(0, SESSION_HANDOFF.MAX_UNFINISHED_LENGTH) : null,
|
|
3325
|
+
decisions: decisions.length > 0 ? decisions : brief.decisions,
|
|
3326
|
+
unfinished: narrative?.unfinished && narrative.unfinished.length > 0 ? narrative.unfinished.join("; ").substring(0, SESSION_HANDOFF.MAX_UNFINISHED_LENGTH) : brief.next_steps.length > 0 ? brief.next_steps.join("; ").substring(0, SESSION_HANDOFF.MAX_UNFINISHED_LENGTH) : null,
|
|
3326
3327
|
blockers: state.recent_errors.slice(0, SESSION_HANDOFF.MAX_BLOCKERS).map((e) => e.substring(0, 200)),
|
|
3327
|
-
files: state.session_files.slice(-SESSION_HANDOFF.MAX_FILES).map((f) => f.split(/[/\\]/).pop() ?? f),
|
|
3328
|
+
files: brief.key_files.length > 0 ? brief.key_files.slice(-SESSION_HANDOFF.MAX_FILES) : state.session_files.slice(-SESSION_HANDOFF.MAX_FILES).map((f) => f.split(/[/\\]/).pop() ?? f),
|
|
3328
3329
|
lessons,
|
|
3329
3330
|
phase: state.cognitive_state.session_phase ?? null,
|
|
3330
3331
|
turns: state.total_turns,
|