@t0ken.ai/memoryx-openclaw-plugin 2.2.75 → 2.2.76
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/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/sidecar.d.ts.map +1 -1
- package/dist/sidecar.js +15 -1
- package/package.json +1 -2
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PLUGIN_VERSION = "2.2.
|
|
1
|
+
export declare const PLUGIN_VERSION = "2.2.76";
|
|
2
2
|
export declare const DEFAULT_API_BASE = "https://memoryx.cloud/api";
|
|
3
3
|
export declare const PLUGIN_DIR: string;
|
|
4
4
|
/** 真实上游 baseUrl 缓存文件:重启后若配置已被改成 localhost,从此文件恢复各厂商真实地址。 */
|
package/dist/constants.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
import * as os from "os";
|
|
6
6
|
// Plugin version - synced from package.json by prebuild script
|
|
7
|
-
export const PLUGIN_VERSION = "2.2.
|
|
7
|
+
export const PLUGIN_VERSION = "2.2.76";
|
|
8
8
|
export const DEFAULT_API_BASE = "https://memoryx.cloud/api";
|
|
9
9
|
export const PLUGIN_DIR = path.join(os.homedir(), ".openclaw", "extensions", "memoryx-openclaw-plugin");
|
|
10
10
|
/** 真实上游 baseUrl 缓存文件:重启后若配置已被改成 localhost,从此文件恢复各厂商真实地址。 */
|
package/dist/sidecar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidecar.d.ts","sourceRoot":"","sources":["../src/sidecar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,EAA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 @@ export class SidecarServer {
|
|
|
262
262
|
request_format: requestFormat,
|
|
263
263
|
};
|
|
264
264
|
const pathLog = url.split("?")[0] || "/";
|
|
265
|
-
|
|
265
|
+
const pathForRouting = (pathLog || "/").toLowerCase();
|
|
266
|
+
const forwardToGateway = pathForRouting.includes("chat") ||
|
|
267
|
+
pathForRouting.includes("message") ||
|
|
268
|
+
pathForRouting.includes("response");
|
|
269
|
+
log(`[Sidecar] ${reqId} ${method} ${pathLog} fmt=${requestFormat} provider=${realProvider} model=${parsedBody.model ?? "-"} stream=${stream} route=${forwardToGateway ? "gateway" : "direct"}`, { console: true });
|
|
270
|
+
// Only paths containing "chat", "message", or "response" go to MemoryX gateway; others go direct to upstream.
|
|
271
|
+
if (!forwardToGateway) {
|
|
272
|
+
const directOk = await this.fallbackToUpstream(url, res, reqId, parsedBody, requestFormat, incomingApiKey, req.headers["anthropic-version"] || "", realProvider);
|
|
273
|
+
if (directOk)
|
|
274
|
+
return;
|
|
275
|
+
log(`[Sidecar] ${reqId} direct upstream failed`, { console: true });
|
|
276
|
+
res.writeHead(502, { "Content-Type": "application/json" });
|
|
277
|
+
res.end(JSON.stringify({ error: "Direct upstream request failed" }));
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
266
280
|
const agentTimeoutMs = (this.options.agentTimeoutSeconds || 600) * 1_000;
|
|
267
281
|
const FETCH_TIMEOUT = stream ? Math.round(agentTimeoutMs * 1.2) : 90_000;
|
|
268
282
|
const REASONING_CHUNK_TIMEOUT = Math.round(agentTimeoutMs * 1.2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t0ken.ai/memoryx-openclaw-plugin",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.76",
|
|
4
4
|
"description": "MemoryX real-time memory capture and recall plugin for OpenClaw (powered by @t0ken.ai/memoryx-sdk)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MemoryX Team",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"prebuild": "node scripts/update-version.cjs",
|
|
16
16
|
"build": "tsc",
|
|
17
|
-
"test:recall": "node scripts/test-recall-capture.mjs",
|
|
18
17
|
"reset-gateway-usage": "node scripts/reset-memoryx-gateway-usage.mjs"
|
|
19
18
|
},
|
|
20
19
|
"keywords": [
|