pub struct Daemon {
pub runtime: Arc<Runtime<ProviderManager, DaemonHook>>,
}Expand description
Shared daemon state — holds the runtime. Cheap to clone (Arc-backed).
Fields§
§runtime: Arc<Runtime<ProviderManager, DaemonHook>>The walrus runtime.
Implementations§
Source§impl Daemon
impl Daemon
Sourcepub async fn start(config_dir: &Path) -> Result<DaemonHandle>
pub async fn start(config_dir: &Path) -> Result<DaemonHandle>
Load config, build runtime, bind the Unix domain socket, and start serving.
Returns a DaemonHandle with the socket path and a shutdown trigger.
Sourcepub async fn start_with_config(
config: &DaemonConfig,
config_dir: &Path,
) -> Result<DaemonHandle>
pub async fn start_with_config( config: &DaemonConfig, config_dir: &Path, ) -> Result<DaemonHandle>
Start with an already-loaded config. Useful when the caller resolves config separately (e.g. CLI with scaffold logic).
Trait Implementations§
Source§impl Server for Daemon
impl Server for Daemon
Source§async fn send(&self, req: SendRequest) -> Result<SendResponse>
async fn send(&self, req: SendRequest) -> Result<SendResponse>
Handle
Send — run agent and return complete response.Source§fn stream(
&self,
req: StreamRequest,
) -> impl Stream<Item = Result<StreamEvent>> + Send
fn stream( &self, req: StreamRequest, ) -> impl Stream<Item = Result<StreamEvent>> + Send
Handle
Stream — run agent and stream response events.Source§async fn clear_session(
&self,
req: ClearSessionRequest,
) -> Result<SessionCleared>
async fn clear_session( &self, req: ClearSessionRequest, ) -> Result<SessionCleared>
Handle
ClearSession — clear agent history.Source§async fn list_agents(&self) -> Result<AgentList>
async fn list_agents(&self) -> Result<AgentList>
Handle
ListAgents — list all registered agents.Source§async fn agent_info(&self, req: AgentInfoRequest) -> Result<AgentDetail>
async fn agent_info(&self, req: AgentInfoRequest) -> Result<AgentDetail>
Handle
AgentInfo — get agent details.Source§async fn list_memory(&self) -> Result<MemoryList>
async fn list_memory(&self) -> Result<MemoryList>
Handle
ListMemory — list all memory entries.Source§async fn get_memory(&self, req: GetMemoryRequest) -> Result<MemoryEntry>
async fn get_memory(&self, req: GetMemoryRequest) -> Result<MemoryEntry>
Handle
GetMemory — get a memory entry by key.Source§fn download(
&self,
req: DownloadRequest,
) -> impl Stream<Item = Result<DownloadEvent>> + Send
fn download( &self, req: DownloadRequest, ) -> impl Stream<Item = Result<DownloadEvent>> + Send
Handle
Download — download model files with progress.Source§async fn reload_skills(&self) -> Result<SkillsReloaded>
async fn reload_skills(&self) -> Result<SkillsReloaded>
Handle
ReloadSkills — reload skills from disk.Source§async fn mcp_add(&self, req: McpAddRequest) -> Result<McpAdded>
async fn mcp_add(&self, req: McpAddRequest) -> Result<McpAdded>
Handle
McpAdd — add an MCP server.Source§async fn mcp_remove(&self, req: McpRemoveRequest) -> Result<McpRemoved>
async fn mcp_remove(&self, req: McpRemoveRequest) -> Result<McpRemoved>
Handle
McpRemove — remove an MCP server.Source§async fn mcp_reload(&self) -> Result<McpReloaded>
async fn mcp_reload(&self) -> Result<McpReloaded>
Handle
McpReload — reload MCP servers from config.Source§async fn mcp_list(&self) -> Result<McpServerList>
async fn mcp_list(&self) -> Result<McpServerList>
Handle
McpList — list connected MCP servers.Source§fn dispatch(
&self,
msg: ClientMessage,
) -> impl Stream<Item = ServerMessage> + Send
fn dispatch( &self, msg: ClientMessage, ) -> impl Stream<Item = ServerMessage> + Send
Dispatch a
ClientMessage to the appropriate handler method. Read moreAuto Trait Implementations§
impl Freeze for Daemon
impl !RefUnwindSafe for Daemon
impl Send for Daemon
impl Sync for Daemon
impl Unpin for Daemon
impl UnsafeUnpin for Daemon
impl !UnwindSafe for Daemon
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
Mutably borrows from an owned value. Read more