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

agentdraft

v0.2.0

Published

TypeScript SDK for AgentDraft — inbox, conflict-free calendar booking, and audit trail for AI agents

Readme

agentdraft — TypeScript SDK

npm License: MIT

The official TypeScript / JavaScript SDK for AgentDraft — the ops API for AI agents with inbox, conflict-free calendar, and audit trail.

AgentDraft gives each agent an inbox and routes every calendar hold or commit through one deterministic engine, so multiple agents can act on the same calendar without double-booking.

This SDK gives Node and edge agents a typed, one-line surface to participate.

Install

npm install agentdraft

ESM-only. Requires Node 18+.

Upgrade

npm install agentdraft@latest

Release notes: https://agentdraft.io/changelog

Quickstart

import { AgentDraft, Conflict } from "agentdraft";

const client = new AgentDraft({ apiKey: process.env.AGENTDRAFT_API_KEY! });

const start = new Date(Date.now() + 4 * 60 * 60 * 1000);
const end   = new Date(start.getTime() + 30 * 60 * 1000);

try {
  const booking = await client.bookings.commit({
    start, end,
    idempotencyKey: "ik_call_42",
    title: "Discovery call",
    invitee: { name: "Ada Lovelace", email: "[email protected]" },
  });
  console.log("booked:", booking.bookingId);
} catch (e) {
  if (e instanceof Conflict) {
    console.log(`outranked by ${e.winningAgentId} (rank ${e.winningAgentPriority})`);
  } else {
    throw e;
  }
}

title and invitee ({ name?, email?, notes? }) are first-class fields: persisted on the booking, returned on the Booking object, and shown to the calendar owner in the dashboard. A top-level title supersedes a legacy metadata.title. client.agents.me() also returns the owner's timezone so a client can render slots in their zone.

A losing agent gets a typed Conflict error, not a timeout — it knows who won, by what priority, and where the audit row lives, so fallback behavior is a clean instanceof away.

Authentication

API keys are issued from the AgentDraft dashboard and start with avs_live_. Pass it via the constructor or set AGENTDRAFT_API_KEY in the environment.

new AgentDraft({ apiKey: "avs_live_..." });
// or:
process.env.AGENTDRAFT_API_KEY = "avs_live_...";
new AgentDraft();

For local development against a dev backend, pass baseUrl: or set AGENTDRAFT_BASE_URL.

Surface

| Attribute | Purpose | |---|---| | client.availability | Read merged availability across all agents writing to the calendar | | client.bookings | hold, release, commit, cancel — the four state transitions | | client.agents | me() — confirm key + current priority + scopes | | client.mailbox | Inbound/outbound mail surface for agents that book via email |

Error types

  • Conflict — your write was outranked. Carries winningAgentId, winningAgentPriority, winningBookingId, auditEventId.
  • AuthError — bad/missing/expired API key.
  • RateLimited — token bucket exhausted. Has retryAfterSeconds.
  • RuleViolation — request was syntactically valid but violated a rule.
  • ApiError — base class.

Idempotency

Pass idempotencyKey to bookings.commit({...}). The server caches the result by (agentId, key) for 24 hours, so retries return the original booking, not a duplicate.

Supply chain

Releases are cut from the publish-typescript-sdk.yml workflow on ts-sdk-v* tag pushes. npm view agentdraft shows the published tarball metadata. npm provenance attestations are temporarily disabled pending a move to github-hosted runners — see ryabinski-labs/agentdraft#168.

Links

Security

Found a vulnerability? Please follow SECURITY.md — do not open a public issue for a security report.

Contributing

See CONTRIBUTING.md. This SDK lives inside the ryabinski-labs/agentdraft monorepo under sdks/typescript/.

License

MIT — see LICENSE.