Skip to main content

Module resolution

Module resolution 

Source
Expand description

Session resolution: pick a profile and produce an authenticated session.

get_or_create_session is the entry point. It resolves the active profile (CLI override, SYSTEMPROMPT_PROFILE, the stored active key, or bootstrap), reuses a valid cached session when present, and otherwise mints a new local or tenant session. The helpers submodule holds the per-strategy resolution steps.

A freshly minted session is stored under its key, but only a profile chosen from the stored session may become the active one: an explicit --profile or SYSTEMPROMPT_PROFILE override, or a discovered profile, is a one-shot target and must not leave the next bare invocation pointed at it. admin session switch|login remain the ways to change the active profile.

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Modules§

helpers
Helpers resolving an existing CLI session for reuse.

Structs§

ProfileContext

Functions§

get_or_create_session
record_new_session