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

@aihu/agent-a2a

v1.0.2

Published

A2A (Agent2Agent) protocol bindings (spec v1.0.1, JSON-RPC) for @aihu/agent-service.

Readme

@aihu/agent-a2a

Aihu — agentic discovery and interaction, for human purpose.

A2A (Agent2Agent) protocol bindings (spec v1.0.1, JSON-RPC) for @aihu/agent-service.

Part of the agent surface layer of Aihu. Every Aihu component exposes its agent surface via the @agent block; this package implements one slice of the dispatch + protocol surface that connects @agent actions to live runtime signals (per the Live-Binding RFC).

Implements the Agent2Agent (A2A) Protocol Specification v1.0.1, JSON-RPC 2.0 binding. mountA2aAdapter(service, options?) wraps an AgentService with two routes:

| Method | Path | Description | |---|---|---| | GET | {prefix}/.well-known/agent-card.json | Agent card (spec §4.4.1) — supportedInterfaces, capabilities, skills | | POST | {prefix}/a2a | JSON-RPC 2.0 endpoint — SendMessage, SendStreamingMessage (SSE), GetTask, ListTasks, CancelTask, SubscribeToTask, GetExtendedAgentCard |

Skill addressing: every aihu action is exposed as an A2A skill with id "<tag>/<action>". A Message invokes one with a data part — { "data": { "skill": "x-counter/increment", "params": { … } } } — or a text part whose text is the skill id (params then come from the first data part, if any).

Tasks: results are persisted to a TaskStore (in-memory by default, injectable via options.taskStore), so GetTask/ListTasks/CancelTask are real. The gate's verdict maps onto task state: 401 AUTH_REQUIRED → TASK_STATE_AUTH_REQUIRED (resumable by re-sending with message.taskId and credentials), 403 SCOPE_DENIED → TASK_STATE_REJECTED; the full gate envelope rides in a status-message data part for audit.

Attribution (thesis §4 tier 0): pass options.resolveAuth to derive a RequestContext per request; absent or throwing resolvers degrade to an explicit anonymous context, which still fails closed on scoped bindings.

⚠ v0.1.x wire is gone (semver-major): the pre-v0.2 REST paths (/a2a/tasks/send, /a2a/tasks/sendSubscribe, /.well-known/agent.json), the "tag/action" string-message hack, and the [DONE] streaming sentinel are all removed in favor of the spec wire above.

Install

npm install @aihu/agent-a2a
# or
bun add @aihu/agent-a2a

Auto-generated against @aihu/[email protected].

Package facts

| | | |---|---| | Version | 1.0.2 | | Tier | C — Agent surface — A2A (Agent2Agent) protocol, spec v1.0.1 JSON-RPC binding | | Bundle size | 2.62 kB (gz) — limit 3000 B | | Published files | 3 entries | | License | MIT |

Auto-generated against @aihu/[email protected].

Exports

| Subpath | ESM | CJS | |---|---|---| | . | ./dist/index.js | — |

Auto-generated against @aihu/[email protected].

Dependencies

Dependencies:

  • @aihu/agent-service — workspace:*

Auto-generated against @aihu/[email protected].

See also

Auto-generated against @aihu/[email protected].

License

MIT — see LICENSE.

Auto-generated against @aihu/[email protected].