From d42c2f6a17e177b0c2267cb30c65e87beb86eebd Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 28 Mar 2026 05:53:15 +0000 Subject: [PATCH] test(pi-tools): use typebox schema fixture --- src/agents/pi-tools.schema.test.ts | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) 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(), };