Expand description
Session management for authenticated Joy operations.
Sessions are time-limited tokens stored locally in ~/.config/joy/sessions/.
They prove that the user has entered their passphrase and derived the correct
identity key within the configured time window.
Structs§
- Session
Claims - Claims encoded in a session token.
- Session
Token - A session token: claims + Ed25519 signature.
Functions§
- create_
session - Create a session token signed by the identity keypair.
- create_
session_ for_ ai - Create a session for an AI member, binding it to a specific token_key.
- current_
tty - Detect the current terminal device for session binding.
- load_
session - Load a session token from disk for a specific member, if it exists.
- load_
session_ by_ id - Load a session by its opaque ID (the JOY_SESSION value).
- project_
id - Derive a stable project ID from project name and acronym.
- remove_
session - Remove a session token from disk for a specific member.
- save_
session - Save a session token to disk.
- session_
id - The session ID: a short, deterministic, opaque identifier for a session.
Used as
JOY_SESSIONenvironment variable (SSH-agent pattern). - validate_
session - Validate a session token against a public key and project ID.