marona 1.1.2

Universal Model Gateway and MCP/Skill SDK with mandatory project-scoped Marona authentication
Documentation

Marona Rust SDK

Universal Model Gateway and MCP/Skill SDK for Rust 1.82+.

Install

[dependencies]
marona = "1.1.2"

Authentication

A project-scoped Marona Developer Key is mandatory for every client and runtime mode. Pass it explicitly or let the builder resolve MARONA_API_KEY.

use marona::{CreateRequest, Marona, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let marona = Marona::builder().build()?;
    let response = marona
        .responses
        .create(CreateRequest::new("marona/auto", "Review this design"))
        .await?;
    println!("{:?}", response.output);
    Ok(())
}

Missing, invalid, revoked, and expired keys produce typed Error::Authentication values with canonical gateway metadata.

Universal Model Gateway

Every model name must use the marona/* namespace. marona/auto delegates selection to the project-scoped Model Registry; aliases such as marona/company-assistant resolve there. Provider credentials and custom model endpoints are configured once through the Marona Developer Portal or Model Registry API. They are write-only and never exposed through this crate.

All calls—including registered Edge models—go through authenticated Marona Runtime. The crate has no direct-provider, local-executor, credential-cache, or public model-registration bypass.

Agents and Hub tools

use marona::{Agent, ConnectOptions, Input, Marona, Result, Runner};

# async fn run() -> Result<()> {
let marona = Marona::builder().build()?;
let tools = marona
    .hub
    .connect(ConnectOptions {
        apps: Some(vec!["sda-books".into()]),
        ..Default::default()
    })
    .await?;

let agent = Agent::new(&marona, "Customer Assistant")
    .model("marona/auto")
    .instructions("Help clearly.")
    .hub_tools(tools);

let result = Runner::run(
    &agent,
    Input::from("Download Steps to Christ"),
    Some("customer_482"),
    Some("chat_91a7"),
)
.await?;
println!("{:?}", result.output);
# Ok(())
# }

The same agent supports streaming, realtime, handoffs, delegation, A2A peers, validated function tools, lifecycle behavior, and published Marona Skills while keeping model execution behind the Universal Model Gateway.

Errors

GatewayError exposes code, request_id, retryable, required_action, retry_after_ms, and safe details. Typed Error variants cover authentication, namespace/model, credits, upstream service, custom model, billing, and Marona availability failures. Responses expose only safe routing fields, never upstream endpoints or raw provider payloads.

External MCP federation

# use marona::Marona;
# async fn example(marona: Marona) -> Result<(), marona::Error> {
let registered = marona.hub.register_mcp_server(
    "Microsoft 365",
    "microsoft-365",
    "https://workiq.svc.cloud.microsoft/mcp",
    "User-authorized Microsoft 365 work context",
    "private",
    "oauth2",
).await?;
let server_id = registered["server"]["id"].as_str().unwrap();
let authorization = marona.hub.start_mcp_oauth(
    server_id,
    &[],
    Some("YOUR_APPLICATION_USER_ID"),
).await?;
println!("{}", authorization["authorization_url"]);
marona.hub.verify_mcp_server(server_id).await?;
marona.hub.activate_mcp_server(server_id, &[]).await?;
# Ok(())
# }

Marona manages the Microsoft OAuth client; each application user only follows the authorization URL and consents. Use the same user subject as the runtime user ID afterward. The unified connection covers supported Outlook, Calendar, Teams, people, Planner, and OneDrive or SharePoint work context, including Word, Excel, and PowerPoint files, subject to the signed-in user's permissions.

Use a targeted connect for least privilege. connect_all() returns every capability available to the developer key. External calls always pass through Marona's governed gateway; upstream credentials and direct external endpoints are never returned to the SDK.

Release

Version 1.1.2 is published to crates.io from tag rust-v1.1.2 only after formatting, tests, Clippy, and package validation succeed on main.