objectiveai_sdk/client_objectiveai_mcp/client_request/request.rs
1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4/// Envelope: correlation `id` + tagged [`super::Payload`]. Wire shape
5/// (the `id` field lives at the envelope level, the `type` discriminator
6/// and the variant's payload fields are flattened alongside):
7///
8/// ```json
9/// {"id":"…","type":"agent_completion_notify","response_id":"…","content":{…}}
10/// ```
11#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
12#[schemars(rename = "client_objectiveai_mcp.client_request.Request")]
13pub struct Request {
14 /// Client-minted correlation id. Echoed by the matching
15 /// [`super::super::client_response::Response`].
16 pub id: String,
17 #[serde(flatten)]
18 pub payload: super::Payload,
19}