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

@crispthinking/athena-classifier-sdk

v0.8.69

Published

A Node.js SDK for the Athena classifier that uses gRPC transport.

Readme

Athena NodeJS SDK

This repository contains the NodeJS SDK.

Overview

Athena is a gRPC-based image classification service designed for CSAM (Child Sexual Abuse Material) detection by Crisp. The service provides real-time image classification through bidirectional streaming with session-based deployment management and multi-affiliate support.

Features

  • Real-time Classification: Bidirectional streaming for immediate image processing
  • Session Management: Deployment-based grouping enables collaborative processing
  • Multi-format Support: Supports JPEG, PNG, WebP, TIFF, and many other image formats
  • Compression: Optional Brotli compression for bandwidth optimization
  • Error Handling: Comprehensive error codes and detailed error messages
  • Monitoring: Active deployment tracking and backlog monitoring

Contributing

Code Quality and Pre-commit Hooks

This project uses pre-commit hooks to ensure code quality and consistency. The hooks run linting, formatting, and type checking before each commit.

Setting up Pre-commit Hooks

  1. Install pre-commit (if not already installed):

    uvx pre-commit --help

    Or install globally:

    uv tool install pre-commit
  2. Install the hooks:

    uvx pre-commit install
  3. Run all quality checks manually:

    npm run lint:all

What the Pre-commit Hooks Check

  • ESLint: Code quality and style issues
  • Prettier: Code formatting consistency
  • TypeScript: Type checking and compilation
  • File checks: Trailing whitespace, file endings, large files, etc.
  • Submodule status: Ensures submodules are properly tracked

Manual Quality Checks

You can run individual checks manually:

# Run ESLint
npm run lint

# Check Prettier formatting
npm run prettier:check

# Fix Prettier formatting
npm run prettier

# TypeScript type checking
npx tsc --noEmit

# Run all checks at once
npm run lint:all

Updating the Protobuf definitions

Protobufs are stored as a git submodule from the @crispthinking/athena-protobufs repository.

To update the protobuf definitions for client generation:

  1. Update the submodule to the latest version:

    git submodule update --remote athena-protobufs
  2. Or update to a specific commit:

    cd athena-protobufs
    git checkout <commit-sha>
    cd ..
    git add athena-protobufs
    git commit -m "Update protobuf definitions to <commit-sha>"

Regenerating the TypeScript gRPC Client

This project uses @protobuf-ts/plugin to generate TypeScript-native gRPC clients and message types for use with @grpc/grpc-js.

How to update the generated client code

  1. Ensure dependencies are installed:

    npm install --save-dev @protobuf-ts/plugin
    npm install --save @grpc/grpc-js
  2. Run the following command to regenerate the client and types:

    npm run codegen

    Or manually with:

    npx protoc \
      --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \
      --ts_out=client_grpc1:./src/athena \
      --proto_path=./athena-protobufs/athena \
      ./athena-protobufs/athena/athena.proto
    • This will generate .ts files in src/athena/ including a gRPC client compatible with @grpc/grpc-js.
  3. Update your imports in your code as needed:

    • The main client will be in src/athena/athena.grpc-client.ts.
    • Message types and enums are in src/athena/athena.ts.
  4. Format the generated code:

    npm run prettier

Notes

  • If you update proto files in the submodule, rerun npm run codegen to keep the TypeScript client in sync.
  • If you see TypeScript errors about missing modules, ensure your tsconfig.json includes the src/athena directory and restart your IDE/tsserver.
  • The generated files are automatically formatted by the pre-commit hooks, but you can run npm run prettier manually if needed.

Building Documentation To build the documentation:

Install uv if not already installed

curl -LsSf https://astral.sh/uv/install.sh | sh

Sync dependencies and build

uv sync cd docs make html The built documentation will be available in docs/build/html/index.html.