memtap 4.0.2 → 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 +13 -7
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -2034,17 +2034,18 @@ ${memoryContext}
|
|
|
2034
2034
|
|
|
2035
2035
|
// Capture user's inbound message (store for pairing with assistant reply)
|
|
2036
2036
|
api.registerHook(
|
|
2037
|
-
'
|
|
2037
|
+
'message:received',
|
|
2038
2038
|
async (event: any) => {
|
|
2039
|
+
console.log('[memtap] message:received hook FIRED, ctx keys:', Object.keys(event?.context || {}).join(','));
|
|
2039
2040
|
const cfg = getConfig(api);
|
|
2040
2041
|
if (!cfg.captureEnabled && !cfg.autoCapture) return;
|
|
2041
2042
|
|
|
2042
|
-
const ctx = event
|
|
2043
|
-
const content = ctx.content ||
|
|
2043
|
+
const ctx = event?.context || {};
|
|
2044
|
+
const content = ctx.content || '';
|
|
2044
2045
|
if (!content || typeof content !== 'string') return;
|
|
2045
2046
|
if (content === 'NO_REPLY' || content === 'HEARTBEAT_OK') return;
|
|
2046
2047
|
|
|
2047
|
-
const conversationId = ctx.conversationId || ctx.from ||
|
|
2048
|
+
const conversationId = ctx.conversationId || ctx.from || 'default';
|
|
2048
2049
|
pendingUserMessages.set(conversationId, {
|
|
2049
2050
|
content,
|
|
2050
2051
|
channel: ctx.channelId || ctx.provider,
|
|
@@ -2062,13 +2063,18 @@ ${memoryContext}
|
|
|
2062
2063
|
|
|
2063
2064
|
// Capture assistant's outbound reply (pair with buffered user message, then POST to /capture)
|
|
2064
2065
|
api.registerHook(
|
|
2065
|
-
'
|
|
2066
|
+
'message:sent',
|
|
2066
2067
|
async (event: any) => {
|
|
2068
|
+
console.log('[memtap] message:sent hook FIRED, ctx keys:', Object.keys(event?.context || {}).join(','));
|
|
2067
2069
|
const cfg = getConfig(api);
|
|
2068
|
-
if (!cfg.captureEnabled && !cfg.autoCapture)
|
|
2070
|
+
if (!cfg.captureEnabled && !cfg.autoCapture) {
|
|
2071
|
+
console.log('[memtap] capture disabled, skipping');
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2069
2074
|
|
|
2070
|
-
const ctx = event
|
|
2075
|
+
const ctx = event?.context || {};
|
|
2071
2076
|
const assistantContent = ctx.content || '';
|
|
2077
|
+
console.log('[memtap] assistantContent length:', assistantContent.length, 'preview:', String(assistantContent).substring(0, 60));
|
|
2072
2078
|
if (!assistantContent || typeof assistantContent !== 'string') return;
|
|
2073
2079
|
if (assistantContent === 'NO_REPLY' || assistantContent === 'HEARTBEAT_OK') return;
|
|
2074
2080
|
if (assistantContent.length < (cfg.captureMinLength || 80)) return;
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "memtap",
|
|
3
3
|
"name": "MemTap",
|
|
4
4
|
"kind": "memory",
|
|
5
|
-
"version": "4.0.
|
|
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
|
+
"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",
|