Skip to content

Replace custom file watcher with bm watch#9

Merged
bm-clawd merged 3 commits intomainfrom
claw/simplify-and-improve
Feb 15, 2026
Merged

Replace custom file watcher with bm watch#9
bm-clawd merged 3 commits intomainfrom
claw/simplify-and-improve

Conversation

@bm-clawd
Copy link
Contributor

Summary

Replaces the custom Node.js file watcher + archive indexer with Basic Memory's native bm watch command, and simplifies the plugin architecture.

Changes

Architecture:

  • Spawn bm watch --project <name> as a child process on startup (initial sync + live file watching)
  • Remove entire mode-b/ directory (file-watcher.ts, archive.ts) — -1,306 net lines
  • No more mode branching (archive/agent-memory/both) — plugin always registers all tools

Config:

  • projectPath defaults to ~/.openclaw/workspace/memory/ (single canonical dir)
  • Remove indexInterval (BM handles its own sync timing)
  • Remove watchPaths / mode config

Code moves:

  • indexConversation() moved from archive.ts into BmClient as a method
  • Capture hook updated to call client.indexConversation() directly

Tests: 156 pass, 0 fail

README: Fully rewritten to match new architecture

Requires

  • Basic Memory with bm watch command (dev branch)

- Spawn `bm watch --project <name>` as child process instead of custom
  Node.js file watcher + archive indexing
- Default projectPath now points to ~/.openclaw/workspace/memory/
- Move indexConversation into BmClient (capture hook still works)
- Remove mode-b/ directory (file-watcher.ts, archive.ts, archive.test.ts)
- Remove indexInterval config (BM handles its own sync timing)
- Fix pre-existing Dirent type issue in memory-provider.ts
- Update all tests (156 pass, 0 fail)
- Remove mode references (archive/agent-memory/both)
- Document bm watch child process approach
- Document composited memory_search (3 parallel sources)
- Update config table (remove indexInterval, watchPaths)
- Update project structure (no mode-b/ directory)
- Simplify setup and troubleshooting sections
Replace filesystem scan with schema-based query (type:Task [status] active).
Falls back to filesystem scan if BM search fails.
Cleans up redundant imports.
@bm-clawd bm-clawd merged commit 92dc0b3 into main Feb 15, 2026
@bm-clawd bm-clawd deleted the claw/simplify-and-improve branch February 15, 2026 17:30
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