agent-nodejs icon indicating copy to clipboard operation
agent-nodejs copied to clipboard

refactor(ai-proxy): introduce RemoteTool class hierarchy

Open Scra3 opened this issue 3 weeks ago • 1 comments

Summary

  • Make RemoteTool an abstract base class with sourceType as a property
  • Add McpServerRemoteTool for MCP server tools (sourceType: 'mcp-server')
  • Add ServerRemoteTool for server-side tools (sourceType: 'server')
  • Extract tool building logic into ServerRemoteToolBuilder for better extensibility
  • Update tests to use concrete classes

This refactoring prepares the codebase for adding more server-side tools (slack, infogreffe, etc.) by providing a cleaner architecture.

Test plan

  • [x] All unit tests pass (yarn workspace @forestadmin/ai-proxy test)
  • [x] Lint passes (yarn workspace @forestadmin/ai-proxy lint)
  • [x] Build passes (yarn workspace @forestadmin/ai-proxy build)

🤖 Generated with Claude Code

Scra3 avatar Jan 16 '26 19:01 Scra3