Expand description
Queen sessions: the sessions LeanCTX | Cloud Desktop started as a Queen, registered by the app over the 0600 local socket (an app-only call).
A bus role is self-declared, so it never grants anything. A session may
set a task’s priority and labels through ctx_tasks only when the
launching app’s session id of its MCP server (LEAN_CTX_SESSION_ID) is
registered here. The app removes the id when the session ends.
Stored 0600 in the Instance’s data dir; at most MAX_QUEENS ids.
Structs§
- Queen
Session - One registered Queen session.
Constants§
- MAX_
QUEENS - NOT_
A_ QUEEN - The refusal for a session that may read but not set priority.
- QUEENS_
FILE
Functions§
- data_
dir - The Instance’s data dir, where the registrations live.
- is_
queen_ in - Whether
session_idis a registered Queen session indir. - list_in
- The registered sessions in
dir, sorted by id. - register_
in - Register
session_id(again: it keeps itssince, the name is updated). - remove_
in - Remove
session_id(no error when it is not registered). - this_
session_ is_ queen - Whether this process runs for a registered Queen session: the launching
app’s session id (
LEAN_CTX_SESSION_ID) of this process is registered. - validate_
session_ id - 8-128 of
[A-Za-z0-9._:-].