pub struct OperatorSessionEntry {
pub sid: SessionId,
pub token: String,
pub roles: Vec<String>,
pub capability_manifest: Option<AgentProviderManifest>,
pub joined_at_secs: u64,
pub ws_session: Mutex<Option<Arc<WSOperatorSession>>>,
}Expand description
Login-flow record for a minted Operator session. Held in
AppState.operator_sessions, keyed by sid. ws_session starts None
(login only mints sid+token) and is set on first successful WS connect;
on reconnect the same WSOperatorSession is reused (replace_tx) rather
than re-registered.
Fields§
§sid: SessionIdServer-minted session id (typed SessionId since issue #14).
token: StringBearer auth token (10-hex-char) required on the WS upgrade and admin routes.
roles: Vec<String>Role aliases claimed by this session (roles-exclusivity set).
capability_manifest: Option<AgentProviderManifest>Provider-owned effective capability manifest submitted at join.
joined_at_secs: u64GH #81 Layer 2: unix epoch seconds when POST /v1/operators minted
this entry. Surfaced by GET /v1/operators so a recovery driver
can pick the oldest stale session without probing each sid
individually.
ws_session: Mutex<Option<Arc<WSOperatorSession>>>The reusable 3-trait session object once a WS has connected at least
once; None before first connect. Its sender tracks current connectivity.
Auto Trait Implementations§
impl !Freeze for OperatorSessionEntry
impl !RefUnwindSafe for OperatorSessionEntry
impl !UnwindSafe for OperatorSessionEntry
impl Send for OperatorSessionEntry
impl Sync for OperatorSessionEntry
impl Unpin for OperatorSessionEntry
impl UnsafeUnpin for OperatorSessionEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more