Skip to main content

Module workspace

Module workspace 

Source
Expand description

Workspace abstraction: Mode S (MemoryVfsBackend) vs Mode P (GuestPrimaryBackend).

See docs/superpowers/specs/2026-03-20-devshell-guest-primary-design.md §4.

Structs§

GuestPrimaryBackend
Mode P skeleton: GuestFsOps + logical cwd + guest mount (see design §5).
MemoryVfsBackend
Mode S: Vfs in memory (Rc<RefCell<Vfs>> matches REPL sharing).

Enums§

WorkspaceBackendError
Unified error for workspace operations (until dispatch is wired).
WorkspaceReadError
Failure reading a logical path from the active workspace (guest or VFS).

Traits§

WorkspaceBackend
Virtual workspace for devshell: Mode S (memory) or Mode P (guest-primary).

Functions§

guest_export_readonly_to_vfs
Copy the logical subtree at logical_src from the guest into a fresh directory under /.__export_ro_<ms>/… and return that absolute logical path (printed by export-readonly).
logical_path_to_guest
Map a logical absolute path to a guest path (same layout as γ push: project root = guest_project_dir_on_guest).
logical_to_guest_abs
Map a logical path to a guest absolute path (γ guest-primary).
read_logical_file_bytes
Read file bytes for a logical path: guest-primary (γ or β) first, else in-memory Vfs.
read_logical_file_bytes_rc
Same as read_logical_file_bytes with shared Rc handles (script / REPL).