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

@agentix-e/anomaly-detector-web

v1.0.0

Published

Browser entry for anomaly-detector — adds TimesFM foundation-model forecasting via ONNX Runtime Web. TimesFM is opt-in — install @agentix-e/timesfm-web separately.

Readme

@agentix-e/anomaly-detector-web

Browser entry for anomaly-detector — adds TimesFM foundation-model forecasting via ONNX Runtime Web. TimesFM is opt-in — install @agentix-e/timesfm-web separately.

npm CI Coverage License: MIT

Overview

@agentix-e/anomaly-detector-web is the browser platform entry for the anomaly-detector ecosystem. It re-exports core types and adds optional TimesFM Web support — Google Research's foundation model running directly in the browser via ONNX Runtime Web (WebAssembly + WebGL).

TimesFM is opt-in: the adapter uses dynamic import() and gracefully falls back to anofox-forecast if @agentix-e/timesfm-web is not installed. The adapter uses variable-based import() to prevent bundler static analysis and avoid tree-shaking failures.

Installation

npm install @agentix-e/anomaly-detector-web

For TimesFM Web support, install the optional dependency:

npm install @agentix-e/timesfm-web onnxruntime-web

onnxruntime-web is a peer dependency of @agentix-e/timesfm-web.

Quick Start

Basic Usage (anofox-forecast via WASM — no extra deps)

import { createWebDetector } from '@agentix-e/anomaly-detector-web'

const detector = createWebDetector()

const result = await detector.analyze(
  { value: 95, timestamp: Date.now() },
  [{ value: 50, timestamp: Date.now() - 60000 }]
)

console.log(result.jointConfidence)

With TimesFM Web (opt-in)

npm install @agentix-e/timesfm-web onnxruntime-web
import {
  createWebDetector,
  type TimesfmWebConfig
} from '@agentix-e/anomaly-detector-web'

const timesfmConfig: TimesfmWebConfig = {
  modelUrl: 'https://cdn.example.com/timesfm-2.0.onnx',
  executionProvider: 'wasm',  // or 'webgl' for GPU acceleration
}

const detector = createWebDetector({
  forecaster: {
    type: 'timesfm',
    timesfm: timesfmConfig,
  },
})

const result = await detector.analyze(current, history)

If TimesFM Web is requested but @agentix-e/timesfm-web is not installed, the detector logs a warning and falls back to anofox-forecast.

Direct TimesFM Adapter Usage

import { TimesfmWebAdapter } from '@agentix-e/anomaly-detector-web'
import { createDetector } from '@agentix-e/anomaly-detector-web'

const adapter = new TimesfmWebAdapter({
  modelUrl: 'https://cdn.example.com/timesfm-2.0.onnx',
})

const detector = createDetector({
  _customForecaster: adapter,
})

API Documentation

📚 All core types and functions are re-exported from @agentix-e/anomaly-detector-core. See the core README for the full API reference.

Key Exports

| Export | Kind | Description | |--------|------|-------------| | createWebDetector(config?) | function | Creates a detector with TimesFM Web support (opt-in, graceful fallback) | | TimesfmWebAdapter | class | Browser TimesFM adapter — wraps @agentix-e/timesfm-web via onnxruntime-web | | TimesfmWebConfig | type | Configuration for TimesFM Web (modelUrl, executionProvider) | | createDetector | function | Re-exported from core — zero-config shortcut | | IAnomalyDetector | interface | Detector interface (re-exported) | | DetectorConfig | type | Full configuration type (re-exported) |

License

MIT