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

cortexdb-dsh-memory

v2.125.0

Published

CortexDB memory for DeepSeek Harness: recall before each prompt, session capture, and memory tools over the CortexDB gRPC sidecar

Readme

CortexDB Memory for DeepSeek Harness

A native DeepSeek Harness (dsh) plugin backed by the CortexDB gRPC sidecar:

  • Recall. Before each prompt a person types, CortexDB is asked about it and the matching memories and knowledge are attached for the model — the same question, snippets and wording as the Claude Code and Codex recall hook.
  • Capture. When a session has been quiet for captureIdleMinutes, or ends, its durable facts are distilled into memories (auto:dsh-<session>:<slug>), and older memories they make untrue are marked superseded.
  • Tools. cortexdb_memory_search, cortexdb_memory_store and cortexdb_memory_forget for the model to use on purpose.

Recall reads the whole brain unless scope, namespace or userId narrow it, so dsh sees what Claude Code, Codex and other agents saved there, and they see what dsh saved.

Install

dsh plugin --profile web add cortexdb-dsh-memory

Any profile works (web, tui, headless, your own). Installing selects the plugin's bundle; restart the profile, or let HMR pick it up.

The plugin has no runtime dependencies: it speaks gRPC over node:http2, so pnpm has no build script to approve.

The brain

By default the plugin connects to 127.0.0.1:47821. If nothing answers there, it downloads the cortexdb-grpc release matching this package's version, checks its SHA-256, and starts it against ~/.cortexdb/cortexdb.db; it stops it again when the profile shuts down.

For a shared brain, or a sidecar you run yourself, set endpoint (or CORTEXDB_REMOTE). The plugin never starts a local sidecar in place of a shared one that is down.

Configure it from the profile's cordis.patch.yml (~/.dsh/profiles/<profile>/cordis.patch.yml):

- id: cortexdb-memory
  config:
    endpoint: 192.168.1.10:47821
    token: ...              # or CORTEXDB_GRPC_TOKEN

Capture

Distilling a session needs a model; without one, capture stays off and says so once in the log. Either export the variables cortexdb-mcp reads:

export CORTEXDB_LLM_BASE_URL=https://api.example.com/v1   # OpenAI-compatible, or an Ollama host
export CORTEXDB_LLM_MODEL=...
export CORTEXDB_LLM_API_KEY=...

or name them in the config:

- id: cortexdb-memory
  config:
    captureLlmBaseUrl: https://api.deepseek.com/v1
    captureLlmModel: deepseek-v4-flash
    captureLlmApiKeyEnv: DEEPSEEK_API_KEY

A session is captured once it has three turns a person typed, again only when it has more, and one capture at a time. The capture runs cortexdb-mcp --capture-session (downloaded and verified like the sidecar, or mcpBinaryPath) as a detached process, so it finishes after a one-shot dsh headless run has exited. Its log is ~/.cortexdb/dsh/capture/capture.log.

Sessions from before the plugin was installed can be imported with the import_agent_memory tool (sources: ["dsh_sessions"]) or cortexdb-mcp --import-agent-memory --sessions; both read dsh's own logs under $DSH_HOME (default ~/.dsh).

Configuration

| Field | Default | Meaning | | --- | --- | --- | | endpoint | CORTEXDB_REMOTE, else 127.0.0.1:47821 | Sidecar, host:port, or an https:// URL. | | token | CORTEXDB_GRPC_TOKEN | Bearer token, if the sidecar requires one. | | autoStart | true | Start a sidecar on the local default endpoint when none answers. | | dbPath | CORTEXDB_PATH, else ~/.cortexdb/cortexdb.db | Database a started sidecar opens. | | binaryPath / mcpBinaryPath | release download | cortexdb-grpc / cortexdb-mcp to use instead. | | dataDir | ~/.cortexdb/dsh | Downloaded binaries and capture exports. | | userId, scope, namespace | empty | Narrow recall; scope/namespace also apply to stored memories (default scope global). | | autoRecall | true | Recall before each typed prompt. | | recallTopK | 3 | Memories and knowledge hits per automatic recall. | | recallTimeoutMs | 4000 | A slower automatic recall is skipped, never waited on. | | callTimeoutMs | 30000 | Timeout for the memory tools. | | autoCapture | true | Distil sessions into memories (needs a model). | | captureIdleMinutes | 10 | Capture this long after a session's last turn; 0 captures only at the end. | | captureLlmBaseUrl, captureLlmModel, captureLlmApiKeyEnv | empty | The capture's model, instead of CORTEXDB_LLM_*. |

Do not also add CortexDB's MCP server to the same profile unless duplicate tools are intended.