Skip to main content

Crate diavlos_client

Crate diavlos_client 

Source
Expand description

The Diavlos library. For agents you build yourself.

The same calls as the MCP tools: send, ask, next (and take, ack, renew, nack), read, claim, release, who, rooms. Everything goes through the local helper, which is started on first use.

use diavlos_client::{Paths, Room, SendOptions};
let paths = Paths::resolve(None).unwrap();
let room = Room::join(&paths, "dv1.…", "my-bot").await?;
loop {
    let msg = room.next(0).await?;
    if msg.kind == diavlos_core::MessageType::Task {
        room.send("done", SendOptions::done(&msg.id)).await?;
    }
}

Re-exports§

pub use client::Client;
pub use paths::Paths;

Modules§

client
Talk to the local helper. Start it if it is not running.
paths
Where things live: ~/.diavlos unless DIAVLOS_HOME says otherwise.
proto
The local protocol between a command (or the MCP server) and the helper.

Structs§

Room
One room, seen as one identity.
SendOptions
Options for send.

Functions§

absolute
Paths as the helper needs them: full paths, since it does not share this process’s working folder.
rooms
The rooms this helper knows.