@nowledge/openclaw-nowledge-mem 0.8.15 → 0.8.18

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/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ All notable changes to the Nowledge Mem OpenClaw plugin will be documented in th
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## [0.8.18] - 2026-04-20
8
+
9
+ ### Fixed
10
+
11
+ - OpenClaw installs no longer break when the installer writes `plugins.slots.contextEngine: "openclaw-nowledge-mem"` instead of the canonical manual id `nowledge-mem`. The plugin now registers a compatibility alias for that slot value, so users do not need to patch local config after install just to activate the Context Engine.
12
+
13
+ ### Changed
14
+
15
+ - `nowledge_mem_status` now explains when OpenClaw selected the plugin id as a context-engine compatibility alias, while still treating `nowledge-mem` as the canonical manual config value.
16
+
17
+ ## [0.8.17] - 2026-04-16
18
+
19
+ ### Fixed
20
+
21
+ - ClawHub installs no longer ship the plugin test suite inside the published code-plugin artifact. The package now uses an explicit `.clawhubignore`, so OpenClaw's security scanner no longer blocks install or update on harmless test-only `child_process` and `process.env + fetch` patterns.
22
+
23
+ ## [0.8.16] - 2026-04-15
24
+
25
+ ### Fixed
26
+
27
+ - Fixed a regression in `0.8.15` where supplement-mode startup could fail during plugin registration because the status tool was passed an undefined `memorySlot` variable. This could block the plugin before corpus supplement or native tools became available.
28
+ - Added coverage for the implicit default path where OpenClaw leaves the memory slot on `memory-core`.
29
+
7
30
  ## [0.8.15] - 2026-04-15
8
31
 
9
32
  ### Fixed
package/CLAUDE.md CHANGED
@@ -9,7 +9,7 @@ Continuation guide for `community/nowledge-mem-openclaw-plugin`.
9
9
  - Memory backend: `nmem` CLI (fallback: `uvx --from nmem-cli nmem`)
10
10
  - OpenClaw minimum: `2026.4.5` (`registerMemoryCorpusSupplement` for dreaming integration)
11
11
  - Architecture: **CLI-first via OpenClaw runtime** - all CLI execution goes through `api.runtime.system.runCommandWithTimeout`, not direct `child_process`
12
- - Context engine: registered via `api.registerContextEngine("nowledge-mem", factory)`. Activated when user sets `plugins.slots.contextEngine: "nowledge-mem"`. Falls back to hooks when CE is not active.
12
+ - Context engine: registered under the canonical id `nowledge-mem` plus the compatibility alias `openclaw-nowledge-mem`. Activated when OpenClaw sets either value in `plugins.slots.contextEngine`. Manual config should still prefer `nowledge-mem`. Falls back to hooks when CE is not active.
13
13
  - Remote mode: `~/.nowledge-mem/config.json` (shared) or OpenClaw dashboard. Legacy `openclaw.json` still honored.
14
14
  - Ambient space lane: prefer plugin config `space` or `spaceTemplate`. Use `NMEM_SPACE` only when OpenClaw is launched in one stable lane and there is no better profile-owned config surface. Legacy `NMEM_SPACE_ID` still works for older setups.
15
15
 
@@ -84,8 +84,8 @@ Enable when memory-core is the memory slot and you want cross-tool knowledge to
84
84
 
85
85
  The plugin is published as a dual-role OpenClaw plugin (`kind: ["memory", "context-engine"]`). These roles remain independent at runtime:
86
86
 
87
- - **Memory slot**: provides `memory_search` + `memory_get`, activates OpenClaw's "Memory Recall" system prompt section. Always active.
88
- - **Context engine**: activated when user sets `plugins.slots.contextEngine: "nowledge-mem"`. Replaces hooks with richer CE lifecycle.
87
+ - **Memory slot**: provides `memory_search` + `memory_get` and activates OpenClaw's "Memory Recall" system prompt section only when `plugins.slots.memory = "openclaw-nowledge-mem"`. In supplement mode with `memory-core`, these compatibility tools stay off so memory-core keeps owning that surface.
88
+ - **Context engine**: activated when OpenClaw sets `plugins.slots.contextEngine` to `nowledge-mem` or the compatibility alias `openclaw-nowledge-mem`. Manual config should still use `nowledge-mem`. Replaces hooks with richer CE lifecycle.
89
89
 
