Repository navigation
fix(rust): preserve elicitation tool call id - #2910
Open
FOWEPJF255 wants to merge 1 commit into
Open
FOWEPJF255 wants to merge 1 commit into
FOWEPJF255 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the regression assertion covers forwarding the optional tool-call ID to the handler.
No open issues 🎉
What changed in this PR
This pull request preserves the optional elicitation tool-call ID in Rust by exposing it on ElicitationRequest and forwarding it to the registered handler.
Changes:
- Added the optional
tool_call_idfield to the Rust elicitation request type. - Forwarded the event’s tool-call ID during session notification handling.
- Added a regression assertion covering handler correlation.
| File | Description |
|---|---|
rust/tests/session_test.rs |
Verifies the handler receives the expected tool-call ID. |
rust/src/types.rs |
Adds the optional tool_call_id field to ElicitationRequest. |
rust/src/session.rs |
Propagates the event’s tool-call ID to the handler request. |
This pull request is ready to be approved.
Review effort: Lite (auto)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toolCallIdon RustElicitationRequestElicitationHandlerFixes #2900.
Root cause
ElicitationRequestedDataalready deserializes the optionaltoolCallId, but the handwrittenElicitationRequesttype did not expose it andSession::handle_notificationomitted it when constructing the handler request. Hosts therefore could not associate a pending form with the tool invocation that raised it.Validation
c74ef966: failed to compile withE0609: no field tool_call_id on type ElicitationRequestcargo test --offline --no-default-features --features test-support --test session_test elicitation_requested_dispatches_to_handler_and_responds(Rust 1.99.1, Linux): 1 passedcargo check --offline --no-default-features --features local-runtime(Rust 1.99.1, Linux)cargo +stable fmt --all -- --config-path .rustfmt.toml --checkgit diff --checkThe repository's pinned AHP
rust/v1.0.0source was supplied locally from the exact tagged commit only to work around a transient Git transport timeout; no dependency or lockfile change is included.