@t0ken.ai/memoryx-openclaw-plugin 2.2.13 → 2.2.15
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.d.ts.map +1 -1
- package/dist/index.js +14 -11
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA+CH,UAAU,YAAY;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,YAAY;IAClB,QAAQ,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,eAAe,EAAE,KAAK,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AA4CD,cAAM,aAAa;IACf,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,WAAW,CAAkB;gBAEzB,YAAY,CAAC,EAAE,YAAY;IAIjC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAad,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA6B1D,MAAM,CA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
|
26
26
|
import * as path from "path";
|
|
27
27
|
import * as os from "os";
|
|
28
|
-
//
|
|
28
|
+
// Lazy-load version to avoid blocking I/O at module load time
|
|
29
|
+
// OpenClaw loads plugins synchronously, so top-level sync I/O will block status command
|
|
29
30
|
const PACKAGE_JSON_PATH = path.join(__dirname, "..", "package.json");
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
|
|
31
|
+
function getVersion() {
|
|
32
|
+
try {
|
|
33
|
+
const packageJson = JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, "utf-8"));
|
|
34
|
+
return packageJson.version || "unknown";
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return "unknown";
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
40
|
const DEFAULT_API_BASE = "https://t0ken.ai/api";
|
|
39
41
|
const PLUGIN_DIR = path.join(os.homedir(), ".openclaw", "extensions", "memoryx-openclaw-plugin");
|
|
@@ -271,7 +273,7 @@ let plugin;
|
|
|
271
273
|
export default {
|
|
272
274
|
id: "memoryx-openclaw-plugin",
|
|
273
275
|
name: "MemoryX Realtime Plugin",
|
|
274
|
-
get version() { return
|
|
276
|
+
get version() { return getVersion(); },
|
|
275
277
|
description: "Real-time memory capture and recall for OpenClaw (powered by @t0ken.ai/memoryx-sdk)",
|
|
276
278
|
register(api, pluginConfig) {
|
|
277
279
|
api.logger.info("[MemoryX] Plugin registering...");
|
|
@@ -622,7 +624,8 @@ export default {
|
|
|
622
624
|
}
|
|
623
625
|
});
|
|
624
626
|
// Assistant response capture via llm_output hook
|
|
625
|
-
//
|
|
627
|
+
// AI responses are saved to conversation history (for rounds/maxTokens counting)
|
|
628
|
+
// But they do NOT trigger memory search - only user messages do that
|
|
626
629
|
api.on("llm_output", async (event, ctx) => {
|
|
627
630
|
const { assistantTexts } = event;
|
|
628
631
|
if (assistantTexts && Array.isArray(assistantTexts) && plugin) {
|
|
@@ -678,7 +681,7 @@ export default {
|
|
|
678
681
|
await plugin.endConversation();
|
|
679
682
|
}
|
|
680
683
|
});
|
|
681
|
-
api.logger.info(`[MemoryX] ✅ Plugin v${
|
|
684
|
+
api.logger.info(`[MemoryX] ✅ Plugin v${getVersion()} ready! Your conversations will be remembered automatically.`);
|
|
682
685
|
// Async check and show portal link after SDK initializes
|
|
683
686
|
setImmediate(async () => {
|
|
684
687
|
try {
|
package/package.json
CHANGED