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

@sentry/junior-memory

v0.190.0

Published

The memory plugin stores durable facts, recalls relevant facts into prompts, and learns candidates from completed sessions. SQL schemas, exported types, tools, and tests are authoritative.

Readme

@sentry/junior-memory

The memory plugin stores durable facts, recalls relevant facts into prompts, and learns candidates from completed sessions. SQL schemas, exported types, tools, and tests are authoritative.

Surfaces

  • createMemory, removeMemory, listMemories, and searchMemories are model-visible tools registered by src/plugin.ts.
  • userPrompt recall contributes bounded memory context before a run.
  • processSession reviews completed sessions asynchronously for passive learning.
  • The memory CLI namespace provides explicit administrative search and inspection.
  • The dashboard exposes a searchable, paginated Memories user page. It includes public memory and private memory owned by the authenticated user. The overview charts global passive-extraction cost from the durable memory/memories_captured events. The System plugin report uses the same event-cost feed.
  • Authenticated REST clients can list and search authorized memories through GET /api/plugins/memory/memories, read one through GET /api/plugins/memory/memories/:id, and forget an authorized private memory through DELETE /api/plugins/memory/memories/:id. Public memory is read-only in the dashboard and REST API.

Scope And Visibility

  • The Source sets memory visibility. Model output cannot set it.
  • Public memory is visible everywhere.
  • Private memory belongs to one User. Every Identity linked to that User can access it.
  • Junior records the optional Location where it learned a memory. Location is a record of where Junior learned it. It does not grant access.
  • The subject says what a memory is about. It does not set access. A user preference can be public or private based on its Source.
  • Recall filters candidates by visibility, status, and relevance before content reaches the model.
  • Administrative reads require explicit selectors and safe output defaults.
  • Memory content, embeddings, source excerpts, and review prompts must not be logged or traced.

Storage

  • The Drizzle schema in src/db/schema.ts and generated migrations define the database contract.
  • Records retain provenance, lifecycle status, supersession relationships, and timestamps needed for review and deletion.
  • Embeddings are derived indexes, not independent memory authority.
  • Embedding distance never decides that two memories are duplicates. Exact content and preference review own duplicate and supersession decisions.
  • Writes are idempotent where a completed session or tool retry can repeat.
  • Removal and supersession preserve enough lifecycle information to prevent deleted facts from being recalled or silently recreated.

Learning And Recall

  • Explicit user requests to remember or forget take priority over passive learning.
  • Passive extraction creates only durable, reusable facts—not transient tasks, conversation summaries, secrets, or speculative interpretation.
  • Every completed passive extraction emits the namespaced memory/memories_captured conversation event with its best-effort model cost. Empty extraction outcomes remain durable for reporting but do not produce a transcript row.
  • Candidate review resolves duplicates and supersession before activation.
  • Search combines independently ranked vector and PostgreSQL full-text matches with reciprocal rank fusion; provider-specific raw scores are never added together.
  • Both retrieval legs always run in parallel as bounded top-k probes. Each leg fetches at least the caller's requested limit (and never more than the store limit ceiling). Recall keeps a smaller overfetch window than explicit search and slightly prefers lexical ranks so exact tokens survive soft semantic neighbors. Vector recall also applies the cosine distance cutoff in SQL, and embeddings use an HNSW cosine index (vector_cosine_ops).
  • Automatic recall also searches private memory by itself. This keeps newer public memory with common words from hiding older private memory. On equal RRF scores, private memory ranks first.
  • Automatic recall retrieves a bounded candidate window, then uses the memory relevance model and prompt limit to select useful memories. An empty result adds no prompt text.
  • Every completed automatic recall attempt emits an invisible, namespaced memory/memories_recalled conversation event with the admitted memory IDs and best-effort embedding and relevance-model cost, including retrievals that find no candidates and decisions that admit no memories.
  • Automatic recall degrades to no prompt contribution when relevance selection fails. Review, extraction, and write failures still fail their owning hook/task without corrupting existing memory state.

Configuration

  • AI_MEMORY_MODEL or memoryPlugin({ modelId }) selects the structured review model.
  • memoryPlugin({ disableRecall: true }) disables automatic prompt recall.
  • memoryPlugin({ disableExtraction: true }) disables passive session extraction. The two flags are independent and do not disable explicit memory tools.
  • Automatic recall uses a fixed cosine distance cutoff of 0.45 (for text-embedding-3-small). Explicit search does not apply that cutoff.
  • Generate schema changes with pnpm --filter @sentry/junior-memory db:generate.

Follow ../../policies/data-redaction.md, ../../policies/security.md, and the plugin contract in ../junior-plugin-api/README.md.