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

@johnhenry/aimatey-native-laya

v0.2.0

Published

Laya (ConvAI) typed-decision backend for Aimatey, via @receptron/laya

Readme

@johnhenry/aimatey-native-laya

npm version license

Run Aimatey typed-decision requests against ConvAI's Laya model on-device, via @receptron/laya -- a real TypeScript/ ONNX Runtime port, not a hosted-API wrapper. No network call, no API key.

Part of the aimatey monorepo.

Requirements

  • Node.js 18+ (this package: Node 26+)
  • The optional native binding: npm install @receptron/laya
  • ~1.7GB of ONNX weights, downloaded from HuggingFace on first use and cached locally (cacheDir, or @receptron/laya's own LAYA_CACHE default)

Installation

npm install @johnhenry/aimatey-native-laya @receptron/laya

Quick Start

import { Bridge } from '@johnhenry/aimatey-core';
import { LayaFrontendAdapter } from '@johnhenry/aimatey-frontend';
import { LayaBackendAdapter } from '@johnhenry/aimatey-native-laya';

const backend = new LayaBackendAdapter();

// Sessions are loaded lazily on first decide(); initialize eagerly to
// surface a missing-dependency or download failure early.
await backend.initialize();

const bridge = new Bridge(new LayaFrontendAdapter(), backend);

// IR in, IR out. The frontend is not involved.
const response = await bridge.decide(
  { headline: 'Local sea levels rising faster than predicted' },
  { urgency: { type: 'score', instructions: 'How urgent is this?', criteria: ['low', 'medium', 'high'] } }
);

// Laya's own request/response shapes in and out, via the frontend adapter.
const native = await bridge.decideFrom({
  state: { headline: 'Local sea levels rising faster than predicted' },
  questions: { urgency: { type: 'score', instructions: 'How urgent is this?', criteria: ['low', 'medium', 'high'] } },
});

await backend.close();

What the adapter declares

  • decisionModels: english, multilingual, typed-decisions
  • decisionTypes: choice, score, noul
  • decisionLimits: 20 choice options (Laya is weak beyond that), 10 score levels, 512 state tokens (the English checkpoint; multilingual allows 1024), no images (decisionImages: false; images are dropped with a capability-unsupported warning)

Behaviour notes

  • decide(request, signal) honours signal before loading, before running, and once the result arrives. An in-flight ONNX run cannot be cancelled.
  • The checkpoint is chosen when the session loads (subfolder), and @receptron/laya's systemOne() takes no task/lang. A parameters.model that differs from subfolder, and parameters.custom.task/lang, are reported as parameter-unsupported warnings on response.metadata.warnings rather than ignored silently.
  • Laya's per-answer rl_agent sub-object is kept under response.raw.rl_agent, keyed by question. Convai measured its act_probability as uninformative, so treat it as diagnostic.
  • Laya reports no confidence for noul answers; the adapter derives max(p, 1 - p).

License

MIT - see LICENSE for details.