tpmjs/apps
Ajax Davis 89564af030 fix: sanitize invalid JSON schemas with type 'None' to valid object schemas
Add sanitizeJsonSchema() function to fix common schema issues:
- Replaces invalid type 'None' (common in Python tools) with 'object'
- Ensures all schemas have a valid type field
- Recursively sanitizes nested schemas in properties, items, anyOf/oneOf/allOf
- Prevents OpenAI API errors from malformed tool schemas

This fixes the error with @superagent-ai/ai-sdk guard tool which
returns type: 'None' instead of a valid JSON Schema type.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 18:02:10 +10:00
..
playground feat: add collated error reporting to batch tool loading 2025-12-04 16:59:12 +10:00
railway-executor fix: sanitize invalid JSON schemas with type 'None' to valid object schemas 2025-12-04 18:02:10 +10:00
web fix: handle undefined npmKeywords in tool detail page 2025-12-04 17:14:20 +10:00