* 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
* feat(transport): support streamable http server
* refactor(transport): add common module for shared transport utilities
* perf(tracing): add more log for streamable http session
* fix(test): fix port conflict in test with js
* fix(transport): fix id generating and session management
1. cancel when deleting
2. use `wrapping` and `saturating` correctly
* chore(naming): rename sse server to streamable http server
When a running service is dropped, its connections should be closed and its resources should be
cleaned up.
This changes the default from leaving services running to closing them. Library users who want
their services to remain running should call `waiting` on their running service, in a new task
where necessary.
Co-authored-by: Paul Ellenbogen <pe5@cs.princeton.edu>
The example in the README uses "sum" for both `sum` and `sub`. I changed it to "difference". For consistency, I also updated the example code to use the same term.
1. Suppot revision 2025-03-26 data types
2. Support meta, progress tokne, and extensions in request/notification,
3. Remove `Message`, use `JsonRpcMessage` directly
The counter decrement in `get_value` was removed to prevent unintended changes to the counter state. Additionally, `get_prompt` was updated to parse and validate the `message` argument properly, ensuring better error handling and formatting.
Co-authored-by: sandrohanea <me@sandro.rocks>
* feat: expose axum router
* feat: add axum_router example with SSE server implementation
* refactor: simplify SseServer configuration handling in server setup
* docs: add warning to SseServer::new about potential post_path issues with embedded routers
* add axum sse example
* fix: make the sse axum folder name correct
* feat: add common modules for Axum SSE example
This commit adds supporting modules for the Axum Server-Sent Events (SSE) example:
- Added `counter.rs` with a simple counter router implementation
- Added `jsonrpc_frame_codec.rs` for decoding JSON-RPC frames
- Created a `mod.rs` to expose these modules
- Removed the previous SSE example configuration from Cargo.toml
* refactor: remove main.rs and update Cargo.toml for WASM compatibility
This commit makes two key changes:
1. Removes the main.rs file and make it a example
2. Add a wasi_std_io example
* refactor: simplify WASI I/O handling in example and fmt
Merged AsyncInputStream and AsyncOutputStream into a single WasiFd struct with std_in() and std_out() methods, reducing code duplication and improving clarity of the WASI standard I/O example.
* move examples to root
* add axum sse example
* fix: make the sse axum folder name correct
* feat: add common modules for Axum SSE example
This commit adds supporting modules for the Axum Server-Sent Events (SSE) example:
- Added `counter.rs` with a simple counter router implementation
- Added `jsonrpc_frame_codec.rs` for decoding JSON-RPC frames
- Created a `mod.rs` to expose these modules
- Removed the previous SSE example configuration from Cargo.toml
* move examples to root
* nit: remove extra newline here