Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
Sonde::Session Struct Reference

State of one MCP session (one local connection, or one HTTP Mcp-Session-Id). More...

#include <server_p.h>

Public Types

enum class  Admission { New , Waiting , Admitted }
 How far a session is from being answered (design 0033). More...

Public Attributes

QString id
 Session id (a UUID).
Admission admission = Admission::New
 Whether its requests are answered.
QString transport
 "http" or "local".
QString protocolVersion
 Negotiated version; empty until initialize.
QJsonObject clientInfo
 clientInfo from initialize.
QJsonObject clientCapabilities
 capabilities from initialize.
bool initialized = false
 Whether notifications/initialized arrived.
LogLevel logLevel = LogLevel::Info
 Minimum level for log notifications.
QSet< QString > subscriptions
 Subscribed resource URIs.
NotifyFunction notify
 Stream to the client; empty if none is open.
QHash< QString, std::weak_ptr< ToolCallPrivate > > activeCalls
 In-flight tool calls by request key.
QElapsedTimer lastActivity
 Time since the last message (for expiry).
SessionPeer peer
 What the operating system says about the client.
QDateTime started
 When it was admitted.
std::shared_ptr< SessionRequestPrivate > pendingApproval
 The application's decision while admission is Waiting (design 0033).

Detailed Description

State of one MCP session (one local connection, or one HTTP Mcp-Session-Id).

Member Enumeration Documentation

◆ Admission

enum class Sonde::Session::Admission
strong

How far a session is from being answered (design 0033).

Enumerator
New 

initialize not sent yet: only initialize and ping are answered.

Waiting 

initialize sent; the application hasn't approved the client yet.

Admitted 

initialize answered: every request is.


The documentation for this struct was generated from the following file: