openclaw-cortex-memory 0.1.0-Alpha.8 → 0.1.0-Alpha.9

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.
Files changed (50) hide show
  1. package/README.md +34 -43
  2. package/SKILL.md +46 -51
  3. package/dist/index.d.ts +24 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +127 -11
  6. package/dist/index.js.map +1 -1
  7. package/dist/openclaw.plugin.json +1 -1
  8. package/dist/src/engine/memory_engine.d.ts +2 -1
  9. package/dist/src/engine/memory_engine.d.ts.map +1 -1
  10. package/dist/src/engine/ts_engine.d.ts +59 -0
  11. package/dist/src/engine/ts_engine.d.ts.map +1 -1
  12. package/dist/src/engine/ts_engine.js +609 -0
  13. package/dist/src/engine/ts_engine.js.map +1 -1
  14. package/dist/src/engine/types.d.ts +7 -0
  15. package/dist/src/engine/types.d.ts.map +1 -1
  16. package/dist/src/session/session_end.d.ts.map +1 -1
  17. package/dist/src/session/session_end.js +18 -4
  18. package/dist/src/session/session_end.js.map +1 -1
  19. package/dist/src/store/archive_store.d.ts +24 -0
  20. package/dist/src/store/archive_store.d.ts.map +1 -1
  21. package/dist/src/store/archive_store.js +217 -24
  22. package/dist/src/store/archive_store.js.map +1 -1
  23. package/dist/src/store/embedding_utils.d.ts +32 -0
  24. package/dist/src/store/embedding_utils.d.ts.map +1 -0
  25. package/dist/src/store/embedding_utils.js +173 -0
  26. package/dist/src/store/embedding_utils.js.map +1 -0
  27. package/dist/src/store/read_store.d.ts +20 -0
  28. package/dist/src/store/read_store.d.ts.map +1 -1
  29. package/dist/src/store/read_store.js +336 -21
  30. package/dist/src/store/read_store.js.map +1 -1
  31. package/dist/src/store/vector_store.d.ts +13 -0
  32. package/dist/src/store/vector_store.d.ts.map +1 -1
  33. package/dist/src/store/vector_store.js +59 -1
  34. package/dist/src/store/vector_store.js.map +1 -1
  35. package/dist/src/store/write_store.d.ts +35 -0
  36. package/dist/src/store/write_store.d.ts.map +1 -1
  37. package/dist/src/store/write_store.js +163 -14
  38. package/dist/src/store/write_store.js.map +1 -1
  39. package/dist/src/sync/session_sync.d.ts +44 -2
  40. package/dist/src/sync/session_sync.d.ts.map +1 -1
  41. package/dist/src/sync/session_sync.js +364 -31
  42. package/dist/src/sync/session_sync.js.map +1 -1
  43. package/dist/src/utils/runtime_env.d.ts +4 -0
  44. package/dist/src/utils/runtime_env.d.ts.map +1 -0
  45. package/dist/src/utils/runtime_env.js +51 -0
  46. package/dist/src/utils/runtime_env.js.map +1 -0
  47. package/openclaw.plugin.json +1 -1
  48. package/package.json +3 -2
  49. package/scripts/cli.js +13 -13
  50. package/scripts/uninstall.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-cortex-memory",
3
- "version": "0.1.0-Alpha.8",
3
+ "version": "0.1.0-Alpha.9",
4
4
  "description": "Long-term memory system for OpenClaw AI Agent",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,8 @@
14
14
  "test:compat": "node scripts/compat-regression.js",
15
15
  "test:model": "node scripts/model-regression.js",
16
16
  "test:graph": "node scripts/graph-eval.js",
17
- "test:all": "npm run test:compat && npm run test:model && npm run test:graph",
17
+ "test:lengthnorm": "node scripts/lengthnorm-regression.js",
18
+ "test:all": "npm run test:compat && npm run test:model && npm run test:graph && npm run test:lengthnorm",
18
19
  "release:check": "node scripts/release-pipeline.js",
19
20
  "dev": "tsc --watch",
20
21
  "prepack": "npm run build",
package/scripts/cli.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
- const { spawn } = require('child_process');
6
5
 
7
6
  const PLUGIN_NAME = 'openclaw-cortex-memory';
8
7
 
@@ -175,21 +174,22 @@ function getStatus() {
175
174
  }
176
175
 
177
176
  function runUninstall(args) {
178
- const uninstallScript = path.join(__dirname, 'uninstall.js');
179
-
180
- if (!fs.existsSync(uninstallScript)) {
177
+ const uninstallScriptPath = path.join(__dirname, 'uninstall.js');
178
+ if (!fs.existsSync(uninstallScriptPath)) {
181
179
  console.error('Uninstall script not found.');
182
180
  process.exit(1);
183
181
  }
184
-
185
- const child = spawn(process.execPath, [uninstallScript, 'uninstall', ...args], {
186
- stdio: 'inherit',
187
- cwd: process.cwd()
188
- });
189
-
190
- child.on('exit', (code) => {
191
- process.exit(code || 0);
192
- });
182
+ try {
183
+ const uninstallModule = require(uninstallScriptPath);
184
+ if (!uninstallModule || typeof uninstallModule.uninstall !== 'function') {
185
+ console.error('Invalid uninstall script export.');
186
+ process.exit(1);
187
+ }
188
+ uninstallModule.uninstall(args);
189
+ } catch (error) {
190
+ console.error(`Failed to run uninstall: ${error instanceof Error ? error.message : String(error)}`);
191
+ process.exit(1);
192
+ }
193
193
  }
194
194
 
195
195
  function showHelp() {
@@ -220,4 +220,10 @@ function main() {
220
220
  }
221
221
  }
222
222
 
223
- main();
223
+ module.exports = {
224
+ uninstall,
225
+ };
226
+
227
+ if (require.main === module) {
228
+ main();
229
+ }