pub fn encode_cwd(cwd: &Path) -> String
Encode cwd into a single path-safe component for the per-cwd session bucket.
cwd
Matches pi migrations.ts:
migrations.ts
let safePath = `--${cwd.replace(/^[/\\]/, "").replace(/[/\\:]/g, "-")}--`