pub struct DaemonEnvelope {
pub service: Option<String>,
pub op: String,
pub payload: Value,
pub origin_invocation_id: Option<String>,
}Expand description
A request sent to the daemon over the control socket.
Fields§
§service: Option<String>Target service name. None
(or "daemon") routes to the built-in daemon ops.
op: StringOperation name, interpreted by the target service (or the daemon).
payload: ValueOperation payload; null when the op takes no arguments.
origin_invocation_id: Option<String>Originating client’s request-log invocation_id, threaded across the
socket so daemon-side HTTP records correlate to the CLI/MCP invocation
that triggered them rather than the daemon’s own (#1198). Non-secret.
Absent from older clients; the daemon simply skips the correlation then.
Implementations§
Source§impl DaemonEnvelope
impl DaemonEnvelope
Sourcepub fn service(
name: impl Into<String>,
op: impl Into<String>,
payload: Value,
) -> Self
pub fn service( name: impl Into<String>, op: impl Into<String>, payload: Value, ) -> Self
Builds an envelope targeting a named service.
Sourcepub fn builtin(op: impl Into<String>) -> Self
pub fn builtin(op: impl Into<String>) -> Self
Builds an envelope targeting the built-in daemon ops.
Sourcepub fn with_origin(self, invocation_id: impl Into<String>) -> Self
pub fn with_origin(self, invocation_id: impl Into<String>) -> Self
Stamps the originating client’s request-log invocation_id on the
envelope so the daemon can correlate the requests it serves back to the
caller’s invocation (#1198).
Trait Implementations§
Source§impl Clone for DaemonEnvelope
impl Clone for DaemonEnvelope
Source§fn clone(&self) -> DaemonEnvelope
fn clone(&self) -> DaemonEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more