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

@dornick/capabilities

v0.1.0

Published

Browser capability detection for Dornick — typed flags, async probes, reactive subscriptions, system-prompt summary.

Downloads

37

Readme

@dornick/capabilities

Browser capability detection for Dornick — typed flags, async probes, reactive subscriptions, system-prompt summary.

A small (~2 KB gz), no-deps package that probes the browser at startup and tells you what's actually reachable. Dornick uses it to gate parsers, mounts, and skills so the agent never sees an affordance that won't work on this user's browser.

npm bundle license

Install

npm i @dornick/capabilities

Use

import { CapabilityRegistry } from "@dornick/capabilities";

const caps = await CapabilityRegistry.detect();

caps.has("webgpu");                       // boolean
caps.has("apis.fileSystemAccess");        // boolean
caps.has("apis.webSpeech.recognition");   // boolean

caps.toPromptSummary();
// "browser capabilities — platform: mobile, touch, languages=en-GB;
//  compute: wasm+simd, webgpu; storage: indexedDB, opfs, quota=2048MB;
//  apis: clipboard, geo, fs-access, camera, mic, speech-out."

caps.toJSON();   // full BrowserCapabilities object — pass to /host/browser/capabilities.json

caps.onChange((next) => {
  // fires on online/offline + permission changes
});

What it detects

| Group | Examples | |---|---| | Compute | WebAssembly + SIMD + threads, WebGPU adapter info, WebGL v1/v2, crossOriginIsolated | | Storage | IndexedDB, OPFS, quota estimate in MB | | APIs | Clipboard, Geolocation, Notifications, ServiceWorker, BackgroundSync, Web Speech (in/out), File System Access, BarcodeDetector, Web NFC, WebAuthn, Bluetooth, USB, Serial, camera, mic, share / share-target, WakeLock, IdleDetection, ContactsPicker, PaymentRequest, WebHID, WebXR | | Permissions | granted / denied / prompt for geolocation, notifications, camera, microphone, clipboard, persistent-storage, push, screen-wake-lock | | Platform | userAgent, mobile, touch, online, languages, timezone, devicePixelRatio |

Three detection phases

| Phase | Latency | Examples | |---|---|---| | Static (synchronous) | < 1 ms | class-existence ('BarcodeDetector' in window), WebGL canvas probe, crossOriginIsolated | | Probe (async) | 50–200 ms | WASM SIMD/threads validation, WebGPU adapter request, storage quota estimate, permissions snapshot | | Reactive | live | online/offline events; permission changes (planned) |

Use detectSync() for a synchronous-only snapshot when you need to make a decision at boot before the async probes resolve.

How parsers and mounts use it

Each @dornick/parsers-* package and each @dornick/mounts-* package declares the capabilities it requires. Dornick's parser registry and mount registration filter them automatically:

// in @dornick/parsers-audio
export const whisperParser: FileParser = {
  name: "whisper-audio",
  requires: ["webgpu", "crossOriginIsolated"],
  matches: (file, caps) => file.mimeType.startsWith("audio/"),
  // ...
};
// in @dornick/mounts-browser
export class FileSystemMount implements VfsMountHandler {
  static available(caps: BrowserCapabilities): boolean {
    return caps.apis.fileSystemAccess;
  }
  // ...
}

If the gate fails, the parser / mount becomes a no-op — never appears in tree /, never gets called by the model.

Links

License

MIT — © Dipankar Sarkar