ExAgent.Workspace.Directory (ExAgent v3.0.0)

View Source

A text workspace rooted in an existing POSIX directory. Configure it with ExAgent.Workspace.directory/1. The backend pins the root's device and inode, checks path components with File.lstat/2, and reads singly linked regular files. The host controls the directory tree and its parent directories.

Stability — Candidate.

Writers acquire the root's .exagent-write-lock directory by atomic creation. Under that lock a write checks the old text and quotas, closes a private exclusive temporary file in the destination directory and renames it into place. Cooperating writers on the same filesystem share this lock across VMs. If a writer dies abruptly, the host can remove its stale lock and temporary files after confirming the writer has stopped and inspecting the destination.

POSIX pathname operations have a time-of-check/time-of-use window. A process that swaps path components without cooperating can defeat confinement. The backend requires a host-controlled tree throughout each operation.