Commit 84028f2
authored
feat(memos-local-openclaw): add multi-OpenClaw sharing, dual-instance isolation, and viewer improvements (#1321)
## Description
This PR brings the `native_memos` branch into `main` with a major
upgrade to the `memos-local-openclaw` plugin, focused on team sharing,
dual-instance isolation, viewer usability, recall quality, and
documentation completeness.
It solves several practical issues that appeared during real-world local
OpenClaw usage, especially when running multiple instances on the same
machine:
- team sharing state transitions were fragile across
join/leave/role-switch flows
- Hub/Viewer ports and session state could conflict in dual-instance
setups
- admin and member notifications were incomplete or unclear
- Viewer polling and sharing UX had refresh/state consistency issues
- documentation and landing pages did not fully explain the Hub/Client
architecture, multi-instance deployment, and collaboration workflow
Implementation approach:
- added and hardened the Hub/Client sharing architecture, including Hub
auth, client connector flow, server-side status management, admin
operations, and notification handling
- improved dual-instance isolation by refining runtime/config behavior
around gateway-derived ports, sharing state cleanup, and local-vs-hub
behavior boundaries
- enhanced recall quality with origin tracking, Hub result filtering,
and local/hybrid search improvements
- improved Viewer UX and stability across sharing setup, admin
workflows, polling, notifications, and collaboration-related UI
- added and updated automated test coverage for hub server, viewer
sharing, connector logic, storage, integration, and skill runtime flows
- expanded README, Team Sharing guide, docs site, troubleshooting docs,
and landing pages to better document collaboration workflows and
multi-OpenClaw capabilities
Relevant dependencies / requirements:
- no new mandatory external product dependency for end users beyond
existing model/provider configuration
- local runtime still depends on `better-sqlite3` native bindings being
built for the active Node.js version
- optional telemetry and model-provider related configuration continue
to follow the existing plugin setup
Related Issue (Required): Fixes #1320
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] Refactor (does not change functionality, e.g. code style
improvements, linting)
- [x] Documentation update
## How Has This Been Tested?
The change was validated through a combination of targeted automated
coverage added in this branch and manual end-to-end verification of
multi-instance local OpenClaw scenarios.
Test areas covered in this branch include:
- Hub server and authentication behavior
- viewer sharing flows and config handling
- client connector and sharing state transitions
- storage and integration flows
- skill runtime and sharing-related scenarios
Manual reproduction / verification steps:
1. Start two local OpenClaw instances with isolated
`OPENCLAW_CONFIG_PATH`, `OPENCLAW_STATE_DIR`, and workspace directories.
2. Install and enable `memos-local-openclaw` in both instances.
3. Configure one instance as Hub and another as Client.
4. Verify gateway, viewer, and Hub startup behavior, including port
isolation and no cross-instance conflict.
5. Submit a join request from the Client, approve it from the Hub, and
verify status updates and notifications.
6. Test admin operations including promote, demote, remove member, and
self-removal prevention.
7. Test client leave / disable / role-switch behavior and verify state
cleanup and reconnect behavior.
8. Verify Viewer live updates do not cause unnecessary full refreshes or
scroll-position loss.
9. Open the updated docs / landing pages and confirm installation
instructions, Team Sharing content, and collaboration visuals are
displayed correctly.
Suggested test environment:
- OS: macOS
- Runtime: local OpenClaw dual-instance setup
- Plugin: `memos-local-openclaw`
- Database: SQLite / `better-sqlite3`
- [ ] Unit Test
- [x] Test Script Or Test Steps (please provide)
- [ ] Pipeline Automated API Test (please provide)
## Checklist
- [x] I have performed a self-review of my own code | 我已自行检查了自己的代码
- [x] I have commented my code in hard-to-understand areas |
我已在难以理解的地方对代码进行了注释
- [x] I have added tests that prove my fix is effective or that my
feature works | 我已添加测试以证明我的修复有效或功能正常
- [x] 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(如果适用)
- [x] I have linked the issue to this PR (if applicable) | 我已将 issue
链接到此 PR(如果适用)
- [x] I have mentioned the person who will review this PR | 我已提及将审查此 PR
的人
## Reviewer Checklist
- [x] closes #1320
- [x] Made sure Checks passed
- [x] Tests have been providedFile tree
73 files changed
+22136
-1766
lines changed- .github/workflows
- apps/memos-local-openclaw
- docs
- scripts
- skill/memos-memory-guide
- src
- capture
- client
- embedding
- hub
- ingest
- providers
- recall
- sharing
- skill
- storage
- tools
- viewer
- tests
- www
- docs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
73 files changed
+22136
-1766
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
| 35 | + | |
0 commit comments