You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: registerMemoryCapability API not found in OpenClaw 2026.3.31 #1559
Summary: Fixes issue #1559: OpenClaw 2026.3.31 removed api.registerMemoryCapability and split it into three single-purpose methods (registerMemoryPromptSection, registerMemoryFlushPlan, registerMemoryRuntime). The MemOS Local OpenClaw plugin previously made an unconditional call to the removed method, crashing during plugin registration with TypeError: api.registerMemoryCapability is not a function, which prevented the plugin from loading.
The fix in apps/memos-local-openclaw/index.ts migrates the call to prefer api.registerMemoryPromptSection(buildMemoryPromptSection) when the host SDK exposes it (OpenClaw 2026.3.31+), with a fallback to the legacy api.registerMemoryCapability({ promptBuilder }) for older hosts. When neither method is exposed, the plugin emits a non-fatal warning via the host logger and continues to load, eliminating the hard-crash failure mode entirely.
A new regression suite tests/issue-1559-memory-api-migration.test.ts covers all three branches: (1) new API preferred when both are present, (2) legacy fallback when only the legacy method exists, (3) no-op + warn when neither is exposed. Verification: npx vitest run on impacted suites (issue-1559-memory-api-migration, plugin-openclaw-wiring, integration, plugin-impl-access, shutdown-lifecycle, incremental-sharing, hub-eager-connect) — 44/44 passed. The 5 unrelated pre-existing failures (model loading, timing-sensitive task processor, viewer update-install) reproduce on the baseline branch without this change and are out of scope.
Branch bugfix/autodev-1559 pushed to origin; commit dfe260e. opsp artifacts archived to memos-autodev-specs repo.
Summary: Fixes #1559: the @memtensor/memos-local-openclaw-plugin failed to load on OpenClaw 2026.3.31 because it still called the removed umbrella api.registerMemoryCapability({promptBuilder}) at apps/memos-local-openclaw/index.ts:163. OpenClaw 2026.3.31 split that umbrella into three focused registrars — registerMemoryPromptSection, registerMemoryFlushPlan, registerMemoryRuntime — so the call threw TypeError: api.registerMemoryCapability is not a function and the plugin refused to initialize.
The fix rewrites register() to feature-detect the new registerMemoryPromptSection(builder) API and use it preferentially, falling back to the legacy registerMemoryCapability({ promptBuilder }) for older gateways, and logging a warning if neither method is present. Only the prompt-section builder is needed — the plugin does not implement flush plans or memory runtimes — so this is a minimal, backwards-compatible migration.
Test evidence: a new tests/memory-registration-api.test.ts (3 cases) locks in preference of the new API, the legacy-fallback path, and the no-throw safeguard. Six existing test stubs were extended to expose both entry points. npx vitest run tests/memory-registration-api.test.ts → 3/3 pass; targeted run of touched files (plugin-openclaw-wiring, plugin-impl-access, shutdown-lifecycle, hub-eager-connect, integration, incremental-sharing) → 41/41 pass. Broader npx vitest run --exclude e2e/accuracy → 213 pass; the 3 pre-existing failures (skill-auto-install, task-processor, update-install) exist on the base branch too and are unrelated to this change (confirmed via git stash re-run). npx tsc --noEmit is clean.
Activity
MaiHHConnect commentedon Apr 29, 2026
Memtensor-AI commentedon Jun 30, 2026
🤖 AutoDev has picked up this issue and started working on it.
Task ID:
7840d0a0fd0dd299Working branch:
bugfix/autodev-1559Target branch:
latest dev* branchWorkflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.
fix(openclaw-plugin): migrate registerMemoryCapability to OpenClaw 20…
Memtensor-AI commentedon Jun 30, 2026
✅ AutoDev task
7840d0a0fd0dd299completed.Summary: Fixes issue #1559: OpenClaw 2026.3.31 removed
api.registerMemoryCapabilityand split it into three single-purpose methods (registerMemoryPromptSection,registerMemoryFlushPlan,registerMemoryRuntime). The MemOS Local OpenClaw plugin previously made an unconditional call to the removed method, crashing during plugin registration withTypeError: api.registerMemoryCapability is not a function, which prevented the plugin from loading.The fix in
apps/memos-local-openclaw/index.tsmigrates the call to preferapi.registerMemoryPromptSection(buildMemoryPromptSection)when the host SDK exposes it (OpenClaw 2026.3.31+), with a fallback to the legacyapi.registerMemoryCapability({ promptBuilder })for older hosts. When neither method is exposed, the plugin emits a non-fatal warning via the host logger and continues to load, eliminating the hard-crash failure mode entirely.A new regression suite
tests/issue-1559-memory-api-migration.test.tscovers all three branches: (1) new API preferred when both are present, (2) legacy fallback when only the legacy method exists, (3) no-op + warn when neither is exposed. Verification:npx vitest runon impacted suites (issue-1559-memory-api-migration,plugin-openclaw-wiring,integration,plugin-impl-access,shutdown-lifecycle,incremental-sharing,hub-eager-connect) — 44/44 passed. The 5 unrelated pre-existing failures (model loading, timing-sensitive task processor, viewer update-install) reproduce on the baseline branch without this change and are out of scope.Branch
bugfix/autodev-1559pushed to origin; commitdfe260e. opsp artifacts archived to memos-autodev-specs repo.Base branch:
mainBranch:
bugfix/autodev-1559Commit:
dfe260ePR: #1991
Assigned to: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller
Reviewers: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller
Fix #1559: fix: registerMemoryCapability API not found in OpenClaw 20…
Memtensor-AI commentedon Jul 2, 2026
🤖 AutoDev has picked up this issue and started working on it.
Task ID:
aa7384b576a80c35Working branch:
bugfix/autodev-1559Target branch:
latest dev* branchWorkflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.
fix(memos-local-openclaw): migrate to OpenClaw 2026.3.31 memory API
Memtensor-AI commentedon Jul 2, 2026
✅ AutoDev task
aa7384b576a80c35completed.Summary: Fixes #1559: the @memtensor/memos-local-openclaw-plugin failed to load on OpenClaw 2026.3.31 because it still called the removed umbrella
api.registerMemoryCapability({promptBuilder})atapps/memos-local-openclaw/index.ts:163. OpenClaw 2026.3.31 split that umbrella into three focused registrars —registerMemoryPromptSection,registerMemoryFlushPlan,registerMemoryRuntime— so the call threwTypeError: api.registerMemoryCapability is not a functionand the plugin refused to initialize.The fix rewrites
register()to feature-detect the newregisterMemoryPromptSection(builder)API and use it preferentially, falling back to the legacyregisterMemoryCapability({ promptBuilder })for older gateways, and logging a warning if neither method is present. Only the prompt-section builder is needed — the plugin does not implement flush plans or memory runtimes — so this is a minimal, backwards-compatible migration.Test evidence: a new
tests/memory-registration-api.test.ts(3 cases) locks in preference of the new API, the legacy-fallback path, and the no-throw safeguard. Six existing test stubs were extended to expose both entry points.npx vitest run tests/memory-registration-api.test.ts→ 3/3 pass; targeted run of touched files (plugin-openclaw-wiring,plugin-impl-access,shutdown-lifecycle,hub-eager-connect,integration,incremental-sharing) → 41/41 pass. Broadernpx vitest run --exclude e2e/accuracy→ 213 pass; the 3 pre-existing failures (skill-auto-install, task-processor, update-install) exist on the base branch too and are unrelated to this change (confirmed viagit stashre-run).npx tsc --noEmitis clean.Base branch:
mainBranch:
bugfix/autodev-1559Commit:
9453cbcPR: #2037
Assigned to: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller
Reviewers: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller
refactor(memos-local-openclaw): hoist memory-registration API narrow …
refactor(memos-local-openclaw): safer casts + fail-fast on missing me…
Fix #1559: fix: registerMemoryCapability API not found in OpenClaw 20…