Throws unless the model has seen the file's current content. Pass undefined for a file that
does not exist yet: creating a file needs no prior read.
Notes that file is gone.
Notes that the model has just read content from file.
Notes that file now holds content, because the model wrote it.
Remembers what the model last saw of each file, so a write can be refused when the file has changed since (another process, a formatter, the user) or was never read. Share one tracker between
workspaceToolsandagentToolssoread_file,edit_file,write_fileandapply_patchagree. Files are keyed by their real path; create one per session.