Releases: max-ramas/rms-memory-mcp
Releases · max-ramas/rms-memory-mcp
Release list
v1.0.2
Changelog
All notable changes to this project will be documented in this file.
[1.0.2] - 2026-07-08
Security
- Path Traversal Prevention:
rms_readandrms_writenow reject paths containing..components, preventing escape from the vault directory. - LanceDB Filter Injection: All filter strings in
store.rs(delete_document,read_document) now escape single quotes viaescape_filter(), preventing potential data corruption.
Fixed
- OpenCode MCP Payload Format: Replaced hardcoded
if ide.name == "OpenCode"branching with aPayloadBuilderdependency-injection architecture. Theopencode_payloadfunction now produces OpenCode's nativeMcpLocalConfigschema ({"type": "local", "command": [array], "enabled": true}), which was previously missing thetypefield and using a stringcommandinstead of an array. - Zed JSONC Silent Skip: The installer now falls back to
strip_json_comments()whenserde_json::from_strfails on config files containing//comments (e.g. Zed'ssettings.json). Previously, Zed configs were silently skipped. On parse failure,tracing::warn!now logs a clear diagnostic message. - Missing
enabled: truefor Standard Payload: Thestandard_payloadfunction now injects"enabled": truefor all non-OpenCode IDEs. This is required by Zed'scontext_serversschema and is a harmless no-op for Claude, Cursor, and VSCode. - Hybrid Search Activated: The LanceDB
search()method now uses combined vector search + Tantivy full-text search (FullTextSearchQuery). Previously, only vector search was performed despite the FTS index being created. Falls back to vector-only gracefully if FTS index is unavailable. - Write
createMode: Now correctly rejects overwriting existing files. Previously,createfell through to the catch-all_branch which behaved as a full overwrite. links_resolvedNo Longer Stub: Bothsync_vaultandindex_vault_fullnow store actual normalized link paths inlinks_resolvedinstead of the placeholder"[]".- Safe Unsafe: Added
// SAFETY:documentation comment for theTMPDIRenvironment variable override inIndexer::new().
Added
rms-memory doctor(Full Diagnostics): Implements 5-point vault health check: directory structure, missing document IDs, broken cross-document links, LanceDB store accessibility, and registry coherence.rms-memory uninstall: New command to removerms-memoryentries from all discovered IDE configuration files. Usespatcher::remove_key()for safe JSONC-aware key removal with automatic.bakbackups.- Graceful Shutdown: Added
SIGINT/Ctrl+Chandler inmain.rsviatokio::signal::ctrl_c(), ensuring clean log flush on exit instead of immediate process termination. - Zombie Process Prevention: MCP server now signals background file-watcher tasks to stop when stdin closes (EOF on disconnect).
std::process::exit(0)inmain.rsguarantees the process terminates even if tokio runtime has lingering tasks. - llms.txt Export Compliance:
export-llmsnow generates a properllms.txtspec format with clickable links, frontmatter-derived titles, and content summaries, in addition to the full vault contents section.
Changed
- Installer DI Architecture: Introduced
PayloadBuildertype alias (fn(exe: &str) -> serde_json::Value) and attached it toIdeConfigas abuild_payloadfield. Adding a new IDE format no longer requires modifyingrun_installer()— just one line inget_ide_registry(). - ExportLlms Optimization: Fixed double
find_markdown_files()call — now computed once.
v1.0.1
v1.0.0
Changelog
All notable changes to this project will be documented in this file.
[1.0.0] - 2026-07-07
Fixed
- MCP Initialization Bug: Changed MCP workspace provisioning to fallback to the process's current working directory (
cwd) when the IDE (like Zed) fails to pass a validrootUriin the JSON-RPCinitializehandshake. Furthermore, strict validation now rejects root paths (/) to entirely prevent the generation of orphanedUnknownProjectvaults. - Config Directory Isolation: Removed the
directories::ProjectDirsabstraction which defaulted to messy system paths (e.g.,~/Library/Application Support/). All configs, databases, and logs are now strictly bound to a cross-platform~/.rms-memory/directory to ensure clean disk usage. - Import Routing Categorization: Fixed an issue where unmatched markdown files were erroneously dumped into
guides/. They now default todocs/. Added strict mapping fortask.md,walkthrough.md,changelog,historyandimplementation_planto route directly toartifacts/. - Infinite Sync Loop Fix (CPU Hog): Resolved a critical issue where the
notifyfile watcher would recursively trigger itself indefinitely by ignoring changes to.lancedb,store.json, and.logfiles, ensuring 0% CPU consumption during idle times. - macOS Sandboxing Crashes:
rms-memory installnow automatically copies a safe binary, builds entitlements (disable-library-validation), and runscodesignatomically to bypass macOS terminating the running process withSIGKILL. - Agent Rule Templates: Updated all MCP injected templates (
general_mcp_guide.md,cursor_rules.md,claude_code_rules.md,zed_assistant_rules.md) to explicitly use IDE-prefixed tools (rms-memory_rms_search) and document theartifacts/,docs/, andapi/directories. - Repository Pollution: Removed the generation of
.bakfiles during agent rule injection (rules_injector.rs) to prevent flooding user workspaces with backup files. - Batched Vector Indexing (OOM Fix): Replaced monolithic embedding calls with a batched chunking architecture (
batch_size = 32) insync_vaultandindex_vault_full. This entirely resolves extreme CPU/RAM spikes and process deadlocks (OOM) when indexing exceptionally large files, allowing thefastembedONNX Runtime to efficiently ingest 100% of the file content without truncation.
Changed
- Default Vault Structure: Vault initialization (
cli.rs,workspace.rs) now explicitly createsdocs/andapi/directories alongsiderules/,decisions/,architecture/, andartifacts/.
Added
- Monolith Refactoring & Dependency Injection: Completely dismantled
cli.rsandmcp_server.rsmonoliths into modular components (src/commands/andsrc/tools/). IntroducedAppContextfor dependency injection of databases and models across the system. - MCP Stdio Server: Full implementation of JSON-RPC protocol over standard I/O for
rms-memory_rms_read,rms-memory_rms_write, andrms-memory_rms_searchtooling. - Global Vault Registry: Added
registry.tomlrouting logic allowing the server to automatically detect the current code directory and isolate contextual documentation into a unified, secure system-level vault (~/.rms-memory/vaults/ProjectName). - Hybrid LanceDB Retrieval: Deployed local embedded
LanceDB(v0.31.0) configured with multi-threaded Vector Search and Tantivy FTS indices to guarantee zero-fail context hits. - Multilingual-E5-Small FastEmbed Pipeline: Native ONNX AST embedding for dual-language (Russian & English) documentation support directly integrated into the ingest flow.
- Semantic AST Markdown Chunking: Precision boundary preservation (1500 chars limit) via
pulldown-cmark. It attaches hierarchical headings to paragraphs and enforces smart sliding-window truncation for large code blocks. - Dynamic IDE Auto-Installer (
rms-memory install): Interactive recursive scanner spanning~/.config/and~/Library/Application Support/to auto-inject themcpServersJSON object directly into Cursor, Zed, OpenCode, VS Code, and Claude Code configurations. - Rules-as-Code IDE Patching: Non-destructive AST block-patching (
<!-- RMS-MEMORY-START -->) to automatically inject contextual guide instructions into.cursorrules,.claude/CLAUDE.md,.zed/assistant.md, andRMS_MEMORY_GUIDE.md. - Dry-Run & System Auditing (
--dry-run): Execution previews forinstallandinitcommands to visualize JSON modifications and Markdown AST patches without corrupting host files. Generates automated.bakbackups before any writes. - Background Incremental Sync (
rms-memory sync): Zero-latency startup sync task performingDelete-then-Insertvector replacement based onmtimebound metadata. - Garbage Collection (
rms-memory gc): Prunes orphaned LanceDB data caches matching deleted Vault boundaries. - LLMs.txt Export Hook: Enables one-shot compilation of a project Vault into standard flat structures.
- Linked Documents Architecture: Introduced native support for "Link Files"—standard Markdown Vault entries containing a
link: <source_path>frontmatter property. The LanceDB indexer,readandwriteendpoints seamlessly trace and operate on the original repository file while enforcing strict path constraints within the Vault directory structure. - Interactive Documentation Importer (
rms-memory import): Added a powerful CLI importer to scan project repositories for existing legacy documentation (README.md,CLAUDE.md,.cursorrules,docs/,ADR/). Features 5 user-selectable strategies includingLink Only(creates zero-copy Link Files) andImport & Organize(deterministically categorizes files into the Vault). - Auto-Import Integration: Added
--auto-importflag torms-memory config(auto_import_strategyinregistry.toml). Whenauto_add_projectstriggers in the background, the server can now silently resolve legacy documentation into the Vault using the pre-configured strategy without blocking the MCP connection. - Write-Guard Snapshotting: Captures local
fs::copy.bakstate preservation automatically before an AI is permitted to execute JSON-RPC.mdreplace/append mutations. - Dedicated Telemetry Logging: Integrated
tracingstreams routed directly to~/.rms-memory/rms.logshielding MCP stdio channels from standard output noise.
Fixed
- Safe Auto-Inject Default:
auto-injectconfiguration now defaults tofalse, preventing implicit modification of.cursorrules,CLAUDE.md, etc., upon first repository discovery without explicit user consent. - Write-Guard Rolling Backups: Added
max_backupsparameter to prevent disk pollution. Ensures backup files are gracefully rotated and limited (default 5). - Embedding Dimension Safety: Hardened
Store::initto properly validate existing table schema dimension arrays against the current embedding model dimension. Returns a loudINDEX_REBUILD_REQUIREDerror instead of a runtime vector search panic. - Dependency Inversion (DIP) & Testing: Extracted
VectorStoreandEmbeddertraits fromMcpServer, establishing a robust Mock architecture for the JSON-RPC layer and cleanly eliminating LanceDBRecordBatchleaky abstractions. - Bug Fix: Fixed server crash/early exit during
initializein strict sandboxes by routinghf-hubatomic download temp files to the.rms-memorycache directory instead of the system temp directory, preventingRead-only file system(os error 30) panics. - Bug Fix: Fixed JSON-RPC stream corruption where background auto-initialization was writing
[INFO]logs tostdoutinstead of usingtracingorstderr, causing the MCP client to instantly disconnect the transport.