Vibe.Workspace (vibe v0.2.1)

Copy Markdown View Source

Workspace path helpers for file operations.

Vibe currently follows Pi-style local-agent semantics: paths are resolved from the current workspace, but absolute and parent-relative paths are allowed. A stricter multi-root permission model can be added later when eval and command execution can be governed by the same policy.

Summary

Types

policy()

@type policy() :: %{root: Path.t(), real_root: Path.t(), allow_absolute?: boolean()}

Functions

policy(opts \\ [])

@spec policy(keyword()) :: policy()

relative(path, opts \\ [])

@spec relative(
  Path.t(),
  keyword()
) :: Path.t()

resolve(path, opts \\ [])

@spec resolve(
  String.t(),
  keyword()
) :: {:ok, Path.t()} | {:error, String.t()}

resolve_symlinks(path)

@spec resolve_symlinks(Path.t()) :: Path.t()