Skip to main content

Module fs

Module fs 

Source
Expand description

Session-scoped staged filesystem mode.

hostlib_fs_set_mode({session_id, mode: "staged"}) makes hostlib file mutations land in a durable per-session overlay under .harn/state/staged/<session_id>/. Reads made by the same session consult that overlay first, so agent loops see their own pending writes without touching the working tree until hostlib_fs_commit_staged.

Structs§

CommitResult
Result returned after applying staged changes to disk.
DiscardResult
Result returned after dropping staged changes.
FsCapability
Hostlib filesystem capability handle.
PendingWrite
One pending staged filesystem change.
SetModeResult
Result returned after changing a session’s filesystem mode.
StagedStatus
Summary of staged filesystem changes for one session.

Enums§

FsMode
Filesystem mode for one hostlib session.

Functions§

commit_staged
Commit staged changes for all paths or for a filtered path list.
configure_session_root
Remember the workspace root associated with a live session.
discard_staged
Discard staged changes for all paths or for a filtered path list.
set_mode
Set a session’s filesystem mode.
staged_status
Return the staged status for a session.