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

opencode-durmemo

v0.1.8

Published

Durable Memory for OpenCode

Readme

opencode-durmemo

Shared memory for OpenCode plugins. Stores JSON values by topic and key, at global, project, or session scope.

Session entries shadow project entries, which shadow global entries.

Install

Add it to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["opencode-durmemo"]
}

OpenCode installs it on next startup. No config needed.

Use as a human

Tag a topic into the session by writing #topic in a prompt. Tags also accept inputs which other plugins can consume: #topic[input1, input2].

Example:

#plan remember my deploy checklist

Once tagged, the agent can read and write keys under that topic. You can view and manage keys and values using /tags.

Use as an agent

You get four tools under the durmemo namespace. Every call needs a topic already tagged in the session.

  • durmemo_list_keys lists in-scope keys for tagged topics. Optional topics filter.
  • durmemo_read reads the winning entry for a topic and key.
  • durmemo_write creates or updates a key at an exact scope: global, project, or session.
  • durmemo_delete deletes a key at an exact scope.

Read returns the winner. Write and delete act on the exact scope you pass, so a session write shadows the project value instead of replacing it.

Use as a plugin author

Import the RPC definition from opencode-durmemo/rpc and call it with ctx.rpc:

import { DurmemoRpc } from "opencode-durmemo/rpc";

const durmemo = ctx.rpc(DurmemoRpc);
yield * durmemo["keys.readExact"]({ topic, key, scope: "session", owner: sessionID });
yield *
  durmemo["init.ensure"]({
    pluginId,
    topic,
    key,
    scope: "session",
    owner: sessionID,
    initialValue,
  });

init.ensure seeds a key once without overwriting an existing value. Use it for defaults.

React to a key from a session hook:

import { Effect } from "effect";
import { DurmemoRpc } from "opencode-durmemo/rpc";

const durmemo = ctx.rpc(DurmemoRpc);
yield *
  ctx.session.hook("context", (event) =>
    Effect.gen(function* () {
      const { found, entry } = yield* durmemo["keys.readExact"]({
        topic: "mytopic",
        key: "mykey",
        scope: "session",
        owner: event.sessionID,
      });
      if (found && entry !== undefined) {
        event.system.push({ type: "text" as const, text: String(entry.value) });
      }
    }).pipe(Effect.orElseSucceed(() => undefined)),
  );