Session-memory autopilot: watches DSH sessions and extracts OKF entries in-process through the harness LLM (ctx.llm, deepseek-official by default) at idle, commit, compaction and end checkpoints, storing them via the vault MCP server.
Install
# from npm (prebuilt)
dsh plugin --profile web add @luisarg/memory-auto
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Luisarg03/dsh-memory-vault#path:/packages/memory-auto
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Cordis bundle that auto-captures session memory for DeepSeek Harness (DSH): it watches sessions and digests transcripts into an OKF vault at checkpoints — idle, git commit, compaction, and session end.
The digest runs in-process: extraction uses the harness's own LLM service
(ctx.llm.stream, provider/model configurable, deepseek-official by
default), and the resulting OKF entries are written through the vault's MCP
server (store_* tools over stdio), keeping the Markdown source of truth and
the SQLite FTS5 index in sync. No external CLI and no stored credentials — the
plugin uses the same key DSH is configured with.
Install
dsh plugin --profile web add @luisarg/memory-auto
Requires the vault server directory (memory-vault-server in this repository) and either uv
on PATH or Python ≥3.11: the bundled launcher.mjs runs the server with uv run and falls back
to a pip-managed venv (python3 -m venv + pip install -r requirements.txt) when uv is missing.
Skills
The package ships one skill, registered as a bundled provider (rank 600, the weakest in DSH's local discovery table — a same-named skill in a user or project root still wins):
| Command | Source | What it does |
|---|---|---|
/checkpoint-auto |
skills/checkpoint-auto/SKILL.md |
Explains and steers the automatic capture: the git-commit, compaction, idle and session-end triggers, what an injected [memory-checkpoint] prompt means, and the provider / model / maxTokens / minTranscriptChars / enabled knobs |
It deliberately does not restate the entry vocabulary: that lives in packages/memory-mcp's
checkpoint skill and in src/pure.ts, which builds the injected prompt so it keeps working with
no skill loaded. Registration happens before the enabled gate — the skill is how a session
learns that capture is off and how to turn it back on.
Configuration
| Field | Purpose | Default |
|---|---|---|
memoryPath |
vault directory | $DSH_MEMORY_PATH or ~/.memories |
serverDir |
directory containing the vault server.py |
$DSH_MEMORY_SERVER_DIR or $DSH_HOME/memory-vault-server |
provider |
LLM provider route (harness registry) | deepseek-official |
model |
LLM model id | deepseek-v4-flash |
maxTokens |
extraction output cap | 2048 |
minTranscriptChars |
minimum transcript size to digest | 200 |
enabled |
master switch | true |
Environment variables used at load time: DSH_MEMORY_PATH,
DSH_MEMORY_SERVER_DIR.
Behavior
session/created— registers the session and resolves the project name (openspec/present → directory basename; elsepackage.jsonname; elsepyproject.toml[project].name; else first#heading ofREADME.md; else directory basename).session/disposed— digests the transcript, skipping sessions with no activity. A dispose-timectx.effectbatch-digests any session still pending, using the tracked activity summary as a stand-in transcript.agent/statuswith statusidle— runs the auto-capture gate (idleCheckpoint): skips sessions without activity or already delivered, and on the first idle of a session also digests the tracked activity summary.session/event— tracks activity and queues checkpoints:tool/call(also accepted astool_call) whoseargs.commandmatchesgit commitqueues a commit checkpoint.compaction/startqueues a pre-compaction checkpoint (fires whenever there is activity, even if one was already delivered).user/messageandassistant/messageare recorded as tracked activity.
agent/pre-step— delivers the queued checkpoint by pushing it ontopayload.context(orpayload.messages), and the agent writes entries with thestore_*MCP tools.
Extraction failures are retried with bounded backoff and logged; a failed digest never takes the agent down.
Development
pnpm install
pnpm build
pnpm test
The bundle manifest (dsh.bundle) makes this package installable through the
standard dsh plugin add flow; the patch layer lives in cordis.patch.yml.
Links
More in this category
vectorize-io/hindsight#coding-agents★ 64571
Hindsight, agent memory that learns: long-term project memory with auto recall and retain, knowledge pages, deep reflection, and per-repo memory banks.
volcengine/OpenViking#examples/dsh-memory-plugin★ 43161
OpenViking memory and context bundle for DeepSeek Harness: pre-step auto-recall and profile injection, session capture, `viking://` URI guarding, and recall/write memory tools backed by an OpenViking server.
MemTensor/MemOS#memos-local-plugin★ 12564
Local-first memory plugin for DeepSeek Harness: layered L1/L2/L3 memory with automatic capture, manual memos_* retrieval tools, and a built-in memory viewer.
agentscope-ai/ReMe#dsh★ 3886
Connects DeepSeek Harness to ReMe's local-first, self-evolving personal knowledge base: automatically captures completed main-agent conversations as user-owned Markdown memory, searches conversations and source material through reme_search with BM25, optional embeddings, and wikilink expansion, and schedules daily memory consolidation.
zilliztech/memsearch#MemSearch★ 2983
Shared Markdown memory for DSH and other coding agents, with automatic capture, pre-step context injection, searchable recall, and memory-to-skill self-evolution through a review panel.
vshulcz/deja-vu#extensions/dsh★ 1725
Cross-session memory and context recovery across forty-five other coding agents (45+) on this machine, reading session files they already wrote before install (Claude Code, Codex, Cursor, Windsurf, Trae, Antigravity, VS Code Copilot Chat, opencode, OpenClaw, Hermes, Kimi, Qoder, Cline, Zed, Magpie and more): six tools (deja_recall, deja_session, deja_blame, deja_fix, deja_how, deja_remember), a /deja command, and optional automatic recall injected into runtime context. Local BM25 CLI/MCP index, no LLM, no embeddings, no network (dsh plugin --profile web add dsh-deja).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.