openclaw-cortex-memory 0.1.0-Alpha.3 → 0.1.0-Alpha.4
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/README.md +19 -15
- package/SKILL.md +22 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -5
- package/dist/index.js.map +1 -1
- package/dist/openclaw.plugin.json +1 -1
- package/dist/src/reflect/reflector.d.ts +7 -0
- package/dist/src/reflect/reflector.d.ts.map +1 -1
- package/dist/src/reflect/reflector.js +75 -1
- package/dist/src/reflect/reflector.js.map +1 -1
- package/dist/src/store/read_store.d.ts +15 -0
- package/dist/src/store/read_store.d.ts.map +1 -1
- package/dist/src/store/read_store.js +177 -4
- package/dist/src/store/read_store.js.map +1 -1
- package/dist/src/store/write_store.d.ts +8 -0
- package/dist/src/store/write_store.d.ts.map +1 -1
- package/dist/src/store/write_store.js +70 -0
- package/dist/src/store/write_store.js.map +1 -1
- package/dist/src/sync/session_sync.d.ts.map +1 -1
- package/dist/src/sync/session_sync.js +11 -3
- package/dist/src/sync/session_sync.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +12 -5
- package/scripts/cli.js +6 -1
- package/scripts/uninstall.js +15 -4
- package/index.ts +0 -2142
- package/scripts/install.js +0 -27
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-cortex-memory",
|
|
3
3
|
"name": "Cortex Memory",
|
|
4
|
-
"version": "0.1.0-Alpha.
|
|
4
|
+
"version": "0.1.0-Alpha.4",
|
|
5
5
|
"description": "Long-term memory system with semantic, episodic, and procedural memory for AI Agents",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"author": "OpenClaw Community",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-cortex-memory",
|
|
3
|
-
"version": "0.1.0-Alpha.
|
|
3
|
+
"version": "0.1.0-Alpha.4",
|
|
4
4
|
"description": "Long-term memory system for OpenClaw AI Agent",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,9 +9,15 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc && node -e \"require('fs').copyFileSync('openclaw.plugin.json','dist/openclaw.plugin.json')\"",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"check:version": "node scripts/check-version.js",
|
|
14
|
+
"test:compat": "node scripts/compat-regression.js",
|
|
15
|
+
"test:model": "node scripts/model-regression.js",
|
|
16
|
+
"test:all": "npm run test:compat && npm run test:model",
|
|
17
|
+
"release:check": "node scripts/release-pipeline.js",
|
|
12
18
|
"dev": "tsc --watch",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
19
|
+
"prepack": "npm run build",
|
|
20
|
+
"prepublishOnly": "npm run check:version && npm run build && npm run test:all"
|
|
15
21
|
},
|
|
16
22
|
"keywords": [
|
|
17
23
|
"openclaw",
|
|
@@ -37,9 +43,7 @@
|
|
|
37
43
|
},
|
|
38
44
|
"files": [
|
|
39
45
|
"dist/",
|
|
40
|
-
"index.ts",
|
|
41
46
|
"scripts/cli.js",
|
|
42
|
-
"scripts/install.js",
|
|
43
47
|
"scripts/uninstall.js",
|
|
44
48
|
"openclaw.plugin.json",
|
|
45
49
|
"SKILL.md"
|
|
@@ -48,6 +52,9 @@
|
|
|
48
52
|
"plugin": true,
|
|
49
53
|
"requiresPython": false,
|
|
50
54
|
"cli": "cortex-memory",
|
|
55
|
+
"compat": {
|
|
56
|
+
"pluginApi": ">=2026.3.22"
|
|
57
|
+
},
|
|
51
58
|
"extensions": [
|
|
52
59
|
"./dist/index.js"
|
|
53
60
|
]
|
package/scripts/cli.js
CHANGED
|
@@ -8,10 +8,12 @@ const PLUGIN_NAME = 'openclaw-cortex-memory';
|
|
|
8
8
|
|
|
9
9
|
function findOpenClawConfig() {
|
|
10
10
|
const explicitConfigPath = process.env.OPENCLAW_CONFIG_PATH || '';
|
|
11
|
+
const stateDir = process.env.OPENCLAW_STATE_DIR || '';
|
|
11
12
|
const basePath = process.env.OPENCLAW_BASE_PATH || '';
|
|
12
13
|
const homePath = process.env.USERPROFILE || process.env.HOME || '';
|
|
13
14
|
const possiblePaths = [
|
|
14
15
|
explicitConfigPath,
|
|
16
|
+
stateDir ? path.join(stateDir, 'openclaw.json') : '',
|
|
15
17
|
basePath ? path.join(basePath, 'openclaw.json') : '',
|
|
16
18
|
path.join(process.cwd(), 'openclaw.json'),
|
|
17
19
|
homePath ? path.join(homePath, '.openclaw', 'openclaw.json') : '',
|
|
@@ -53,7 +55,10 @@ function enablePlugin() {
|
|
|
53
55
|
const configPath = findOpenClawConfig();
|
|
54
56
|
|
|
55
57
|
if (!configPath) {
|
|
56
|
-
const defaultPath =
|
|
58
|
+
const defaultPath = process.env.OPENCLAW_CONFIG_PATH
|
|
59
|
+
|| (process.env.OPENCLAW_STATE_DIR ? path.join(process.env.OPENCLAW_STATE_DIR, 'openclaw.json') : '')
|
|
60
|
+
|| (process.env.OPENCLAW_BASE_PATH ? path.join(process.env.OPENCLAW_BASE_PATH, 'openclaw.json') : '')
|
|
61
|
+
|| path.join(process.env.USERPROFILE || process.env.HOME || '', '.openclaw', 'openclaw.json');
|
|
57
62
|
console.log(`No config file found. Creating: ${defaultPath}`);
|
|
58
63
|
|
|
59
64
|
const config = {
|
package/scripts/uninstall.js
CHANGED
|
@@ -17,14 +17,20 @@ function findProjectRoot() {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function findOpenClawConfig() {
|
|
20
|
+
const explicitConfigPath = process.env.OPENCLAW_CONFIG_PATH || '';
|
|
21
|
+
const stateDir = process.env.OPENCLAW_STATE_DIR || '';
|
|
22
|
+
const basePath = process.env.OPENCLAW_BASE_PATH || '';
|
|
23
|
+
const homePath = process.env.USERPROFILE || process.env.HOME || '';
|
|
20
24
|
const possiblePaths = [
|
|
25
|
+
explicitConfigPath,
|
|
26
|
+
stateDir ? path.join(stateDir, 'openclaw.json') : '',
|
|
27
|
+
basePath ? path.join(basePath, 'openclaw.json') : '',
|
|
21
28
|
path.join(process.cwd(), 'openclaw.json'),
|
|
22
|
-
path.join(
|
|
23
|
-
path.join(process.env.OPENCLAW_BASE_PATH || '', 'openclaw.json'),
|
|
29
|
+
homePath ? path.join(homePath, '.openclaw', 'openclaw.json') : '',
|
|
24
30
|
];
|
|
25
31
|
|
|
26
32
|
for (const p of possiblePaths) {
|
|
27
|
-
if (fs.existsSync(p)) {
|
|
33
|
+
if (p && fs.existsSync(p)) {
|
|
28
34
|
return p;
|
|
29
35
|
}
|
|
30
36
|
}
|
|
@@ -114,15 +120,20 @@ function removeFromConfig() {
|
|
|
114
120
|
const content = fs.readFileSync(configPath, 'utf-8');
|
|
115
121
|
const config = JSON.parse(content);
|
|
116
122
|
|
|
123
|
+
if (Array.isArray(config.plugins?.allow)) {
|
|
124
|
+
config.plugins.allow = config.plugins.allow.filter((item) => item !== PLUGIN_NAME);
|
|
125
|
+
}
|
|
117
126
|
if (config.plugins?.entries?.[PLUGIN_NAME]) {
|
|
118
127
|
delete config.plugins.entries[PLUGIN_NAME];
|
|
119
|
-
|
|
120
128
|
if (config.plugins.slots?.memory === PLUGIN_NAME) {
|
|
121
129
|
delete config.plugins.slots.memory;
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
125
133
|
console.log(`Removed plugin from config: ${configPath}`);
|
|
134
|
+
} else if (Array.isArray(config.plugins?.allow)) {
|
|
135
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
136
|
+
console.log(`Removed plugin allowlist entry from config: ${configPath}`);
|
|
126
137
|
} else {
|
|
127
138
|
console.log('Plugin not found in config.');
|
|
128
139
|
}
|