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

@here.build/arrival-env

v0.9.0

Published

Type definitions and protocol for Arrival S-expression serialization

Readme

@here.build/arrival-env

Minimal package that provides Symbol.SExpr and Symbol.toSExpr definitions without actual serialization runtime injection.

Use this in shared libraries that need S-expression serialization in some environments but not others.

When to Use This

You have a shared model library used across multiple environments:

  • MCP server needs to serialize models to S-expressions for AI agents
  • Browser frontend just needs the models as regular classes
  • You don't want to bundle the full arrival runtime everywhere

Quick Start

In your shared library:

npm install @here.build/arrival-env
// shared-models/src/button.ts
import '@here.build/arrival-env';

export class Button {
  constructor(public label: string, public disabled: boolean) {
  }

  [Symbol.SExpr]() {
    return 'Button';
  }

  [Symbol.toSExpr]({ keyword }) {
    return [
      keyword('label'), this.label,
      keyword('disabled'), this.disabled
    ];
  }
}

Symbol.toSExpr context

Symbol.toSExpr invocation provides expressive context to use:

export class Button {
  [Symbol.toSExpr]({ keyword, symbol, quote, string, expr }) {
    return [
      keyword("clickable"), // produces :clickable. Semantic meaning - unique flag, object key
      symbol(this.name), // produces clickme. No semantic value found, added for totality
      quote(this.uuid), // produces 'abc123. Semantic meaning - unique identifier to reference
      string(this.description), // produces "description" - always quoted even when quotes are optional. Semantic meaning - explicit text entity
      expr("onClick", this.clickHandler) // produces (onClick ...). Semantic meaning - isolated statement
    ];
  }
}

You can return all types - objects, classes, arrays, sets, etc.

S-expression serializer is designed to generally produce "at least as good as json" output, with custom definitions allowing to make certain entities more expressive and compact.

In environments that need serialization (MCP server):

import { toSExprString } from '@inhuman.tools/arrival-serializer';
import { Button } from 'shared-models';

const btn = new Button('Click me', false);
toSExprString(btn);
// => (Button
//      :label "Click me"
//      :disabled false)

In environments that don't (browser):

import { Button } from 'shared-models';
// No arrival runtime bundled, just the class

The protocol is defined once in the shared library. Serialization happens only where @inhuman.tools/arrival is imported.

Package use is idempotent - multiple sources may include it, yet Symbol.SExpr and Symbol.toSExpr are defined in stable, failsafe way.