pub fn to_session_path(input: &str) -> StringExpand description
Canonical leading-slash session path from any accepted spelling: collapses
repeated slashes, strips the /workspace alias, ensures a single leading
slash, and trims a trailing slash.
This is the single normalizer for every session-path surface — the agent
(via MountFs/the VFS backends) and the control-plane HTTP FS API both route
through it, so a path resolves to the same key regardless of entry point.
Examples: /workspace → /, /workspace/a.txt → /a.txt,
/workspacefoo → /workspacefoo, a.txt → /a.txt, /sub/dir/ → /sub/dir,
/a//b/ → /a/b.