objectiveai-cli-sdk 2.0.5

Library surface for objectiveai-cli: structured JSON Lines output types.
Documentation
use serde::{Deserialize, Serialize};

/// Contents of a log read or subscribe. Mirrors the upstream
/// `objectiveai_sdk::filesystem::logs::LogContent` (which has no serde
/// derives) so the wire shape is parseable in cli-lib without depending
/// on it for serialization.
///
/// `Json` carries an arbitrary API payload (one of the two intentional
/// uses of `serde_json::Value` in this module). `DataUrl` carries
/// `data:{mime};base64,{payload}` for binary log content.
///
/// Wire shapes:
///   `{"type":"notification","content":<value>}`
///   `{"type":"notification","content_data_url":"data:..."}`
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(untagged)]
pub enum LogContent {
    Json { content: serde_json::Value },
    DataUrl { content_data_url: String },
}