mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-23 00:43:18 +00:00
feat(file_watcher): add directory deletion support with descendant indexing Add support for deleting entire directories and their indexed descendants in the file watcher. Previously only individual file deletions were handled properly. Now when a directory is deleted, the system finds all indexed files beneath that directory path and removes them along with their metadata and chunks. The implementation includes: - New `_descendant_indexed_paths` method to find all indexed files under a given directory path - Updated `_on_deleted` method to process both the target path and all its indexed descendants - Proper handling of symlinks and path resolution differences - Enhanced logging to show directory deletion with child count Also adds necessary os import for path operations. refactor(config): restructure configuration profiles for clarity Rename curated.yaml to remove outdated configuration file and rename full.yaml to expert.yaml with updated documentation. Add new service.yaml configuration profile that provides a service-aligned MCP surface with three main tools: - retrieve: graph-aware hybrid retrieval - remember: single write entry point with log/distill modes - maintain: vault hygiene sweep The expert configuration now excludes the ingest tool since cold-path operations are handled by external agents, and adds memory_lint tool for structural issue detection. Updated documentation to clarify the different configuration profiles and their intended usage patterns. ```
40 lines
1.9 KiB
Python
40 lines
1.9 KiB
Python
"""MCP step shells — the @R.register classes the model invokes as MCP tools.
|
|
|
|
Three groups:
|
|
|
|
Hot-write primitives that bypass services and land on MFS directly:
|
|
sync — idempotent event-folder upsert (event log)
|
|
memory_toolkit — memory_create / update / property_update /
|
|
rename / delete / archive / get / list /
|
|
links / backlinks / resolve_wikilink /
|
|
count_tokens. Each step lives in
|
|
`reme2.memory.memory_toolkit` and exposes
|
|
BOTH an `execute()` (this MCP path) and a
|
|
same-named class method (the agent toolkit
|
|
path used by the Ingestor's ReActAgent).
|
|
|
|
Service delegates (thin shells over the three memory services):
|
|
memory_retriever — memory_search + memory_graph_search; delegate
|
|
to the Retriever component
|
|
(`reme2.memory.retriever`).
|
|
memory_lint — read-only projection of the Maintainer's lint
|
|
findings (`reme2.memory.maintainer`).
|
|
|
|
Topic creation is owned by the Ingestor (`reme2.memory.ingestor`) — its
|
|
LLM-driven R-M-W loop decides when a new topic is warranted, applies the
|
|
schema preset, and routes the write through `memory_create`. There is no
|
|
separate `topic_create` MCP tool.
|
|
|
|
The Ingestor's MCP face (`ingest`) is registered from
|
|
`reme2.memory.ingestor`. Importing this package triggers all the step
|
|
registrations hosted here and in `reme2.memory.memory_toolkit`.
|
|
"""
|
|
|
|
from ...memory import memory_toolkit # noqa: F401 -- triggers @R.register for memory_*
|
|
from . import memory_lint # noqa: F401 -- triggers @R.register for memory_lint
|
|
from . import memory_retriever # noqa: F401 -- memory_search / memory_graph_search
|
|
from .sync import Sync
|
|
|
|
__all__ = [
|
|
"Sync",
|
|
]
|