memory-gateway-sync 0.3.0 → 0.4.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/package.json +1 -1
- package/src/index.ts +6 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -42,7 +42,12 @@ export default definePluginEntry({
|
|
|
42
42
|
const gatewayToken = cfg.gatewayToken;
|
|
43
43
|
const debounceMs = cfg.debounceMs ?? 1500;
|
|
44
44
|
const defaultAgentId = cfg.agentId ?? "default";
|
|
45
|
-
const ownerClawUserId =
|
|
45
|
+
const ownerClawUserId = (() => {
|
|
46
|
+
const token = process.env.OPENCLAW_GATEWAY_TOKEN ?? "";
|
|
47
|
+
// 格式: oc-user-{userId},用 - 切开取最后一段
|
|
48
|
+
const parts = token.split("-");
|
|
49
|
+
return parts.length >= 3 ? parts[parts.length - 1] : null;
|
|
50
|
+
})();
|
|
46
51
|
|
|
47
52
|
if (!gatewayUrl || !gatewayToken) {
|
|
48
53
|
api.logger.warn(
|