memory-gateway-sync 0.8.0 → 0.9.0
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.js +3 -2
- package/openclaw.plugin.json +0 -1
- package/package.json +1 -1
- package/src/index.ts +3 -3
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// memory-gateway-sync/src/index.ts
|
|
1
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
2
3
|
import fs from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
@@ -10,8 +11,8 @@ var index_default = definePluginEntry({
|
|
|
10
11
|
kind: "generic",
|
|
11
12
|
register(api) {
|
|
12
13
|
const cfg = api.pluginConfig ?? {};
|
|
13
|
-
const gatewayUrl = cfg.gatewayUrl;
|
|
14
|
-
const gatewayToken = cfg.gatewayToken;
|
|
14
|
+
const gatewayUrl = cfg.gatewayUrl || process.env.MEMORY_SYNC_GATEWAY_URL || "";
|
|
15
|
+
const gatewayToken = cfg.gatewayToken || process.env.MEMORY_SYNC_GATEWAY_TOKEN || "";
|
|
15
16
|
const debounceMs = cfg.debounceMs ?? 1500;
|
|
16
17
|
const defaultAgentId = cfg.agentId ?? "default";
|
|
17
18
|
const ownerClawUserId = (() => {
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -39,9 +39,9 @@ export default definePluginEntry({
|
|
|
39
39
|
kind: "generic",
|
|
40
40
|
|
|
41
41
|
register(api) {
|
|
42
|
-
const cfg = (api.pluginConfig ?? {}) as PluginConfig
|
|
43
|
-
const gatewayUrl = cfg.gatewayUrl;
|
|
44
|
-
const gatewayToken = cfg.gatewayToken;
|
|
42
|
+
const cfg = (api.pluginConfig ?? {}) as Partial<PluginConfig>;
|
|
43
|
+
const gatewayUrl = cfg.gatewayUrl || process.env.MEMORY_SYNC_GATEWAY_URL || "";
|
|
44
|
+
const gatewayToken = cfg.gatewayToken || process.env.MEMORY_SYNC_GATEWAY_TOKEN || "";
|
|
45
45
|
const debounceMs = cfg.debounceMs ?? 1500;
|
|
46
46
|
const defaultAgentId = cfg.agentId ?? "default";
|
|
47
47
|
const ownerClawUserId = (() => {
|