From 00c6257dcf4ea77f34c2b33a06720c80ff273c2a Mon Sep 17 00:00:00 2001 From: Nicholai Date: Sun, 22 Feb 2026 03:15:42 -0700 Subject: [PATCH] 2026-02-22T10-15-42_auto_MEMORY.md --- .daemon/logs/signet-2026-02-22.log | 8 ++++++++ MEMORY.md | 1 + hooks/agent-memory/HOOK.md | 2 +- hooks/agent-memory/handler.js | 20 ++++++++++++-------- 4 files changed, 22 insertions(+), 9 deletions(-) create mode 120000 MEMORY.md diff --git a/.daemon/logs/signet-2026-02-22.log b/.daemon/logs/signet-2026-02-22.log index 688480659..146a3c260 100644 --- a/.daemon/logs/signet-2026-02-22.log +++ b/.daemon/logs/signet-2026-02-22.log @@ -3048,3 +3048,11 @@ {"timestamp":"2026-02-22T10:12:25.837Z","level":"info","category":"hooks","message":"Session start completed","data":{"memoryCount":26,"durationMs":1}} {"timestamp":"2026-02-22T10:12:25.838Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/memories.db-wal"}} {"timestamp":"2026-02-22T10:12:25.837Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/memories.db-wal"}} +{"timestamp":"2026-02-22T10:12:30.859Z","level":"info","category":"git","message":"Auto-committed","data":{"message":"2026-02-22T10-12-30_auto_memory/memories.db-wal","filesChanged":1}} +{"timestamp":"2026-02-22T10:12:30.840Z","level":"warn","category":"git","message":"Git add failed"} +{"timestamp":"2026-02-22T10:14:25.834Z","level":"warn","category":"git","message":"Push failed: To https://github.com/Signet-AI/signetai.git\n ! [rejected] HEAD -> main (non-fast-forward)\nerror: failed to push some refs to 'https://github.com/Signet-AI/signetai.git'\nhint: Updates were rejected because the tip of your current branch is behind\nhint: its remote counterpart. If you want to integrate the remote changes,\nhint: use 'git pull' before pushing again.\nhint: See the 'Note about fast-forwards' in 'git push --help' for details.\n"} +{"timestamp":"2026-02-22T10:14:25.834Z","level":"warn","category":"git","message":"Periodic sync failed: Push failed: To https://github.com/Signet-AI/signetai.git\n ! [rejected] HEAD -> main (non-fast-forward)\nerror: failed to push some refs to 'https://github.com/Signet-AI/signetai.git'\nhint: Updates were rejected because the tip of your current branch is behind\nhint: its remote counterpart. If you want to integrate the remote changes,\nhint: use 'git pull' before pushing again.\nhint: See the 'Note about fast-forwards' in 'git push --help' for details.\n"} +{"timestamp":"2026-02-22T10:14:30.575Z","level":"warn","category":"git","message":"Push failed: To https://github.com/Signet-AI/signetai.git\n ! [rejected] HEAD -> main (non-fast-forward)\nerror: failed to push some refs to 'https://github.com/Signet-AI/signetai.git'\nhint: Updates were rejected because the tip of your current branch is behind\nhint: its remote counterpart. If you want to integrate the remote changes,\nhint: use 'git pull' before pushing again.\nhint: See the 'Note about fast-forwards' in 'git push --help' for details.\n"} +{"timestamp":"2026-02-22T10:14:30.575Z","level":"warn","category":"git","message":"Periodic sync failed: Push failed: To https://github.com/Signet-AI/signetai.git\n ! [rejected] HEAD -> main (non-fast-forward)\nerror: failed to push some refs to 'https://github.com/Signet-AI/signetai.git'\nhint: Updates were rejected because the tip of your current branch is behind\nhint: its remote counterpart. If you want to integrate the remote changes,\nhint: use 'git pull' before pushing again.\nhint: See the 'Note about fast-forwards' in 'git push --help' for details.\n"} +{"timestamp":"2026-02-22T10:15:37.752Z","level":"info","category":"watcher","message":"File added","data":{"path":"/home/nicholai/.agents/MEMORY.md"}} +{"timestamp":"2026-02-22T10:15:37.752Z","level":"info","category":"watcher","message":"File added","data":{"path":"/home/nicholai/.agents/MEMORY.md"}} diff --git a/MEMORY.md b/MEMORY.md new file mode 120000 index 000000000..ce8cad324 --- /dev/null +++ b/MEMORY.md @@ -0,0 +1 @@ +/home/nicholai/.agents/memory/MEMORY.md \ No newline at end of file diff --git a/hooks/agent-memory/HOOK.md b/hooks/agent-memory/HOOK.md index 80d7f0f53..4d97281aa 100644 --- a/hooks/agent-memory/HOOK.md +++ b/hooks/agent-memory/HOOK.md @@ -6,7 +6,7 @@ metadata: "openclaw": { "emoji": "🔗", - "events": ["command:remember", "command:recall", "command:context"], + "events": ["command:remember", "command:recall", "command:context", "command:new", "command:reset"], }, } --- diff --git a/hooks/agent-memory/handler.js b/hooks/agent-memory/handler.js index 5247d6785..e9a45cd14 100644 --- a/hooks/agent-memory/handler.js +++ b/hooks/agent-memory/handler.js @@ -24,6 +24,18 @@ const handler = async (event) => { const args = event.context?.args || ""; switch (event.action) { + case "new": + case "reset": + case "context": + try { + const data = await fetchDaemon("/api/hooks/session-start", { + harness: "openclaw", + }); + if (data.inject) event.messages.push(data.inject); + } catch (e) { + if (event.action === "context") event.messages.push(`Error: ${e.message}`); + } + break; case "remember": if (!args.trim()) { event.messages.push("Usage: /remember "); return; } try { @@ -46,14 +58,6 @@ const handler = async (event) => { } } catch (e) { event.messages.push(`Error: ${e.message}`); } break; - case "context": - try { - const data = await fetchDaemon("/api/hooks/session-start", { - harness: "openclaw", - }); - event.messages.push(data.inject || "no context"); - } catch (e) { event.messages.push(`Error: ${e.message}`); } - break; } };