pub struct ChatSession {
pub agent_id: String,
pub host_client_id: String,
pub created_at: u64,
}Expand description
In-flight agents.chat session bookkeeping. Created when a host
client calls agents.chat, removed when the agent emits a terminal
agent.chat.event (kind: "done" or "error"), when either side
disconnects, or when the host cancels via agents.chat.cancel.
The session_id is host-supplied (or server-generated when omitted)
and threads through every agent.chat.event notification so the
server can route streamed deltas back to the originating host
without needing per-session subscriptions. See
docs/proposals/agent-chat-surface.md for the wire contract.
Fields§
§agent_id: StringAgent that owns this chat — populated from
attached_agents at agents.chat dispatch time.
host_client_id: StringClient id of the host that issued agents.chat. The server
forwards agent.chat.event notifications back to this host
only, so two CarHost windows chatting with the same agent are
independent streams.
created_at: u64Unix-seconds creation time — used by the future stale-session sweeper to drop sessions whose agent died without emitting a terminal event.
Trait Implementations§
Source§impl Clone for ChatSession
impl Clone for ChatSession
Source§fn clone(&self) -> ChatSession
fn clone(&self) -> ChatSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ChatSession
impl RefUnwindSafe for ChatSession
impl Send for ChatSession
impl Sync for ChatSession
impl Unpin for ChatSession
impl UnsafeUnpin for ChatSession
impl UnwindSafe for ChatSession
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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