openclaw-cortex-memory 0.1.0-Alpha.3 → 0.1.0-Alpha.30
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 +263 -204
- package/SKILL.md +77 -268
- package/dist/index.d.ts +92 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1062 -1207
- package/dist/index.js.map +1 -1
- package/dist/openclaw.plugin.json +384 -15
- package/dist/src/dedup/three_stage_deduplicator.d.ts +25 -0
- package/dist/src/dedup/three_stage_deduplicator.d.ts.map +1 -0
- package/dist/src/dedup/three_stage_deduplicator.js +224 -0
- package/dist/src/dedup/three_stage_deduplicator.js.map +1 -0
- package/dist/src/engine/memory_engine.d.ts +2 -1
- package/dist/src/engine/memory_engine.d.ts.map +1 -1
- package/dist/src/engine/ts_engine.d.ts +126 -0
- package/dist/src/engine/ts_engine.d.ts.map +1 -1
- package/dist/src/engine/ts_engine.js +1145 -44
- package/dist/src/engine/ts_engine.js.map +1 -1
- package/dist/src/engine/types.d.ts +12 -0
- package/dist/src/engine/types.d.ts.map +1 -1
- package/dist/src/graph/ontology.d.ts +103 -0
- package/dist/src/graph/ontology.d.ts.map +1 -0
- package/dist/src/graph/ontology.js +564 -0
- package/dist/src/graph/ontology.js.map +1 -0
- package/dist/src/net/http_post.d.ts +17 -0
- package/dist/src/net/http_post.d.ts.map +1 -0
- package/dist/src/net/http_post.js +56 -0
- package/dist/src/net/http_post.js.map +1 -0
- package/dist/src/quality/llm_output_validator.d.ts +48 -0
- package/dist/src/quality/llm_output_validator.d.ts.map +1 -0
- package/dist/src/quality/llm_output_validator.js +404 -0
- package/dist/src/quality/llm_output_validator.js.map +1 -0
- 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 +352 -8
- package/dist/src/reflect/reflector.js.map +1 -1
- package/dist/src/rules/rule_store.d.ts.map +1 -1
- package/dist/src/rules/rule_store.js +75 -16
- package/dist/src/rules/rule_store.js.map +1 -1
- package/dist/src/session/session_end.d.ts +33 -0
- package/dist/src/session/session_end.d.ts.map +1 -1
- package/dist/src/session/session_end.js +67 -64
- package/dist/src/session/session_end.js.map +1 -1
- package/dist/src/store/archive_store.d.ts +128 -0
- package/dist/src/store/archive_store.d.ts.map +1 -0
- package/dist/src/store/archive_store.js +475 -0
- package/dist/src/store/archive_store.js.map +1 -0
- package/dist/src/store/embedding_utils.d.ts +32 -0
- package/dist/src/store/embedding_utils.d.ts.map +1 -0
- package/dist/src/store/embedding_utils.js +173 -0
- package/dist/src/store/embedding_utils.js.map +1 -0
- package/dist/src/store/graph_memory_store.d.ts +44 -0
- package/dist/src/store/graph_memory_store.d.ts.map +1 -0
- package/dist/src/store/graph_memory_store.js +168 -0
- package/dist/src/store/graph_memory_store.js.map +1 -0
- package/dist/src/store/read_store.d.ts +86 -0
- package/dist/src/store/read_store.d.ts.map +1 -1
- package/dist/src/store/read_store.js +1661 -25
- package/dist/src/store/read_store.js.map +1 -1
- package/dist/src/store/vector_store.d.ts +44 -0
- package/dist/src/store/vector_store.d.ts.map +1 -0
- package/dist/src/store/vector_store.js +201 -0
- package/dist/src/store/vector_store.js.map +1 -0
- package/dist/src/store/write_store.d.ts +52 -0
- package/dist/src/store/write_store.d.ts.map +1 -1
- package/dist/src/store/write_store.js +239 -3
- package/dist/src/store/write_store.js.map +1 -1
- package/dist/src/sync/session_sync.d.ts +100 -2
- package/dist/src/sync/session_sync.d.ts.map +1 -1
- package/dist/src/sync/session_sync.js +725 -28
- package/dist/src/sync/session_sync.js.map +1 -1
- package/dist/src/utils/runtime_env.d.ts +4 -0
- package/dist/src/utils/runtime_env.d.ts.map +1 -0
- package/dist/src/utils/runtime_env.js +51 -0
- package/dist/src/utils/runtime_env.js.map +1 -0
- package/openclaw.plugin.json +384 -15
- package/package.json +53 -7
- package/schema/graph.schema.yaml +175 -0
- package/scripts/cli.js +19 -14
- package/scripts/repair-memory.js +321 -0
- package/scripts/uninstall.js +22 -5
- package/index.ts +0 -2142
- package/scripts/install.js +0 -27
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
|
}
|
|
@@ -209,4 +220,10 @@ function main() {
|
|
|
209
220
|
}
|
|
210
221
|
}
|
|
211
222
|
|
|
212
|
-
|
|
223
|
+
module.exports = {
|
|
224
|
+
uninstall,
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
if (require.main === module) {
|
|
228
|
+
main();
|
|
229
|
+
}
|