feat: better http server support (#199)

* feat: better http server support

1. allow user get extensions in tool call.
2. allow user serve sse service without initialization.

* fix: fix document test
This commit is contained in:
4t145 2025-05-19 18:49:18 +08:00 • committed by GitHub
commit 076dc2c2cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,7 +57,7 @@
//!
//! // create transport from std io
//! async fn io() -> Result<(), Box<dyn std::error::Error>> {
//! let client = None.serve((tokio::io::stdin(), tokio::io::stdout())).await?;
//! let client = ().serve((tokio::io::stdin(), tokio::io::stdout())).await?;
//! let tools = client.peer().list_tools(Default::default()).await?;
//! println!("{:?}", tools);
//! Ok(())