Skip to content

Dev 20260323 v2.0.11#1367

Merged
CaralHsi merged 16 commits intomainfrom
dev-20260323-v2.0.11
Mar 27, 2026
Merged

Dev 20260323 v2.0.11#1367
CaralHsi merged 16 commits intomainfrom
dev-20260323-v2.0.11

Conversation

@CaralHsi
Copy link
Copy Markdown
Collaborator

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 (if applicable) | 我已在 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

Kyan Du and others added 16 commits March 9, 2026 02:05
* feat:optimize pool

* feat:optimize pool

* feat:optimize pool
* feat:optimize export_graph

* feat:optimize export_graph
…1344)

* chore: delete nebula

* feat: update .gitignore

* feat: delete old product/core files

* feat: delete old product/core files
* feat: add MiniMax as a first-class LLM provider

Add MiniMax LLM support via the OpenAI-compatible API, following the
same pattern as the existing Qwen and DeepSeek providers.

Changes:
- Add MinimaxLLMConfig with api_key, api_base, extra_body fields
- Add MinimaxLLM class inheriting from OpenAILLM
- Register minimax backend in LLMFactory and LLMConfigFactory
- Add minimax_config() to APIConfig with env var support
  (MINIMAX_API_KEY, MINIMAX_API_BASE)
- Add minimax to backend_model dicts in product/user config
- Add MiniMax example scenario in examples/basic_modules/llm.py
- Add unit tests for config and LLM (generate, stream, think prefix)
- Update .env.example and README with MiniMax provider info

MiniMax API: https://api.minimax.io/v1 (OpenAI-compatible)
Models: MiniMax-M2.5, MiniMax-M2.5-highspeed (204K context)

* feat: upgrade MiniMax default model to M2.7

- Update default model from MiniMax-M2.5 to MiniMax-M2.7 in API config
- Update example code to use MiniMax-M2.7 as default with M2.7-highspeed listed
- Update unit tests to reference M2.7 and M2.7-highspeed models
- Keep all previous models (M2.5, M2.5-highspeed) as available alternatives

* fix: Update MemReader configuration with backup support

Enhanced MemReader configuration to support backup client and general model.

* fix: derive MinimaxLLMConfig from OpenAILLMConfig

* Add backup configuration options to test_llm.py

* Add backup configuration options to test_llm.py

* backup options in test_minimax_config

Restored backup configuration options in test_llm.py.

---------

Co-authored-by: CaralHsi <caralhsi@gmail.com>
The /product/add endpoint expects messages as a list of chat message
objects, not a plain string. When passed a string, the SimpleStruct
MemReader silently skips it and no memory is stored.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CaralHsi <caralhsi@gmail.com>
feat: add health check endpoint for service status monitoring
* update feedback id

* update feedback id

* feedback fix

---------

Co-authored-by: 黑布林 <11641432+heiheiyouyou@user.noreply.gitee.com>
Co-authored-by: CaralHsi <caralhsi@gmail.com>
* feat: optimize pool

