| 1 | // Copyright 2025 The Go MCP SDK Authors. All rights reserved. |
| 2 | // Use of this source code is governed by an MIT-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package mcp |
| 6 | |
| 7 | // hasSessionID is the interface which, if implemented by connections, informs |
| 8 | // the session about their session ID. |
| 9 | // |
| 10 | // TODO(rfindley): remove SessionID methods from connections, when it doesn't |
| 11 | // make sense. Or remove it from the Sessions entirely: why does it even need |
| 12 | // to be exposed? |
| 13 | type hasSessionID interface { |
| 14 | SessionID() string |
| 15 | } |
| 16 | |
| 17 | // ServerSessionState is the state of a session. |
| 18 | type ServerSessionState struct { |
| 19 | // InitializeParams are the parameters from 'initialize'. |
| 20 | InitializeParams *InitializeParams `json:"initializeParams"` |
| 21 | |
| 22 | // InitializedParams are the parameters from 'notifications/initialized'. |
| 23 | InitializedParams *InitializedParams `json:"initializedParams"` |
| 24 | |
| 25 | // LogLevel is the logging level for the session. |
| 26 | LogLevel LoggingLevel `json:"logLevel"` |
| 27 | |
| 28 | // TODO: resource subscriptions |
| 29 | } |