feat(ai): Implement Zod-based tool validation and improve Agent API
- Replace JSON Schema with Zod schemas for tool parameter definitions - Add runtime validation for all tool calls at provider level - Create shared validation module with detailed error formatting - Update Agent API with comprehensive event system - Add agent tests with calculator tool for multi-turn execution - Add abort test to verify proper handling of aborted requests - Update documentation with detailed event flow examples - Rename generate.ts to stream.ts for clarity
This commit is contained in:
@@ -19,10 +19,11 @@
|
||||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.60.0",
|
||||
"@google/genai": "^1.15.0",
|
||||
"chalk": "^5.5.0",
|
||||
"openai": "^5.15.0"
|
||||
"@anthropic-ai/sdk": "^0.61.0",
|
||||
"@google/genai": "^1.17.0",
|
||||
"chalk": "^5.6.2",
|
||||
"openai": "^5.20.0",
|
||||
"zod-to-json-schema": "^3.24.6"
|
||||
},
|
||||
"keywords": [
|
||||
"ai",
|
||||
|
||||
Reference in New Issue
Block a user