Expand description
WSL folders in Hangar and the editor, through Windows’ own share for a
distro’s files, \\wsl.localhost\<distro>\... (P1 of
SPEC_REMOTE_TERMINALS_AND_DURABLE_SESSIONS_2026_10_02.md).
Windows reads and writes those paths with the ordinary file APIs, so the
panes need no new transport, only to know when a path is one: the rules
about where AgentMux may write are written for Windows paths, and a distro
has its own home and system folders, and its /mnt/<letter> is a Windows
drive. Everything here is string work on a path, so it is tested on every
platform.
Structs§
- Share
Path - A path inside a distro, as seen through the share.
Constants§
- LEGACY_
SHARE_ 🔒HOST - SHARE_
HOST - The share’s host.
wsl$is the older name for the same share. - SYSTEM_
DIRS 🔒 - A distro’s own system folders: the same list AgentMux protects on a Linux
machine, plus
/mnt(where WSL mounts the Windows drives and its own helpers),/init(WSL’s own init) and/run./itself counts.
Functions§
- drive_
path - The Windows path a distro’s
/mnt/<letter>/...is: WSL mounts each drive there, so changing it changes the Windows file, and the Windows rules apply. - in_home
- Whether
linuxis a distro user’s home folder or inside one: the WSL side of the editor’s “only under your home folder” rule for writes. - is_home
- Whether
linuxis a distro user’s home folder:/home/<user>or/root. - is_
system_ path - Whether
linuxis, or is inside, one of a distro’s system folders. - share_
of split_sharewhere the share exists, on Windows;Noneelsewhere, where//wsl.localhost/...is an ordinary path and the Windows rules for it are the only ones. Every rule that treats a share path differently goes through this.- share_
path - The share path for
linuxindistro:\\wsl.localhost\<distro>\a\b. - split_
share - The distro and Linux path of a path on the share:
\\wsl.localhost\D\...,\\wsl$\D\..., the\\?\UNC\wsl.localhost\D\...formcanonicalizereturns, or any of those with/separators (the frontend’s form).Nonefor any other path. - strip_
unc_ 🔒prefix