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

@pensyve/opencode

v1.3.0

Published

Pensyve memory plugin for OpenCode — cross-session memory with 8-signal fusion retrieval

Readme

opencode-pensyve

Persistent working-memory substrate for the opencode CLI — memory is not a feature you invoke, it is the substrate the agent operates on.

Note: The original opencode-ai/opencode repository is archived. Its successor is Crush by Charmbracelet. The @opencode-ai/plugin SDK remains actively maintained and this plugin targets that SDK.

What It Does

  • Proactive memory during work — lessons are captured the moment they land, not at session end
  • Thread-aware continuity — sessions that continue prior work resume with relevant context, no re-briefing
  • Entity-scoped recall — substantive questions are grounded in prior decisions; simple commands stay fast
  • Three memory types — durable facts (semantic), session-specific events (episodic), reusable procedures (procedural)
  • Lightly visible — one-line surfaces when memory is used; never interrupts your flow
  • Native plugin hooks — auto-recall on session start, system prompt injection, auto-capture of responses

Install

Two steps: configure the MCP server, then install the instructions file.

1. Configure the MCP server

Merge the following into your opencode.json:

Cloud with API key (recommended):

export PENSYVE_API_KEY="psy_your_key_here"
{
  "mcpServers": {
    "pensyve": {
      "type": "http",
      "url": "https://mcp.pensyve.com/mcp",
      "headers": {
        "Authorization": "Bearer ${PENSYVE_API_KEY}"
      }
    }
  }
}

A ready-to-use example is at opencode.mcp.json.example — copy relevant keys into your opencode.json.

Create your key at pensyve.com/settings/api-keys. Put the export in ~/.bashrc or ~/.zshrc to persist.

Local (offline, self-hosted):

{
  "mcpServers": {
    "pensyve": {
      "type": "stdio",
      "command": "pensyve-mcp",
      "args": ["--stdio"]
    }
  }
}

Build the binary: cargo build --release -p pensyve-mcp from the pensyve repo.

2. Install the instructions file

Copy AGENTS.md to your project root (opencode loads AGENTS.md automatically as its agent instruction file):

cp /path/to/pensyve/integrations/opencode-plugin/AGENTS.md .

Note: All 8 substrate rules are consolidated into a single AGENTS.md with clear section headings. If you prefer directory-based instruction files under .opencode/instructions/, you can split sections into individual .md files with the same content.

3. (Optional) Install the native plugin

For richer auto-behaviors (session-start recall, system prompt injection, auto-capture):

# Project-level
cp -r /path/to/pensyve/integrations/opencode-plugin .opencode/plugins/pensyve

# Or user-level (applies to all projects)
cp -r /path/to/pensyve/integrations/opencode-plugin ~/.config/opencode/plugins/pensyve

Or via npm:

npm install opencode-pensyve

Then add to opencode.json:

{
  "plugin": ["opencode-pensyve"]
}

How It Works

The substrate is delivered through AGENTS.md. The Memory Reflex Rule section establishes the discipline: before substantive answers, recall by entity; when a lesson lands, observe immediately with a one-line surface. Flow sections (When Debugging, When Designing, When Refactoring, Longitudinal Work) guide the model through consult-memory + capture-lesson steps.

When the native plugin is also installed, the session.created hook fires a recall on session start and injects memories into the system prompt automatically — no explicit tool call needed.

Episode lifecycle: Episodes open lazily on the first pensyve_observe call and are not explicitly closed under normal operation. Server-side consolidation handles aging.

Continuity primer: The Context Loader section runs a best-effort recall at the start of substantive conversations to surface prior relevant observations.

Memory Behavior Model

Pensyve behaves as working memory for the agent — always-on, ambient, continuous.

Writes happen in-flight. When a root cause is confirmed, a decision is made, or a reusable procedure emerges, it's captured the moment it lands via the memory reflex. No batching to session end.

Reads happen at decision points. Before substantive answers, the model consults memory scoped to the detected entities. Simple commands (run tests, format file) skip recall to stay fast.

Sessions continue. At the start of a substantive conversation, Pensyve checks whether the current work continues prior memories (shared entities + recent activity). If yes, you resume with a primer — no re-briefing needed.

Memory Types

| Type | Definition | MCP call | Example | |---|---|---|---| | Semantic | Durable truths, decisions, preferences | pensyve_remember | "We chose RS256 over HS256 for JWT signing" | | Episodic | Temporal events, session-scoped observations | pensyve_observe (with lazy-opened episode_id) | "Phase-3 regression root cause: hybrid-router threshold" | | Procedural | Reusable workflows, sequences, recipes | pensyve_observe with [procedural] content prefix | "To calibrate V7r: freeze Haiku config, run suite, diff baseline" |

Opt-Out

  • Full opt-out — delete AGENTS.md from your project root
  • Partial opt-out — delete specific sections from the file (e.g., remove the "Longitudinal Work" section if you don't do research work)
  • Silent mode — edit the Memory Reflex Rule section to remove the "one-line surface" guidance; captures stay silent
  • Recall-only mode — edit flow sections to drop the Capture lesson steps while keeping Consult memory
  • Disable native plugin — remove from opencode.json plugin array; AGENTS.md substrate continues working via MCP

Available MCP Tools

| Tool | Description | |---|---| | pensyve_recall | Search memories by semantic similarity | | pensyve_remember | Store a durable fact (semantic memory) | | pensyve_observe | Record a session observation (episodic / procedural via [procedural] prefix) | | pensyve_episode_start | Begin tracking an episode | | pensyve_episode_end | Close an episode with outcome | | pensyve_forget | Delete an entity's memories | | pensyve_inspect | List memories for an entity |

See MCP Tools Reference for full parameter details.

Design Philosophy

  • Memory as substrate — not a feature the user invokes; always there, continuous, carried across sessions
  • Reasoning-layer firstAGENTS.md delivers the substrate even without the native plugin
  • 1:1 with Claude Code — same skill structure, same conventions, same memory types
  • MCP contract-respecting — every rule's call examples verified against pensyve-mcp-tools/src/params.rs
  • Single-file delivery — all 8 rules consolidated into AGENTS.md with clear section headings

Links

License

Apache 2.0