objectiveai-sdk 2.1.0

ObjectiveAI SDK, definitions, and utilities
Documentation
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "agent.openrouter.Continuation")]
pub struct Continuation {
    pub upstream: super::Upstream,
    /// Full slash-separated lineage of the agent this continuation
    /// belongs to (e.g. `A/B/agtcpl-<uuid>-<created>`). Minted on the
    /// agent's first spawn and preserved verbatim across every
    /// continuation round so the agent's identity stays stable
    /// regardless of who resumes the conversation.
    pub agent_instance_hierarchy: String,
    pub messages: Vec<super::super::completions::message::Message>,
    pub mcp_sessions: indexmap::IndexMap<String, String>,
    /// Per-agent reverse-attach session id baked into this agent's
    /// `client_objectiveai_mcp` proxy URL path segment. Persisted
    /// across continuation resumes so the proxy URLs stored in
    /// `mcp_sessions` keep matching the registered WS reverse-attach
    /// route. `None` when this agent never used `client_objectiveai_mcp`.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    #[schemars(extend("omitempty" = true))]
    pub ws_session_id: Option<String>,
}