feat(memos-local-openclaw): hub embedding & parallel recall, auto-update reliability fix#1341
Merged
tangbotony merged 18 commits intoMemTensor:openclaw-local-plugin-20260324from Mar 24, 2026
Conversation
## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes @issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes @issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes #issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
### ## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes #issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
…isolation - Add hubInstanceId to team_shared_chunks, local_shared_tasks, and client_hub_connection to prevent stale sharing state when switching between Hub instances - Fix memory_search/timeline/get owner isolation by accepting agentId from tool execution context - Fix viewer sharing queries to use role-appropriate tables (hub_memories vs team_shared_chunks) - Apply maxChars truncation in memory_get handler - Fix 11 failing tests: accuracy thresholds, integration env isolation, plugin-impl join flow, and task-processor topic judge flakiness Made-with: Cursor
…n search, LLM dedup - Compute embeddings on Hub when memories are shared (same as task/skill), instead of on-the-fly at search time; auto-backfill missing vectors on startup - Hub search now reads pre-computed vectors from hub_memory_embeddings + FTS + RRF (unified retrieval strategy across memory/chunk/skill) - Add deduplication rule to LLM filterRelevant prompt so merged local+remote results automatically drop near-duplicate snippets - Add LLM filtering to skill_search hub merge path (consistent with memory_search) - Persist latest Hub username/role during client 401 recovery - Add admin rename notification + fix client nickname consistency - Fix Hub join dryRun logic, normalizeTimestamp compile error - Define missing OpenClaw provider prompt constants
…d 3-phase recall
- Refactor both memory_search tool and auto-recall to a 3-phase pipeline:
Phase 1: local engine.search() ∥ hubSearchMemories() via Promise.all
Phase 2: merge all candidates → single LLM filterRelevant() call
Phase 3: build response with unified { candidates, hubCandidates, filtered } structure
- Remove redundant double LLM filtering (was: local filter → hub fallback → merge filter)
- Separate hub-memory origin hits from local candidates in RecallEngine results
- Simplify trackTool serialization to a single branch matching the unified details shape
- Add dedicated "远程召回" (Hub Remote) display section in Viewer between initial retrieval and LLM filtered results
… npm cache - update-check: installCommand now uses exact version (e.g. @1.0.6-beta.11) instead of dist-tag (@beta) - frontend: always construct pkgSpec as packageName@exactVersion, pass targetVersion to backend - backend: verify downloaded version matches targetVersion, rollback on mismatch - npm pack: add --prefer-online flag as extra safety - postinstall: fix native binding validation, delegate to native-binding.cjs - update-install: flush HTTP response before SIGUSR1 restart, add no-cache headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR brings several improvements to the
memos-local-openclawplugin, focusing on Hub search infrastructure, parallel recall performance, and auto-update reliability.Hub Embedding & Search Infrastructure
Parallel Local + Hub Search
remote recall: N items) for better observabilitySharing State Isolation
hubInstanceIdto prevent cross-instance state leakage when switching between multiple HubsAuto-Update Reliability (Critical Fix)
npm pack @scope/pkg@betaresolved the@betadist-tag using npm's local cache, downloading stale versions instead of the latestupdate-check.tsnow returns exact version (e.g.,@1.0.6-beta.11) instead of dist-tag (@beta) ininstallCommandcheckForUpdate()always constructspackageName@exactVersion, never parses dist-tags frominstallCommandhandleUpdateInstall()acceptstargetVersionfrom frontend, verifies downloaded package version matches, and rolls back on mismatch--prefer-onlinetonpm packcommandjsonResponseAndRestart()ensures HTTP response is fully flushed to client before triggeringSIGUSR1restartno-storecache headers on/api/update-checkendpoint (server + client)postinstall.cjsto delegate native validation tonative-binding.cjs, triggering rebuild on anydlopenfailureRelated Issue: N/A (production bug reports from beta users)
Type of change
How Has This Been Tested?
tests/update-install.test.ts— covers version mismatch detection, rollback on wrong version, success pathtests/postinstall-native-binding.test.ts— covers native binding validation and rebuild triggers1.0.6-beta.5throughbeta.11sequentiallydownloaded beta.7.tgzwhen expecting beta.8)npm packcommand and version mismatch triggers rollbackChecklist