Skip to content

Vouch Request: blockgroot — fix for #2622 (Zod v4 instanceof check in tools.ts) #4414

Closed as not planned

Description

@blockgroot

Why do you want to contribute?

I'd like to fix #2622 — @trigger.dev/core's convertToolParametersToSchema in packages/core/src/v3/types/tools.ts uses toolParameters instanceof z.ZodSchema to detect a Zod schema, which breaks for consumers on Zod v4 (Zod v4 doesn't export ZodSchema the same way, causing build failures in downstream apps like Next.js). The fix is straightforward: the codebase already has the correct version-agnostic pattern in schemas.ts (isSchemaZodEsque, which duck-types _def/parse/parseAsync/safeParse instead of using instanceof) — I'd reuse that helper in tools.ts instead. I'll add a regression test and a changeset.

Prior contributions or relevant experience

No response

Activity

  1. blockgroot commented on Jul 29, 2026

    @blockgroot
    Author

    Update: three fixes are now implemented and pushed to my fork, each with a regression test that fails before the fix and passes after. Each is scoped to a single issue per the one-issue-per-PR rule, ready to open as a PR the moment I'm vouched.

    Happy to open PRs for any/all of these once vouched — let me know if you'd like me to start with a particular one.

  2. matt-aitken commented on Oct 7, 2026

    @matt-aitken
    Member

    We have a new Vouch policy, please see the discussion here: #5010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions