Repository navigation
Add Runtime Type Validation for Tool Results - #82
Merged
Merged
Conversation
dsp-ant
previously approved these changes
Nov 26, 2024
dsp-ant
left a comment
Member
There was a problem hiding this comment.
Thank you for the improvement! This is quite sensible.
ashwin-ant
previously approved these changes
Nov 26, 2024
ashwin-ant
left a comment
Member
There was a problem hiding this comment.
Thank you! Left one small comment
| </pre> | ||
| <h4 className="font-semibold mb-2">Errors:</h4> | ||
| {parsedResult.error.errors.map((error) => ( | ||
| <pre className="bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64"> |
Member
There was a problem hiding this comment.
nit: I think this might need a key prop
Contributor
Author
There was a problem hiding this comment.
@ashwin-ant Perfect! I've applied your suggestion.
ashwin-ant
reviewed
Nov 26, 2024
Co-authored-by: ashwin-ant <[email protected]>
jacksteamdev
dismissed stale reviews from ashwin-ant and dsp-ant
via
November 26, 2024 20:30
6057831
ashwin-ant
approved these changes
Nov 26, 2024
cliffhall
added a commit
that referenced
this pull request
Oct 20, 2026
CodeQL flagged the stamp's plain SHA-256 of the client secret as an insufficient password hash (js/insufficient-password-hash, alert #82). The digest sat in the same store as the secret, so it revealed nothing that store does not, but the shape is still a fast unkeyed hash of a secret. The stamp now carries an HMAC over the client_id keyed by the credential: only a writer holding the value can produce it, it matches only that value, and it also refuses a stamp whose client_id was swapped. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: cliffhall <[email protected]>
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.
Fixes #80
Problem
The inspector crashes when tool handlers return malformed responses. Specifically, when following the weather example from the docs, the inspector throws
TypeError: f.content.map is not a functionbecause the response structure doesn't match expectations.Solution
Changes
safeParse()to validate without throwingTesting