Summary
wiki.bridge.import always returns 0 artifacts even though memory-core registers publicArtifacts.listArtifacts via api.registerMemoryCapability(). The wiki plugin's listActiveMemoryPublicArtifacts() silently returns an empty array because memoryPluginState.capability is undefined/null at call time.
Steps to Reproduce
- Configure memory-core as
plugins.slots.memory with a workspace containing MEMORY.md and memory/*.md files
- Configure memory-wiki with
vaultMode: "bridge" and all bridge options enabled
- Run
openclaw gateway call wiki.bridge.import --json
- Observe:
artifactCount: 0, workspaces: 0
Expected Behavior
listArtifacts() in memory-core should find MEMORY.md, daily notes, dream reports, and event logs from the configured workspace(s), and bridge import should create wiki source pages from them.
Actual Behavior
artifactCount: 0 consistently, even after gateway restart.
Root Cause Analysis
The call chain:
- memory-core registers capability:
api.registerMemoryCapability({ publicArtifacts: { listArtifacts: listMemoryCorePublicArtifacts } }) — this calls registerMemoryCapability(pluginId, capability) which sets memoryPluginState.capability
- wiki plugin calls
listActiveMemoryPublicArtifacts({ cfg: appConfig }) which reads memoryPluginState.capability?.capability.publicArtifacts?.listArtifacts(params)
- The result is always
[] (the ?? [] fallback)
memoryPluginState is a module-level singleton in memory-state-CKpinHhR.js. Both plugins run in the gateway process, but memoryPluginState.capability appears to be null when wiki accesses it.
Possible causes:
- ESM/CJS module instance split: memory-core imports
memory-state-CKpinHhR.js via one path, wiki imports it via another, resulting in two separate singleton instances
- Plugin loading order: wiki loads and caches the reference before memory-core registers
- Module resolution path mismatch: the bundled dist filename includes a content hash (
CKpinHhR), and if plugins resolve it differently the singleton diverges
Environment
- OpenClaw 2026.4.14 (323493f)
- memory-core:
plugins.slots.memory: "memory-core"
- memory-wiki:
plugins.entries.memory-wiki.enabled: true, vaultMode: "bridge"
- active-memory:
plugins.entries.active-memory.enabled: true
- memory backend: qmd
- OS: Linux (Kali), systemd service
- Gateway: running, pid confirmed active, RPC probe ok
Workaround
Switch to vaultMode: "isolated" and use wiki_apply tool for manual knowledge entry. Bridge mode is non-functional until this is fixed.
Summary
wiki.bridge.importalways returns 0 artifacts even though memory-core registerspublicArtifacts.listArtifactsviaapi.registerMemoryCapability(). The wiki plugin'slistActiveMemoryPublicArtifacts()silently returns an empty array becausememoryPluginState.capabilityis undefined/null at call time.Steps to Reproduce
plugins.slots.memorywith a workspace containing MEMORY.md and memory/*.md filesvaultMode: "bridge"and all bridge options enabledopenclaw gateway call wiki.bridge.import --jsonartifactCount: 0, workspaces: 0Expected Behavior
listArtifacts()in memory-core should find MEMORY.md, daily notes, dream reports, and event logs from the configured workspace(s), and bridge import should create wiki source pages from them.Actual Behavior
artifactCount: 0consistently, even after gateway restart.Root Cause Analysis
The call chain:
api.registerMemoryCapability({ publicArtifacts: { listArtifacts: listMemoryCorePublicArtifacts } })— this callsregisterMemoryCapability(pluginId, capability)which setsmemoryPluginState.capabilitylistActiveMemoryPublicArtifacts({ cfg: appConfig })which readsmemoryPluginState.capability?.capability.publicArtifacts?.listArtifacts(params)[](the?? []fallback)memoryPluginStateis a module-level singleton inmemory-state-CKpinHhR.js. Both plugins run in the gateway process, butmemoryPluginState.capabilityappears to be null when wiki accesses it.Possible causes:
memory-state-CKpinHhR.jsvia one path, wiki imports it via another, resulting in two separate singleton instancesCKpinHhR), and if plugins resolve it differently the singleton divergesEnvironment
plugins.slots.memory: "memory-core"plugins.entries.memory-wiki.enabled: true,vaultMode: "bridge"plugins.entries.active-memory.enabled: trueWorkaround
Switch to
vaultMode: "isolated"and usewiki_applytool for manual knowledge entry. Bridge mode is non-functional until this is fixed.