pub struct SessionPluginResponse {
pub capabilities: Vec<Capability>,
pub metadata: Option<Value>,
}Expand description
What a session lifecycle hook returns: the capability set plus optional metadata the plugin wants persisted onto the session.
Returned by ChatEngineBackendPlugin::on_session_created,
on_session_updated, and
on_session_type_configured.
For the session-bound hooks (on_session_created / on_session_updated)
Chat Engine merges metadata into Session.metadata. For
on_session_type_configured there is no session, so metadata is ignored.
Fields§
§capabilities: Vec<Capability>Capabilities to expose — stored as Session.enabled_capabilities
(session hooks) or SessionType.available_capabilities (type hook).
metadata: Option<Value>Optional metadata merged into the owning session’s metadata (object
merge; plugin keys override existing same-name keys). None leaves the
session metadata untouched.
Trait Implementations§
Source§impl Clone for SessionPluginResponse
impl Clone for SessionPluginResponse
Source§fn clone(&self) -> SessionPluginResponse
fn clone(&self) -> SessionPluginResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionPluginResponse
impl Debug for SessionPluginResponse
Source§impl Default for SessionPluginResponse
impl Default for SessionPluginResponse
Source§fn default() -> SessionPluginResponse
fn default() -> SessionPluginResponse
Source§impl From<Vec<Capability>> for SessionPluginResponse
impl From<Vec<Capability>> for SessionPluginResponse
Source§fn from(capabilities: Vec<Capability>) -> Self
fn from(capabilities: Vec<Capability>) -> Self
Ergonomic conversion for plugins that only resolve capabilities.