Skip to content

v2.19.1

Latest

Choose a tag to compare

@2b3pro 2b3pro released this 05 Jun 13:46

Fix: update --done/--todo no longer erases block text from a subprocess

roam update <uid> --done (and --todo / --clear-status) invoked without a content arg would erase the block, replacing its text with a bare {{[[DONE]]}} , whenever stdin was non-TTY but empty — i.e. any non-interactive subprocess (stdin = /dev/null), such as Bun.spawn(['roam','update',uid,'--done']).

Root cause: the stdin heuristic read empty stdin and stored '' as the new content. Because '' !== undefined, the "fetch existing block text" path was skipped and applyStatus prepended the marker to an empty string instead of find-replacing the existing {{[[TODO]]}} marker in place.

Fix: new resolveUpdateContent() maps empty/whitespace stdin to "no new text", so status-only updates fetch the existing text and flip the marker in place. Added update.test.ts (14 cases); verified end-to-end on a live block.

Full changelog: https://github.com/2b3pro/roam-research-mcp/blob/main/CHANGELOG.md