claude-mem-lite 2.33.4 → 2.33.5
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/hook.mjs
CHANGED
|
@@ -109,14 +109,14 @@ if (!event) process.exit(0);
|
|
|
109
109
|
|
|
110
110
|
// ─── Episode Flush ──────────────────────────────────────────────────────────
|
|
111
111
|
|
|
112
|
-
// hookEventName
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
//
|
|
112
|
+
// hookEventName serves two roles: it is written into the emitted receipt JSON
|
|
113
|
+
// AND it gates emission via RECEIPT_EVENTS. Callers MUST pass their triggering
|
|
114
|
+
// event name so both work — Stop falls outside the allowlist, so its receipt
|
|
115
|
+
// is skipped entirely (CC's Stop schema rejects hookSpecificOutput at the root,
|
|
116
|
+
// not just on event-name mismatch). The episode still flushes to DB and
|
|
117
|
+
// spawns llm-episode background enrichment; only the stdout receipt is gated.
|
|
118
|
+
// Regression chain: v2.33.1 introduced the receipt; v2.33.3 misdiagnosed the
|
|
119
|
+
// Stop rejection as event-name mismatch; v2.33.4 is the root-cause fix.
|
|
120
120
|
const RECEIPT_EVENTS = new Set(['PostToolUse', 'SessionStart', 'UserPromptSubmit']);
|
|
121
121
|
function flushEpisode(episode, hookEventName = 'PostToolUse') {
|
|
122
122
|
if (!episode || episode.entries.length === 0) return;
|