@xynehq/jaf
Version:
Juspay Agent Framework - A purely functional agent framework with immutable state and composable tools
35 lines • 2.26 kB
TypeScript
/**
* Pure functional A2A client
* All client operations are pure functions
*/
import type { A2AClientConfig, A2AClientState, JSONRPCRequest, JSONRPCResponse, SendMessageRequest, SendStreamingMessageRequest, AgentCard, A2AStreamEvent } from './types.js';
export declare const createA2AClient: (baseUrl: string, config?: Partial<A2AClientConfig>) => A2AClientState;
export declare const createMessageRequest: (message: string, sessionId: string, configuration?: any) => SendMessageRequest;
export declare const createStreamingMessageRequest: (message: string, sessionId: string, configuration?: any) => SendStreamingMessageRequest;
export declare const sendA2ARequest: (client: A2AClientState, request: JSONRPCRequest) => Promise<JSONRPCResponse>;
export declare const sendMessage: (client: A2AClientState, message: string, configuration?: any) => Promise<string>;
export declare const streamMessage: (client: A2AClientState, message: string, configuration?: any) => AsyncGenerator<A2AStreamEvent, void, unknown>;
export declare const getAgentCard: (client: A2AClientState) => Promise<AgentCard>;
export declare const discoverAgents: (baseUrl: string) => Promise<AgentCard>;
export declare const sendMessageToAgent: (client: A2AClientState, agentName: string, message: string, configuration?: any) => Promise<string>;
export declare const streamMessageToAgent: (client: A2AClientState, agentName: string, message: string, configuration?: any) => AsyncGenerator<A2AStreamEvent, void, unknown>;
export declare const extractTextResponse: (result: any) => string;
export declare const checkA2AHealth: (client: A2AClientState) => Promise<{
status: string;
agents: string[];
timestamp: string;
}>;
export declare const getA2ACapabilities: (client: A2AClientState) => Promise<any>;
export declare const connectToA2AAgent: (baseUrl: string) => Promise<{
client: A2AClientState;
agentCard: AgentCard;
ask: (message: string, config?: any) => Promise<string>;
stream: (message: string, config?: any) => AsyncGenerator<A2AStreamEvent, void, unknown>;
health: () => Promise<{
status: string;
agents: string[];
timestamp: string;
}>;
capabilities: () => Promise<any>;
}>;
//# sourceMappingURL=client.d.ts.map