You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase H redo: migrate tests, examples, and scenarios to per-trait handler API
Mechanical migration of all consumers to the new optional handler-trait
API introduced in 455a17b:
- rust/tests/session_test.rs: ~30 SessionHandler impls split into the
corresponding PermissionHandler / ElicitationHandler / UserInputHandler /
ExitPlanModeHandler / AutoModeSwitchHandler / ToolHandler impls. Tests
that called handler.on_event(...) directly now call handler.handle(...)
on the appropriate trait. The legacy tool.call direct-RPC test was
dropped; equivalent coverage is already provided by
external_tool_requested_dispatches_to_handler_and_responds.
- rust/tests/e2e/*: per-trait migration; with_handler(...) -> the matching
with_*_handler builder.
- rust/examples/*: same migration.
- test/scenarios/**/rust/src/main.rs: same migration.
Also fixes a bug in Client::create_session / Client::resume_session
where to_wire() was called after .take()-ing all handler fields, so the
derived wire flags (requestPermission, requestElicitation, hooks, etc.)
were always false. Computing the wire payload now happens before the
takes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments