# Version History ## v4.3.6 - Drop Unused pandas and python-magic Dependencies ```text - python-magic was declared as a dependency but never imported anywhere in src/memcord -- removed as dead weight (it also needs a separately installed libmagic on Windows, so it never actually worked there). - pandas was pulled in solely for a single pd.read_csv() call in the CSV/TSV importer, dragging in numpy, python-dateutil, and tzdata for functionality the standard library's csv module already covers. Replaced with a small csv.reader-based table formatter; import output is unchanged. - Net effect: a fresh install pulls fewer packages, with no feature loss -- CSV/TSV import still produces the same readable table plus row/column metadata. ``` ## v4.3.5 - Fix Update Runs Falsely Blocked by Installer Self-Modifications ```text - Every install run rewrites README.md (path substitution) and, via uv run's implicit lock sync, sometimes uv.lock -- both git-tracked files. The next update run's local-modifications safety check then saw those as "local changes" and refused to proceed, requiring a manual stash/reset before the installer could run again. - Fixed: install.sh/install.ps1 now discard just those two files' diffs (git checkout -- README.md uv.lock) before the dirty-check runs, so the installer's own prior output never blocks an update -- any other tracked file the user actually edited still correctly blocks it. - Added --frozen to the uv run invocations so uv stops touching uv.lock in the first place, rather than only cleaning up after the fact. ``` ## v4.3.4 - Quieter Installer Output ```text - Emoji trimmed to three semantic markers (checkmark/cross/warning) across install.sh, install.ps1, and utilities/protect_data.py; all decorative emoji removed. - Installers now pass --backup-only alongside --force to protect_data.py, skipping its CRITICAL DATA LOSS WARNING banner and DATA PROTECTION OPTIONS listing entirely -- the installer always creates the backup unconditionally, so displaying alternative options users can't actually choose between was pure noise. - protect_data.py's inline recovery instructions replaced with a short pointer to docs/data-protection-guide.md#recovery-after-data-loss, which already documents the same restore steps in full. - Fixed a real gap: the entire slash-commands block (not just the interactive picker) was gated on a single "fresh install" check, so update runs -- the normal path for anyone who already has memcord installed -- never mentioned --manage-commands at all. The hint now always prints; only the interactive auto-invoke stays limited to fresh, interactive installs. - install.ps1 now sets $env:PYTHONUTF8 before invoking child Python processes, so a legacy-codepage Windows console can't turn a successful backup into a false "aborted" failure via a print() encoding crash. ``` ## v4.3.3 - Fix install.ps1 Crash on Plain `irm | iex` ```text - Fixed install.ps1 crashing on the documented Quick Start command: irm https://github.com/ukkit/memcord/raw/main/install.ps1 | iex - Root cause: [ValidateSet("project", "user")] on the $Scope param() broke under Invoke-Expression -- piping the script into iex binds $Scope to an empty string before any argument is supplied, and ValidateSet rejects that empty default immediately ("The attribute cannot be added because variable Scope with value would no longer be valid"). This hit every user running the plain install command, not just anyone passing -Scope. - Validation moved into the script body instead: an empty/unset $Scope is accepted (means "let generate-config.py auto-detect"), only a non-empty, unrecognized value is rejected. - Added a regression test asserting [ValidateSet] is never reintroduced on the $Scope param. ``` ## v4.3.2 - Global Slash-Command Install ```text - scripts/generate-config.py gains --manage-commands (interactive picker) and --commands all|none|name1,name2 (non-interactive) to install the 17 memcord-*.md slash commands into ~/.claude/commands/, making them available from any project directory instead of only inside the memcord checkout. - Both flags funnel through apply_command_selection(), an idempotent, ownership-safe reconciliation function keyed on exact filename identity against the shipped command manifest -- foreign files at the target directory are never touched. Deselecting an unedited command deletes it; deselecting one that's been hand-edited renames it to .bak instead of discarding the edit. - install.sh/install.ps1 auto-invoke the picker at the end of a fresh install, gated on stdin being a real terminal so curl|bash/irm|iex never hangs on piped input -- it prints the manual command instead. Update runs never auto-prompt. - Rewrote the long-stale "Custom Claude Code Commands" sections in docs/installation.md and docs/claude-code-guide.md, which described a fictional memory-*.md example set that didn't match any real shipped file. ``` ## v4.3.1 - Global-Scope Install by Default ```text - Fresh installs now register memcord globally (~/.claude.json) by default, so it's available in every project without per-project setup. Pass --scope project to scripts/generate-config.py (or --scope/-Scope to install.sh/install.ps1) to keep writing a project-level .mcp.json for team sharing via version control instead. - Re-running the installer to update an existing checkout auto-detects and preserves whichever scope is already in use (project scope if a .mcp.json already exists, global otherwise) -- updating never silently switches an existing team-shared install to global. - The global-scope merge touches only the mcpServers key in ~/.claude.json, leaving unrelated Claude Code state untouched, and takes a rolling ~/.claude.json.bak backup before writing. - save_config() now writes atomically (temp file + replace) instead of writing the target file directly, for all generated configs. - Fixed a latent crash in the VSCode config step when .vscode/ doesn't already exist (masked in this repo only because .vscode/ is git-tracked). - README.md and docs/installation.md document the new default and how to switch an existing project-scoped install to global. ``` ## v4.3.0 - MCP Compliance and Self-Updating Installers ```text - install.sh / install.ps1 now detect an existing checkout (in the current directory or a memcord/ subdirectory) and update it in place instead of failing on git clone: fast-forward-only git pull, aborting safely if tracked files have local modifications, reusing the existing virtual environment, and upgrading dependencies. - docs/installation.md and README.md document the new update flow, with the manual git pull steps kept as a fallback. - Added title fields (SDK-supported, spec-recommended) to all 53 Tool definitions across server.py and optimized_schemas.py. - Fixed optimized_schemas.py: memcord_list, memcord_zero, and memcord_list_tags still used the old {"properties": {}} empty-object schema instead of additionalProperties: false, missed by the v3.4.1 MCP compliance pass. - Bumped the mcp SDK floor to >=1.28.1. ``` ## v4.2.0 - Storage Links Registry ```text - custom_storage_path now redirects a slot's full settings, not just its data file: the slot's _config.json sidecar (tags, group, max_auto_summaries, etc.) moves with it to the custom directory, so two devices sharing a slot via a synced folder (e.g. Dropbox) no longer drift apart on settings. - New local-only registry file, memory_dir/_storage_links.json, maps slot_name -> absolute custom path. The registry itself is never synced — each device keeps its own local redirect, pointing at wherever it mounts the shared folder. - Legacy slots configured under the old (pre-registry) scheme are migrated automatically on first read: the sidecar is relocated to join the data and the registry is updated, with the registry commit deferred until after the file relocation succeeds so a failed migration can't leave a slot stranded. - memcord_configure reads custom_storage_path from the registry instead of the sidecar. - utilities/protect_data.py no longer misreports _storage_links.json or *_config.json sidecars as memory slots during the pre-install data protection check. - config-templates/* now include empty MEMCORD_MEMORY_DIR and MEMCORD_SHARED_DIR placeholders in the generated MCP client configs, so users discover these env vars without hand-editing the file. ``` ## v4.1.1 - Cross-Drive Storage Migration Fix ```text - Fix custom_storage_path migration raising WinError 17 ("cannot move the file to a different disk drive") when the target directory is on a different drive than the slot's current location. - set_custom_storage_path now uses shutil.move (copy+delete fallback) instead of a bare os.rename, so migrations work across drives and filesystems, not just within the same one. ``` ## v4.1.0 - Custom Storage Path ```text - New per-slot config key: custom_storage_path, settable via memcord_configure action="set" key="custom_storage_path" value="". Lets a slot's primary data file live in any directory — e.g. a Dropbox/OneDrive-synced folder — so the same memory can be read and updated from multiple devices. - Setting the path on a slot that already has data automatically migrates the .json (and .bak) file to the new location; clearing it (empty string or "none") migrates back to the default memory_slots/ directory. - New PathValidator.validate_custom_storage_dir() in security.py validates absolute target directories (rejecting traversal, dangerous characters, and reserved Windows device names per path component) and verifies the directory is creatable and writable before linking a slot to it. - Collision protection: if data already exists at both the old and new locations, the set call is refused rather than silently overwriting either. - Search index, cache, and archives remain local per machine and are rebuilt lazily; only the slot's primary data file is shared — each device sets its own local redirect once, pointing at wherever it mounts the shared folder. - list_memory_slots now discovers slots whose primary file lives entirely outside memory_dir, via their config sidecar. - 26 new tests across tests/test_custom_storage_path.py and tests/test_configure_tool.py; full suite (1133+) passes. ``` ## v4.0.2 - OpenClaw Installation Docs Fix ```text - Fix SKILL.md OpenClaw config snippet: use standard JSON (quoted keys) instead of JSON5 — openclaw.json requires valid JSON, not JSON5. - Add explicit note that the MCP server config must be added manually to ~/.openclaw/openclaw.json after running `openclaw skills install`. - Add openclaw mcp list as the verification step in SKILL.md. - Add full OpenClaw installation section to docs/installation.md covering the two-step install (skills install + manual mcp config) with examples for default and named slots. ``` ## v4.0.0 - OpenClaw / ClaWHub Compatibility ```text - New tool: memcord_auto_save — saves chat text to a default slot without requiring prior memcord_name / memcord_use / memcord_init setup. Designed for gateway integrations (OpenClaw, etc.) where slot management calls are not part of the conversation flow. Slot name is controlled by MEMCORD_DEFAULT_SLOT env var (default: "default"). Auto-creates the slot on first use. - _resolve_slot now accepts MEMCORD_DEFAULT_SLOT as a 4th fallback (after explicit arg, active slot, .memcord binding), so memcord_read with no slot_name argument also reads from the default slot when the env var is set. - SKILL.md added to repo root — ClaWHub skill manifest with uv install spec, OpenClaw gateway config snippet (toolFilter to expose only memcord_auto_save + memcord_read), and AI usage instructions. - .clawhubignore added — excludes tests, docs, memory_slots, bytecode, etc. from the published ClaWHub bundle. - 17 new tests in tests/test_auto_save.py; all 1107 tests pass. ``` ## v3.4.2 - Automatic Summary Consolidation ```text - Auto-pruning of auto_summary entries at save time: when the combined auto_summary + rolled_summary entry count exceeds max_auto_summaries (default 5), the oldest entries are merged into a single rolled_summary entry before the slot is written to disk — keeps context size bounded across long sessions without any manual cleanup. - New SlotConfig field: max_auto_summaries (int, default 5, 0 = disabled). Configurable per-slot via: memcord_configure action="set" key="max_auto_summaries" value="N" - New MemoryEntry type: rolled_summary — marks consolidated entries so they count toward the cap on subsequent saves. - manual_save entries are never touched by consolidation. - 26 new tests in tests/test_auto_consolidation.py; all 1090 tests pass. ``` ## v3.4.1 - MCP Protocol Compliance Fixes ```text - isError=true on all tool execution errors: ErrorResult marker class propagates isError=True through CallToolResult at the MCP boundary — enables LLM self-correction per spec §tools/error-handling (2025-11-25). Zero breaking changes: ErrorResult subclasses list so all internal and test code using result[0].text is unaffected. - SDK bump: mcp>=1.27.1 (from 1.27.0) — latest 1.x patch release - Tightened inputSchema for no-parameter tools: memcord_list, memcord_ping, memcord_zero, memcord_close, memcord_list_tags now use {"type": "object", "additionalProperties": false} per spec recommendation instead of {"type": "object", "properties": {}} - All 1063 tests pass ``` ## v3.4.0 - MCP Protocol Compliance (spec 2025-03-26 / 2025-11-25) ```text - SDK bump: mcp>=1.27.0 for spec 2025-11-25 compliance - Tool annotations on all 28 tools: readOnlyHint, destructiveHint, idempotentHint, and openWorldHint — enables MCP clients to make smarter tool-use decisions - Centralized _TOOL_ANNOTATIONS map + _annotate_tools() post-processor using model_dump round-trip — zero per-tool boilerplate, forward-safe for SDK updates - Anthropic extension anthropic/maxResultSizeChars: 500K on memcord_read and memcord_query — raises Anthropic Claude's per-tool result truncation cap from 25K - Resource metadata enrichment: description (slot name + entry count + char count) and size fields on every Resource object in list_resources - ResourceTemplate registration for memory://{slot_name}.{md,txt,json} — enables slot-name argument autocompletion in supporting clients - Completions handler (_handle_completion): returns live slot-name suggestions filtered by prefix when clients send completion/complete requests - Progress notifications with message field: _emit_progress() helper emits ProgressNotification with human-readable status in _handle_saveprogress, _handle_importmem, and _handle_mergemem — requires client to provide progressToken - 23 new tests in tests/test_mcp_protocol_compliance.py covering all new features - All 1064 tests pass ``` ## v3.3.0 - Zero Memory Leaks and Minimum Memory Footprint ```text - Bounded OperationQueue: completed/failed/cancelled ops evicted automatically when count exceeds 200; no unbounded accumulation on long-running servers - Tracked asyncio tasks: fire-and-forget create_task() calls in ProgressTracker and ProgressAwareMixin now store references in a set with add_done_callback cleanup — prevents silent GC destruction of in-flight callbacks - O(1) LRU cache eviction: interned_strings, json_parse_cache, json_serialize_cache switched from plain dict (full list copy on trim) to OrderedDict with popitem(last=False) / move_to_end() — no more O(n) memory spikes at capacity - Bounded access history: UsagePatternAnalyzer._access_history changed from list with slice copy to deque(maxlen=history_size); per-key access_times capped at deque(maxlen=1000) — zero-copy auto-eviction - RateLimiter memory pruning: empty client/operation entries deleted after request expiry — bounds growth from servers with many unique clients - Undo stack as deque: _undo_stack changed from list with O(n) pop(0) to deque(maxlen=50) — O(1) eviction, serialization uses list() - URL session cleanup: requests.Session() in WebURLHandler now uses context manager — connection pools always released, including on exception paths - change_log hard cap: IncrementalSearchIndex caps change_log at 5000 entries (trimmed to 1000) on every write, not just during 5-minute maintenance cycles - All 1041 tests pass ``` ## v3.2.0 - Fix Event Loop Blocking in Async Summarizers ```text - SemanticSummarizer and TransformersSummarizer offload model loading and inference to asyncio.to_thread — event loop stays responsive during heavy CPU/IO work; MCP requests no longer queue behind model downloads - Merge now preserves individual slot entries instead of flattening to a single blob, retaining per-entry timestamps and metadata - Ruff formatting applied across codebase - Release-sync workflow extended with X/Twitter announcement step ``` ## v3.1.0 - Write Operations Honor .memcord Binding ```text - Write operations now honor .memcord binding as a fallback slot source - _resolve_slot_for_write() follows the same priority as reads: explicit argument → active slot → .memcord binding in cwd - When the bound slot exists, it is auto-activated for the session so subsequent calls skip re-detection (no memcord_use required after restart) - Affected tools: memcord_save, memcord_save_progress, memcord_configure - Updated docs: README.md, tools-reference.md, troubleshooting.md, claude-code-guide.md to reflect unified slot resolution behavior ``` ## v3.0.2 - Remove Unsupported SessionEnd Hook ```text - Dropped SessionEnd from hooks.json template — Claude Code does not support type:agent for stop/session-end hooks ("Agent stop hooks are not yet supported outside REPL") - merge_hooks() now runs a cleanup pass: re-running --install-hooks removes stale memcord hooks from events no longer in the template, fixing existing installs automatically - Fixed test_hooks_template_entries_have_required_fields to walk the nested hooks format - Added test covering stale hook removal behaviour - Updated docs: installation.md and config-templates/README.md - Existing users: run `uv run python scripts/generate-config.py --install-hooks` to remove the stale SessionEnd hook from .claude/settings.json ``` ## v3.0.1 - Claude Code Hooks Format Compatibility ```text - Updated hooks template to new Claude Code hooks schema (hooks array nested inside each entry) - merge_hooks() now detects and deduplicates memcord entries in both old and new format — re-running --install-hooks on existing installs migrates cleanly without duplicates - Updated UserPromptSubmit warm-up example in docs/claude-code-guide.md to new format - Existing users: run `uv run python scripts/generate-config.py --install-hooks` to migrate ``` ## v3.0.0 - Pluggable Summarizer Backends & Per-Slot Config ```text - New default summarizer for fresh slots: sumy (graph-based LexRank, zero model downloads) - Existing slots auto-assigned nltk config on first access — no behavior change for current users - Per-slot sidecar config: {slot_name}_config.json stores backend, algorithm, model, compression ratio - New memcord_configure MCP tool: get/set/reset per-slot summarizer config without restarting - MEMCORD_SUMMARIZER env var overrides per-slot config for deployment-level control (Docker, CI) - Optional semantic backend: sentence-transformers + MMR sentence selection (~80MB, install with [semantic]) - Optional transformers backend: HuggingFace BART dialogue-trained abstractive summarizer (~400MB, install with [transformers]) - Summarizer built per-call so config changes take effect immediately on the next save_progress - SummaryMetadata Pydantic model for typed LLM-enriched entry metadata - SlotConfig Pydantic model for validated per-slot configuration - add_summary_entry now stores which backend produced the summary in entry.metadata - sumy added to core dependencies; sentence-transformers and transformers remain optional extras - 59 new tests covering backends, factory, filesystem sidecar auto-creation, and configure tool ``` ## v2.5.0 - Auto-Save Hooks for Claude Code ```text - Opt-in Claude Code agent hooks for automatic progress saving - PreCompact hook: saves conversation summary before context compaction - SessionEnd hook: saves summary and closes the active memory slot - New --install-hooks flag for generate-config.py (idempotent, safe to run multiple times) - Hooks template at config-templates/claude-code/hooks.json - merge_hooks() logic preserves existing hooks and deduplicates memcord entries - Added memcord_close to default permissions whitelist - Install scripts (install.sh, install.ps1) now mention hooks availability - Tests for hook merge logic and template validation ``` ## v2.4.2 - Project Detection & Code Quality Fixes ```text - Fixed .memcord detection to use MCP client roots instead of server cwd - Proper file URI parsing with percent-decoding (spaces, special chars in paths) - Cross-platform URI-to-path conversion using urllib.parse (Windows & POSIX) - Slot name validation on .memcord files (rejects path traversal, injection chars) - Multiline .memcord files now read only the first line - Space-to-underscore normalization consistent across all detection paths - Removed debug logging left in _handle_memname handler - Replaced asyncio.iscoroutine with inspect.iscoroutinefunction for robust async detection - Added 25 new tests for URI parsing, roots detection, and edge cases ``` ## v2.4.1 - Summarizer Enhancement & CI Improvements ```text - Enhanced TextSummarizer with better scoring, MMR selection, and chat-aware summarization - Added memcord_close tool to deactivate memory slots and end sessions - Fixed memcord_use to auto-detect slot name from .memcord binding file - Fixed slot state issues with separate read/write resolution - Moved release exclusion patterns to .releaseexclude for easier maintenance - Added CLAUDE.md project development guide - Added GitHub Actions CI workflows (manual trigger, matrix testing across Python 3.10-3.12 and 3 OSes) - CI runs disabled by default to reduce costs (workflow_dispatch only) ``` ## v2.4.0 - Project Memory Binding & Auto-Detection ```text - New memcord_init tool: Initialize project directories with memory slots via .memcord file - New memcord_unbind tool: Remove project bindings (preserves memory data) - Auto-detection: Slash commands automatically use bound slot from .memcord file - Zero-config workflow: Once bound, no need to specify slot names - Updated tool count: 21 tools (13 basic + 8 advanced) - Enhanced documentation for project binding workflows ``` ## v2.3.7 - Cross-Platform Support ```text - Windows PowerShell installer (install.ps1) for one-line installation - Centralized config-templates/ folder with platform-specific configs - Cross-platform config generator (scripts/generate-config.py) - Windows cmd /c wrapper support for proper process spawning - Updated MCP SDK version constraint to v1.22-2.0 for stability - Logging configuration to prevent stdout corruption in STDIO mode ``` ## v2.3.6 - Google Antigravity IDE Support ```text - Added Google Antigravity IDE configuration template - Full compatibility with Antigravity's MCP server integration ``` ## v2.3.5 - Enhanced VSCode and GitHub Copilot Integration ```text - Added comprehensive VSCode configuration templates (.vscode/mcp.json.example) - Implemented 16 reusable prompt templates for GitHub Copilot workflows - Created automated verification script for VSCode setup validation - Added MCP registry metadata (package.json) for marketplace discovery - Full integration test suite for VSCode/Copilot compatibility - Complete documentation for enterprise deployment, security, and workflows ``` ## v2.3.4 - Updated MCP SDK & MCP Protocol to latest ```text - MCP SDK: 1.22.0 (released November 20, 2025) - MCP Protocol: 2025-11-25 (released November 25, 2025) ``` ## v2.3.3 - Optimizations to improve speed, reduce startup time, and improve code maintainability ```text - Tool definition caching to eliminate redundant list_tools() calls - Lazy loading for heavy dependencies (TextSummarizer, SimpleQueryProcessor, ContentImporter, MemorySlotMerger) via u/property decorators for faster startup - Error message constants to eliminate 30+ duplicate string literals and improve maintainability - LRU cache (@functools.lru_cache) to _get_mime_type() for faster repeated lookups ``` ## v2.3.0 - Enhanced Security ```text - Built-in protection that checks inputs, limits misuse, strengthens defenses, and handles errors safely - High Speed: Uses 42% fewer tokens, loads slots 20x faster, and makes searches 7x quicker thanks to smart caching that hits 80% of the time—keeping response times under a millisecond. - Better Documentation: Clearer documentation, intelligent default settings that adapt to your preferences. ``` ## v2.2.0 - What's New ```text - Timeline Navigation - memcord_select_entry - Simplified Slot Activation - memcord_use - Memory Integration Promoted - memcord_merge ```