feat!: capabilities for tasks, elicitation (#732)
closes #544 Replaces opaque `JsonObject?` modelling of `elicitation` with a typed `ClientCapabilities.Elicitation` (`form`, `url`), and adds the new `tasks` capability on both `ClientCapabilities` and `ServerCapabilities` (with `list`, `cancel`, per-request-type augmentation). Wires capability assertions for `tasks/*` methods and `notifications/tasks/status` into `Client` and `ServerSession` ## How Has This Been Tested? unit tests ## Breaking Changes yes now elicitation is a specific class in capabilities ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed
This commit is contained in:
parent
664f51b9cc
commit
ebc53f0ded
1 changed files with 872 additions and 65 deletions
|
|
@ -1058,7 +1058,7 @@ class ClientTest {
|
|||
Implementation(name = "test client", version = "1.0"),
|
||||
ClientOptions(
|
||||
capabilities = ClientCapabilities(
|
||||
elicitation = EmptyJsonObject,
|
||||
elicitation = ClientCapabilities.Elicitation(),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
@ -1270,7 +1270,7 @@ class ClientTest {
|
|||
): Pair<Client, ServerSession> = kotlinx.coroutines.coroutineScope {
|
||||
val client = Client(
|
||||
Implementation(name = "test client", version = "1.0"),
|
||||
ClientOptions(capabilities = ClientCapabilities(elicitation = EmptyJsonObject)),
|
||||
ClientOptions(capabilities = ClientCapabilities(elicitation = ClientCapabilities.Elicitation())),
|
||||
)
|
||||
client.setElicitationHandler(handler)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue