Skip to main content

DaemonClient

Struct DaemonClient 

Source
pub struct DaemonClient { /* private fields */ }
Expand description

Typed async client for communicating with the vex daemon.

Implementations§

Source§

impl DaemonClient

Source

pub fn new(port: u16) -> Self

Source

pub fn port(&self) -> u16

Source

pub async fn connect(&self) -> Result<TcpStream>

Open a raw TCP connection to the daemon.

Source

pub async fn request(&self, msg: &ClientMessage) -> Result<ServerMessage>

One-shot request-response: connect, send, read one control frame.

Source

pub async fn shell_spawn( &self, workdir: Option<String>, name: Option<String>, workstream_id: Option<WorkstreamId>, attach: bool, ) -> Result<ShellId>

Source

pub async fn shell_list(&self) -> Result<Vec<ShellInfo>>

Source

pub async fn shell_kill(&self, id: ShellId) -> Result<()>

Source

pub async fn shell_send( &self, id: ShellId, text: Option<String>, keys: Option<Vec<String>>, ) -> Result<()>

Source

pub async fn shell_screenshot(&self, id: ShellId) -> Result<String>

Source

pub async fn shell_logs( &self, id: ShellId, last: Option<usize>, ) -> Result<String>

Source

pub async fn agent_spawn( &self, workdir: Option<String>, prompt: Option<String>, workstream_id: Option<WorkstreamId>, ) -> Result<(AgentId, ShellId)>

Source

pub async fn agent_list(&self) -> Result<Vec<AgentInfo>>

Source

pub async fn agent_send(&self, id: AgentId, message: &str) -> Result<()>

Source

pub async fn agent_kill(&self, id: AgentId) -> Result<()>

Source

pub async fn agent_pause(&self, id: AgentId) -> Result<()>

Source

pub async fn agent_resume( &self, id: AgentId, prompt: Option<String>, ) -> Result<()>

Source

pub async fn agent_history(&self, id: AgentId) -> Result<Vec<String>>

Source

pub async fn agent_screenshot(&self, id: AgentId) -> Result<String>

Source

pub async fn ws_create( &self, name: &str, branch: Option<&str>, repo: Option<&str>, issue: Option<&str>, from: Option<&str>, ) -> Result<WorkstreamId>

Source

pub async fn ws_list(&self) -> Result<Vec<WorkstreamInfo>>

Source

pub async fn ws_show( &self, id: WorkstreamId, ) -> Result<(WorkstreamInfo, Vec<ShellInfo>, Vec<AgentInfo>, Vec<EventEntry>)>

Source

pub async fn ws_switch(&self, id: WorkstreamId) -> Result<()>

Source

pub async fn ws_pause(&self, id: Option<WorkstreamId>) -> Result<()>

Source

pub async fn ws_resume(&self, id: Option<WorkstreamId>) -> Result<()>

Source

pub async fn ws_complete(&self, id: Option<WorkstreamId>) -> Result<()>

Source

pub async fn ws_abandon(&self, id: Option<WorkstreamId>) -> Result<()>

Source

pub async fn ws_note(&self, id: WorkstreamId, text: &str) -> Result<()>

Source

pub async fn repo_list(&self) -> Result<Vec<RepoInfo>>

Source

pub async fn repo_status(&self, path: Option<&str>) -> Result<RepoStatusInfo>

Source

pub async fn repo_branches( &self, path: Option<&str>, ) -> Result<Vec<RepoBranchInfo>>

Source

pub async fn repo_log( &self, path: Option<&str>, last: Option<usize>, ) -> Result<Vec<CommitInfo>>

Source

pub async fn repo_watch(&self, path: &str) -> Result<()>

Source

pub async fn repo_unwatch(&self, path: &str) -> Result<()>

Source

pub async fn skill_list(&self) -> Result<Vec<SkillInfo>>

Source

pub async fn skill_info(&self, name: &str) -> Result<SkillInfo>

Source

pub async fn gh_auth(&self) -> Result<(String, Vec<String>)>

Source

pub async fn daemon_status(&self) -> Result<DaemonStatusInfo>

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> 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, 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.