Zero-config per-Session freshness for codebase-memory: on Session start and on every working-directory change it refreshes the index of the Session's own repository, so each project in each Session answers from its current graph while indexing stays in the shared daemon.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-cbm-autorefresh
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:xingbei437/dsh-cbm-autorefresh
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
A DeepSeek Harness plugin that keeps codebase-memory indexes fresh per Session.
Harness opens one MCP connection for the whole app, so codebase-memory never learns which
workspace a Session is actually working in — every project reports
watch.reason: not_session_project and nothing auto-refreshes. This plugin closes that gap:
- on
session/created, it refreshes the index of that Session's own working directory; - on
working-directory/change, it refreshes the new directory instead; - when the plugin itself (re)loads, it catches up on the Sessions that already exist.
Each refresh is one or more short-lived CLI calls (1–3 s when nothing changed). All heavy indexing happens inside codebase-memory's shared daemon, so the plugin never keeps a background process alive: N Sessions do not mean N resident processes.
Install
# in your DSH profile directory, e.g. ~/.dsh/profiles/desktop
pnpm add dsh-cbm-autorefresh
Then add the bundle to the profile manifest and reload:
// package.json
{
"dsh": {
"profile": {
"bundles": ["@deepseek-ai/dsh-base", "dsh-cbm-autorefresh"]
}
}
}
The package ships its own cordis.patch.yml, so it mounts itself; override or disable it from
your profile patch:
- id: cbm-autorefresh
disabled: true
Configuration
- id: cbm-autorefresh
name: dsh-cbm-autorefresh
config:
enabled: true # false turns every trigger off
binary: /path/to/codebase-memory-mcp # default: $CBM_BIN, then ~/.local/bin/codebase-memory-mcp
minIntervalMs: 300000 # per-directory throttle (default 5 minutes)
timeoutMs: 600000 # per CLI call timeout (default 10 minutes)
logFile: /tmp/cbm-autorefresh.log # optional: also append every refresh line to a file
Behaviour and limits
| Situation | Result |
|---|---|
| Session starts in an indexed repo | index refreshed (≈1–3 s when unchanged) |
| Session switches to another indexed repo | that repo's index refreshed |
| Repo not indexed yet | skipped and logged — first indexing stays a deliberate act |
| Not a git working directory | skipped and logged |
Same directory within minIntervalMs |
skipped (throttled) |
| Same repo already refreshing | skipped (single-flight) |
Known limits:
- the plugin does not create indexes, it only refreshes existing ones;
- a Session that edits a lot without starting a new turn or changing directory stays refreshed at session start only — raise the triggers yourself if you need more;
- requires
codebase-memory-mcpon the machine (thebinaryconfig or$CBM_BIN).
How it works
session/created ─┐
├─► session working directory ─► git rev-parse --show-toplevel
working-directory/change ─┘ │
├─► codebase-memory-mcp cli list_projects --format json
│ (find the project whose root_path matches)
└─► codebase-memory-mcp cli index_repository --repo-path <root>
Testing
npm test
License
MIT
Links
More in this category
DayuanJiang/next-ai-draw-io#dsh-plugin★ 36802
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
Tencent/WeKnora#dsh-weknora★ 36302
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 7042
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 5074
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
sixtysevenlf/dsh-blender-plugin★ 1575
Lets a DSH agent drive a local Blender over a direct TCP channel with 15 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 228 ops across 34 families.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1155
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.