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

@sockt/cadvp

v0.2.1

Published

The memory ingestion daemon — tails agent execution logs (JSONL), validates and deduplicates events, batches them, and writes to a `MemoryStore` (typically GBrain via `@sockt/memory`). This is the write-side half of Sockt's memory pipeline; `@sockt/memory

Readme

@sockt/cadvp

The memory ingestion daemon — tails agent execution logs (JSONL), validates and deduplicates events, batches them, and writes to a MemoryStore (typically GBrain via @sockt/memory). This is the write-side half of Sockt's memory pipeline; @sockt/memory is the read-side client.

Agents never write to memory directly. Every execution step gets appended to a JSONL file; CADVP is the only thing that turns those log lines into durable memory — which keeps the hot agent-execution path fast and keeps prompt injection from being a direct path to memory poisoning.

Install

bun add @sockt/cadvp

What's in here

CadvpDaemon

The top-level daemon. Wires together a JsonlTailer, SchemaValidator, EventProcessor, and CheckpointStore into a running loop.

import { CadvpDaemon, DEFAULTS } from "@sockt/cadvp";
import { createMemoryStore } from "@sockt/memory";

const daemon = new CadvpDaemon({
  store: createMemoryStore({ endpoint: process.env.GBRAIN_URL! }),
  checkpointPath: "~/.sockt/scratch/cadvp-checkpoint.json",
  dedupThreshold: DEFAULTS.dedupThreshold, // 0.92
  batchSize: DEFAULTS.batchSize,           // 10
  flushIntervalMs: DEFAULTS.flushIntervalMs, // 2000
  pollIntervalMs: DEFAULTS.pollIntervalMs,   // 500
});

await daemon.start();

JsonlTailer

Watches a JSONL file (agent execution log) for new lines, polling at pollIntervalMs. Resilient to the file being rotated or not existing yet at startup.

SchemaValidator

Validates each incoming event line against the CadvpEvent schema (from @sockt/types) before it's processed — malformed lines are skipped, not thrown.

EventProcessor

Deduplicates new events against existing memory using cosine similarity (dedupThreshold, default 0.92), batches non-duplicate events (batchSize), and flushes to the MemoryStore on a timer (flushIntervalMs).

CheckpointStore

Persists how far the tailer has read into the log file, so a daemon restart resumes instead of reprocessing (or missing) events.

DEFAULTS

The default config values above, exported so you can reference or partially override them rather than hardcoding magic numbers.

Environment variables

GBRAIN_URL, WATCH_DIR, CHECKPOINT_PATH — full reference in docs/CONFIGURATION.md.

Docs

Memory pipeline architecture: docs/ARCHITECTURE.md#memory-pipeline-cadvp--gbrain

License

FSL-1.1-MIT — free for non-competing use, converts to MIT two years after each release.