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

@tekmemo/recall

v0.1.0

Published

Provider-neutral vector recall contracts, validation, and test utilities for TekMemo.

Readme

@tekmemo/recall

npm License: MIT Types CI Status

Provider-neutral vector recall contracts, validation helpers, scoring utilities, filter matching, and an in-memory test implementation for TekMemo.

This package does not talk to Upstash, Turso, Qdrant, Pinecone, Chroma, LanceDB, Weaviate, or Milvus directly.

Those provider-specific packages should implement the RecallStore interface exported here.

Why this package exists

TekMemo is file-first. Local memory lives in .tekmemo/, but recall providers can vary.

The recall flow is:

.tekmemo memory files
  -> chunk records
  -> embeddings
  -> RecallStore implementation
  -> recall query results
  -> optional reranking

@tekmemo/recall defines the provider-neutral contract for that recall layer.

Install

pnpm add @tekmemo/recall

Core API

import type { RecallStore, RecallDocument, RecallQuery } from "@tekmemo/recall";

RecallStore

export interface RecallStore {
  upsert(documents: RecallDocument[]): Promise<void>;
  query(query: RecallQuery): Promise<RecallResult[]>;
  delete(ids: string[], options?: { namespace?: string }): Promise<void>;
  deleteBySource(input: DeleteBySourceInput): Promise<void>;
}

In-memory store

Use the in-memory store for local tests, examples, and adapter contract tests.

import { createInMemoryRecallStore } from "@tekmemo/recall";

const store = createInMemoryRecallStore({
  duplicateDocumentIdBehavior: "last-write-wins"
});

await store.upsert([
  {
    id: "chunk_1",
    text: "TekMemo uses local .tekmemo memory files.",
    embedding: [1, 0, 0],
    metadata: {
      projectId: "proj_1",
      sourceType: "document",
      sourceId: "core",
      memoryType: "core"
    }
  }
]);

const results = await store.query({
  embedding: [1, 0, 0],
  topK: 5,
  filter: {
    projectId: "proj_1"
  }
});

Namespaces

Use namespaces to isolate tenants/projects in providers that support namespaces.

import { createProjectNamespace } from "@tekmemo/recall";

const namespace = createProjectNamespace({
  tenantId: "ten_1",
  projectId: "proj_1"
});

Filters

The neutral filter format supports:

  • exact values
  • $eq
  • $ne
  • $in
  • $nin
  • $gt
  • $gte
  • $lt
  • $lte
  • $exists
  • $contains

Provider adapters should map this neutral shape to the provider's native filter syntax.

Production behavior

This package handles:

  • invalid embeddings
  • dimension mismatches
  • invalid topK
  • unsafe IDs
  • unsafe namespaces
  • non-JSON metadata
  • circular metadata
  • unsupported filter operators
  • deterministic sorting
  • namespace isolation
  • metadata filtering
  • duplicate document IDs
  • deletion by ID
  • deletion by source

Package boundary

This package must not own:

  • embedding providers
  • vector provider SDKs
  • reranking providers
  • cloud billing
  • cloud tenancy
  • BYOK secret storage

Provider packages should depend on this package and implement RecallStore.