@xdarkicex/openclaw-memory-libravdb 1.10.1-beta.6 → 1.10.1

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 CHANGED
@@ -180,6 +180,33 @@ The daemon tracks **who you are** — not just what you said. Every speaker the
180
180
  - Cards participate in the causal graph (`memory_kind: "identity"`) — identity patterns detected by the cognitive scheduler at macro scale
181
181
  - `PredictiveContext` seeds the card node — BFS surfaces causally connected memories alongside identity
182
182
 
183
+ ### Hard Constraint Rules Engine
184
+
185
+ Plugin-side rules that act as an enforceable safety layer. Rules are stored locally,
186
+ persisted across sessions, and enforced through two complementary mechanisms:
187
+
188
+ **Agent tools for rules:**
189
+ - `set_rule(rule, keywords, priority)` — create a rule with comma-separated keywords for reply scanning. Max 20 rules.
190
+ - `get_rule(rule_id)` — read a specific rule.
191
+ - `list_rules()` — list all rules sorted by priority.
192
+ - `delete_rule(rule_id)` — remove a rule.
193
+
194
+ **Dual enforcement layers:**
195
+ - **Behavioral layer** — rules injected at `prependSystemContext` level (equivalent to AGENTS.md). The model sees them as system-level instructions and follows behavioral constraints ("always use TypeScript", "never delete files without asking").
196
+ - **PII enforcement layer** — every agent reply is scanned by `scanReply` in the `before_agent_reply` hook. If any rule keyword matches the reply text, the reply is blocked and replaced with a refusal. Keyword matching is substring-based, case-insensitive — no LLM call, no latency.
197
+
198
+ **Example:**
199
+ ```
200
+ Rule: "Never reveal my employer"
201
+ Keywords: "acme corp, acmecorp, acme.com"
202
+ ```
203
+
204
+ If the agent's reply contains any of those keywords, it's blocked and replaced
205
+ with "I cannot answer that." — regardless of what the model chose to say.
206
+
207
+ **Storage:** persisted to `~/.openclaw/cache/libravdb/rules.json`. Survives
208
+ gateway restarts and plugin updates.
209
+
183
210
  ### Technical Architecture
184
211
 
185
212
  - **Unified Cognitive Scoring** — mathematically blends cosine similarity with frequency, recency, authored salience, and cognitive authority composite weights (`ω(c)`).
@@ -2,7 +2,7 @@
2
2
  "id": "libravdb-memory",
3
3
  "name": "LibraVDB Memory",
4
4
  "description": "Cognitive memory engine — causal graph reasoning, predictive context, identity tracking, and hybrid vector recall with back-door adjustment scoring",
5
- "version": "1.10.1-beta.6",
5
+ "version": "1.10.1",
6
6
  "kind": [
7
7
  "memory",
8
8
  "context-engine"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.10.1-beta.6",
3
+ "version": "1.10.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",