pub struct LocalCli {
pub intents: IntentMachine,
pub role: String,
}Expand description
Local CLI handlers share the intent queue with plugin-originated sends.
Fields§
§intents: IntentMachine§role: StringImplementations§
Source§impl LocalCli
impl LocalCli
pub fn new(intents: IntentMachine) -> Self
pub fn with_role(intents: IntentMachine, role: impl Into<String>) -> Self
Sourcepub fn send(&self, envelope: Envelope) -> Result<ClientOp>
pub fn send(&self, envelope: Envelope) -> Result<ClientOp>
Queue one outbound send and answer the stamped envelope.
The queue keys its row with an op_id; a note arrives without one, so
the stamp lands before the envelope becomes the ClientOp the caller
writes, and the frame on the wire carries the id the row stored.
pub fn reply(&self, envelope: Envelope) -> Result<ClientOp>
pub fn complete(&self, envelope: Envelope) -> Result<ClientOp>
pub fn handoff(&self, envelope: Envelope) -> Result<ClientOp>
pub fn control(&self, args: ControlArgs) -> ClientOp
pub fn query_sessions(&self, args: QuerySessionsArgs) -> ClientOp
Sourcepub fn query_roles(&self, args: QueryRolesArgs) -> ClientOp
pub fn query_roles(&self, args: QueryRolesArgs) -> ClientOp
Build the server query shape for callers that need a wire request.
Sourcepub fn query_roles_local(&self, args: &QueryRolesArgs) -> Result<ResBody>
pub fn query_roles_local(&self, args: &QueryRolesArgs) -> Result<ResBody>
Answer the role query from durable local prose cache. QueryRolesArgs
is the only role-query type in onlyne-proto and has the field role.
Sourcepub fn export_prose(&self) -> Result<ResBody>
pub fn export_prose(&self) -> Result<ResBody>
Client-surface export used by cluster export-prose.
pub fn query_ledger(&self, args: LedgerQuery) -> ClientOp
pub fn subscribe(&self, args: Subscribe) -> ClientOp
pub fn history(&self, args: HistoryArgs) -> Result<ClientOp>
Sourcepub fn offline_send(&self, envelope: &Envelope) -> Result<ResBody>
pub fn offline_send(&self, envelope: &Envelope) -> Result<ResBody>
Queue one plugin send and answer the key its intent row carries.
A note arrives without an op_id, so the stamp happens before the
reply is built: the plugin reads the id the queue stored rather than
null, and the stored envelope is the one that replays.