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

@augmentcode/cosmos-agent-sdk

v0.0.1-alpha.0

Published

TypeScript client for the Auggie v2 SDK / RPC protocol

Readme

cosmos-agent-sdk — TypeScript client

@augmentcode/cosmos-agent-sdk — the TypeScript client for the Auggie v2 SDK / RPC protocol. It spawns auggie-v2 --mode rpc as a subprocess, speaks the newline-delimited JSON protocol defined in ../../spec, and exposes a typed, ergonomic API on top of it.

Toolchain

Commands

bun install       # install dependencies
bun run build     # emit dist/ (JS + .d.ts)
bun run lint      # biome ci
bun test          # run the unit suite
bun run conformance  # drive the real client against the shared golden fixtures

Quick start

import { AuggieClient } from "@augmentcode/cosmos-agent-sdk";

const client = new AuggieClient({
  // Answer reply-expecting extension-UI requests; fire-and-forget need no reply.
  extensionUIHandler(request) {
    if (request.method === "confirm") {
      return { type: "extension_ui_response", id: request.id, confirmed: true };
    }
    return; // fall back to cancelled for other reply-expecting methods
  },
});

// Stream every agent event.
client.onEvent((event) => console.log(event.type));

// Prompt and wait for the turn to finish (idle = the agent_end event).
await client.promptAndWait("List the files in this repo");

// Typed commands return their correlated response.
const state = await client.send({ type: "get_state" });

client.close();

Architecture

The client is layered so each concern is independently testable:

  • Types (src/types/) — mirror the four JSON Schemas in spec/schema/ exactly: commands, responses, events, and the bidirectional extension-UI protocol. Deep external structures are modeled permissively per the spec's permissiveness policy.
  • Transport (src/transport/) — the byte-level boundary. SubprocessTransport spawns the agent and moves JSONL frames over its stdio (stderr = logs, not protocol); FakeTransport replays canned wire messages in-memory for tests and conformance without spawning a binary.
  • Protocol (src/protocol/) — JSONL framing and the classification of stdout lines into responses / events / extension-UI requests, tolerating unknown top-level types as warnings.
  • Session & facade (src/session.ts, src/client.ts) — request/response correlation by id, event streaming, waitForIdle on agent_end, and extension-UI round-trips.

Conformance

conformance-adapter.mjs binds the real client to the shared conformance/ runner: it drives RpcSession over FakeTransport through every golden fixture, exercising the real parsing, typing, correlation, event-routing, and extension-UI code paths. bun run conformance builds the client and runs all vectors, exiting non-zero on any failure.