* feat: fix format
…) (#1104)

* fix(api): support delete_memory by user_id and conversation_id

* fix(api): harden delete filter validation and tests

* fix(postgres): implement delete_node_by_prams for filter deletes

* reformat

Remove unnecessary blank line in product_models.py

* Update memory_handler.py

---------

Co-authored-by: CaralHsi <caralhsi@gmail.com>
* feat: neo4j example now read memory from env

* fix: neo4j pre-filter

* fix: neo4j pre-filter

* fix: neo4j pre-filter

* test: add regression tests for Neo4j vector search pre-filter and sources KeyError

Made-with: Cursor

* style: fix ruff formatting in server_api.py

Made-with: Cursor
* chore(memos-local): checkpoint memory lifecycle changes

* feat(memos-local): add v4 sharing config foundation

* feat(memos-local): add hub storage foundation

* chore(git): ignore local worktrees

* feat(memos-local): add hub service skeleton

* feat(memos-local): add openclaw fallback guards

* feat(memos-local): add hub search and task share endpoints

* feat(memos-local): add minimal task share tools

* feat(memos-local): add client hub connector

* feat(memos-local): add local plus hub memory search

* chore(memos-local): stabilize v4 fast-track workspace

* feat(memos-local): add hub memory detail tool

* feat(memos-local): add hub team info tool

* feat(memos-local): add hub skill bundle export helper

* feat(memos-local): add hub skill sync flow

* feat(memos-local): finish v4 tool registration

* feat(memos-local): complete T12 sharing viewer ui

* docs(memos-local): finish T13 sharing docs and hardening

* fix: remove (engine as any) hack in memory_search, pass store/ctx explicitly

- createMemorySearchTool now accepts optional store and ctx parameters
  instead of accessing private members via (engine as any)
- Add missing worker.flush() call in root index.ts stop handler
- Fix shutdown-lifecycle test mocks for new module dependencies

Made-with: Cursor

* fix: add 10MB body size limit to Hub server readJson

Prevents memory exhaustion from oversized request bodies. Returns 413
status code when the limit is exceeded.

Made-with: Cursor

* feat: add per-user rate limiting to Hub server

Centralized auth + rate limit check for all authenticated endpoints.
- 60 req/min default, 30 req/min for search endpoints
- Returns 429 with retryAfterMs when exceeded
- Refactored handle() to authenticate once at the top

Made-with: Cursor

* feat: add missing SqliteStore group management methods

Add getHubGroupById, deleteHubGroup, and listHubGroupMembers to support
the existing Hub server group management API endpoints.

Made-with: Cursor

* feat: add group management UI and Viewer proxy endpoints

- Viewer server: add proxy endpoints for group CRUD, member management,
  and user listing (all forwarded to Hub API)
- Hub server: add GET /admin/users endpoint for listing active users
- Viewer UI: wire up "Manage Groups" button with group/member panel
  (already had the JS functions, now connected via server routes)

Made-with: Cursor

* feat: incremental push for already-shared tasks

- Add local_shared_tasks table to track which tasks have been shared
- task_share/task_unshare now mark/unmark tasks in local tracking table
- After each agent_end, automatically sync new chunks for shared tasks
  to the Hub without requiring manual re-share

Made-with: Cursor

* feat: Hub-side embedding and hybrid search (FTS + vector RRF)

- Add upsertHubEmbedding/getHubEmbedding/getAllHubEmbeddings to SqliteStore
- Hub server accepts optional embedder; embeds shared chunks async on receive
- Hub search now merges FTS and vector results via RRF (k=60) when embedder
  is available, falling back to FTS-only otherwise
- Pass embedder instance to HubServer from root index.ts

Made-with: Cursor

* fix(memos-local): harden hub search and incremental sync

* fix(memos-local): fix OpenClaw default model fallback chain

- config.ts: inject provider:"openclaw" when hostEmbedding/hostCompletion
  capabilities are enabled but no explicit provider is configured, so the
  fallback priority chain (user config → openclaw → local/rule) works correctly
- openclaw-api.ts: rename class to OpenClawAPIClient and add explicit
  `implements OpenClawAPI` to avoid confusion with the interface in types.ts
- ingest/providers/index.ts: rewrite all 5 openclaw summarizer methods with
  high-quality prompts aligned with openai.ts (language preservation, structured
  JSON output for filter/dedup), reuse parseFilterResult/parseDedupResult
- viewer/server.ts: pass openclawAPI to Summarizer in migration code path
- openai.ts: export parseFilterResult for reuse

Made-with: Cursor

* fix(memos-local): fix owner isolation and shutdown ordering bugs

- memory_search/skill_search: read agentId from context (3rd arg)
  instead of params, matching the OpenClaw Plugin SDK calling convention
- memory_timeline: add owner filtering so agents cannot access
  other agents' private chunks via timeline traversal
- memory_get: add owner filtering so agents cannot read other
  agents' private chunks directly
- memory_search: include ref and summary in details.hits for
  downstream tools (timeline/get) that need the full ChunkRef
- service.stop(): reorder to flush worker before telemetry shutdown,
  ensuring data persistence completes before auxiliary services stop

Made-with: Cursor

* fix(memos-local): preserve timeline window under owner filtering

* fix(memos-local): wire openclaw fallback through plugin runtime

* feat(memos-local): auto-approve hub join and interactive setup wizard

Simplify the LAN sharing onboarding flow so users no longer need to
manually edit JSON config or wait for admin approval:

- Hub /api/v1/hub/join now auto-approves and returns userToken directly
  (team token IS the trust credential)
- Connector auto-joins via teamToken when no userToken is available
- postinstall.cjs gains an interactive Phase 3 wizard that asks
  Hub-or-Client, collects hub address / team token, and writes config
- ClientModeConfig adds teamToken field for deferred auto-join
- Update tests to match the new 200 (active) response from join

Made-with: Cursor

* fix(memos-local): fix hub server connection bug and add admin management panel

The serveSharingStatus function incorrectly required role === "client",
causing Hub administrators to always see "Connected: no" with no access
to management UI. Removed the role restriction so both hub and client
roles attempt connection when client config (hubAddress + userToken) is
present.

Added a dedicated Admin panel (new nav tab, visible only to admins) with
four sub-tabs: Users (approve/reject pending, view active), Groups
(create/delete, manage members), Shared Memories (browse/delete shared
tasks), and Shared Skills (browse/delete shared skills). Includes
corresponding Hub server admin API endpoints and store methods.

Made-with: Cursor

* fix(memos-local): improve plugin config loading and build setup

- Add fallback config loading from file when OpenClaw doesn't provide config
- Update plugin manifest to include extensions field
- Fix package.json main entry to point to compiled output
- Fix string escaping in admin panel button
- Add test for OpenClaw fallback configuration
- Update .gitignore to exclude root-level compiled artifacts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(memos-local): add i18n support for admin/hub/sharing UI strings

Replace all hardcoded English strings in admin panel, hub settings,
sharing status, group management, search results, and toast/confirm
dialogs with t() i18n calls. Add ~120 new keys to both en and zh
dictionaries. Fix variable naming conflict (t → tk) in
renderAdminMemories to avoid shadowing the t() translation function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): redesign hub/team sidebar card with structured layout

