pub struct Client;Expand description
Client side: connect, send a request, and block for the response.
Implementations§
Source§impl Client
impl Client
Sourcepub fn send(cmd: &ProposedCommand) -> Result<Verdict>
pub fn send(cmd: &ProposedCommand) -> Result<Verdict>
Propose a command and await its verdict.
Sourcepub fn resolve(resolution: &Resolution) -> Result<()>
pub fn resolve(resolution: &Resolution) -> Result<()>
Record a human’s resolution of a held command.
Sourcepub fn observe(observation: &Observation) -> Result<()>
pub fn observe(observation: &Observation) -> Result<()>
Record an observed filesystem change (backstop).
Sourcepub fn record(cmd: &ProposedCommand) -> Result<()>
pub fn record(cmd: &ProposedCommand) -> Result<()>
Record a shell command a human already ran (passive session recording).
Sourcepub fn list_pending() -> Result<Vec<PendingItem>>
pub fn list_pending() -> Result<Vec<PendingItem>>
List the commands currently held for approval.
Sourcepub fn pending_status(id: &str) -> Result<String>
pub fn pending_status(id: &str) -> Result<String>
The status of a queued command: pending | approved | denied | gone.
Sourcepub fn approve(id: &str) -> Result<()>
pub fn approve(id: &str) -> Result<()>
Approve a queued command (records the human decision; may snapshot).
Sourcepub fn status_scorer() -> Result<String>
pub fn status_scorer() -> Result<String>
The daemon’s active scorer backend id (e.g. heuristic or
llama:<model>). Lets callers report whether the local model is loaded.
Sourcepub fn auth_begin(op: &str) -> Result<(bool, String, String, KdfParams)>
pub fn auth_begin(op: &str) -> Result<(bool, String, String, KdfParams)>
Begin authenticating a privileged op; returns (locked, nonce, salt, params).
Sourcepub fn shutdown(op: &str, nonce: &str, proof: &str) -> Result<()>
pub fn shutdown(op: &str, nonce: &str, proof: &str) -> Result<()>
Complete an authenticated shutdown with a challenge proof (hex). On success the daemon records the event and exits.
Sourcepub fn is_daemon_running() -> bool
pub fn is_daemon_running() -> bool
Whether a daemon appears to be listening.