diff --git a/src/agents/pi-tools.schema.test.ts b/src/agents/pi-tools.schema.test.ts index 70bc420407f..cfe56ab76dc 100644 --- a/src/agents/pi-tools.schema.test.ts +++ b/src/agents/pi-tools.schema.test.ts @@ -1,4 +1,5 @@ import type { AgentTool } from "@mariozechner/pi-agent-core"; +import { Type } from "@sinclair/typebox"; import { describe, expect, it, vi } from "vitest"; import { normalizeToolParameters } from "./pi-tools.schema.js"; @@ -8,21 +9,10 @@ describe("normalizeToolParameters", () => { name: "demo", label: "demo", description: "demo", - parameters: { - type: "object", - properties: { - count: { - type: "integer", - minimum: 1, - maximum: 5, - }, - query: { - type: "string", - minLength: 2, - }, - }, - required: ["count"], - }, + parameters: Type.Object({ + count: Type.Integer({ minimum: 1, maximum: 5 }), + query: Type.Optional(Type.String({ minLength: 2 })), + }), execute: vi.fn(), };