Documentation
¶
Overview ¶
Package sessionid generates and validates session-recording identifiers.
Format: "ses_" + standard UUIDv7 string (time-sortable; matches the repo_<UUIDv7> convention in internal/repotools).
Relationship to other ID types ¶
- ses_<UUIDv7> — THIS package. One specific recording. Unique per recording, populated at recording creation, never regenerated.
- oxsid_<ULID> — internal/auth. Server session bound to one "ox agent prime" call (24h lifetime). Reused across every recording produced during that window. NOT a recording identifier.
- Ox<4-char> — internal/agentinstance. Agent identifier within a project. Stable across all of that agent's recordings. NOT a recording identifier.
- repo_<UUIDv7> — internal/repotools. Repository identifier.
All four are ID-like and easy to confuse. ses_ is the only one that answers the question "which specific recording is this?".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSessionID ¶
func GenerateSessionID() string
GenerateSessionID generates a new prefixed session ID using UUIDv7. Format: "ses_" + standard UUIDv7 string.
UUIDv7 is time-sortable; the standard format preserves this property when sorted lexicographically.
func IsValidSessionID ¶
IsValidSessionID validates the format of a session ID. Returns true only for the canonical encoding: "ses_" + lowercase hyphenated UUID. uuid.Parse also accepts braces, urn:uuid: prefixes, undashed hex, and uppercase — all of which would produce a /c/ URL that doesn't byte-match the ID stored in meta.json or keyed server-side, so non-canonical encodings are rejected via a round-trip check.
func ParseSessionID ¶
ParseSessionID parses a session ID back to its underlying UUID. Returns an error if the ID is invalid or doesn't have the correct prefix.
Types ¶
This section is empty.