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

aeglis-sdk

v1.0.3

Published

The official Node.js SDK for **Aeglis** — The Hybrid AI Security Engine. Protect your platform from zero-day phishing, malicious payloads, and macro-viruses in milliseconds. Built for FinTech, HR-Tech, EdTech, and Enterprise Gateways.

Readme

Aeglis Node.js SDK 🛡️

The official Node.js SDK for Aeglis — The Hybrid AI Security Engine. Protect your platform from zero-day phishing, malicious payloads, and macro-viruses in milliseconds. Built for FinTech, HR-Tech, EdTech, and Enterprise Gateways.

Version License

📦 Installation

npm install aeglis-sdk

🚀 Quick Start

Get your API Key and Webhook Secret from the Aeglis Developer Dashboard.

const Aeglis = require('aeglis-sdk');

// Initialize with your API Key
const aeglis = new Aeglis('sk_live_YourApiKeyHere');

💻 API Methods

1. Quick Scan (Synchronous)

Best for short text, URLs, and chat moderation. Evaluates intent instantly.

async function moderateChat() {
    try {
        const result = await aeglis.scan(
            "Claim your free prize here: [http://suspicious-link.com](http://suspicious-link.com)", 
            "user_9982" // (Optional) Your internal tracking ID
        );
        
        console.log(result.risk_level); // "DANGER", "WARNING", or "SAFE"
    } catch (error) {
        console.error(error.message);
    }
}

2. Deep File Scan (Asynchronous)

Best for KYC documents, resumes, and user uploads. Scans for hidden macros and zero-day malware. Note: This triggers a background task. The final result is pushed to your configured Webhook.

async function scanUpload() {
    try {
        const task = await aeglis.deepScan(
            './uploads/candidate_resume.pdf', // Path to the file
            {
                inputText: "Candidate CV for Software Engineer", // (Optional) Context
                endUserId: "candidate_id_5548" // (Optional) Returned in your webhook
            }
        );
        
        console.log(task.status); // "processing"
        console.log(task.message); // "File accepted. Result will be dispatched to your Webhook."
    } catch (error) {
        console.error(error.message);
    }
}

⚡ Webhook Verification (Security)

Aeglis pushes the result of deepScan to your server. To prevent spoofing attacks, you must verify the HMAC SHA-256 signature attached to the request.

The SDK makes this a 1-line process.

⚠️ IMPORTANT: You must pass the Raw Body to the verifier. Do not parse it to JSON before verification.

Express.js Example:

const express = require('express');
const app = express();
const Aeglis = require('aeglis-sdk');
const aeglis = new Aeglis('sk_live_YourApiKeyHere');

const WEBHOOK_SECRET = 'whsec_YourDashboardSecretHere';

// Use express.raw() to preserve the exact payload for hashing
app.post('/aeglis-webhook', express.raw({ type: 'application/json' }), (req, res) => {
    // Check both standard header formats
    const signature = req.headers['x-aeglis-signature'] || req.headers['aeglis-signature'];

    try {
        // The SDK verifies the HMAC signature securely
        const event = aeglis.verifyWebhook(req.body, signature, WEBHOOK_SECRET);
        
        // Extract parameters from the nested 'data' wrapper
        const eventData = event.data || {};
        
        console.log("Verified Event Received!");
        console.log(`Risk Level: ${eventData.risk_level}`);
        console.log(`Your Tracking ID: ${eventData.user_id}`);

        // Action based on result
        if (eventData.risk_level === 'DANGER') {
            // Block the file in your database
        }

        res.status(200).send("Webhook Processed");

    } catch (error) {
        console.error("Webhook Hacker Blocked:", error.message);
        res.status(400).send("Invalid Signature");
    }
});

🛠️ Error Handling

The SDK automatically parses backend errors and throws clean, readable JavaScript Errors. Always wrap your calls in try/catch blocks.

try {
    await aeglis.scan(""); // Missing payload
} catch (error) {
    console.log(error.message); // "Aeglis API Error: inputText is required..."
}

🔗 Resources

Engineered in India. Built for the World.