Struct RpcSession
pub struct RpcSession {Show 13 fields
pub agent: Arc<Mutex<Agent>>,
pub created_at: Instant,
pub last_active: Instant,
pub agent_alias: String,
pub workspace_dir: String,
pub overrides: SessionOverrides,
pub uploads: HashMap<String, UploadEntry>,
pub plan: Vec<PlanEntry>,
pub chat_mode: ChatMode,
pub interaction_surface: Option<InteractionSurface>,
pub owner_tui_id: Option<String>,
pub generation: u64,
pub owner_principal_id: Option<String>,
/* private fields */
}Fields§
§agent: Arc<Mutex<Agent>>§created_at: Instant§last_active: Instant§agent_alias: String§workspace_dir: String§overrides: SessionOverrides§uploads: HashMap<String, UploadEntry>§plan: Vec<PlanEntry>§chat_mode: ChatMode§interaction_surface: Option<InteractionSurface>§owner_tui_id: Option<String>§generation: u64Monotonic generation counter stamped by SessionStore::insert.
Provider-refresh callers capture this before building a provider box
and pass it to SessionStore::apply_model_provider so stale work
cannot mutate a successor installed under the same session ID.
owner_principal_id: Option<String>Owning principal for session isolation. None for sessions created
by unscoped connections (shared operator, admin): such sessions are
visible to unscoped connections and invisible to scoped principals.
Implementations§
Source§impl RpcSession
impl RpcSession
pub fn new( agent: Agent, alias: &str, workspace: &str, chat_mode: ChatMode, ) -> Self
Sourcepub fn with_pending_generation(self, notify: Arc<Notify>) -> Self
pub fn with_pending_generation(self, notify: Arc<Notify>) -> Self
Mark this session as published with a provisional binding. The
returned notifier is handed to the reconciliation and refresh paths,
which call SessionStore::clear_pending_generation only after a
committed binding has been published for this session generation.
Sourcepub fn with_owner(self, tui_id: Option<String>) -> Self
pub fn with_owner(self, tui_id: Option<String>) -> Self
Bind this session to a TUI owner.
pub fn with_interaction_surface( self, interaction_surface: Option<InteractionSurface>, ) -> Self
Sourcepub fn with_owner_principal(self, principal_id: Option<String>) -> Self
pub fn with_owner_principal(self, principal_id: Option<String>) -> Self
Bind this session to its owning principal (scoped principals only;
unscoped connections pass None).
pub fn with_lifecycle_lease(self, lifecycle_lease: AgentSessionLease) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for RpcSession
impl !UnwindSafe for RpcSession
impl Freeze for RpcSession
impl Send for RpcSession
impl Sync for RpcSession
impl Unpin for RpcSession
impl UnsafeUnpin for RpcSession
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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