Skip to content

Replace id with name#38

Merged
MyrikLD merged 19 commits into
mainfrom
replace-id-with-name
Apr 27, 2026
Merged

Replace id with name#38
MyrikLD merged 19 commits into
mainfrom
replace-id-with-name

Conversation

@MyrikLD
Copy link
Copy Markdown
Owner

@MyrikLD MyrikLD commented Apr 6, 2026

Summary

Replaces numeric id with human-readable name as the primary identifier for MCP tool interactions. IDs remain internal (DB primary key), but all MCP tools now accept and return name instead.

  • New name column on memories — Text, nullable, unique per workspace; indexed for fast lookups
  • All MCP tools updated — store_memory, get_memory, update_memory, delete_memory, search_by_tag, list_memories, move_memory now use name as the primary handle; get_memory accepts lookup by name
  • DAO — MemoryDao.get() accepts id | name; update() returns (id, name) tuple; new get_id_by_name() helper

Migration notes

Existing memories without a : separator in content will have name = NULL after migration. The downgrade restores content by prepending name: for all rows that had a name set.

MyrikLD added 9 commits April 6, 2026 13:35
# Conflicts:
#	ruff.toml
#	src/memlord/dao/memory.py
#	src/memlord/dao/workspace.py
#	src/memlord/models/memory.py
#	src/memlord/search.py
#	src/memlord/tools/get_memory.py
#	src/memlord/tools/list_memories.py
#	src/memlord/tools/search_by_tag.py
#	src/memlord/ui/base.py
#	src/memlord/ui/data.py
#	src/memlord/ui/workspaces.py
#	tests/test_dao.py
#	tests/test_pipeline.py
@MyrikLD MyrikLD force-pushed the replace-id-with-name branch from 8b281dc to 2226b12 Compare April 7, 2026 17:36
@MyrikLD MyrikLD merged commit f197476 into main Apr 27, 2026
3 checks passed
@MyrikLD MyrikLD deleted the replace-id-with-name branch April 27, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant