fix(tool): bridge custom tool zod metadata (#27770)

This commit is contained in:
Aiden Cline 2026-05-15 14:50:21 -05:00 committed by GitHub
commit 48122b31cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 18 deletions

View file

@ -264,7 +264,7 @@ describe("tool.registry", () => {
)
it.instance(
"preserves Zod arg descriptions from config-scoped plugin packages",
"preserves Zod arg descriptions from older config-scoped plugin packages",
() =>
Effect.gen(function* () {
const test = yield* TestInstance
@ -291,7 +291,7 @@ describe("tool.registry", () => {
[
"import { z } from 'zod'",
"export function tool(input) {",
" return { ...input, jsonSchema: z.toJSONSchema(z.object(input.args), { target: 'draft-7', io: 'input' }) }",
" return input",
"}",
"tool.schema = z",
"",