Replace plain text info dump with structured card: user row with role
badge (green admin / purple client), key-value info grid for team/hub/groups,
and pill-style API version badge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): improve perf, i18n, a11y and UX in viewer html

- Parallelize 5 serial fetches in loadTasks() with Promise.all
- Add missing try-catch in loadMetrics()
- Replace all hardcoded 'zh-CN' locale with dynamic dateLoc() helper
- Add light theme overrides for role-badge contrast
- i18n task share/unshare and skill pull toast messages
- Replace double toggleGroupMembers() hack with proper reloadGroupMembers()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): enable admin panel in hub mode

Hub mode was missing admin permissions in /api/sharing/status, causing
the Admin tab to be hidden. Also unified hub connection resolution into
resolveHubConnection() so hub mode can authenticate against the local
hub server using the bootstrap admin token from hub-auth.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): auto-connect to Hub on startup in client mode

Client mode now automatically connects to Hub during service startup,
supporting both existing token reuse and auto-join via teamToken.
Eliminates the need for manual userToken configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): recognize persisted hub connection in sharing status

The sharing status endpoint only checked config file for userToken,
missing auto-joined sessions stored in the database. Now resolves
hubUrl and clientConfigured from both config and persisted connection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): add independent memory sharing to OpenClaw Hub

Add hub_memories table with FTS5 and embedding support for sharing
individual memory chunks to the Hub, independent of tasks. Includes
share/unshare/search/admin endpoints on both hub and viewer servers,
batch sharing-status injection into memory listings, admin panel UI
with shared memories tab, share/unshare buttons on memory cards, and
full EN/ZH i18n coverage. Validates groupId existence on group shares
and guards against missing hub_memories table in non-hub deployments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): implement host model proxy and settings UI

