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

@agentpost-tools/resourceshark-sdk

v0.2.0

Published

A typed client for resourceshark, for servers and browsers, with the framework-independent hold and booking workflows.

Readme

ResourceShark SDK

A typed client for ResourceShark's HTTP API, with hold and booking workflows. It runs in Node 24, browsers, and React Native wherever fetch is available.

npm i @agentpost-tools/resourceshark-sdk

You need an Agentpost workspace and a project key for a project that uses ResourceShark. Read a resource's free slots on your server with its secret key:

import { createClient } from '@agentpost-tools/resourceshark-sdk';

export async function freeSlots(key: string, resourceId: string) {
  const resources = createClient({ token: key });
  const { slots } = await resources.slots.list({
    resourceId,
    from: '2028-01-07T00:00:00+07:00',
    to: '2028-01-08T00:00:00+07:00',
  });
  return slots.filter((slot) => slot.available > 0);
}

ResourceShark SDK docs cover the client, workflows, and server helpers.

Changes

On 0.x, changes that break existing calls, exports, types, or workflow behavior bump the minor version; other changes bump the patch.

0.2.0

  • A schedule's first save sends no If-Match. If-Match: 0, or a malformed one, is invalid_request on every route; on PUT /config and the patches it was stale_version.
  • client.events.read takes types as a list or a string separated by commas, and after: 'latest' to start from now. EventsQuery is now the client's own type for that input, so existing calls keep compiling. A cursor behind the oldest change kept is refused with cursor_expired (410), whose details give oldest and latest, where the feed used to skip ahead silently. A page shorter than limit gives a next past the changes a types filter skipped. A numeric after takes digits only. limit is coerced to a whole number from 1 to 500, and a repeated query parameter takes its first value.
  • An Idempotency-Key answer is kept sealed with your project's cipher. A request in progress holds its key for up to 5 minutes, not 60 seconds. The query and If-Match are part of what a key names. A blank key is invalid_request. A retry under a key first sent before this release runs again once.
  • A repeat whose caller your host now refuses, or now confines to one holder on an operation for trusted callers only, gets forbidden; any other change in what your host allows that caller is idempotency_mismatch.
  • POST /availability takes no Idempotency-Key: it changes nothing, so it runs on every request.
  • A JSON null request body is invalid_request.
  • A forbidden or unauthenticated refusal's details name the operation only, no longer the resource it reached.
  • ResourcesharkApiError narrows details by code: after error.code === 'insufficient_supply', error.details is { lines }, and cursor_expired, stale_version, key_in_use, settings_locked, exhausted_until_supply, assignment_infeasible, hold_expired, and hold_resolved are typed too. code is ResourceShark's codes, the Platform's, and unknown, rather than any string, and ErrorDetails, ErrorDetailsOf, and ResourcesharkApiErrorCode name the types. Code that compared code with a string outside those, or typed a narrowed details itself, may need to change.

Proprietary: use with Agentpost's hosted services under LICENSE.md.