Skip to main content

Crate scv_client

Crate scv_client 

Source
Expand description

What every local client of the SCV daemon needs, without depending on the server: the instance Layout (every path under SCV_HOME, and the instance’s service unit name), the delegation-depth variable a delegated SCV inherits, the chat log (history), framed reading and writing (Connection, read_frame), private instance files (fs::replace_private), Secret values that never print, byte-bounded text (text::utf8_prefix), and control for daemon management requests, which fail with a typed ControlError.

Modules§

fs
Private instance files: SCV’s state, records, and credentials are written whole, readable only by the user, and survive a crash.
history
The chat log: each direct conversation between a chat account’s owner and SCV, kept on disk so a new session can pick an unfinished conversation back up and the model can look further back when asked.
text
Byte-bounded text, for limits that count bytes on the wire or on disk.

Structs§

Connection
A client’s side of one protocol connection: a buffered reader, a writer, and the decoder that bounds what the server may send.
Layout
The paths of one SCV instance.
Secret
An API key, token, or app secret.
Stray
Something in an instance home that SCV does not read.

Enums§

ControlError
Why a control request failed.

Constants§

DELEGATION_DEPTH_VARIABLE
Environment variable carrying a delegated process’s depth; SCV sets it on every agent it starts.

Functions§

control
A bounded management exchange. Never retries mutations on ambiguous failure.
inherited_delegation_depth
The delegation depth to declare in session.start: this process’s own, when an SCV started it, so a delegated client cannot reset the count by connecting to a daemon.
read_frame
Read the next frame from reader.
write_message
Write message as one frame and flush it.