Skip to main content
OSS reference implementation of the anomaly detector documented in the Glide OSS plan §M4. Deterministic, explainable signals; no classifier, no ML; every heuristic is a pure function over a facts snapshot the operator passes in.

Install

npmjs.com/package/@glideco/anomaly

Why no ML?

Per the OSS plan §“Critical architectural commitments”:
Anomaly signals are heuristics, not a classifier.
Signals are inputs to UI decision aids — the policy engine has the only hard veto. Heuristics are explainable, version-controllable, testable in isolation, and don’t drift between training runs. ML is the wrong tool for the “why did this fire” review surface.

Built-in heuristics

Storm suppression

A burst of similar signals (e.g., 50 “new-recipient” events in 60 seconds during a payroll batch) should NOT fan out as 50 push notifications. The suppressor returns at most maxPerWindow signals per (kind, agentId) per windowMs; overflow signals are still recorded — caller’s choice what to do with them (typically routed to an in-app aggregated feed).

Sentry sink

Optional adapter that routes signals to Sentry as messages tagged with severity + kind. The Sentry instance is operator-supplied so the package doesn’t take a hard dependency on @sentry/nextjs (any object with captureMessage() works — @sentry/node, Glitchtip, custom shims).
Severity mapping: Failures emitting to Sentry never bubble — the sink swallows them so a Sentry outage can’t break the calling pipeline.

Adding your own heuristic

Heuristics are just (ctx) => signals[]. Wire one for your domain:

Reading list