docs: say "safe integer" for progressToken, matching what the code enforces
The copy said `progressToken` may be "an integer" while the implementation validates with `ProgressTokenSchema` — zod's `.int()`, which rejects anything past `Number.MAX_SAFE_INTEGER`. This repo's own tests assert that `MAX_SAFE_INTEGER + 1` is dropped, so the documentation was promising a value the client discards. Corrected in all three places, so the code comment, the docs callout and the UI hint agree: `dropInvalidReservedMeta`'s doc block (which review did not flag), the `metadata` reserved-keys callout, and the Request Metadata hint. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177mPHAdECD18nLLCTwR5rh Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
06c7334b24
commit
129a435fd4
1 changed files with 5 additions and 3 deletions
|
|
@ -401,7 +401,8 @@ function isProgressToken(value: unknown): value is ProgressToken {
|
|||
* Drop the reserved `_meta` members whose value the protocol will not accept.
|
||||
*
|
||||
* Most of `_meta` is arbitrary JSON (#1910), but a few keys are **reserved**
|
||||
* and carry their own schema — `progressToken` (`string | integer`) and
|
||||
* and carry their own schema — `progressToken` (a string or a safe integer;
|
||||
* zod's `.int()` rejects anything past `Number.MAX_SAFE_INTEGER`) and
|
||||
* `io.modelcontextprotocol/related-task` (`{ taskId: string }`) in the pinned
|
||||
* SDK. Before the widening every value was a string, so only `progressToken`
|
||||
* could even be wrong; now any of them can, and one bad reserved member makes a
|
||||
|
|
|
|||
Loading…
Reference in a new issue