feat(memos-local): structured topic classifier, agent tracking, task auto-finalize#1412
Merged
tangbotony merged 10 commits intoApr 3, 2026
Merged
Conversation
…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
Add disable, enable, and hard-delete management for skills in the memory viewer so inactive skills stop participating in recall while remaining manageable from the UI. Made-with: Cursor
Merge the latest upstream openclaw-local-plugin-20260331 changes into the fork branch so follow-up MemOS local plugin work can continue from the synced codebase. Made-with: Cursor
…' into native_memos
…, task auto-finalize, and viewer enhancements - Replace simple NEW/SAME topic judge with structured two-stage LLM classifier (JSON output with confidence score, low-confidence arbitration fallback) - Compact prompts and task state to reduce token consumption by ~50-60% - Add role-based dedup filtering to prevent cross-role memory merging - Add sourceAgent/owner field to memory search results and hub sharing - Add task auto-finalize for stale active tasks (configurable timeout in settings) - Add agent filter badges and i18n support in viewer UI - Fix session-scoped task processing to prevent cross-agent task interference - Update task-processor tests for new classifier API with arbitration scenarios Made-with: Cursor
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.
Summary
Changes
Topic Judgment Algorithm
task-processor.ts: NewbuildTopicJudgeState()builds compact task context (topic, recent 3 turn summaries, conditional assistant snippet for short/ambiguous messages)task-processor.ts:processChunksIncrementally()now callsclassifyTopic()→ structured JSON result; low-confidence NEW (< 0.65) triggersarbitrateTopicSplit()second passproviders/openai.ts: NewclassifyTopicOpenAI(),arbitrateTopicSplitOpenAI(),parseTopicClassifyResult()with compact prompt ({"d":"S"|"N","c":0.0-1.0})providers/index.ts: NewSummarizer.classifyTopic()/arbitrateTopicSplit()methods with OpenClaw and multi-provider routingproviders/anthropic.ts,gemini.ts,bedrock.ts: UpdatedTOPIC_JUDGE_PROMPTwith improved short-message/pronoun handling rulesAgent Source Tracking
index.ts: Addedowner/sourceAgentfields to memory search results, auto-recall output, and hub sharing payloadshub/server.ts: Accept and propagatesourceAgentin memory share and search responsesviewer/html.ts: Display agent badge on memory/task/skill itemsTask Auto-Finalize
viewer/server.ts:autoFinalizeStaleTasks()triggered on task page load; configurable viataskAutoFinalizeHourstypes.ts: AddedtaskAutoFinalizeHourstoMemosLocalConfigwith default of 4viewer/html.ts: Settings UI field for auto-finalize timeout with i18nDedup & Task Isolation
worker.ts: Filter dedup candidates by matchingroleto prevent cross-role mergingtask-processor.ts: Session-scoped task processing prevents cross-agent interferenceTest Plan
task-processor.test.ts): 19/20 passed (1 pre-existing session-change issue)accuracy.test.ts) against real LLM:tscclean)Made with Cursor