Packages
AI agent framework for Elixir built on OTP. TEA-based agents with crash isolation, inter-agent messaging, team supervision, and real SSE streaming to Anthropic, OpenAI, Ollama, and more.
Current section
Files
Jump to
Current section
Files
lib/raxol/agent/actions/vfs/remove.ex
defmodule Raxol.Agent.Actions.Vfs.Remove do
use Raxol.Agent.Action,
name: "vfs_remove",
description: "Remove a file or empty directory from the virtual filesystem",
schema: [
input: [
path: [type: :string, required: true, description: "Path to remove"]
]
]
@spec run(map(), map()) :: {:ok, map()} | {:error, term()}
@impl true
def run(%{path: path} = params, context) do
fs = Raxol.Agent.Actions.Vfs.get_vfs(params, context)
case Raxol.Commands.FileSystem.rm(fs, path) do
{:ok, new_fs} -> {:ok, %{path: path, vfs: new_fs}}
{:error, reason} -> {:error, reason}
end
end
end