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

@svatah/yam-bindings

v0.2.0

Published

Bindings store, context hash, resolver, synthesis, fingerprint, relocalization

Readme

@svatah/yam-bindings

Module (a)'s core (REQ-PKG-1): the bindings store, the context hash, the resolver, candidate synthesis, fingerprinting, and model-free relocalization.

It depends on @svatah/yam-surface and @svatah/yam-schema and on nothing else — not on the flow language, not on the compiler, not on the model gateway. That is the whole point of the module: a Playwright user adopts it without adopting anything else. The import-boundary lint and the dependency-graph test in tools/repo-checks hold it to that (LLD §1).

The store (LLD §6.1)

bindings/<app>/<page>/<element>.yaml, canonical YAML, one file per element. An id is the same path written with dots — login.username-field is bindings/login/username-field.yaml — so the layout is readable from an id and an id is readable from a path.

Writing the same bindings twice produces the same bytes, and save() does not touch a file whose content is unchanged. That is what makes a re-record a reviewable diff rather than noise (REQ-REC-9).

The context hash (LLD §6.2)

Computed from the surface snapshot rather than the DOM, so it is adapter-neutral: the nearest landmark, form, dialog or window ancestor, rendered with names replaced by length buckets, sha256.

It ignores what a page says and tracks what a page is. A greeting with a different user's name in it is not a shape change; a wrapper element, a reordered sidebar or a moved form is. Two uses follow from that: bindings are scoped by it (REQ-REC-6), and a failed resolution can say whether the element moved or the page changed (LLD §6.3).

The resolver (LLD §6.3, REQ-RUN-5)

Candidates in the order they are stored, each with its own timeout, requiring exactly one match. A candidate that matches two elements is not a near miss — it cannot say which element was meant, and taking the first would make replay depend on document order. nth is how a candidate that legitimately matches several says which.

A webmcp candidate is preferred over the locators when the adapter reports the capability and the site still declares the tool, and falls through to them when it does not (REQ-ADP-9).

LocatorError reports every candidate tried, what each one saw, where the session was, and whether the page's shape had drifted from the one the binding was recorded against. It is the input the healer works from (REQ-HEAL-1) and the thing a person reads in a CI log, so it says all of that rather than "element not found".

Licence

Apache-2.0.