-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
The plugin shells out to bm tool ... for all operations. Some commands output clean JSON natively, others need --format json (PR basic-memory#553), and some have no JSON output at all.
The parseJsonOutput() function in bm-client.ts exists to strip non-JSON junk (warnings, Rich markup) from CLI output. Once all commands support clean --format json, this workaround can be removed.
Current state
| Command | Method | JSON support | Notes |
|---|---|---|---|
search-notes |
execToolNativeJson |
✅ Native JSON | Works clean |
build-context |
execToolNativeJson |
✅ Native JSON | Works clean |
read-note |
execTool + --format json |
Also needs frontmatter stripping | |
write-note |
execTool + --format json |
Response used to confirm write | |
recent-activity |
execTool + --format json |
||
project add |
execRaw |
❌ No JSON | Output ignored, errors silenced |
Goal
- Confirm PR #553 covers
read-note,write-note,recent-activitywith clean JSON - Once merged, verify all commands return parseable JSON without prefix junk
- Remove
parseJsonOutput()workaround — replace with directJSON.parse() - Collapse
execTool/execToolNativeJsoninto a single method (all commands become native JSON) - Decide: does
project addneed JSON output? (currently fire-and-forget)
Longer term: writes via markdown files
Per architecture discussion: write operations (write-note, edit) should eventually write markdown files directly to the project path and let BM's filewatcher index them. This removes the CLI dependency for writes entirely. Reads stay on CLI with --format json.
Depends on
- basic-memory PR #553 (
--format jsonfor CLI tools)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels