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

dsh-tool-memo

v0.1.0

Published

Tool-result memoization for DeepSeek Harness — TTL cache over idempotent tool calls; cache hits short-circuit re-execution with an explanatory verdict, LRU-bounded, per-tool TTLs, JSONL audit.

Readme

dsh-tool-memo

Tool-result memoization for DeepSeek Harness. Idempotent tool calls that repeat with identical arguments are served from a TTL cache instead of re-executing — fewer wasted executions, fewer burned tokens, faster loops.

Plugin id: dsh-memo · npm: dsh-tool-memo

Install

dsh plugin --profile web add dsh-tool-memo
dsh --profile web --dump-config | grep -A3 'id: dsh-memo'   # verify

The plugin ships disabled.

How a hit behaves

| mode | on a cache hit | |------|----------------| | hint (default) | the re-execution is denied with an explanatory reason carrying a bounded preview of the cached value and instructions to bypass with the fresh flag | | inject | EXPERIMENTAL — the verdict additionally carries the full cached result (result field) for harnesses that honor it; on ones that don't, the call simply re-executes |

The fresh flag (default _memoFresh: true in the tool arguments) always bypasses lookup. Mutating and outbound tools (bash, writes, http*, send*, …) are excluded by default — a cached side effect is worse than a repeated one.

Cache semantics

  • Key = sha256(tool, stable-serialized args) — content-addressed, safe across sessions of the same profile.
  • TTL per tool via perToolTtl globs, defaultTtlMs otherwise; a TTL of 0 disables caching for that tool.
  • LRU bounded by maxEntries (default 256); hits refresh recency.
  • Error results are never cached.

Config

- id: dsh-memo
  name: dsh-tool-memo
  config:
    enabled: false
    mode: hint                  # hint | inject (inject = experimental)
    defaultTtlMs: 600000        # 10 min
    perToolTtl:                 # first matching glob wins
      - { tool: read_file, ttlMs: 300000 }
      - { tool: "search*", ttlMs: 120000 }
    maxEntries: 256
    excludeTools: []            # empty = built-in mutating/outbound list
    includeTools: []            # empty = all non-excluded tools
    freshFlag: _memoFresh
    audit: { enabled: true }    # default file: <cwd>/.dsh-tool-memo/audit.jsonl

A profile-level patch targeting id: dsh-memo replaces the WHOLE config row (no deep merge) — restate every key you want to keep.

Audit format (JSONL)

{"ts":"2026-09-19T12:00:00.000Z","memo_version":"0.1.0","event":"hit","tool":"read_file","key":"9296…","age_ms":4210}

Events: store · hit · miss · skip (not cacheable / fresh flag / error) · evict.

Development

pnpm install && pnpm --filter dsh-tool-memo test

MIT licensed. Part of the dsh-plugins monorepo.