Replace OpenClawAPIClient stub with a real proxy that reads host
model providers (api.config.models.providers) and routes embedding /
completion requests through OpenAI-compatible HTTP endpoints.

Add Host Model Proxy toggles to the settings page with bidirectional
sync to provider dropdowns, deep-merge capabilities on config save,
and full EN/ZH i18n coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): route skill LLM calls through openclawAPI when provider is openclaw

SkillGenerator, SkillEvaluator, and SkillUpgrader all used direct HTTP
calls with cfg.endpoint + cfg.apiKey, which are undefined when provider
is "openclaw". Add the same openclaw branch that SkillValidator already
had: check cfg.provider === "openclaw" and delegate to
ctx.openclawAPI.complete().

Also includes the SkillValidator refactor and the settings UI tweak
that disables the skill provider dropdown when hostCompletion is on.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): add independent host skill toggle and unify getProviderConfig

- Add "Host Completion (Skill)" toggle to Host Model Proxy settings,
  making skill provider independently controllable alongside summarizer
  and embedding.
- Sync all four skill classes (Generator, Evaluator, Upgrader, Validator)
  to prefer skillEvolution.summarizer config before falling back to main
  summarizer.
- Add SkillEvolutionConfig.summarizer type definition.
- Wire up bidirectional sync between toggle and skill provider dropdown,
  persist capabilities.hostSkill, and add i18n for en/zh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): populate connection details in hub server sharing status

Server mode returned connected=true but left user, hubUrl, teamName
empty. Fill in hub-admin user info and fetch team/apiVersion from
own hub endpoint with graceful fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): add hostSkill sharing capability and wire skill evolution summarizer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): simplify memory share/unshare by removing redundant prompts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(memos-local): recognize openclaw provider with capabilities in import config check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): add hub memory list browsing without search query

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): add hub task/skill list browsing for client viewer

Enable browsing shared tasks and skills from Hub without requiring a
search query, mirroring the existing hub memory list flow. Adds
listVisibleHubTasks/Skills storage methods, hub server endpoints,
client API functions, viewer proxy routes, and UI scope selectors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): enable detail view for hub shared memories, tasks and skills

Hub shared items (memories, tasks, skills) were not clickable in both
the client viewer and admin panel. Added cache-based detail functions
and wired onclick events so users can view details just like local items.
Memories also attempt to fetch full content from Hub API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memos-local): add skill share/unshare API and improve hub client resolution

Add /api/sharing/skills/share and /api/sharing/skills/unshare endpoints
for publishing and unpublishing skills to Hub. Skill detail now includes
sharingVisibility field. Hub admin user info is fetched from Hub API
instead of hardcoded. Sharing operations use resolveHubClientAware for
correct identity in hub mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve TypeScript errors after merging feat/hub-sharing

- Add "openclaw" to SummaryProvider type union
- Import OpenClawAPI, parseFilterResult, parseDedupResult in providers
- Fix filterRelevantOpenClaw parameter type to match caller
- Add missing OpenClaw prompt templates
- Fix duplicate memories mapping in viewer server

Made-with: Cursor

* fix: remove duplicate scope declaration in skill_search after merge

Made-with: Cursor

* fix: call migrateHubTables() during database initialization

The hub sharing tables were defined but never created because
migrateHubTables() was not called in the migrate() chain.

Made-with: Cursor

* fix: ensure memory_search defaults to local-only when hub not configured

The merged code referenced searchScope/searchLimit/hubAddress/userToken
variables without defining them, causing every search to attempt a hub
query even without sharing enabled.

Made-with: Cursor

* fix: fix windows dir error

* chore: update doc

