MessagesPayload (src/types.rs)

lean-ctx · clients/rust/lean-ctx-client/src/types.rs · rust · Apache-2.0
integration, Integration / API

Defines Rust structs for lean‑ctx API payloads, mirroring TypeScript types for consistent client‑server data exchange.

// Source: https://github.com/yvgude/lean-ctx | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Wire types for the lean-ctx `/v1` contract.
//!
//! These mirror the TypeScript SDK (`cookbook/sdk/src/types.ts`) and the server
//! structs so a Rust embedder sees the same shapes. Open-ended documents
//! (`manifest`, `capabilities`, `openapi.json`) are returned as
//! [`serde_json::Value`] so the client never breaks when the server adds keys.

use serde::{Deserialize, Serialize};
use serde_json::Value;

/// Typed E12 payload carried by a canonical token envelope.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum En

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key