Facade for workspace-local project file access.
A project view gives agent code one stable API for direct project files and isolated overlay-backed files. Paths are logical paths relative to project_root; callers never use frontend labels, tab labels, or backend worktree paths.
Summary
Functions
Returns true when the underlying backend is still available.
Returns capability flags for this view.
Releases backend-owned resources for the view.
Returns environment variables shell commands should use for this view.
Deletes a file from the view.
Returns backend-specific diff data for the view.
Creates a direct project view rooted at project_root.
Discards view-local state.
Discards one file from view-local state.
Replaces exact text in a file in the view.
Lists a directory in the view.
Creates an overlay-backed project view rooted at project_root.
Promotes view-local changes to target.
Reads a file from the view.
Returns the directory shell commands should run in for this view.
Writes a file in the view.
Types
@type t() :: %MingaAgent.ProjectView{ backend: module(), id: String.t(), project_root: String.t(), ref: MingaAgent.ProjectView.Backend.ref(), workspace_id: non_neg_integer() | nil }
Project view handle.
Functions
Returns true when the underlying backend is still available.
@spec capabilities(t()) :: MingaAgent.ProjectView.Backend.capabilities()
Returns capability flags for this view.
Releases backend-owned resources for the view.
Returns environment variables shell commands should use for this view.
Deletes a file from the view.
Returns backend-specific diff data for the view.
Creates a direct project view rooted at project_root.
Discards view-local state.
Discards one file from view-local state.
Replaces exact text in a file in the view.
@spec list_directory(t(), String.t()) :: {:ok, [MingaAgent.ProjectView.Backend.directory_entry()]} | {:error, term()}
Lists a directory in the view.
Creates an overlay-backed project view rooted at project_root.
Promotes view-local changes to target.
Reads a file from the view.
Returns the directory shell commands should run in for this view.
Writes a file in the view.