kaish_kernel/vfs/mod.rs
1//! Virtual Filesystem (VFS) for kaish.
2//!
3//! The VFS provides a unified interface over multiple filesystem backends:
4//!
5//! - **MemoryFs**: In-memory ephemeral storage (for `/scratch`)
6//! - **LocalFs**: Real filesystem access (for mounted worktrees)
7//! - **VfsRouter**: Routes paths to mounted backends
8//!
9//! # Design
10//!
11//! Kaish kernels own `/` in their VFS. Backends are mounted at paths:
12//!
13//! ```text
14//! / # kernel root
15//! ├── /scratch/ # MemoryFs (ephemeral)
16//! ├── /mnt/project/ # LocalFs (worktree, rw)
17//! └── /mnt/reference/ # LocalFs (repo, ro)
18//! ```
19//!
20//! The router finds the longest matching mount point and delegates operations.
21
22mod git;
23mod jobfs;
24mod local;
25mod memory;
26mod router;
27mod traits;
28
29pub use git::{FileStatus, GitVfs, LogEntry, StatusSummary, WorktreeInfo};
30pub use jobfs::JobFs;
31pub use local::LocalFs;
32pub use memory::MemoryFs;
33pub use router::{MountInfo, VfsRouter};
34pub use traits::{DirEntry, EntryType, Filesystem, Metadata};