Bennet Bo Fenner
95d78ff8d5
context server: Make requests type safe ( #32254 )
...
This changes the context server crate so that the input/output for a
request are encoded at the type level, similar to how it is done for LSP
requests.
This also makes it easier to write tests that mock context servers, e.g.
you can write something like this now when using the `test-support`
feature of the `context-server` crate:
```rust
create_fake_transport("mcp-1", cx.background_executor())
.on_request::<context_server::types::request::PromptsList>(|_params| {
PromptsListResponse {
prompts: vec![/* some prompts */],
..
}
})
```
Release Notes:
- N/A
2025-06-06 17:47:21 +02:00
..
2025-05-29 01:58:40 +00:00
2025-06-06 17:47:21 +02:00
2025-06-06 12:05:27 +00:00
2025-05-22 21:00:54 +00:00
2025-05-16 05:04:36 -04:00
2025-05-20 23:06:07 +00:00
2025-06-06 17:47:21 +02:00
2025-05-21 09:27:54 +00:00
2025-06-06 17:47:21 +02:00
2025-06-06 12:05:27 +00:00
2025-06-06 09:39:35 +00:00
2025-05-26 21:20:41 -03:00
2025-05-28 11:51:21 -04:00
2025-05-20 23:06:07 +00:00
2025-05-30 08:29:52 +00:00
2025-06-04 10:41:12 +03:00
2025-05-30 08:32:54 -07:00
2025-05-26 11:48:50 -04:00
2025-05-26 23:04:31 -04:00
2025-06-04 16:56:33 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 23:04:31 -04:00
2025-06-06 16:18:05 +03:00
2025-06-05 19:15:06 +00:00
2025-06-04 19:18:12 +00:00
2025-06-05 12:59:22 +00:00
2025-06-06 17:47:21 +02:00
2025-06-05 19:42:52 +00:00
2025-06-04 01:37:25 +02:00
2025-06-04 01:37:25 +02:00
2025-05-20 00:20:00 +00:00
2025-05-22 07:24:46 -04:00
2025-05-14 11:15:27 +02:00
2025-06-05 19:15:06 +00:00
2025-05-20 23:06:07 +00:00
2025-06-06 16:18:05 +03:00
2025-06-04 19:18:12 +00:00
2025-06-06 14:29:59 +00:00
2025-06-06 12:05:27 +00:00
2025-05-26 16:06:38 +02:00
2025-05-26 16:06:38 +02:00
2025-05-20 23:06:07 +00:00
2025-06-02 22:19:09 +00:00
2025-06-03 20:35:25 +00:00
2025-05-17 16:42:45 +00:00
2025-05-23 14:53:53 +00:00
2025-06-03 20:35:25 +00:00
2025-06-06 11:28:07 -04:00
2025-05-12 14:43:14 +00:00
2025-06-06 11:28:07 -04:00
2025-06-03 12:23:01 -04:00
2025-06-06 11:28:07 -04:00
2025-06-03 09:41:45 +02:00
2025-06-05 19:30:34 +00:00
2025-06-06 07:31:45 +00:00
2025-05-26 17:43:57 +00:00
2025-05-20 23:06:07 +00:00
2025-06-03 15:20:25 -03:00
2025-06-03 13:18:29 +02:00
2025-05-20 23:06:07 +00:00
2025-05-20 23:06:07 +00:00
2025-05-27 21:52:42 +00:00
2025-06-05 19:15:06 +00:00
2025-05-20 23:06:07 +00:00
2025-05-17 16:42:45 +00:00
2025-05-17 16:42:45 +00:00
2025-06-06 10:47:28 -04:00
2025-05-08 14:01:39 +02:00
2025-06-04 14:07:01 +00:00
2025-06-06 12:35:22 +03:00
2025-05-20 23:06:07 +00:00
2025-06-03 02:12:58 +00:00
2025-06-06 08:31:59 -04:00
2025-05-20 23:06:07 +00:00
2025-05-20 23:06:07 +00:00
2025-06-04 14:07:01 +00:00
2025-06-05 19:42:52 +00:00
2025-05-29 21:41:15 +00:00
2025-05-30 08:29:52 +00:00
2025-05-20 23:06:07 +00:00
2025-05-30 08:10:12 -03:00
2025-05-22 14:22:35 -04:00
2025-06-06 11:06:42 +00:00
2025-06-05 23:35:43 +00:00
2025-06-06 06:23:09 +00:00
2025-06-04 14:07:01 +00:00
2025-05-26 11:46:35 +00:00
2025-06-03 15:59:46 +00:00
2025-05-26 23:04:31 -04:00
2025-05-26 23:04:31 -04:00
2025-06-02 21:24:08 +00:00
2025-05-29 12:55:47 +00:00
2025-06-05 19:42:52 +00:00
2025-06-06 17:47:21 +02:00
2025-06-05 03:53:59 +05:30
2025-05-26 23:04:31 -04:00
2025-05-20 23:06:07 +00:00
2025-06-06 11:28:07 -04:00
2025-06-05 07:09:09 +00:00
2025-05-26 17:43:57 +00:00
2025-05-23 14:53:53 +00:00
2025-05-27 16:56:27 +00:00
2025-06-04 19:54:24 +02:00
2025-06-02 16:29:06 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 11:48:50 -04:00
2025-05-26 11:48:50 -04:00
2025-06-03 14:59:17 -03:00
2025-05-26 23:04:31 -04:00
2025-05-29 20:43:12 +00:00
2025-05-20 23:06:07 +00:00
2025-06-03 12:23:01 -04:00
2025-06-04 17:29:08 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 23:04:31 -04:00
2025-05-26 13:44:09 +00:00
2025-05-20 23:06:07 +00:00
2025-05-16 17:35:44 +02:00
2025-05-20 23:06:07 +00:00
2025-05-26 11:48:50 -04:00
2025-05-23 20:45:32 +00:00
2025-05-29 16:09:07 +00:00
2025-05-30 14:32:59 +02:00
2025-06-05 13:25:51 -04:00
2025-06-06 08:08:20 -04:00
2025-06-03 17:43:06 -04:00
2025-06-04 02:37:27 +00:00
2025-05-26 18:23:41 +00:00
2025-05-26 18:23:41 +00:00
2025-06-04 17:29:08 +00:00
2025-06-05 07:09:09 +00:00
2025-06-02 16:29:06 +00:00
2025-06-06 06:24:59 +00:00
2025-05-14 23:29:11 +02:00
2025-05-23 19:31:25 +00:00
2025-05-30 15:26:27 +00:00
2025-06-04 02:37:27 +00:00
2025-06-05 18:10:22 -07:00
2025-05-20 23:06:07 +00:00
2025-05-29 15:20:58 -04:00
2025-06-06 05:09:48 -04:00
2025-06-03 22:30:59 +00:00
2025-06-05 19:38:19 +08:00
2025-06-06 06:23:09 +00:00
2025-05-26 11:48:50 -04:00
2025-06-06 00:49:30 -06:00