* fix(capture): filter system-injected boot/heartbeat/sentinel replies from memory (#1298)

* feat(memos-local-openclaw): enhance viewer, hub, storage and add docs

- Overhaul viewer HTML with new UI theme, layout and interactive features
- Extend viewer server with additional API endpoints and hub integration
- Improve SQLite storage with new query capabilities and schema updates
- Add hub sharing guide, demo guide and troubleshooting docs
- Update recall engine, capture, connector and config modules

Made-with: Cursor

* fix(memos-local): eliminate page refresh and scroll position loss during live polling

- Add scroll position save/restore in _livePollTick to prevent position reset on DOM updates
- Add data fingerprinting for memories, tasks, skills, admin panel to skip unnecessary re-renders
- Replace location.reload() with local state refresh in retryJoin and saveHubConfig
- Remove showRestartOverlay from sharing config save (server doesn't restart)
- Add Hub shutdown notification when switching from hub to client mode
- Fix update banner centering with wrapper div
- Add i18n keys for hub/client role switch confirmation dialogs
- Add hub_memories search in recall engine for shared memory recall
- Bump version to 1.0.4-beta.9

Made-with: Cursor

* fix(memos-local): shared memories disappearing from list & telemetry credentials externalization

- Fix owner filter in serveMemories/serveStats: shared memories (owner='public')
  were excluded because session_key LIKE 'agent:main:%' never matched.
  Changed to simply include all public memories alongside agent-owned ones.
- Add toast notifications for retry-connection in all states (loading/fail/error)
  so sidebar clicks also get user feedback.
- Remove hardcoded ARMS telemetry credentials from source code.
  Credentials are now loaded at runtime from telemetry.credentials.json
  (generated by CI from GitHub Secrets) or MEMOS_ARMS_* env vars.
  If neither is available, telemetry is silently disabled.

Made-with: Cursor

* fix(memos-local): prevent team sharing when hub disconnected and ensure atomicity

Disable "team" scope option in the sharing modal when hub connection is
not active, preventing users from triggering a doomed request. On the
backend, reorder scope handlers (memory, task, skill) so the hub remote
call executes before any local state mutation — if the hub request fails,
local data stays unchanged, avoiding inconsistency.

Made-with: Cursor

* fix(memos-local): scan all agents in migrate/scan to match import count

The migrate/scan endpoint only counted sessions under agents/main/,
while the actual import traverses agents/*/sessions/ for all configured
agents. This caused a mismatch between the previewed message count and
the import progress total.

Made-with: Cursor

* feat(memos-local): replace "Days" stat card with "Agents" count

Show the number of distinct agents instead of time span in the overview
stat cards. The data is already available from the owners array returned
by the stats API.

Made-with: Cursor

* feat(memos-local): enhance recall system with origin tracking, LLM filtering for Hub results, and skill embedding

- Add SearchHit.origin field (local/local-shared/hub-memory/hub-remote) to track result source
- RecallEngine sets origin based on chunk owner and hubmem: prefix
- memory_search: Hub remote results now pass through summarizer.filterRelevant LLM filtering
- Hub skill publish generates embedding async via embedSkillAsync for vector search
- Hub /api/v1/hub/skills search endpoint adds vector search + RRF fusion
- Add getVisibleHubSkillEmbeddings() to sqlite storage layer
- rawCandidates and auto-recall logs include origin field
- Viewer log recall-items display origin badges (本机共享/团队缓存/团队)
- AI output annotates each result with origin label
- Handle removed user re-join on Hub (reset to pending)
- Detect 401 in getHubStatus for deleted user cleanup

Made-with: Cursor

* fix(memos-local): improve self-join detection with port check and preserve client hub connection on disable

- Check both hostname and port when detecting self-join to avoid blocking different-port Hub on same machine
- Preserve client hub connection when sharing is disabled (instead of clearing it) for seamless re-enable
- Trigger auto-join when re-enabling sharing as client, not only on initial role switch

Made-with: Cursor

* feat(memos-local): v1.0.4-beta.12 — hub data isolation, notification, sharing UX

- Fix embedding model consistency: Client mode no longer stores hub_memories
  locally or searches them with local embedder. Remote data stays remote,
  searched via Hub API only. Hub mode retains local hub_memories search
  since embeddings are generated by the same model.
- Add user notifications for approve/reject: Hub server now creates
  notifications for users when their membership is approved or rejected.
- Fix sharing UI onboarding: Settings page auto-switches to Hub tab when
  sharing is unconfigured, showing the setup guide card.
- Fix scope selector visibility: Memory/task/skill scope selectors now
  appear when hub is connected, auto-refresh data on first connection.
- Fix hub group management: Add hub_groups/hub_group_members tables and
  CRUD methods, enforce group-based search permissions.
- Fix chunker type system: Support code_block, error_stack, list, command
  chunk kinds beyond paragraph.
- Fix test stability: Mock LLM in task-processor test, adapt viewer-sharing
  tests to pending-approval flow, fix viewer-ui function call.

Made-with: Cursor

* fix(memos-local): add groups field to HubStatusInfo type

Made-with: Cursor

* fix(memos-local): fix token expiry misdiagnosed as user removal, improve notification and admin panel refresh

- Fix 401 misdiagnosis: token expiry was incorrectly treated as "removed" status.
  Now queries registration-status for real state and auto-renews token if active.
- Add membership_approved/rejected notification types with i18n support
- Reconnect SSE and load notifications immediately on pending→active transition
- Shorten client pending poll interval from 10s to 5s
- Add user.status to admin fingerprint to catch status changes
- Force admin data refresh on view switch and after approve/reject/remove/role-change
- Add notifPollImmediate for instant notification check on new SSE connections

Made-with: Cursor

* chore(memos-local): bump version to 1.0.4-beta.13

Made-with: Cursor

* feat(memos-local): v1.0.4-beta.14 — auto-recall hub fallback, scope auto-upgrade, and sharing UX fixes

- Auto-recall: add hubFallback() to search remote Hub when local yields no/insufficient results (3-layer fallback)
- memory_search: auto-upgrade scope from "local" to "all" when sharing is enabled
- config: parse client nickname field for join requests
- hub/server: sync userManager.approveUser on registration-status token renewal
- storage: tasks query includes shared public tasks for original owner visibility
- viewer: role switch clears stale panels, rejected/removed show retry button, admin tab visibility control, adminToggleRole refreshes all panels, memory scope persists in localStorage

Made-with: Cursor

* fix: report import step failures correctly (#1303)

* fix: disable zhipu thinking mode to prevent output truncation

Zhipu AI models (glm-4.7, glm-5, etc.) use reasoning tokens that
consume the max_tokens budget, leaving no room for actual output.
This causes all summarizer functions (filterRelevant, judgeNewTopic,
judgeDedup, summarize, etc.) to return empty content.

Add buildRequestBody helper that detects zhipu endpoints and injects
{"thinking":{"type":"disabled"}} to disable the built-in reasoning
mode for these classification/generation tasks.

Tested models:
- glm-5: reasoning_tokens consumed 187/200 tokens (output empty)
- glm-4.7: reasoning_tokens consumed 199/200 tokens (output empty)
- glm-4.7 + thinking disabled: reasoning_tokens=0, all functions correct
- glm-5 + thinking disabled: reasoning_tokens=0 but poor instruction following
- Non-zhipu providers: completely unaffected by this change

* fix: migrate auto-recall from before_agent_start to before_prompt_build

* feat(memos-local): dual-instance isolation, team sharing state management, and admin notifications

- Hub port auto-derivation (gatewayPort + 11) to avoid port conflicts in multi-instance setups
- Hub port retry on EADDRINUSE (up to 3 retries)
- Role change notifications (role_promoted / role_demoted) sent to affected users
- Withdraw-pending API for canceling pending join requests when switching roles
- Complete client connection cleanup (clearClientHubConnection) on role switch
- Frontend toast guards: pending→connected/rejected only fire for client role
- Resource notification display: localized titles with resource name as detail
- Self-removal prevention in admin user management panel
- Faster restart overlay (waitDown max 8 attempts instead of 60)
- Config path resolution via OPENCLAW_CONFIG_PATH / OPENCLAW_STATE_DIR

Made-with: Cursor

* docs(memos-local): add comprehensive Team Sharing documentation across all docs and landing pages

- README: expand Team Sharing section with capabilities table, multi-instance deployment, Viewer panel details
- HUB-SHARING-GUIDE: add admin features, notifications table, multi-instance deployment, port auto-derivation
- www/index.html: add Team Sharing section with Hub-Client architecture demo, admin controls, nav link, update tool count to 17
- docs/index.html: add Team Sharing sidebar group, feature card, full setup/admin/multi-instance/notification docs
- openclaw.plugin.json: update description to include team sharing and collaboration tools

Made-with: Cursor

* docs(memos-local): sync install instructions with openmem.net — dual-platform tabs & one-liner install

- www/index.html: add macOS/Linux + Windows tab switcher for hero terminal and Quick Start install section; update install description to match openmem.net
- README.md: simplify install to one-liner curl/powershell commands matching openmem.net; add Windows PowerShell install; update homepage links

Made-with: Cursor

* docs(memos-local): add realistic Hub-Client architecture SVG diagram to Team Sharing section

Replace text-only code blocks with a full SVG architecture diagram showing:
- Hub server with team members (online/offline/pending states)
- Three Client instances (Alice connected, Bob pending, Charlie offline)
- Data flow arrows (task_share, skill_pull) between instances
- Shared data badges (tasks, memories, skills counts)
- Per-client views (local private vs team shared data)
- Port auto-derivation info box
- OpenClaw mascot icons on each instance

Made-with: Cursor

* docs(memos-local): add multi-OpenClaw collaboration visual to Hero section

- Add animated SVG showing Hub + 3 Client instances with data flow particles
- Each instance has OpenClaw mascot, role label, memory counts, and operations
- Animated connection lines and flowing data particles between instances
- "...N" indicator showing unlimited scalability
- Update Hero tagline to emphasize multi-instance collaboration

Made-with: Cursor

* docs(memos-local): move Hero collaboration diagram above install terminal & add architecture SVG to docs pages

- Move multi-OpenClaw collaboration SVG from below install terminal to above it in Hero section
- Add Hub-Client architecture diagram to docs/index.html and www/docs/index.html team sharing section
- Use distinct gradient ID namespaces (hg*/ts*/dg*) to avoid SVG ID conflicts across pages

Made-with: Cursor

* feat(memos-local): team_shared_chunks for Client team-share UI without hub_memories recall

- Add team_shared_chunks table + upsert/get/delete; clear in deleteAll
- Client: after Hub memories/share, persist metadata only; Hub role keeps upsertHubMemory
- Viewer: merge team_shared_chunks into memory list sharing map; getHubMemoryForChunk reads both
- Unshare paths delete team_shared_chunks; shareMemoryToHub/unshareMemoryFromHub aligned in index.ts
- capture: strip MiniMax <final> tags from captured text
- hub: sync bootstrapAdminToken on rename (self + admin)
- viewer html: admin preview/collapsed message fade mask 88%
- chore: version 1.0.4-beta.19

Made-with: Cursor

* fix(memos-local): sync client team share badge after admin removes memory on Hub

- Hub: resource_removed notification includes JSON message with memoryId + sourceChunkId
- Viewer: POST /api/sharing/sync-hub-removal clears team_shared_chunks + local hub_memories row
- html: sync from notifications before non-silent loadMemories

Made-with: Cursor

* fix(memos-local): sync team share on SSE notif update when on memories view

Made-with: Cursor

* fix(memos-local): sync-hub-removal only clears team_shared_chunks (badge), never hub_memories/recall

Made-with: Cursor

* fix(memos-local): skip stale hub-removal notifications after re-share

When a memory is re-shared to team after an admin removal, old
resource_removed notifications would incorrectly clear the new
team_shared_chunks badge on every page refresh. Now handleSyncHubRemoval
compares the notification's memoryId against the current hub_memory_id
and skips deletion when they differ (stale notification).

Bump to 1.0.4-beta.21.

Made-with: Cursor

* ci: fix darwin-x64 prebuild — use macos-15 + Rosetta

macos-13 runner is deprecated. Use macos-15 (ARM64) and rebuild
better-sqlite3 under Rosetta 2 via arch -x86_64 to produce the
x64 native binary.

Made-with: Cursor

* release: openclaw-plugin v1.0.4

* fix(memos-local): resolve telemetry credentials path in ESM mode

The plugin runs as ESM (type: module) but telemetry.ts relied on
__dirname which is undefined in ESM. Credentials file existed on disk
but was never found, silently disabling all telemetry since day one.

Now accepts pluginDir from index.ts (resolved via import.meta.url)
and uses it as primary search path for telemetry.credentials.json.

Made-with: Cursor

* release: openclaw-plugin v1.0.5

* chore: update web

* Remove redundant docs.

* fix(memos-local-openclaw): remove accidental runtime-path skill copy from repo

- Delete the duplicated memos-memory-guide file under the faux ~/.openclaw runtime path
- Ignore ~/.openclaw-style generated content inside the plugin directory to avoid future accidental commits

Made-with: Cursor

* fix: add deepseek provider

* feat: add install scripts

* fix: move memory from user prompt to system prompt

* Revert "feat: add install scripts"

* feat: add Tavily as pluggable internet search backend

* chore: regenerate poetry.lock for tavily-python dependency

Made-with: Cursor

* format: pass ruff check

---------

Co-authored-by: jiaqian <jiaqian@jiaqiandeMacBook-Air.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: tangbo <1502220175@qq.com>
Co-authored-by: jiang <fdjzy@qq.com>
Co-authored-by: zhaxi <syzsunshine219@gmail.com>
Co-authored-by: Jiang <33757498+hijzy@users.noreply.github.com>
Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: jiachengzhen <jiacz@memtensor.cn>
Co-authored-by: 席阳阳 <caralhsi@gmail.com>
Co-authored-by: Johnny <Johnny@Young.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tavily PR Agent <tavily-pr-agent@noreply.com>
## Summary
- sanitize nested metadata values before writing Neo4j node properties
- apply the same sanitization in both Neo4j enterprise and community
graph DB implementations
- add a regression test covering skill-memory style nested metadata

## Problem
Neo4j node properties only accept primitive values or arrays of
primitives. Some MemOS flows (especially SkillMemory and
feedback-related flows) can produce nested metadata like:
- `scripts: dict`
- `others: dict`
- nested objects under `info`
- arrays containing dict items

Those values can reach `SET n += $metadata` and trigger errors like:
- `Property values can only be of primitive types or arrays thereof`
- `CypherTypeError: Map{} encountered`

## Fix
This PR adds a small sanitization layer before Neo4j writes:
- keep primitive values as-is
- keep arrays of primitives as-is
- serialize dict values to JSON strings
- serialize nested list items that are dict/list values

This keeps metadata readable while making it safe for Neo4j property
storage.

## Validation
- reproduced the issue locally with SkillMemory-style metadata
- verified the sanitized metadata no longer contains Neo4j-invalid map
values
- verified a real `/product/add` flow successfully created `SkillMemory`
without the previous Neo4j `Map{}` error
@CaralHsi CaralHsi marked this pull request as ready for review March 27, 2026 09:10
@CaralHsi CaralHsi merged commit 23cc791 into main Mar 27, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants