Skip to content

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

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

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