npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mokronos/a2a-chat-api

v0.3.0

Published

Server-side proxy helpers for [A2A](https://a2a-protocol.org/) agent traffic, built with [Effect](https://effect.website/) and `@effect/platform`'s `HttpApi`.

Readme

@mokronos/a2a-chat-api

Server-side proxy helpers for A2A agent traffic, built with Effect and @effect/platform's HttpApi.

Browsers can't talk to most A2A agents directly (CORS, mixed content, hidden credentials). This package gives your app server a same-origin proxy so the frontend (e.g. @mokronos/a2a-react) can forward A2A traffic through it.

It exposes two endpoints:

| Method | Path | Purpose | | --- | --- | --- | | GET | /api/a2a/agent-card?target=<a2aBaseUrl> | Fetches the target agent's /.well-known/agent-card.json | | POST | /api/a2a/jsonrpc?target=<jsonRpcEndpoint> | Forwards the JSON-RPC body to the target agent |

A health check is served at GET /. Only http:/https: targets are allowed; bad targets return 400, unreachable targets return 502.

Install

bun add @mokronos/a2a-chat-api

Peers: effect, @effect/platform (and a platform runtime such as @effect/platform-bun).

Usage

The package exports two pieces you wire together:

  • InspectorApi — the HttpApi definition (route shapes).
  • CoreHandlers — the Layer implementing those routes.
import { InspectorApi, CoreHandlers } from "@mokronos/a2a-chat-api"
import { HttpApiBuilder, HttpServer } from "@effect/platform"
import { Layer } from "effect"

const ApiLive = HttpApiBuilder.api(InspectorApi).pipe(Layer.provide(CoreHandlers))
const ApiLayer = Layer.mergeAll(ApiLive, HttpServer.layerContext)

// Turn it into a standard Web `fetch` handler...
const { handler } = HttpApiBuilder.toWebHandler(ApiLayer)

// ...and mount it under /api in your server.
Bun.serve({
  port: 8000,
  fetch: (request) => {
    const url = new URL(request.url)
    if (url.pathname.startsWith("/api/")) return handler(request)
    return new Response("Not found", { status: 404 })
  },
})

The frontend then points its proxy at the same base path:

<A2AChatProvider proxyBasePath="/api/a2a" initialUrl="http://localhost:8000" autoConnect />

See apps/server in the repo for a complete reference server that also serves the inspector UI.

Part of a2a-chat

| Package | Provides | | --- | --- | | @mokronos/a2a-react | Headless React state and A2A orchestration | | @mokronos/a2a-chat-ui | Styled React components and the A2AChat preset | | @mokronos/a2a-chat-api | This package — server-side A2A proxy endpoints |