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

@miadi/a2a-contracts

v0.1.1

Published

TypeScript contract types for the 16 standardized interfaces of Miadi-A2A v2, modeled on the HAWK hierarchical agent workflow framework (Cheng et al. 2025, arXiv:2507.04067). Functional stub: types only, zero runtime dependencies.

Readme

@miadi/a2a-contracts

TypeScript contract types for the 16 standardized interfaces of Miadi-A2A v2, modeled on the HAWK hierarchical agent workflow framework (Cheng et al. 2025, arXiv:2507.04067).

This is a functional stub at v0.1.0: types only, zero runtime dependencies. The actual transport remains A2A v1's Redis broker; this package gives every message a typed contract so v2 modules can be built independently and still interoperate.


Why

Miadi-A2A v1 is a working Redis-backed transport, but it carries untyped JSON. v2's structural ambition — separating Workflow, Operator, Agent, and Resource layers (per HAWK §3.1) — needs a contract surface that every layer can compile against.

See rispecs/a2a/06-hawk-inspired-next-gen.spec.md for the architectural direction this package implements.


The 16 interfaces

| Interface | From → To | Purpose | | --------- | ---------------------------------- | ---------------------------------------- | | I₁ | TaskParser → WorkflowEngine | Hand off parsed user intent | | I₂ | WorkflowOptimizer ⇌ WorkflowEngine | Real-time strategy adjustment | | I₃ | WorkflowEngine → WorkflowPlanner | Delegate decomposition | | I₄ | WorkflowEngine → WorkflowMonitor | Stream execution telemetry | | I₅ | WorkflowEngine → Environment | Load / snapshot / diff world state | | I₆ | WorkflowEngine → Memory | Read / write / append session memory | | I₇ | WorkflowEngine → TaskManagement | Dispatch / cancel / status | | I₈ | WorkflowEngine → TaskOptimizer | Select among candidate executions | | I₉ | WorkflowEngine → Reasoning | LLM/CoT inference | | I₁₀ | WorkflowEngine → Security | Authorize subject ⨯ resource ⨯ action | | I₁₁ | TaskMgmt → Agent Specification | Declare an agent | | I₁₂ | TaskMgmt → Agent Publication | Publish agent endpoint | | I₁₃ | TaskMgmt → Agent Registration | Register capabilities in a registry | | I₁₄ | TaskMgmt → Agent Discovery | Find agents by capability | | I₁₅ | Operator → Resource | Structured resource access with audit | | I₁₆ | Agent → Resource | Direct resource invocation by agent |


Install

pnpm add @miadi/a2a-contracts

Usage

import {
  makeRequest,
  type RequestOf,
} from "@miadi/a2a-contracts"

// Build a typed I1 message — TypeScript enforces the payload shape.
const msg = makeRequest("I1", {
  taskId: "task-001",
  rawBrief: "Tell a story about Inwe-village…",
  intent: "literary fable",
  constraints: { setting: "forest village", season: "early autumn" },
  unknowns: ["target length", "audience age"],
  metaInstructions: [],
}, {
  messageId: "01HXXX…",
  traceId:   "trace-001",
  createdAt: "2026-05-28T10:00:00Z",
  from:      "task.parser",
  to:        "workflow.engine",
  sourceLayer: "user",
  targetLayer: "workflow",
})

// The envelope carries `interfaceId: "I1"`, so the consumer can narrow.

Type-level helpers:

type I9Req = RequestOf<"I9">  // = I9_ReasoningRequest

What this package does NOT do

  • No runtime validation. Validators (Zod / Valibot) will land in a separate package or in a future minor version. For v0.1.0 the goal is structural type correctness at compile time.
  • No transport. Transport stays in A2A v1 (lib/a2a-message-broker.ts) and any future replacement.
  • No business logic. Every interface is a pure data contract.

Lineage

  • Cheng, Y. et al. (2025). "HAWK: A Hierarchical Agent Workflow Framework for Multi-Agent Collaboration." arXiv:2507.04067. Registered in foundations/source-ledger.yaml as mas.cheng-2025-hawk.
  • Companion package: @miadi/episodic-memory-schema (the durable per-session output).
  • Spec: rispecs/a2a/06-hawk-inspired-next-gen.spec.md.

License

MIT.