Commit c58e2f2
Fix SessionUi::elicitation wire field name
The hand-authored `SessionUi::elicitation` convenience layer was
sending the JSON Schema payload as `"schema"` on the wire, but the
`session.ui.elicitation` request shape expects `"requestedSchema"`.
This is the field name in:
- this crate's own generated UIElicitationRequest type
(rust/src/generated/api_types.rs:1721, serde renames to
`requestedSchema` via #[serde(rename_all = "camelCase")])
- the generated typed RPC wrapper SessionRpcUi::elicitation
(rust/src/generated/rpc.rs:1245-1257), which is correct
- and the same wire field used by every other SDK we ship
So every elicitation call from the SessionUi convenience layer was
effectively dead — the CLI saw a missing required `requestedSchema`
field. The `confirm` / `select` / `input` helpers all delegate to
`elicitation`, so they were dead too.
The mock-server test for elicitation round-tripped through the same
misnamed field on both ends, so the bug slipped past unit tests
(`assert_eq!(request["params"]["schema"], schema)` matched the buggy
implementation). The fix is a one-line rename in session.rs plus a
test update that now asserts on `requestedSchema` and explicitly
rejects a stray `schema` key, so we can't regress the same way.
207 tests pass. doc / clippy / fmt clean.
Caught by the gap-analysis re-run before 0.1.0 cut. Wire-shape
divergence between hand-authored and generated layers — same class
of bug as the workspace RPC fix earlier in this stack.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 85483d5 commit c58e2f2
3 files changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
318 | 331 | | |
319 | 332 | | |
320 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
1247 | | - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1248 | 1252 | | |
1249 | 1253 | | |
1250 | 1254 | | |
| |||
0 commit comments