Expand description
Session ID + cwd encoding.
Matches pi’s migrations.ts: cwd is converted to a single safe path
component by stripping the leading slash, replacing /, \, : with
-, and wrapping in --…--. Session IDs themselves are ULIDs
(lexicographically sortable; chosen over UUID because the workspace
already ships the ulid crate and sort order simplifies “most recent”
queries).
Structs§
- Session
Id - 26-char Crockford-base32 ULID string. Newtype around
Stringso themotosan_agent_loop::SessionStoreAPI (which takes&str) can’t be confused with arbitrary strings, and so we can add validation later without churning consumers.
Functions§
- encode_
cwd - Encode
cwdinto a single path-safe component for the per-cwd session bucket.