@t0ken.ai/memoryx-openclaw-plugin 2.2.22 → 2.2.24
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/index.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import * as fs from "fs";
|
|
|
26
26
|
import * as path from "path";
|
|
27
27
|
import * as os from "os";
|
|
28
28
|
// 插件版本号 - 由 prebuild 脚本自动从 package.json 同步
|
|
29
|
-
const PLUGIN_VERSION = "2.2.
|
|
29
|
+
const PLUGIN_VERSION = "2.2.24";
|
|
30
30
|
const DEFAULT_API_BASE = "https://t0ken.ai/api";
|
|
31
31
|
const PLUGIN_DIR = path.join(os.homedir(), ".openclaw", "extensions", "memoryx-openclaw-plugin");
|
|
32
32
|
let logStream = null;
|
|
@@ -636,6 +636,7 @@ export default {
|
|
|
636
636
|
// User message capture via message_received hook
|
|
637
637
|
// Event structure: { from: string, content: string, timestamp?: number }
|
|
638
638
|
api.on("message_received", async (event, ctx) => {
|
|
639
|
+
log(`message_received hook triggered`, { console: true });
|
|
639
640
|
const { content } = event;
|
|
640
641
|
if (content && plugin) {
|
|
641
642
|
await plugin.onMessage("user", content);
|
|
@@ -645,17 +646,16 @@ export default {
|
|
|
645
646
|
// AI responses are saved to conversation history (for rounds/maxTokens counting)
|
|
646
647
|
// But they do NOT trigger memory search - only user messages do that
|
|
647
648
|
api.on("llm_output", async (event, ctx) => {
|
|
648
|
-
|
|
649
|
+
api.logger.info("[MemoryX] *** LLM_OUTPUT HOOK TRIGGERED ***");
|
|
649
650
|
const { assistantTexts } = event;
|
|
650
|
-
|
|
651
|
-
log(`assistantTexts: ${JSON.stringify(assistantTexts)}`);
|
|
651
|
+
api.logger.info(`[MemoryX] assistantTexts: ${JSON.stringify(assistantTexts)}`);
|
|
652
652
|
if (assistantTexts && Array.isArray(assistantTexts) && plugin) {
|
|
653
653
|
// Join all assistant text segments
|
|
654
654
|
const fullContent = assistantTexts.join("\n");
|
|
655
|
-
|
|
655
|
+
api.logger.info(`[MemoryX] Full assistant content length: ${fullContent.length}`);
|
|
656
656
|
if (fullContent && fullContent.length >= 2) {
|
|
657
657
|
await plugin.onMessage("assistant", fullContent);
|
|
658
|
-
|
|
658
|
+
api.logger.info(`[MemoryX] Assistant message saved`);
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
});
|
package/package.json
CHANGED