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

@appstrate/afps-shared

v0.13.0

Published

Zero-internal-dependency AFPS helpers shared by @appstrate/core and @appstrate/afps-runtime (companion-file checks, semver resolution, SRI integrity, credential templates, authorized_uris rules and host bounds, delivery.http projection)

Readme

@appstrate/afps-shared

Zero-internal-dependency leaf package holding the primitives that both @appstrate/core (platform side) and the AFPS runtime (in-sandbox side) need to agree on byte-for-byte.

It exists so those two layers cannot drift: an integrity hash, an SSRF verdict or a capability-token signature computed on one side must validate on the other. If you are building on Appstrate, you almost certainly want @appstrate/core instead — this package is its foundation, published separately because the runtime cannot depend on the platform.

npm install @appstrate/afps-shared

Requires Bun ≥ 1.3.9. The package ships raw TypeScript sources rather than a compiled bundle, so Node cannot import it directly. There is no barrel export — import each module by subpath.

Exports

| Subpath | What it does | | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | ./guarded-fetch | The single outbound-request primitive for any URL whose host comes from a less-trusted input (manifest URLs, OAuth endpoints). Wraps the SSRF checks below. | | ./ssrf · ./ssrf-dns | SSRF host/address validation, including DNS resolution so a hostname cannot rebind to a private range between check and connect. | | ./signed-token | Keyring-HMAC capability tokens — the one codec behind every short-lived, URL-carried capability (upload URLs, document previews, hosted connect sessions). | | ./unzip-bounded | Memory-bounded ZIP decompression for untrusted archives (AFPS bundles, package ZIPs, integration bundles). | | ./integrity | Package integrity digests. | | ./companion-files | Companion-file enforcement, shared between the platform ZIP-import path and the runtime bundle loader. | | ./credential-template | {$credential.<field>} and {$variable.<name>} template rendering; any other {$…} expression throws. | | ./connection-variables | Connection variables ({$variable.<name>}): references and the per-connection rendering of URL templates (source.remote.url, issuer, login url). | | ./authorized-uris | The authorized_uris URL-pattern rules: parse, render per connection, match a URL, compile the egress policy, bound a host wildcard (Public Suffix List). | | ./delivery-http | Shared HTTP delivery contract. | | ./semver-resolve | Version-range resolution against a published version list. | | ./api-tool-naming · ./mcp-naming | Deterministic tool and MCP-server naming. | | ./file-field | File-field parsing helpers. | | ./token-usage | Token-usage accounting shapes. | | ./backoff | Retry backoff computation. | | ./jsonpath | The single-value RFC 9535 JSONPath subset every integration-manifest path field is read with (identity_claims, login-engine selectors). | | ./runtime-expression | The Arazzo runtime expressions a connect.login block reads its response with ($statusCode, $response.body[#ptr], $response.header.<name>). | | ./json-text | jsonText: a string passes through, any other JSON value is JSON-encoded (never [object Object]). |

import { guardedFetch } from "@appstrate/afps-shared/guarded-fetch";

// Refuses private ranges, link-local addresses and DNS-rebinding attempts.
const res = await guardedFetch(untrustedUrlFromManifest);

Versioning

@appstrate/core depends on this package by caret range, so a release here must be published before any @appstrate/core release that bumps its range — otherwise npm install @appstrate/core cannot resolve.

Publishing is triggered by pushing an [email protected] git tag; CI handles the rest (.github/workflows/publish-afps-shared.yml).

License

Apache-2.0 — see LICENSE and NOTICE.