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

@claxedo/agent-event-runtime

v0.7.0

Published

Canonical agent event contracts and harness adapters: normalize Claude SDK, Codex, Cursor, and ACP event streams into one runtime event model

Readme

Agent Event Runtime

Normalize Claude SDK, Codex, Cursor, and ACP event streams into one canonical, replayable event model.

@claxedo/agent-event-runtime owns harness event normalization and projection. It turns harness-native event frames from external agent harnesses into canonical AgentRuntimeEvent values, then lets host packages project those events into UI, compatibility, replay, or diagnostic formats.

The package is intentionally browser-safe. Hosts still own process management, stdio, WebSocket, EventSource, storage, HTTP routes, and persistence.

Install

npm install @claxedo/agent-event-runtime

Quickstart

import { createAgentEventRuntime, type RawHarnessEvent } from "@claxedo/agent-event-runtime"
import { claudeSdkAdapter } from "@claxedo/agent-event-runtime/harnesses/claude"

const runtime = createAgentEventRuntime({
  harness: "claude-sdk",
  threadId: "thread_123",
  adapter: claudeSdkAdapter(),
})

const raw: RawHarnessEvent = {
  source: "claude-sdk",
  payload: { type: "result", subtype: "success" },
}

for (const event of runtime.ingest(raw).events) console.log(event.type)

runtime.ingest() translates one raw harness frame into zero or more canonical AgentRuntimeEvent values. Swap in codexAppServerAdapter() or cursorSdkAdapter() from the matching harnesses/* subpath to translate a different harness's event stream the same way; the ACP harness adapter is createAcpEventTranslator() from harnesses/acp.

Agent-First Public Docs

Coding agents and host integrators should start with docs/agent.md. If the model is not obvious yet, read docs/concepts.md next. These docs define the package job, mental model, stability labels, boundaries, recipes, and public API.

Public Entry Points

The package ships public docs under docs/. Use docs/recipes.md for import examples and docs/api.md for the intended stable root API.

Entry point status:

  • Stable: @claxedo/agent-event-runtime, @claxedo/agent-event-runtime/contracts
  • Integration: @claxedo/agent-event-runtime/harnesses/acp, @claxedo/agent-event-runtime/harnesses/claude, @claxedo/agent-event-runtime/harnesses/codex, @claxedo/agent-event-runtime/harnesses/cursor, @claxedo/agent-event-runtime/projections/debug-trace
  • Compatibility: @claxedo/agent-event-runtime/projections/opencode-compat

The package publishes built ESM and declaration files from dist.

Architecture

For the data-flow model, the contract/core/harness/projection layers, snapshot boundaries, determinism guarantees, and guides for adding a new harness adapter or projection, see docs/architecture.md.

Verification

Run package checks from the package directory:

cd packages/agent-event-runtime
bun test src
bun typecheck
bun run build

Do not run tests from the repository root. This workspace guards against root test execution.