Repository navigation
Conversation
SDK: add optional Tool.inputZodSchema with a structural synchronous safeParse interface. Validate explicit canonical parser output against complete JSON Schema and require idempotence across approval and hook checks. Intentional behavior tightening: arguments violating previously unenforced declared constraints now fail before execution. Preserve aliases, unknown-key compatibility and default/coercion ownership. Keep complex schemas intact in lean declarations. Validation: tool-input-schema, tiny-window-surface and task-observation stages passed; changed-file ESLint and Prettier passed. Full verify was not green: cold whole-repository ESLint timed out and the todos-view PTY probe failed on both candidate and unchanged baseline.
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.
Tool calls with invalid nested values currently reach implementations because execution only checks top-level parameter types. This change enforces JSON Schema at the existing execution boundaries, including rewritten hook and approval inputs, and consumes optional synchronous, idempotent safeParse adapters before validating their normalized output.
The validator supports draft-07, 2019-09 and 2020-12 without global coercion, default insertion, field removal or external schema loading. Validation messages omit rejected values and custom parser errors. Lean declarations preserve complex schemas instead of pruning them into unsatisfiable contracts.
Validation:
Draft pending CI/review. Studio's official upstream pin remains unchanged until this change is merged into official main.