- Add SSE transport server for remote MCP connections - Implement API key authentication - Add agent presence system (register_agent, list_agents) - Add list_services tool to discover local services - Refactor messaging for dynamic agent names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
import { ToolHandler } from './base/ToolHandler';
|
|
import { FileReadTool } from './builtin/FileReadTool';
|
|
import { FileWriteTool } from './builtin/FileWriteTool';
|
|
import { FileListTool } from './builtin/FileListTool';
|
|
import { SystemCommandTool } from './builtin/SystemCommandTool';
|
|
import { HttpRequestTool } from './builtin/HttpRequestTool';
|
|
import { RegisterAgentTool, ListAgentsTool, ListServicesTool, SendMessageTool, ReceiveMessagesTool } from './builtin/messaging';
|
|
import { NatsClient } from '../nats/NatsClient';
|
|
|
|
export * from './base/ToolHandler';
|
|
|
|
export function createBuiltinTools(natsClient: NatsClient): Map<string, ToolHandler> {
|
|
const tools = new Map<string, ToolHandler>();
|
|
|
|
// File operation tools
|
|
tools.set('file_read', new FileReadTool());
|
|
tools.set('file_write', new FileWriteTool());
|
|
tools.set('file_list', new FileListTool());
|
|
|
|
// System tools
|
|
tools.set('system_command', new SystemCommandTool());
|
|
tools.set('http_request', new HttpRequestTool());
|
|
|
|
// Agent communication tools (require NATS client)
|
|
tools.set('register_agent', new RegisterAgentTool(natsClient));
|
|
tools.set('list_agents', new ListAgentsTool(natsClient));
|
|
tools.set('list_services', new ListServicesTool(natsClient));
|
|
tools.set('send_message', new SendMessageTool(natsClient));
|
|
tools.set('receive_messages', new ReceiveMessagesTool(natsClient));
|
|
|
|
return tools;
|
|
} |