Pixir.Tools.Workspace (pixir v0.1.0)

Copy Markdown View Source

Workspace confinement (CONTEXT.md): the v0.1 safety floor. File Tools resolve a user/model-supplied path against the Workspace root and refuse anything that escapes it. (Symlink resolution is deliberately out of scope for v0.1.)

Summary

Functions

Resolve path (relative or absolute) against workspace, confined to it. Returns {:ok, absolute_path} or a structured :outside_workspace error.

Functions

confine(workspace, path)

@spec confine(String.t(), String.t()) :: {:ok, String.t()} | {:error, map()}

Resolve path (relative or absolute) against workspace, confined to it. Returns {:ok, absolute_path} or a structured :outside_workspace error.