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

@onereach/types-hitl-api

v1.0.5-rc.5

Published

Backend API for Human in the Loop. This service handles session, agent, migration, task, and browser-facing API behavior used by the `hitl` frontend and related platform integrations.

Readme

HitL API

Backend API for Human in the Loop. This service handles session, agent, migration, task, and browser-facing API behavior used by the hitl frontend and related platform integrations.

Local Development

Requirements:

  • Node.js 20+
  • npm 10+
  • Docker Desktop or another local PostgreSQL setup
  • OR_NPM_TOKEN for private dependencies
  • deploy-platform installed locally so config can be generated

1. Install dependencies

npm install

2. Start PostgreSQL

Example with Docker:

docker pull postgres
docker run --name postgresql-local -e POSTGRES_USER=hitl-app -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=hitl-app-db -p 5432:5432 -d postgres

3. Create .env

APP_DEV_PORT=8080
DB_USER=hitl-app
DB_PASSWORD=mysecretpassword
DB_HOST=localhost
DB_PORT=5432
DB_NAME=hitl-app-db
SCHEDULED_TASKS_SWITCH='{"ARCHIVE_SESSION_EVENTS":true,"CLEAN_UP_LISTENERS":true,"CLEAN_UP_SESSIONS":true,"ADD_EVENTS_TO_ARCHIVE":true,"ADD_MEMBERS_TO_ARCHIVE":true,"CLEAN_UP_CONTACTLESS_SESSIONS":true,"FIX_EXPIRED_AGENT_STATUSES":true,"DELETE_EXPIRED_SESSIONS":true,"LONG_EXPIRE_DAYS":7,"SHORT_EXPIRE_DAYS":1}'

4. Generate deploy config

or get-config --branch local --client development --env qa --feature master --project hitl-api --service hitl_api.config --service-or-eval service > config.json

5. Start the server

npm start

6. Run migrations

curl --location --request POST 'http://localhost:8080/api/v1/migrations' --header 'Authorization: user'

7. Run tests

npm test

Main Areas

  • src/api/ and src/api-express/: serverless and express entrypoints
  • src/api-common/: shared middleware, auth, logging, validation, and versions endpoints
  • src/api-express/migrations/: SQL and migration management
  • tests/: Jest-based backend coverage

Shared Parent Domain Aliases

hitl-api participates in the shared-parent-domain alias flow as a supporting API for branded hitl deployments.

That means:

  • browser-facing host trust should be explicit
  • CORS behavior should be driven by configured trusted hosts
  • deploy-platform config must stay aligned with the UI aliases and allowed hosts used by the frontend

Read the full platform behavior here: deploy-platform shared-parent-domain alias documentation