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

@airterm/protocol

v0.5.0

Published

Shared browser and Node.js protocol implementation for AirTerm

Readme

@airterm/protocol

Browser-safe AirTerm protocol primitives shared by the web client and CLI agent. The package implements capability URLs, HKDF key separation, Noise transport, binary framing, and terminal message codecs for protocol version 1.

Its additive streaming-transfer extension uses feature negotiation, 64-bit offsets, bounded acknowledgement windows, and purpose-specific policies for encrypted terminal fonts and clipboard images. Receivers can stream directly to disk, allowing later file-transfer features to grow without replacing the wire format.

npm install @airterm/protocol

AirTerm uses Noise_NNpsk0_25519_ChaChaPoly_BLAKE2b. Applications should import the public APIs from the package root.

import { deriveCapabilityKeys, NoiseTransport } from '@airterm/protocol';

Requires Node.js 22.12 or newer for Node-based consumers. Browser consumers need Web Crypto and WebAssembly support.

Direct transport extension

Protocol v1 framing is unchanged. SessionDescription advertises p2p-v1; peers must explicitly accept it before using inner types 21 (P2PControl), 22 (OutputAck), and 23 (RecoveryComplete). Older peers remain on relay. Acceptance can enable byte-offset recovery without attempting WebRTC.

EncryptedConnection owns each path's Noise state and bounded outbound queue. Relay and direct paths have independent handshakes. Direct handshake binding includes the session ID, relay pairing ID, and random negotiation ID. Signaling and handoff coordination travel inside relay encryption. The gateway requires no SDP/ICE parsing or protocol changes. Exactly one path carries application data; acknowledgement and lifecycle coordination may still use relay.

SDP is limited to 32 KiB, candidates to 2 KiB each and 64 per peer, and signaling to 256 KiB per peer. Direct frames are encrypted once, then fragmented into messages no larger than 16 KiB. Receivers assemble one bounded frame at a time. Negotiation has a ten-second deadline, transfer draining thirty seconds, and handoff two seconds. Ambiguous handoffs require a fresh relay pairing.

Output acknowledgements refer to contiguous PTY byte offsets consumed by the terminal renderer, not merely received by the socket. Never acknowledge across a gap, reuse a cipher after failure, or replay uncertain terminal input.

Account encryption envelopes (0.4 prerelease)

The vault and pairing exports are additive application envelopes; terminal protocol v1 framing is unchanged. Vaults use RSA-OAEP-3072/SHA-256, AES-256-GCM, and context-bound HKDF. Version 1 fixes passphrase Argon2id parameters at 64 MiB, three iterations, one lane, 16-byte salt, and 32-byte output; browser derivation lives in the application worker. Unknown fields, algorithms, versions, sizes, or substituted account/session context must fail closed.

Exactly one primary vault wrapper and one user-held recovery wrapper are supported. The pairing encryption secret is distinct from the polling credential and never reaches the server. These primitives do not authenticate a downloaded browser application or provide an independent cryptographic audit.

The backend pins a reproducible prerelease tarball until separately authorized registry publication. Publish the protocol before any CLI release that depends on it; do not relabel a prerelease artifact as an already published version.