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
parent 0df2f5b45f
commit 48122b31cc
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",
"",