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/list_dir.ex
defmodule Raxol.Agent.Actions.Vfs.ListDir do
use Raxol.Agent.Action,
name: "vfs_list_dir",
description: "List files and directories at a path in the virtual filesystem",
schema: [
input: [
path: [type: :string, description: "Directory path (default: current directory)"]
]
]
@spec run(map(), map()) :: {:ok, map()} | {:error, term()}
@impl true
def run(params, context) do
fs = Raxol.Agent.Actions.Vfs.get_vfs(params, context)
path = Map.get(params, :path, ".")
case Raxol.Commands.FileSystem.ls(fs, path) do
{:ok, entries} ->
{:ok, %{entries: entries, cwd: Raxol.Commands.FileSystem.pwd(fs)}}
{:error, reason} ->
{:error, reason}
end
end
end