90
90
  ### CE vs Hooks (dual-path design)
91
91
 
package/README.md CHANGED
@@ -17,7 +17,14 @@ This is not a flat note store. Nowledge Mem links related knowledge into a graph
17
17
  openclaw plugins install clawhub:@nowledge/openclaw-nowledge-mem
18
18
  ```
19
19
 
20
- OpenClaw's installer writes the install record, enables the plugin, and switches the `memory` slot to `openclaw-nowledge-mem`. Restart OpenClaw after install to load it.
20
+ OpenClaw's installer writes the install record, enables the plugin, and switches the `memory` slot to `openclaw-nowledge-mem`. On current OpenClaw builds, that same install flow may also set `plugins.slots.contextEngine` to `openclaw-nowledge-mem`. Plugin `0.8.18+` accepts that automatically as a compatibility alias, so you do not need to hand-edit the file after install. If you manage config manually, keep using the canonical context engine id `nowledge-mem`.
21
+
22
+ Restart OpenClaw after install to load it.
23
+
24
+ If OpenClaw previously blocked the ClawHub package with a warning about
25
+ `dangerous code patterns detected`, update to `0.8.17+`. That release removes
26
+ test-only files from the published ClawHub artifact, so the installer no longer
27
+ scans harmless development fixtures as if they were runtime plugin code.
21
28
 
22
29
  If you prefer the default resolver path, bare package names also work because OpenClaw resolves external plugins from ClawHub first and then falls back to npm:
23
30
 
@@ -560,6 +567,8 @@ If your config enables `plugins.slots.contextEngine: "nowledge-mem"`:
560
567
  - on `0.8.6+`, Context Engine capture stays active and hooks remain enabled as a safety net
561
568
  - on `0.8.5` and earlier, temporarily removing the `contextEngine` slot is a valid isolation step if thread sync stops while tools still work
562
569
 
570
+ If OpenClaw selected `plugins.slots.contextEngine: "openclaw-nowledge-mem"` during install, plugin `0.8.18+` treats that as the same engine. You only need to rewrite it to `"nowledge-mem"` if you want the config to use the canonical manual id.
571
+
563
572
  Remember: OpenClaw applies plugin setting changes after restart. If you turned `sessionDigest` off earlier but had not restarted yet, thread sync could appear to keep working until the next restart, then stop.
564
573
 
565
574
  What healthy OpenClaw thread sync looks like:
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-nowledge-mem",
3
3
  "name": "Nowledge Mem",
4
4
  "description": "Cross-tool knowledge graph memory for OpenClaw with Working Memory, graph search, and session distillation.",
5
- "version": "0.8.15",
5
+ "version": "0.8.18",
6
6
  "kind": ["memory", "context-engine"],
7
7
  "skills": [
8
8
  "skills/memory-guide"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nowledge/openclaw-nowledge-mem",
3
3
  "displayName": "Nowledge Mem for OpenClaw",
4
- "version": "0.8.15",
4
+ "version": "0.8.18",
5
5
  "type": "module",
6
6
  "description": "Nowledge Mem memory plugin for OpenClaw, local-first personal knowledge base",
7
7
  "author": {
@@ -25,7 +25,9 @@
25
25
  "openclaw.plugin.json"
26
26
  ],
27
27
  "openclaw": {
28
- "extensions": ["./src/index.js"],
28
+ "extensions": [
29
+ "./src/index.js"
30
+ ],
29
31
  "install": {
30
32
  "npmSpec": "@nowledge/openclaw-nowledge-mem"
31
33
  },
@@ -0,0 +1,15 @@
1
+ export const NOWLEDGE_MEM_CONTEXT_ENGINE_ID = "nowledge-mem";
2
+ export const NOWLEDGE_MEM_CONTEXT_ENGINE_COMPAT_ALIAS =
3
+ "openclaw-nowledge-mem";
4
+
5
+ export const NOWLEDGE_MEM_CONTEXT_ENGINE_IDS = [
6
+ NOWLEDGE_MEM_CONTEXT_ENGINE_ID,
7
+ NOWLEDGE_MEM_CONTEXT_ENGINE_COMPAT_ALIAS,
8
+ ];
9
+
10
+ export function isNowledgeMemContextEngineSlot(value) {
11
+ return (
12
+ typeof value === "string" &&
13
+ NOWLEDGE_MEM_CONTEXT_ENGINE_IDS.includes(value.trim())
14
+ );
15
+ }
@@ -3,7 +3,9 @@
3
3
  *
4
4
  * Registers alongside the memory slot (plugin kind includes both "memory" and
5
5
  * "context-engine"). When users activate
6
- * this CE via `plugins.slots.contextEngine: "nowledge-mem"`, it takes over
6
+ * this CE via `plugins.slots.contextEngine: "nowledge-mem"` (or the
7
+ * compatibility alias `openclaw-nowledge-mem` written by current installer
8
+ * builds), it takes over
7
9
  * prompt assembly and adds richer lifecycle behavior:
8
10
  *
9
11
  * assemble() — behavioral guidance + recalled memories via systemPromptAddition
package/src/index.js CHANGED
@@ -6,6 +6,10 @@ import {
6
6
  createRememberCommand,
7
7
  } from "./commands/slash.js";
8
8
  import { isDefaultApiUrl, parseConfig } from "./config.js";
9
+ import {
10
+ NOWLEDGE_MEM_CONTEXT_ENGINE_ID,
11
+ NOWLEDGE_MEM_CONTEXT_ENGINE_IDS,
12
+ } from "./context-engine-ids.js";
9
13
  import { createNowledgeMemContextEngineFactory } from "./context-engine.js";
10
14
  import { createNowledgeMemCorpusSupplement } from "./corpus-supplement.js";
11
15
  import { buildBehavioralHook } from "./hooks/behavioral.js";
@@ -44,7 +48,7 @@ export default {
44
48
  space: cfg.space,
45
49
  });
46
50
 
47
- const { memorySlotSelected } = resolveRegistrationMode({
51
+ const { memorySlot, memorySlotSelected } = resolveRegistrationMode({
48
52
  pluginId: api.id,
49
53
  configuredMemorySlot: api.config?.plugins?.slots?.memory,
50
54
  });
@@ -78,16 +82,22 @@ export default {
78
82
  let contextEngineRegistrationError = null;
79
83
 
80
84
  // --- Context Engine registration ---
81
- // When the user sets `plugins.slots.contextEngine: "nowledge-mem"`,
82
- // this CE takes over prompt assembly from the hooks below (assemble
83
- // replaces behavioral + recall prompt injection). Capture hooks remain
84
- // enabled as a reliability backstop because thread sync is idempotent.
85
- // When the CE slot points elsewhere, hooks continue working as before.
85
+ // When the user sets `plugins.slots.contextEngine: "nowledge-mem"` —
86
+ // or OpenClaw auto-selects the plugin id compatibility alias
87
+ // `openclaw-nowledge-mem` during install — this CE takes over prompt
88
+ // assembly from the hooks below (assemble replaces behavioral + recall
89
+ // prompt injection). Capture hooks remain enabled as a reliability
90
+ // backstop because thread sync is idempotent. When the CE slot points
91
+ // elsewhere, hooks continue working as before.
86
92
  try {
87
- api.registerContextEngine(
88
- "nowledge-mem",
89
- createNowledgeMemContextEngineFactory(client, cfg, logger),
93
+ const contextEngineFactory = createNowledgeMemContextEngineFactory(
94
+ client,
95
+ cfg,
96
+ logger,
90
97
  );
98
+ for (const contextEngineId of NOWLEDGE_MEM_CONTEXT_ENGINE_IDS) {
99
+ api.registerContextEngine(contextEngineId, contextEngineFactory);
100
+ }
91
101
  contextEngineRegistered = true;
92
102
  } catch (err) {
93
103
  // OpenClaw < CE support — degrade gracefully to hooks-only mode
@@ -101,6 +111,7 @@ export default {
101
111
  createStatusTool(client, logger, cfg, {
102
112
  memorySlot,
103
113
  contextEngineSlot,
114
+ contextEngineIds: NOWLEDGE_MEM_CONTEXT_ENGINE_IDS,
104
115
  pluginsAllow,
105
116
  contextEngineRegistered,
106
117
  contextEngineRegistrationError,
@@ -171,7 +182,7 @@ export default {
171
182
 
172
183
  const remoteMode = !isDefaultApiUrl(cfg.apiUrl);
173
184
  logger.info(
174
- `nowledge-mem: initialized (memorySlotSelected=${memorySlotSelected}, context=${cfg.sessionContext}, digest=${cfg.sessionDigest}, corpus=${cfg.corpusSupplement}, mode=${remoteMode ? `remote → ${cfg.apiUrl}` : "local"})`,
185
+ `nowledge-mem: initialized (memorySlotSelected=${memorySlotSelected}, context=${cfg.sessionContext}, digest=${cfg.sessionDigest}, corpus=${cfg.corpusSupplement}, mode=${remoteMode ? `remote → ${cfg.apiUrl}` : "local"}, contextEngineIds=${NOWLEDGE_MEM_CONTEXT_ENGINE_ID}|${api.id})`,
175
186
  );
176
187
  },
177
188
  };
@@ -6,6 +6,11 @@
6
6
  * Shows where each config value comes from (file, pluginConfig, env, default).
7
7
  */
8
8
  import { isDefaultApiUrl } from "../config.js";
9
+ import {
10
+ NOWLEDGE_MEM_CONTEXT_ENGINE_COMPAT_ALIAS,
11
+ NOWLEDGE_MEM_CONTEXT_ENGINE_ID,
12
+ isNowledgeMemContextEngineSlot,
13
+ } from "../context-engine-ids.js";
9
14
 
10
15
  export function createStatusTool(client, _logger, cfg, runtimeInfo = {}) {
11
16
  return {
@@ -104,18 +109,39 @@ export function createStatusTool(client, _logger, cfg, runtimeInfo = {}) {
104
109
  }
105
110
 
106
111
  // 0c. Capture routing — hooks vs context engine
107
- const ceActive = ceSlot === "nowledge-mem" && contextEngineRegistered;
112
+ const ceActive =
113
+ isNowledgeMemContextEngineSlot(ceSlot) && contextEngineRegistered;
108
114
  const captureMode = !cfg.sessionDigest
109
115
  ? "disabled"
110
116
  : ceActive ? "context-engine+hooks" : "hooks";
111
117
  details.captureMode = captureMode;
112
118
  if (ceActive) {
113
- lines.push("Context Engine slot: nowledge-mem (active)");
119
+ if (ceSlot === NOWLEDGE_MEM_CONTEXT_ENGINE_COMPAT_ALIAS) {
120
+ lines.push(
121
+ `Context Engine slot: ${NOWLEDGE_MEM_CONTEXT_ENGINE_COMPAT_ALIAS} (active via compatibility alias)`,
122
+ );
123
+ lines.push(
124
+ ` OpenClaw selected the plugin id for the context-engine slot. ${NOWLEDGE_MEM_CONTEXT_ENGINE_ID} remains the canonical manual setting.`,
125
+ );
126
+ } else {
127
+ lines.push(`Context Engine slot: ${NOWLEDGE_MEM_CONTEXT_ENGINE_ID} (active)`);
128
+ }
114
129
  lines.push(
115
130
  " Thread capture runs through Context Engine afterTurn with hook fallback (agent_end, after_compaction, before_reset).",
116
131
  );
117
- } else if (ceSlot === "nowledge-mem") {
118
- lines.push("Context Engine slot: nowledge-mem (configured, fallback to hooks)");
132
+ } else if (isNowledgeMemContextEngineSlot(ceSlot)) {
133
+ if (ceSlot === NOWLEDGE_MEM_CONTEXT_ENGINE_COMPAT_ALIAS) {
134
+ lines.push(
135
+ `Context Engine slot: ${NOWLEDGE_MEM_CONTEXT_ENGINE_COMPAT_ALIAS} (compatibility alias, fallback to hooks)`,
136
+ );
137
+ lines.push(
138
+ ` OpenClaw selected the plugin id for the context-engine slot. ${NOWLEDGE_MEM_CONTEXT_ENGINE_ID} remains the canonical manual setting.`,
139
+ );
140
+ } else {
141
+ lines.push(
142
+ `Context Engine slot: ${NOWLEDGE_MEM_CONTEXT_ENGINE_ID} (configured, fallback to hooks)`,
143
+ );
144
+ }
119
145
  lines.push(
120
146
  " The slot points to Nowledge Mem, but Context Engine registration is not active in this runtime. Thread capture is using hooks only.",
121
147
  );