UNPKG

nestjs-a2a

Version:

NestJS module for creating Google Agent to Agent Server

18 lines (17 loc) 938 B
import { CanActivate, Logger } from '@nestjs/common'; import { Request, Response } from 'express'; import { AgentToAgentModuleOptions } from './interfaces/a2a.options'; import { AgentCard, JSONRPCRequest, JSONRPCResponse } from './interfaces/a2a.types'; import { A2AExecutor } from './services/a2a.executor'; import { A2ARegistry } from './services/a2a.registry'; export declare function createA2AController(basePath?: string, guards?: CanActivate[]): { new (a2aOptions: AgentToAgentModuleOptions, a2aRegistry: A2ARegistry, a2aExecutor: A2AExecutor): { readonly logger: Logger; readonly a2aOptions: AgentToAgentModuleOptions; readonly a2aRegistry: A2ARegistry; readonly a2aExecutor: A2AExecutor; getAgentCard(request: Request): AgentCard; getServerUrl(request: Request): string; agentHandler(body: JSONRPCRequest, response: Response): Promise<JSONRPCResponse | null>; }; };