ReMe/reme2/mcp/test/__init__.py
huangsen dd2de16481 ```
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.
```
2026-05-11 10:52:25 +08:00

19 lines
825 B
Python

"""End-to-end tests for the reme2 MCP profiles.
Two suites — one per shipped profile (`expert`, `service`) — boot
`reme2.application.Application` against a temp vault and exercise every
MCP-exposed job through `app.run_job(...)`. We force `service.backend =
http` so the suites never block on stdio MCP transport; jobs are
called in-process.
Layout:
_helpers.py shared vault seed, app factory, response decoder
test_expert.py expert profile (every memory_* primitive surfaced)
test_service.py service profile (retrieve / remember / maintain)
__main__.py CLI: `python -m reme2.mcp.test`
The test functions are plain `async def check_<name>(app, ctx)` returning
True / raising. The CLI runner reuses one app per profile to keep the
boot cost out of the per-test budget.
"""