openclaw/docs
Nickolai Yegorov d91522d4a6 feat: hierarchical memory structure (YYYY/MM/) with automatic migration
Implement hierarchical memory structure to improve filesystem performance
when dealing with large numbers of memory files.

## Changes

### Core Implementation (src/memory/internal.ts)
- Add isOldMemoryFormat() - detect old flat format files
- Add migrateMemoryFile() - migrate to YYYY/MM/ structure with:
  * Date validation (rejects invalid dates like 2025-99-99)
  * Atomic file creation (wx flag) to prevent race conditions
  * Optional logger parameter for production use
- Add migrateAllMemoryFiles() - bulk migration with:
  * Full recursive scan via findOldFormatFiles()
  * Dry-run mode for preview
  * Detailed metrics (totalBytes, durationMs, file lists)
- Update walkDir() - auto-migrate on file access
- Update listMemoryFiles() - add logger parameter

### Tests (src/memory/internal.test.ts)
- 20 comprehensive unit tests
- Test old-format detection, date validation, race conditions
- Test dry-run mode and detailed metrics
- 100% coverage of key functionality

### Documentation
- docs/concepts/memory-migration.md (NEW) - migration guide
- docs/concepts/memory.md - backward compatibility section
- docs/help/faq.md - migration FAQ entries

## Backward Compatibility
- Automatic migration on file access
- Old files preserved as backup
- Zero breaking changes
- Both formats supported
2026-01-27 23:20:08 +03:00
..
_layouts refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
assets refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
automation refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
channels refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
cli refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
concepts feat: hierarchical memory structure (YYYY/MM/) with automatic migration 2026-01-27 23:20:08 +03:00
debug refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
diagnostics refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
experiments refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
gateway refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
help feat: hierarchical memory structure (YYYY/MM/) with automatic migration 2026-01-27 23:20:08 +03:00
hooks refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
images docs: add group flow diagram 2026-01-10 20:05:22 +01:00
install refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
nodes refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
platforms refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
plugins refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
providers refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
refactor refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
reference refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
security refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
start refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
tools refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
web refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
_config.yml refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
bedrock.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
brave-search.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
broadcast-groups.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
CNAME chore: update molt.bot domains 2026-01-27 12:21:01 +00:00
date-time.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
debugging.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
docs.json refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
environment.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
hooks.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
index.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
logging.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
multi-agent-sandbox-tools.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
network.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
northflank.mdx refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
perplexity.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
plugin.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
prose.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
railway.mdx refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
render.mdx refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
scripts.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
testing.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
token-use.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
tts.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
tui.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
vps.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
whatsapp-clawd.jpg Add WhatsApp screenshot to claude-config.md 2025-11-27 18:43:24 +01:00