What
A hooks module is a script in a plugin that handles Claude Code events and can call functions such as $.fs.write to work with files. This release widens and tightens those file functions:
$.fs.writecan take raw bytes as{ base64 }(also described asbytes) for byte-exact writes, and anifVersionvalue.- Reading a file's details (stat) now returns a
version, which can be passed back asifVersion. A write can then be refused with "the file changed since it was checked". - New
fs.remove,fs.renameandfs.copyfunctions. They are checked against the sandbox's deny lists (the paths the sandbox blocks) and refuse symbolic links and folders. ui.browseis added to the list of operations plugins can call.- The checks that inspect or restore arguments for
fs.writeandfs.removenow apply only when the call includes anifVersionkey. - Hard-linked files (one file reachable under two names) are refused in place, and a new Windows read and write check applies.
plugin validate also checks hooks modules more strictly. It now warns about:
- matchers that never hear an engine value
- command names the module may answer without a plugin name
$.session.appendrows that are not under the plugin's name- calls this build does not have, reported as "is not a call of this build"
Why
Plugins can now delete, rename and copy files, not only write them, with safety checks around each. A plugin can also make sure it does not overwrite a file that changed after it last looked. Plugin authors get earlier warnings about mistakes in their hooks modules.