REPL extension that bridges Omni.Tools.Files into the sandbox.
When an agent has both REPL and Files tools, it can generate data
in the REPL and then write it via a separate Files tool use. This
extension removes that round-trip — code running in the sandbox can
read and write files directly through a Files module that operates
on the same configured filesystem scope.
The extension accepts a %Omni.Tools.Files.FS{} struct, so the
sandbox inherits the same base directory, read-only flag, and nesting
policy as the Files tool it's paired with.
Files.write("chart.html", html_content) #=> %Entry{}
Files.read("data.csv") #=> "csv,content..."
Files.patch("chart.html", "old", "new") #=> %Entry{}
Files.list() #=> [%Entry{}, ...]
Files.delete("temp.txt") #=> :okUsage
fs = Omni.Tools.Files.FS.new(base_dir: "/tmp/workspace")
Omni.Tools.Repl.new(
extensions: [{Omni.Tools.Repl.Extensions.Files, fs: fs}]
)