fix: support strict JSON Schema validators and resolve TypeScript compiler errors - #2
Open
creatiVision wants to merge 5 commits into
Open
fix: support strict JSON Schema validators and resolve TypeScript compiler errors#2creatiVision wants to merge 5 commits into
creatiVision wants to merge 5 commits into
Conversation
…ed on individual content items
…compatibility and resolve typescript compiler errors
kmalakoff
force-pushed
the
master
branch
14 times, most recently
from
August 30, 2026 07:52
28984eb to
4c710ec
Compare
kmalakoff
force-pushed
the
master
branch
11 times, most recently
from
September 5, 2026 01:58
1f8434e to
19022ec
Compare
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.
Summary
This PR improves compatibility with strict JSON Schema validators (such as the Moonshot/Kimi API validator) and resolves a few strict TypeScript compiler errors in the codebase.
Changes
JSON Schema Compatibility:
z.tuple([z.number(), z.number()])withz.array(z.number()).length(2)insrc/mcp/tools/pdf-document.tsandsrc/mcp/tools/pdf-layout.ts.items: [{type: number}, {type: number}]). Strict validators (such as Moonshot) reject array-baseditemsschemas and requireitemsto be a single schema object. Usingz.array(z.number()).length(2)compiles toitems: { type: 'number' }, minItems: 2, maxItems: 2which is functionally equivalent but universally accepted by all JSON Schema engines.TypeScript Fixes:
src/lib/yoga-resume/measure.tsandsrc/lib/yoga-resume/render.tswhereelement.bulletsis optional and could be undefined.pngBufferpossibly undefined error insrc/mcp/tools/pdf-image.ts.