v2 - RFC Extract Tasks out of protocol.ts into TaskManager (#1673)

Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
Konstantin Konstantinov 2026-03-25 21:58:01 +02:00 • committed by GitHub
commit 462c3fc47d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2122 additions and 1942 deletions

View file

@ -265,14 +265,14 @@ async function connect(url?: string): Promise<void> {
form: {}
},
tasks: {
taskStore: clientTaskStore,
requests: {
elicitation: {
create: {}
}
}
}
},
taskStore: clientTaskStore
}
}
);
client.onerror = error => {

View file

@ -41,9 +41,14 @@ const getServer = () => {
websiteUrl: 'https://github.com/modelcontextprotocol/typescript-sdk'
},
{
capabilities: { logging: {}, tasks: { requests: { tools: { call: {} } } } },
taskStore, // Enable task support
taskMessageQueue: new InMemoryTaskMessageQueue()
capabilities: {
logging: {},
tasks: {
requests: { tools: { call: {} } },
taskStore,
taskMessageQueue: new InMemoryTaskMessageQueue()
}
}
}
);