mcp: don't mark the server sesion as initialized prematurely
Update ServerSession so that the session is not marked as initialized until 'notifications/initialized' is actually received from the client. Include a new test of this lifecycle strictness. Fixes #225
This commit is contained in:
parent
4608401cc4
commit
5ab63feefa
1 changed files with 90 additions and 22 deletions
1
mcp/testdata/conformance/server/tools.txtar
vendored
1
mcp/testdata/conformance/server/tools.txtar
vendored
|
|
@ -20,6 +20,7 @@ greet
|
|||
"clientInfo": { "name": "ExampleClient", "version": "1.0.0" }
|
||||
}
|
||||
}
|
||||
{"jsonrpc":"2.0", "method": "notifications/initialized"}
|
||||
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
|
||||
{ "jsonrpc": "2.0", "id": 3, "method": "resources/list" }
|
||||
{ "jsonrpc": "2.0", "id": 4, "method": "prompts/list" }
|
||||
|
|
|
|||
Loading…
Reference in a new issue