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§
- Commit
Result - Result returned after applying staged changes to disk.
- Discard
Result - Result returned after dropping staged changes.
- FsCapability
- Hostlib filesystem capability handle.
- Pending
Write - One pending staged filesystem change.
- Safe
Text Patch Outcome - Outcome of one
safe_text_patchcall.appliedsays whether the on-disk (or staged-overlay) bytes changed;resultcarries the structured discriminant used by the wire/JSON shape. - SetMode
Result - Result returned after changing a session’s filesystem mode.
- Staged
Status - Summary of staged filesystem changes for one session.
Enums§
- FsMode
- Filesystem mode for one hostlib session.
- Safe
Text Patch Result - Discriminant for a
safe_text_patchoutcome.
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.
- configured_
session_ root - Return the root currently associated with a hostlib session.
- discard_
staged - Discard staged changes for all paths or for a filtered path list.
- remove_
session_ state - Remove all persisted staged-fs state for a caller-owned throw-away session.
- safe_
text_ patch - Atomic compare-and-swap-style text write.
- set_
mode - Set a session’s filesystem mode.
- staged_
status - Return the staged status for a session.