dsh-writeguard: Cross-Session Write Lock and Writer Coordination

dsh-writeguard is a DSH workflow plugin maintained by ziyepei06 that uses path lease locks to prevent the silent overwrite problem that occurs when multiple concurrent sessions write to the same workspace. The plugin intercepts writes under another session's active lock before write/edit/apply_patch operations, and provides six writeguard_* tools, a wg.mjs CLI, a .writeguard message board, and a bottom-right web panel. It supports presence heartbeats, lock queuing, and six message types. Installation requires placing the local package into the profile's plugins directory or installing it via a file: dependency, with Node 20+ and DSH >=0.2.2-rc.3 as prerequisites. Invisible writes such as bash redirections must be wrapped with wg run. The mechanism is designed for collaboration rather than security isolation.

Read More