Skip to main content

Module id

Module id 

Source
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§

SessionId
26-char Crockford-base32 ULID string. Newtype around String so the motosan_agent_loop::SessionStore API (which takes &str) can’t be confused with arbitrary strings, and so we can add validation later without churning consumers.

Functions§

encode_cwd
Encode cwd into a single path-safe component for the per-cwd session bucket.