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

argos-sdk

v1.1.6

Published

argos Security SDK for TypeScript/JavaScript

Readme

🛡️ Argos Security SDK for TypeScript

Argos is a production-grade TypeScript/JavaScript SDK for real-time threat detection and fraud prevention. It monitors every request, scores risk using advanced ML models, and enables you to block malicious traffic automatically.


✨ Key Features

  • 🚀 High Leverage: Zero-config initialization with auto-environment detection from your API key.
  • ⚡ Background Processing: High-performance event batching and flushing to minimize impact on request latency.
  • 🛡️ Multi-Framework Support: First-class middleware for Express, Fastify, Koa, and Next.js.
  • 🔄 Resilience Built-in: Circuit breakers, exponential backoff, and robust error handling.
  • 🧩 Deep Locality: Local blocklist caching ensures sub-millisecond response times for known threats.

📦 Installation

# Install the core SDK
npm install argos-sdk

# Optional: Framework-specific types/peer dependencies
npm install express # or fastify, koa, next

🚀 Quick Start

1. Basic Client Setup

The SDK auto-detects your environmentId from the API key.

import { ArgosClient } from 'argos-sdk';

const client = new ArgosClient({
  apiKey: process.env.ARGOS_API_KEY!,
});

2. Using Middleware (Recommended)

Drop Argos into your application for instant protection.

Express Example

import express from 'express';
import { ArgosClient, createExpressMiddleware } from 'argos-sdk';

const app = express();
const client = new ArgosClient({ apiKey: 'your-api-key' });

app.use(createExpressMiddleware(client, {
  mode: 'sync',          // 'sync' blocks malicious requests, 'async' monitors
  checkBlocklist: true,  // Check local cache BEFORE processing
}));

app.get('/', (req, res) => res.json({ message: 'Secure!' }));
app.listen(3000);

⚙️ Configuration Options

| Option | Default | Description | |--------|---------|-------------| | apiKey | Required | Your Argos API key | | baseURL | https://api.argossecops.com | API endpoint | | timeout | 30000 | Request timeout in ms | | maxRetries | 3 | Maximum retry attempts | | autoBlockOnBlock | false | Auto-block IP when ML returns BLOCK verdict | | autoBlockTTL | 3600000 | Duration (ms) for auto-blocked IPs | | environmentId | Auto-detected | Your environment ID |


🧩 Framework Support

| Framework | Middleware Function | |-----------|---------------------| | Express | createExpressMiddleware(client, config) | | Fastify | createFastifyMiddleware(client, config) | | Koa | createKoaMiddleware(client, config) | | Next.js | createNextMiddleware(client, config) |


🤝 Contributing

We welcome contributions! Please see our CONTRIBUTORS.md for our coding philosophy and standards.

To run the test suite:

npm install
npm test
npm run lint

📄 License

MIT License - see LICENSE for details.

Copyright © 2026 Argos Security. All rights reserved.