memtap 4.0.3 → 4.0.4

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/index.ts CHANGED
@@ -2034,18 +2034,18 @@ ${memoryContext}
2034
2034
 
2035
2035
  // Capture user's inbound message (store for pairing with assistant reply)
2036
2036
  api.registerHook(
2037
- 'message_received',
2037
+ 'message:received',
2038
2038
  async (event: any) => {
2039
- console.log('[memtap] message_received hook FIRED, event keys:', Object.keys(event || {}).join(','));
2039
+ console.log('[memtap] message:received hook FIRED, ctx keys:', Object.keys(event?.context || {}).join(','));
2040
2040
  const cfg = getConfig(api);
2041
2041
  if (!cfg.captureEnabled && !cfg.autoCapture) return;
2042
2042
 
2043
- const ctx = event || event?.context || {};
2044
- const content = ctx.content || ctx.bodyForAgent || ctx.body || '';
2043
+ const ctx = event?.context || {};
2044
+ const content = ctx.content || '';
2045
2045
  if (!content || typeof content !== 'string') return;
2046
2046
  if (content === 'NO_REPLY' || content === 'HEARTBEAT_OK') return;
2047
2047
 
2048
- const conversationId = ctx.conversationId || ctx.from || ctx.to || 'default';
2048
+ const conversationId = ctx.conversationId || ctx.from || 'default';
2049
2049
  pendingUserMessages.set(conversationId, {
2050
2050
  content,
2051
2051
  channel: ctx.channelId || ctx.provider,
@@ -2063,16 +2063,16 @@ ${memoryContext}
2063
2063
 
2064
2064
  // Capture assistant's outbound reply (pair with buffered user message, then POST to /capture)
2065
2065
  api.registerHook(
2066
- 'message_sent',
2066
+ 'message:sent',
2067
2067
  async (event: any) => {
2068
- console.log('[memtap] message_sent hook FIRED, event keys:', Object.keys(event || {}).join(','));
2068
+ console.log('[memtap] message:sent hook FIRED, ctx keys:', Object.keys(event?.context || {}).join(','));
2069
2069
  const cfg = getConfig(api);
2070
2070
  if (!cfg.captureEnabled && !cfg.autoCapture) {
2071
2071
  console.log('[memtap] capture disabled, skipping');
2072
2072
  return;
2073
2073
  }
2074
2074
 
2075
- const ctx = event || event?.context || {};
2075
+ const ctx = event?.context || {};
2076
2076
  const assistantContent = ctx.content || '';
2077
2077
  console.log('[memtap] assistantContent length:', assistantContent.length, 'preview:', String(assistantContent).substring(0, 60));
2078
2078
  if (!assistantContent || typeof assistantContent !== 'string') return;
@@ -2,7 +2,7 @@
2
2
  "id": "memtap",
3
3
  "name": "MemTap",
4
4
  "kind": "memory",
5
- "version": "4.0.3",
5
+ "version": "4.0.4",
6
6
  "description": "Graph-based long-term memory for OpenClaw agents \u2014 semantic recall, GraphRAG, entity management, decision tracking, neural auto-capture, anomaly detection, consolidation, profiles, and adaptive decay.",
7
7
  "defaultConfig": {
8
8
  "serverUrl": "https://api.memtap.ai",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memtap",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "MemTap — Graph-based long-term memory plugin for OpenClaw agents. Knowledge graph with semantic recall, GraphRAG, entity management, decision tracking, and auto-capture.",
5
5
  "keywords": [
6
6
  "openclaw",