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

@asunited/ai-engine

v0.2.0

Published

Typed client for the ASU AI Engine: video analytics from CCTV and other video sources. Attendance, behavioural analysis and task-completion verification.

Downloads

232

Readme

@asunited/ai-engine

Typed client for the ASU AI Engine: video analytics for supported-living settings. Attendance, behavioural analysis, and task-completion verification from CCTV or any other video source.

npm install @asunited/ai-engine

Quick start

import { createClient } from "@asunited/ai-engine";

const engine = createClient({
  baseUrl: "https://aiengine-api.asunited.com.sg",
  apiKey: process.env.ASU_AI_ENGINE_KEY,
});

// Pull 20 seconds off a camera and prepare it for analysis
const clip = await engine.ingestStream({
  url: "rtsp://user:[email protected]:554/Streaming/Channels/101",
  seconds: 20,
});

// Did the client do the task in an acceptable order?
const result = await engine.checkSequence("prepare_vegetables", ["A", "C", "B", "D"]);
if (!result.completed) {
  for (const v of result.violations) console.warn(v.message, v.detail);
}

What this talks to

The engine splits the work in two, and the split is the point. A model answers one narrow question per window of video (which step is this?). Whether the observed order is acceptable is decided by a deterministic grammar, so the part a supervisor will challenge gives the same answer every time.

Ingest

await engine.ingestYouTube({ url: "https://youtu.be/UqIsK6NdJ7w" });
await engine.ingestStream({ url: "rtsp://…", seconds: 30 });
await engine.ingestUpload(fileBlob, "kitchen.mp4");

Workflows

A workflow is its steps plus a partial order over them.

await engine.saveTask({
  task_id: "prepare_vegetables",
  label: "Prepare vegetables",
  steps: {
    A: { name: "take", prompt_hint: "picks up a raw vegetable" },
    B: { name: "wash", prompt_hint: "rinsed under running water" },
    C: { name: "cut", prompt_hint: "cut on a chopping board" },
    D: { name: "cook", prompt_hint: "placed into a pan on a stove" },
  },
  required: ["A", "B", "C", "D"],
  precedence: [
    { earlier: "A", later: "B" }, { earlier: "A", later: "C" },
    { earlier: "A", later: "D" }, { earlier: "B", later: "D" },
    { earlier: "C", later: "D" },
  ],
});

Wash and cut may happen in either order; both must follow take and precede cook. A,B,C,D and A,C,B,D pass. A,D,B,C and A,D,C,B fail.

Attendance and behaviour

const roll = await engine.rollCall({
  sessionId: "morning",
  expected: ["adam.k", "brenda.l"],
  recognised: ["adam.k", "unknown-01"],
});
roll.alarm;       // true
roll.unexpected;  // ["unknown-01"]

const state = await engine.assessBehaviour({
  subjectId: "client-01",
  indicators: { violent_hand_movement: 0.9, facial_distress: 0.8 },
});
state.state;      // "meltdown"

Errors

Every non-2xx throws EngineError with status, code and detail.

Licence

Proprietary. © AS United Pte Ltd.