ExAgent. Workspace. Backend behaviour
(ExAgent v3.0.0)
View Source
Backend of an ExAgent.Workspace mount. Paths are validated relative paths
with no leading slash. The mount root is the empty string. Text is UTF-8.
Stability — Candidate.
entries/4 returns a bounded recursive inventory under the requested
directory, including directories. Reject an incomplete scan with
{:error, :scan_limit}. Enforce the budgets before allocating backend data
where the storage API permits. put/6 atomically compares existing text for
edits. A whole-file write passes :any. A rejected write guarantees no
change. Return {:unknown, :result_unconfirmed} when a write may have
happened. The runtime journals writes under the ordinary tool protocol.
Summary
Types
@type config() :: term()
@type entry() :: {String.t(), :file | :directory}
@type limits() :: %{ file_bytes: pos_integer(), total_bytes: pos_integer(), entries: pos_integer() }
@type reason() ::
:invalid_path
| :not_found
| :not_directory
| :not_file
| :read_only
| :file_limit
| :scan_limit
| :conflict
| :unavailable
| :unlisted