mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
refactor: multi-provider memory adapters with scan-based builtin (#227)
* refactor: restructure memory into multi-provider adapters, remove manifest.json dependency - Rename internal/memory/provider to internal/memory/adapters with per-provider subdirectories (builtin, mem0, openviking) - Replace manifest.json-based delete/update with scan-based index from daily files - Add mem0 and openviking provider adapters with HTTP client, chat hooks, MCP tools, and CRUD - Wire provider lifecycle into registry (auto-instantiate on create, evict on update/delete) - Split docker-compose into base stack + optional overlays (qdrant, browser, mem0, openviking) - Update admin UI to support dynamic provider config schema rendering * chore(lint): fix all golangci-lint issues for clean CI * refactor(docker): replace compose overlay files with profiles * feat(memory): add built-in memory multi modes * fix(ci): golangci lint * feat(memory): edit built-in memory sparse design
This commit is contained in:
@@ -131,20 +131,26 @@ Use ${quote('search_memory')} to recall earlier conversations beyond the current
|
||||
|
||||
### Memory Write Rules (IMPORTANT)
|
||||
|
||||
For ${quote('memory/YYYY-MM-DD.md')}, use ${quote('write')} with structured JSON:
|
||||
For ${quote('memory/YYYY-MM-DD.md')}, use canonical markdown entries:
|
||||
|
||||
${block([
|
||||
'[',
|
||||
' {',
|
||||
' "topic": "like Events, Notes, etc.",',
|
||||
' "memory": "What happened / what to remember",',
|
||||
' }',
|
||||
']',
|
||||
'## Entry mem_20260313_001',
|
||||
'',
|
||||
'```yaml',
|
||||
'id: mem_20260313_001',
|
||||
'created_at: 2026-03-13T13:34:49Z',
|
||||
'updated_at: 2026-03-13T13:34:49Z',
|
||||
'metadata:',
|
||||
' topic: Notes',
|
||||
'```',
|
||||
'',
|
||||
'What happened / what to remember',
|
||||
].join('\n'))}
|
||||
|
||||
Rules:
|
||||
- Only send NEW memory items (do not re-write old content).
|
||||
- Do not invent markdown format for daily memory files.
|
||||
- Preserve the canonical entry structure for daily memory files.
|
||||
- When a memory is about a known user or group from ${quote('PROFILES.md')}, include a stable profile link in ${quote('metadata')} (for example ${quote('profile_ref')}, plus identity fields when available).
|
||||
- Do not provide ${quote('hash')} (backend generates it).
|
||||
- If plain text is unavoidable, write concise factual notes only.
|
||||
- ${quote('MEMORY.md')} stays human-readable markdown (not JSON).
|
||||
|
||||
Reference in New Issue
Block a user