Per human review on #1688: for each `as unknown as` in the PR, either refactor
or justify with a comment naming the SDK gap (so it can inform SDK-side type
improvements).
- Sampling/elicit receiver-task returns: route through a typed `CreateTaskResult`
so the object shape IS checked; the remaining cast to CreateMessageResult /
ElicitResult is the honest SDK gap (the 2-arg setRequestHandler overload types
the handler return as the spec result only, not the task-augmented variant).
- `_requestHandlers` / `_progressHandlers` private-field casts: comments now name
the exact missing public API (opt a handler out of result validation; keep a
progress subscription alive across a resolved request).
- test-server `_requestHandlers` cast: same SDK gap on the server side, noted.
- serverList object->Record casts (pre-existing): documented as plain structural
widening (no index signature -> TS requires the `unknown` step), not an SDK
workaround.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>