tpmjs/apps
Ajax Davis 1e61ba1551 fix: use AI SDK tool() function to create proper tool wrappers
CRITICAL FIX: Was creating plain objects instead of using tool() from AI SDK.

The issue:
- Creating { description, inputSchema, execute } plain objects
- OpenAI receives invalid tool format: "type: None"
- AI SDK needs tools created with tool() function

The fix:
- Import tool() and jsonSchema() from 'ai'
- Use tool() to wrap the remote execution
- Use jsonSchema() to wrap the JSON Schema received from Railway
- Matches the format used in packages/tools/hello

Example from hello tool:
```ts
tool({
  description: "...",
  inputSchema: jsonSchema({ type: 'object', properties: {...} }),
  execute: async (params) => {...}
})
```

Now the playground creates tools the same way!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 09:13:10 +10:00
..
playground fix: use AI SDK tool() function to create proper tool wrappers 2025-12-04 09:13:10 +10:00
railway-executor fix: extract and serialize JSON Schema from AI SDK v6 tools correctly 2025-12-04 09:00:00 +10:00
web fix: use Dockerfile instead of Nixpacks for Railway deployment 2025-12-04 08:35:50 +10:00