import type { z } from "zod"; import type { Store } from "./storage/interface.js"; import type { McpAdapter } from "./protocols/mcp/types.js"; import type { A2aAdapter } from "./protocols/a2a/types.js"; import type { HttpAdapter } from "./protocols/http/types.js"; export interface MethodResult { text: string; contextId?: string; data?: Record; } export interface MethodContext { store: Store; method: string; roomId?: string; protocol: "a2a" | "mcp" | "http" | "internal"; protocolMeta: Record; } export interface MethodDeclaration { description: string; params: z.ZodType; returns?: z.ZodType; handler: (params: any, ctx: MethodContext) => Promise; } export type BeforeProcessor = (params: any, ctx: MethodContext) => Promise; export type AfterProcessor = (result: MethodResult, params: any, ctx: MethodContext) => Promise; export declare class MethodRegistry { private methods; private befores; private afters; private mcpAdapters; private a2aAdapters; private httpAdapters; method(name: string, declaration: MethodDeclaration): void; before(name: string, processor: BeforeProcessor): void; after(name: string, processor: AfterProcessor): void; mcp(name: string, adapter: McpAdapter): void; a2a(name: string, adapter: A2aAdapter): void; http(name: string, adapter: HttpAdapter): void; call(name: string, rawParams: unknown, ctx: MethodContext): Promise; getMethod(name: string): MethodDeclaration | undefined; listMethods(): Map; getMcpAdapter(name: string): McpAdapter | undefined; getA2aAdapter(name: string): A2aAdapter | undefined; getHttpAdapter(name: string): HttpAdapter | undefined; listMcpAdapters(): Map; hasMethod(name: string): boolean; }