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 ingest(observed: &ObservedIngest) -> Result<()>
pub fn ingest(observed: &ObservedIngest) -> Result<()>
Report an observed untrusted-content ingestion (provenance taint input).
Sourcepub fn provenance(cmd: &ProposedCommand) -> Result<(bool, Vec<ProvStep>)>
pub fn provenance(cmd: &ProposedCommand) -> Result<(bool, Vec<ProvStep>)>
Fetch the provenance trail for a command: (tainted, trail).
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 prune_pending() -> Result<u64>
pub fn prune_pending() -> Result<u64>
Prune every still-pending entry from the queue without recording a
human:deny per one — recovery for orphaned holds. Returns the count
pruned (reported by the daemon via a Pending { status: "N" } reply).
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: Option<&str>,
proof: Option<&str>,
) -> Result<()>
pub fn shutdown( op: &str, nonce: Option<&str>, proof: Option<&str>, ) -> Result<()>
Complete a shutdown. Pass Some(nonce_hex) + Some(proof_hex) for the
authenticated path (a provisioned vault); pass None/None when no vault
is set and no proof is required. Absence is modeled as None, never an
empty string, so a placeholder can’t be mistaken for a real nonce.
Sourcepub fn is_daemon_running() -> bool
pub fn is_daemon_running() -> bool
Whether a daemon appears to be listening.