@bamdra/bamdra-openclaw-memory 0.3.18 → 0.3.19
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
|
@@ -2749,9 +2749,8 @@ function ensureToolAllowlist(tools) {
|
|
|
2749
2749
|
return changed;
|
|
2750
2750
|
}
|
|
2751
2751
|
function ensureAgentSkills(agents, skillId) {
|
|
2752
|
-
const list = Array.isArray(agents.list) ? agents.list : [];
|
|
2753
2752
|
let changed = false;
|
|
2754
|
-
for (const item of
|
|
2753
|
+
for (const item of iterAgentConfigs(agents)) {
|
|
2755
2754
|
if (!item || typeof item !== "object") {
|
|
2756
2755
|
continue;
|
|
2757
2756
|
}
|
|
@@ -2770,9 +2769,8 @@ function ensureAgentSkills(agents, skillId) {
|
|
|
2770
2769
|
return changed;
|
|
2771
2770
|
}
|
|
2772
2771
|
function ensureAdminSkills(agents, skillId, adminAgentIds) {
|
|
2773
|
-
const list = Array.isArray(agents.list) ? agents.list : [];
|
|
2774
2772
|
let changed = false;
|
|
2775
|
-
for (const item of
|
|
2773
|
+
for (const item of iterAgentConfigs(agents)) {
|
|
2776
2774
|
if (!item || typeof item !== "object") {
|
|
2777
2775
|
continue;
|
|
2778
2776
|
}
|
|
@@ -2794,6 +2792,34 @@ function ensureAdminSkills(agents, skillId, adminAgentIds) {
|
|
|
2794
2792
|
}
|
|
2795
2793
|
return changed;
|
|
2796
2794
|
}
|
|
2795
|
+
function* iterAgentConfigs(agents) {
|
|
2796
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2797
|
+
const list = Array.isArray(agents.list) ? agents.list : [];
|
|
2798
|
+
for (const item of list) {
|
|
2799
|
+
if (item && typeof item === "object") {
|
|
2800
|
+
const agent = item;
|
|
2801
|
+
seen.add(agent);
|
|
2802
|
+
yield agent;
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
if (list.length > 0) {
|
|
2806
|
+
return;
|
|
2807
|
+
}
|
|
2808
|
+
for (const [key, value] of Object.entries(agents)) {
|
|
2809
|
+
if (key === "list" || key === "defaults" || !value || typeof value !== "object" || Array.isArray(value)) {
|
|
2810
|
+
continue;
|
|
2811
|
+
}
|
|
2812
|
+
const agent = value;
|
|
2813
|
+
if (seen.has(agent)) {
|
|
2814
|
+
continue;
|
|
2815
|
+
}
|
|
2816
|
+
if (typeof agent.id !== "string" && typeof agent.name !== "string") {
|
|
2817
|
+
agent.id = key;
|
|
2818
|
+
}
|
|
2819
|
+
seen.add(agent);
|
|
2820
|
+
yield agent;
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2797
2823
|
function dependencySkillIds(pluginId) {
|
|
2798
2824
|
if (pluginId === "bamdra-user-bind") {
|
|
2799
2825
|
return [USER_BIND_PROFILE_SKILL_ID, USER_BIND_ADMIN_SKILL_ID];
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamdra/bamdra-openclaw-memory",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
4
4
|
"description": "Unified topic-aware memory plugin for OpenClaw with durable SQLite recall and bounded context growth.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.bamdra.com",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@bamdra/bamdra-user-bind": "^0.1.
|
|
64
|
+
"@bamdra/bamdra-user-bind": "^0.1.13",
|
|
65
65
|
"@bamdra/bamdra-memory-vector": "^0.1.11"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamdra/bamdra-openclaw-memory",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
4
4
|
"description": "Unified topic-aware memory plugin for OpenClaw with durable SQLite recall and bounded context growth.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.bamdra.com",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@bamdra/bamdra-user-bind": "^0.1.
|
|
64
|
+
"@bamdra/bamdra-user-bind": "^0.1.13",
|
|
65
65
|
"@bamdra/bamdra-memory-vector": "^0.1.11"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -169,9 +169,8 @@ function ensureToolAllowlist(tools) {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
function ensureAgentSkills(agents, skillId) {
|
|
172
|
-
const list = Array.isArray(agents.list) ? agents.list : [];
|
|
173
172
|
let changed = false;
|
|
174
|
-
for (const item of
|
|
173
|
+
for (const item of iterAgentConfigs(agents)) {
|
|
175
174
|
if (!item || typeof item !== "object") continue;
|
|
176
175
|
const currentSkills = Array.isArray(item.skills) ? [...item.skills] : [];
|
|
177
176
|
if (!Array.isArray(item.skills)) {
|
|
@@ -188,9 +187,8 @@ function ensureAgentSkills(agents, skillId) {
|
|
|
188
187
|
}
|
|
189
188
|
|
|
190
189
|
function ensureAdminSkills(agents, skillId, adminAgentIds) {
|
|
191
|
-
const list = Array.isArray(agents.list) ? agents.list : [];
|
|
192
190
|
let changed = false;
|
|
193
|
-
for (const item of
|
|
191
|
+
for (const item of iterAgentConfigs(agents)) {
|
|
194
192
|
if (!item || typeof item !== "object") continue;
|
|
195
193
|
const agentId = typeof item.id === "string" ? item.id : typeof item.name === "string" ? item.name : null;
|
|
196
194
|
if (!agentId || !adminAgentIds.includes(agentId)) continue;
|
|
@@ -208,6 +206,27 @@ function ensureAdminSkills(agents, skillId, adminAgentIds) {
|
|
|
208
206
|
return changed;
|
|
209
207
|
}
|
|
210
208
|
|
|
209
|
+
function* iterAgentConfigs(agents) {
|
|
210
|
+
const seen = new Set();
|
|
211
|
+
const list = Array.isArray(agents.list) ? agents.list : [];
|
|
212
|
+
for (const item of list) {
|
|
213
|
+
if (item && typeof item === "object") {
|
|
214
|
+
seen.add(item);
|
|
215
|
+
yield item;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (list.length > 0) return;
|
|
219
|
+
for (const [key, value] of Object.entries(agents)) {
|
|
220
|
+
if (key === "list" || key === "defaults" || !value || typeof value !== "object" || Array.isArray(value)) continue;
|
|
221
|
+
if (seen.has(value)) continue;
|
|
222
|
+
if (typeof value.id !== "string" && typeof value.name !== "string") {
|
|
223
|
+
value.id = key;
|
|
224
|
+
}
|
|
225
|
+
seen.add(value);
|
|
226
|
+
yield value;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
211
230
|
function ensureHostConfig(config) {
|
|
212
231
|
let changed = false;
|
|
213
232
|
|
|
@@ -66,6 +66,12 @@ Do not use it for:
|
|
|
66
66
|
|
|
67
67
|
If the current turn conflicts with the stored profile, follow the current turn and let later updates refresh the profile deliberately.
|
|
68
68
|
|
|
69
|
+
When the current user reveals stable personal traits in natural language, prefer updating `bamdra-user-bind` over storing a memory fact.
|
|
70
|
+
|
|
71
|
+
Judge semantically, not by fixed trigger phrases.
|
|
72
|
+
|
|
73
|
+
If the message is really about the current user's long-lived style, identity, boundary, or way of working, it belongs to `bamdra-user-bind` even if the wording is indirect or casual.
|
|
74
|
+
|
|
69
75
|
## Topic Judgment
|
|
70
76
|
|
|
71
77
|
Treat topic handling as a judgment task, not a keyword trigger.
|
|
@@ -140,6 +146,8 @@ Keep these private by default and prefer `user:` scope or `bamdra-user-bind` pro
|
|
|
140
146
|
- pets, family, role, and personal background
|
|
141
147
|
- the user's current focus, ongoing work, and long-lived personal goals
|
|
142
148
|
|
|
149
|
+
Do not store the current user's own address, timezone, tone preference, or collaboration preference as `shared` memory facts. Those belong in `bamdra-user-bind`.
|
|
150
|
+
|
|
143
151
|
When a fact is about “me”, “my”, or the current user's own stable way of working, do not store it as `shared` unless the user explicitly says it is a shared rule for everyone.
|
|
144
152
|
|
|
145
153
|
## Working Style
|