superdoc-sdk 0.1.0-next.beta.1

Typed Rust client for the SuperDoc document runtime
Documentation
//! Process and wire adapters. Protocol policy comes from the generated contract.

pub(crate) mod framing;
pub mod installation;
pub(crate) mod process;
pub(crate) mod routing;

use serde_json::Value;
use std::sync::OnceLock;

pub(crate) fn contract() -> &'static Value {
    static CONTRACT: OnceLock<Value> = OnceLock::new();
    CONTRACT.get_or_init(|| {
        serde_json::from_str(crate::generated::CONTRACT_JSON)
            .expect("the generated SDK contract must be valid JSON")
    })
}

pub(crate) fn policy() -> &'static Value {
    &contract()["sdkPolicy"]
}