Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 04:45 UTC
| 1 | import { McpServerGetResponse } from '../types/mcp.types'; |
| 2 | import { Tool } from '../types/tool.types'; |
| 3 | import { BaseNonAgenticProvider } from './BaseProvider'; |
| 4 | |
| 5 | /** |
| 6 | * This is a default provider implementation for Composio. |
| 7 | * This class is used as a default provider for Composio, if the user does not provide a provider. |
| 8 | * |
| 9 | * This class shouldn't be used directly or to be extended. |
| 10 | */ |
| 11 | |
| 12 | interface CustomTool { |
| 13 | name: string; |
| 14 | } |
| 15 | export class ComposioProvider extends BaseNonAgenticProvider<Array<CustomTool>, CustomTool> { |
| 16 | readonly name = 'ComposioProvider'; |
| 17 | |
| 18 | constructor() { |
| 19 | super(); |
| 20 | } |
| 21 | |
| 22 | wrapTool = (tool: Tool): CustomTool => { |
| 23 | return tool as CustomTool; |
| 24 | }; |
| 25 | |
| 26 | wrapTools(tools: Tool[]): CustomTool[] { |
| 27 | return tools.map(tool => this.wrapTool(tool)); |
| 28 | } |
| 29 | } |