fix(build): tighten TypeScript configuration and update dependencies for zod v4 compatibility
This commit is contained in:
@@ -66,6 +66,7 @@ tap.test('agent should call a single tool and incorporate the result', async ()
|
||||
|
||||
tap.test('agent should pick the right tool from multiple options', async () => {
|
||||
const callLog: string[] = [];
|
||||
type TCalculatorOperation = 'add' | 'subtract' | 'multiply' | 'divide';
|
||||
|
||||
const result = await runAgent({
|
||||
model,
|
||||
@@ -79,7 +80,7 @@ tap.test('agent should pick the right tool from multiple options', async () => {
|
||||
a: z.number(),
|
||||
b: z.number(),
|
||||
}),
|
||||
execute: async ({ operation, a, b }: { operation: string; a: number; b: number }) => {
|
||||
execute: async ({ operation, a, b }: { operation: TCalculatorOperation; a: number; b: number }) => {
|
||||
callLog.push(`calculator:${operation}(${a}, ${b})`);
|
||||
switch (operation) {
|
||||
case 'add': return String(a + b);
|
||||
|
||||
Reference in New Issue
Block a user