Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is EVA A2A Chat Client, a React Router v7 application that provides a chat interface for Agent-to-Agent (A2A) communication using the
@a2a-js/sdk. The app demonstrates A2A protocol integration with features like task management, artifact handling, and real-time streaming.
npm run dev - Start development server at http://localhost:5173npm run build - Create production buildnpm run deploy - Build and deploy to Cloudflare Workersnpm run typecheck - Run TypeScript type checking and generate typesnpm run preview - Preview production build locallynpm run cf-typegen - Generate Cloudflare Workers types (runs automatically after install)@a2a-js/sdk/client for A2A protocol communicationapp/ - Main application code
components/ - React components including chat UI, settings, and dialogslib/ - Business logic and utilitiesdb/ - Dexie database schema and managementhooks/ - Custom React hooksroutes/ - React Router route definitionsworkers/ - Cloudflare Workers deployment codepublic/ - Static assets// ChatRecord { id: string; title: string; createdAt: number; updatedAt: number; contextId: string; // A2A context ID } // MessageRecord { id: string; chatId: string; role: "user" | "assistant" | "system"; content: string; createdAt: number; taskId?: string; // A2A task ID for assistant messages taskStatus?: "submitted" | "working" | "completed" | "failed" | "canceled"; }
The A2A client is configured in
app/lib/get-a2a-client.ts:
http://localhost:9999/.well-known/agent-card.jsoneva token-based auth schemeapp/lib/chat-manager.ts - CRUD operations for chatsapp/lib/message-handler.ts - Message creation and managementapp/lib/a2a-stream-handler.ts - Real-time message streaming from A2A agentsapp/lib/chat-loader.ts - Data loading for chat routesreact-router.config.ts - React Router configuration (SSR enabled)wrangler.jsonc - Cloudflare Workers configurationvite.config.ts - Vite build configurationcomponents.json - Shadcn UI components configuration~/* maps to ./app/* (configured in tsconfig.json)The app is configured for Cloudflare Workers deployment via React Router's built-in adapter. The
npm run deploy command builds and deploys to Cloudflare.
clientAction in app/routes/home.tsxcreateUserMessage()createAssistantPlaceholder()streamMessage()The app uses a custom authentication scheme where auth tokens are prefixed with
eva in the Authorization header when communicating with A2A agents.
For full functionality, you need:
http://localhost:9999 (or configure different URL)