fix(mcp): validate session schema before read-only queries

This commit is contained in:
moesnow authored and digua committed 2026-10-24 16:26:22 +08:00
1 parent 69116a0321
commit d42e1d1bfb
7 files changed
+448 -24

No files matched your search

+2 -2
View File
@@ -41,8 +41,8 @@ test('MCP tools/list array schemas agree with tools/call validation and database
await startMcpServer({
version: '1.0.0',
dbManager: {
listSessionIdsReadonly: () => ['fixture'],
openReadonly: (id) => (id === 'fixture' ? readonlyFixture : null),
listSessionIdsMcpReadonly: () => ['fixture'],
openMcpReadonly: (id) => (id === 'fixture' ? readonlyFixture : null),
},
})
await client.connect(clientTransport)