@psiclawops/hypermem-memory 0.6.2 → 0.8.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/dist/index.js CHANGED
@@ -15,13 +15,23 @@
15
15
  * Both plugins share the same HyperMem singleton (loaded from repo dist).
16
16
  */
17
17
  import { definePluginEntry, emptyPluginConfigSchema } from 'openclaw/plugin-sdk/plugin-entry';
18
- import os from 'os';
19
18
  import path from 'path';
20
19
  import fs from 'fs/promises';
20
+ import os from 'os';
21
+ import { fileURLToPath } from 'url';
21
22
  // ─── HyperMem singleton ────────────────────────────────────────
22
23
  // Reuses the same singleton pattern as the context engine plugin.
23
- // Both plugins load from the same repo dist path and share the instance.
24
- const HYPERMEM_PATH = path.join(os.homedir(), '.openclaw/workspace/repo/hypermem/dist/index.js');
24
+ // Both plugins load from the same installed runtime payload and share the instance.
25
+ const __pluginDir = path.dirname(fileURLToPath(import.meta.url));
26
+ async function resolveHyperMemPath() {
27
+ try {
28
+ const resolvedUrl = await import.meta.resolve('@psiclawops/hypermem');
29
+ return resolvedUrl.startsWith('file:') ? fileURLToPath(resolvedUrl) : resolvedUrl;
30
+ }
31
+ catch {
32
+ return path.resolve(__pluginDir, '../../dist/index.js');
33
+ }
34
+ }
25
35
  let _hm = null;
26
36
  let _hmInitPromise = null;
27
37
  async function getHyperMem() {
@@ -30,7 +40,8 @@ async function getHyperMem() {
30
40
  if (_hmInitPromise)
31
41
  return _hmInitPromise;
32
42
  _hmInitPromise = (async () => {
33
- const mod = await import(HYPERMEM_PATH);
43
+ const hypermemPath = await resolveHyperMemPath();
44
+ const mod = await import(hypermemPath);
34
45
  const HyperMem = mod.HyperMem;
35
46
  const instance = await HyperMem.create({
36
47
  dataDir: path.join(os.homedir(), '.openclaw/hypermem'),
@@ -168,7 +179,9 @@ function createMemorySearchManager(hm, agentId, workspaceDir) {
168
179
  vector: {
169
180
  enabled: !!vectorStore,
170
181
  available: !!vectorStore,
171
- dims: vectorStats ? 768 : undefined,
182
+ dims: vectorStats?.dimensions
183
+ ?? vectorStats?.dims
184
+ ?? undefined,
172
185
  },
173
186
  custom: {
174
187
  vectorStats: vectorStats ?? undefined,
@@ -2,6 +2,9 @@
2
2
  "id": "hypermem",
3
3
  "enabledByDefault": false,
4
4
  "kind": "memory",
5
+ "activation": {
6
+ "onCapabilities": ["memory"]
7
+ },
5
8
  "configSchema": {
6
9
  "type": "object",
7
10
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@psiclawops/hypermem-memory",
3
- "version": "0.6.2",
3
+ "version": "0.8.0",
4
4
  "description": "HyperMem memory plugin for OpenClaw — bridges HyperMem retrieval into the memory slot",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,7 +8,7 @@
8
8
  "author": "PsiClawOps",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/PsiClawOps/hypermem-internal.git",
11
+ "url": "https://github.com/PsiClawOps/hypermem.git",
12
12
  "directory": "memory-plugin"
13
13
  },
14
14
  "publishConfig": {
@@ -25,12 +25,12 @@
25
25
  "./dist/index.js"
26
26
  ],
27
27
  "compat": {
28
- "pluginApi": ">=2026.4.5",
29
- "minGatewayVersion": "2026.4.5"
28
+ "pluginApi": ">=2026.4.12",
29
+ "minGatewayVersion": "2026.4.12"
30
30
  },
31
31
  "build": {
32
32
  "openclawVersion": "2026.4.9",
33
- "pluginSdkVersion": "2026.4.5"
33
+ "pluginSdkVersion": "2026.4.12"
34
34
  }
35
35
  },
36
36
  "scripts": {
@@ -38,7 +38,7 @@
38
38
  "typecheck": "tsc --noEmit"
39
39
  },
40
40
  "dependencies": {
41
- "@psiclawops/hypermem": "^0.5.2"
41
+ "@psiclawops/hypermem": "file:.."
42
42
  },
43
43
  "devDependencies": {
44
44
  "openclaw": "*",