colmugx/posoco/types does not have a README file

    ChatOptions

    pub(all) struct ChatOptions {
    temperature : Double?
    max_output_tokens : Int?
    tool_choice : ToolChoice?
    reasoning_effort : ReasoningEffort?
    } derive(Eq,
    Debug
    )

    Content

    pub(all) enum Content {
    Text(String)
    Image(String, String)
    } derive(Eq,
    Debug
    )

    FinishReason

    pub(all) enum FinishReason {
    Stop
    Length
    ToolCalls
    Other(String)
    } derive(Eq,
    Debug
    )

    MemoryEntry

    pub(all) struct MemoryEntry {
    id : String
    content : String
    metadata : Map[String, Json]
    score : Double?
    } derive(Eq,
    Debug
    )

    MemoryQuery

    pub(all) struct MemoryQuery {
    query : String
    top_k : Int
    threshold : Double?
    filter : Map[String, Json]
    } derive(Eq,
    Debug
    )

    Message

    pub(all) struct Message {
    role : Role
    content : Array[Content]
    tool_calls : Array[ToolCall]
    tool_call_id : String?
    name : String?
    reasoning_content : String?
    } derive(Eq,
    Debug
    )

    A conversation message. reasoning_content carries provider reasoning (e.g. DeepSeek deepseek-reasoner思维链, OpenAI o-series reasoning content). Providers that don't produce reasoning leave it None. Wire encoders decide whether to resend it in subsequent turns (DeepSeek: must resend for turns with tool_calls; optional otherwise).

    ModelResponse

    pub(all) struct ModelResponse {
    message : Message
    tool_calls : Array[ToolCall]
    finish_reason : FinishReason
    usage : Usage?
    reasoning_content : String?
    } derive(Eq,
    Debug
    )

    ReasoningEffort

    pub(all) enum ReasoningEffort {
    Off
    Minimal
    Low
    Medium
    High
    Maximum
    } derive(Eq,
    Debug
    )

    Reasoning effort requested of the model. Provider-agnostic: each ext maps these to its own effort tiers (e.g. DeepSeek collapses to on/off via model choice; OpenAI/Anthropic have explicit tiers). Maximum means the provider's absolute top tier (Claude ultra, DeepSeek Max, OpenAI high).

    Role

    pub(all) enum Role {
    System
    User
    Assistant
    Tool
    } derive(Eq,
    Debug
    )

    Session

    pub(all) struct Session {
    messages : Array[Message]
    metadata : Map[String, Json]
    } derive(Eq,
    Debug
    )

    StreamAccumulator

    pub(all) struct StreamAccumulator {
    text : String
    reasoning : String
    tool_calls : Array[ToolCallBuilder]
    finish_reason : FinishReason
    usage : Usage?
    } derive(
    Debug
    )

    Accumulates StreamChunk events into a ModelResponse.

    StreamAccumulator::new

    StreamAccumulator::push

    fn StreamAccumulator::push(self : StreamAccumulator, chunk : StreamChunk) -> Unit

    StreamAccumulator::to_response

    Assemble accumulated stream chunks into a ModelResponse.

    T07 error-transparency: malformed tool-call argument JSON raises ModelError::ResponseParse instead of silently becoming {}. This prevents a corrupted stream from masquerading as a valid empty-args call.

    StreamChunk

    pub(all) enum StreamChunk {
    TextDelta(token~ : String)
    ReasoningDelta(token~ : String)
    ToolCallDelta(index~ : Int, id~ : String?, name~ : String?, arguments_delta~ : String?)
    Usage(Usage)
    Finish(reason~ : FinishReason)
    } derive(Eq,
    Debug
    )

    ToolCall

    pub(all) struct ToolCall {
    id : String
    name : String
    arguments : Json
    } derive(Eq,
    Debug
    )

    ToolCallBuilder

    pub(all) struct ToolCallBuilder {
    id : String
    name : String
    arguments_json : String
    } derive(
    Debug
    )

    ToolCallBuilder::new

    ToolChoice

    pub(all) enum ToolChoice {
    Auto
    NoTool
    Required
    NamedTool(String)
    } derive(Eq,
    Debug
    )

    ToolDef

    pub(all) struct ToolDef {
    name : String
    description : String
    input_schema : Json
    metadata : Json?
    source : String?
    } derive(Eq,
    Debug
    )

    ToolResult

    pub(all) struct ToolResult {
    content : String
    structured : Json?
    is_error : Bool
    } derive(Eq,
    Debug
    )

    TurnEvent

    pub(all) enum TurnEvent {
    TurnStarted
    ToolCallPending(ToolCall)
    ToolCallResult(call~ : ToolCall, result~ : ToolResult, is_error~ : Bool)
    ModelResponseReceived(message~ : Message, usage~ : Usage?, reasoning_content~ : String?)
    SessionRedirect(from~ : String, to~ : String, messages_before~ : Int, messages_after~ : Int)
    TurnCompleted
    TurnFailed(String)
    ToolCallDeferred(call~ : ToolCall, reason~ : String)
    StreamChunkReceived(chunk~ : StreamChunk)
    Custom(source~ : String, label~ : String, data~ : Json)
    } derive(Eq,
    Debug
    )

    impl Show for TurnEvent

    TurnResult

    pub(all) struct TurnResult {
    message : Message
    tool_results : Array[ToolResult]
    final_session_id : String
    } derive(Eq,
    Debug
    )

    Usage

    pub(all) struct Usage {
    input_tokens : Int?
    output_tokens : Int?
    total_tokens : Int?
    } derive(Eq,
    Debug
    )