Skip to main content

ServerMessage

Enum ServerMessage 

Source
pub enum ServerMessage {
Show 21 variants Response { agent: CompactString, content: String, }, StreamStart { agent: CompactString, }, StreamChunk { content: String, }, StreamEnd { agent: CompactString, }, SessionCleared { agent: CompactString, }, AgentList { agents: Vec<AgentSummary>, }, AgentDetail { name: CompactString, description: CompactString, tools: Vec<CompactString>, skill_tags: Vec<CompactString>, system_prompt: String, }, MemoryList { entries: Vec<(String, String)>, }, MemoryEntry { key: String, value: Option<String>, }, DownloadStart { model: CompactString, }, DownloadFileStart { filename: String, size: u64, }, DownloadProgress { bytes: u64, }, DownloadFileEnd { filename: String, }, DownloadEnd { model: CompactString, }, Error { code: u16, message: String, }, SkillsReloaded { count: usize, }, McpAdded { name: CompactString, tools: Vec<CompactString>, }, McpRemoved { name: CompactString, tools: Vec<CompactString>, }, McpReloaded { servers: Vec<McpServerSummary>, }, McpServerList { servers: Vec<McpServerSummary>, }, Pong,
}
Expand description

Messages sent by the gateway to the client.

Variants§

§

Response

Complete response from an agent.

Fields

§agent: CompactString

Source agent identifier.

§content: String

Response content.

§

StreamStart

Start of a streamed response.

Fields

§agent: CompactString

Source agent identifier.

§

StreamChunk

A chunk of streamed content.

Fields

§content: String

Chunk content.

§

StreamEnd

End of a streamed response.

Fields

§agent: CompactString

Source agent identifier.

§

SessionCleared

Session cleared for an agent.

Fields

§agent: CompactString

Agent whose session was cleared.

§

AgentList

List of registered agents.

Fields

§agents: Vec<AgentSummary>

Agent summaries.

§

AgentDetail

Detailed agent information.

Fields

§name: CompactString

Agent name.

§description: CompactString

Agent description.

§tools: Vec<CompactString>

Registered tool names.

§skill_tags: Vec<CompactString>

Skill tags.

§system_prompt: String

System prompt.

§

MemoryList

List of memory entries.

Fields

§entries: Vec<(String, String)>

Key-value pairs.

§

MemoryEntry

A single memory entry.

Fields

§key: String

Memory key.

§value: Option<String>

Memory value (None if not found).

§

DownloadStart

Download has started for a model.

Fields

§model: CompactString

Model being downloaded.

§

DownloadFileStart

A file download has started.

Fields

§filename: String

Filename within the repo.

§size: u64

Total size in bytes.

§

DownloadProgress

Download progress for current file (delta, not cumulative).

Fields

§bytes: u64

Bytes downloaded in this chunk (delta).

§

DownloadFileEnd

A file download has completed.

Fields

§filename: String

Filename within the repo.

§

DownloadEnd

All downloads complete for a model.

Fields

§model: CompactString

Model that was downloaded.

§

Error

Error response.

Fields

§code: u16

Error code.

§message: String

Error message.

§

SkillsReloaded

Skills were reloaded successfully.

Fields

§count: usize

Number of skills loaded.

§

McpAdded

MCP server added successfully.

Fields

§name: CompactString

Server name.

§tools: Vec<CompactString>

Tools provided by this server.

§

McpRemoved

MCP server removed successfully.

Fields

§name: CompactString

Server name.

§tools: Vec<CompactString>

Tools that were removed.

§

McpReloaded

MCP servers reloaded from config.

Fields

§servers: Vec<McpServerSummary>

Connected servers after reload.

§

McpServerList

List of connected MCP servers.

Fields

§servers: Vec<McpServerSummary>

Connected servers.

§

Pong

Pong response to client ping.

Trait Implementations§

Source§

impl Clone for ServerMessage

Source§

fn clone(&self) -> ServerMessage

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServerMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ServerMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<AgentDetail> for ServerMessage

Source§

fn from(r: AgentDetail) -> Self

Converts to this type from the input type.
Source§

impl From<AgentList> for ServerMessage

Source§

fn from(r: AgentList) -> Self

Converts to this type from the input type.
Source§

impl From<DownloadEvent> for ServerMessage

Source§

fn from(e: DownloadEvent) -> Self

Converts to this type from the input type.
Source§

impl From<McpAdded> for ServerMessage

Source§

fn from(r: McpAdded) -> Self

Converts to this type from the input type.
Source§

impl From<McpReloaded> for ServerMessage

Source§

fn from(r: McpReloaded) -> Self

Converts to this type from the input type.
Source§

impl From<McpRemoved> for ServerMessage

Source§

fn from(r: McpRemoved) -> Self

Converts to this type from the input type.
Source§

impl From<McpServerList> for ServerMessage

Source§

fn from(r: McpServerList) -> Self

Converts to this type from the input type.
Source§

impl From<MemoryEntry> for ServerMessage

Source§

fn from(r: MemoryEntry) -> Self

Converts to this type from the input type.
Source§

impl From<MemoryList> for ServerMessage

Source§

fn from(r: MemoryList) -> Self

Converts to this type from the input type.
Source§

impl From<SendResponse> for ServerMessage

Source§

fn from(r: SendResponse) -> Self

Converts to this type from the input type.
Source§

impl From<SessionCleared> for ServerMessage

Source§

fn from(r: SessionCleared) -> Self

Converts to this type from the input type.
Source§

impl From<SkillsReloaded> for ServerMessage

Source§

fn from(r: SkillsReloaded) -> Self

Converts to this type from the input type.
Source§

impl From<StreamEvent> for ServerMessage

Source§

fn from(e: StreamEvent) -> Self

Converts to this type from the input type.
Source§

impl Serialize for ServerMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<ServerMessage> for AgentDetail

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for AgentList

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for DownloadEvent

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for McpAdded

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for McpReloaded

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for McpRemoved

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for McpServerList

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for MemoryEntry

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for MemoryList

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for SendResponse

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for SessionCleared

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for SkillsReloaded

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<ServerMessage> for StreamEvent

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(msg: ServerMessage) -> Result<Self>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,