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

feloop

v0.2.0-alpha.1

Published

A lightweight, model-agnostic feedback loop for production AI systems.

Readme

Feloop

A lightweight TypeScript SDK for reviewed, evidence-driven AI improvements. Capture executions and feedback, find recurring scored segments, evaluate an immutable candidate, approve it, and coordinate deployment or rollback through your infrastructure. Feloop is a library, not a hosted service or autonomous trainer.

Release target: 0.2.0-alpha.1, MIT, ESM, Node.js 22 and 24. No core runtime dependencies, telemetry, database driver, scheduler, model client, or background daemon. This checkout prepares the release; it does not imply the npm package is published.

Canonical documentation · Starter · Capabilities · Migration · Release gates · Security

Try the source before publication

git clone https://github.com/SanaanKhalid/feloop.git
cd feloop
npm ci
npm test
npm run starter -- demo
npm run starter -- demo --reject

Repository access is required until the owner explicitly makes it public. Both demos are simulated fixtures, not live LLM results. The accepting demo explicitly approves its fixture candidate; ordinary recommendations never do that automatically.

After the separate npm release action, install the pinned alpha with npm install [email protected]. Until then, run npm pack in this checkout and install its actual .tgz file in your consumer project.

Capture a local example

import { FeedbackLoop, InMemoryStore } from 'feloop';

const loop = new FeedbackLoop({
  store: new InMemoryStore(), // Development only; use a conforming DB adapter in production.
  namespace: 'support/development',
});
const execution = await loop.recordExecution({
  id: 'request-123', kind: 'prediction', episodeId: 'ticket-123',
  input: { text: 'Please explain this charge.' }, output: { label: 'other' },
  artifacts: { model: 'your-model-version', prompt: 'intent-v1' },
  metadata: { task: 'support-intent' },
});
await loop.recordSignal({
  id: 'review-123', executionId: execution.id, kind: 'correction',
  name: 'verified_correct', value: false, correction: { label: 'billing' },
  source: 'authorized-reviewer', confidence: 1,
});
await loop.close();

Creation is insert-only. Same caller ID and identical normalized/sanitized input returns the original record; conflicting content fails. Updates require a revision. A namespace is an integrity scope, not authentication. Your application chooses authorized namespaces and verifies correction sources.

Bring your own PostgreSQL

Install pg in your application. feloop/postgres accepts your pool without importing the driver. Construction does not create tables. Review and apply the versioned SQL in migrations/001-feedback-store.sql, or explicitly call migratePostgres(pool) with a migration identity. Production request credentials should not need DDL rights.

import { Pool } from 'pg';
import { FeedbackLoop } from 'feloop';
import { PostgresStore, migratePostgres } from 'feloop/postgres';

const connectionString = process.env.DATABASE_URL;
if (!connectionString) throw new Error('Set DATABASE_URL explicitly.');
const pool = new Pool({ connectionString });
await migratePostgres(pool); // Explicit setup, not a constructor side effect.
const loop = new FeedbackLoop({ store: new PostgresStore(pool), namespace: 'support/dev' });
await loop.recordExecution({ kind: 'prediction', input: { text: 'Synthetic setup check' } });
await loop.close(); // Does not close your pool.
await pool.end();

Use TLS and your database's credential-management policy. Neither migrations nor SDK namespaces replace database authorization, encryption, backups, or restore drills.

Reliability boundary

Evaluation and approval reference exact content, evidence and evaluator versions. Deployment reserves the target and saves an attempt before calling your adapter. The external call runs outside the database transaction. A valid receipt, candidate states, lifecycle event and active pointer are finalized atomically afterward. An uncertain result remains pending until inspection resolves it. Do not retry apply blindly. An adapter must implement idempotent apply, durable inspect, fenced not_applied, and real rollback. There is no universal exactly-once guarantee.

Default automation only recommends. Experimental auto-apply needs explicit opt-in, allowed targets, passing metric gates and low-risk prompt/routing changes. Callbacks run in your process; cancellation is cooperative, not a sandbox.

The complete PostgreSQL/OpenAI or Azure OpenAI starter includes real prompt selection, exact-match holdout evaluation, review, rollback and recovery. Live mode is opt-in, requires your model/provider credentials/database, sends data to the selected provider and may incur charges. Its small synthetic dataset is a mechanics demonstration, not evidence of production ROI.