dsh-frecency
Manifest validResident-index grep for DeepSeek Harness that shadows the built-in grep/glob tools under the same names: repeated content searches hit an in-memory index ranked by access/modification frecency, and gl
dsh-frecency
English | 中文
A DeepSeek Harness plugin that takes over the built-in grep / glob file-search tools: grep runs on a resident index with frecency ranking, glob mirrors the built-in discovery semantics exactly when ripgrep is available (and degrades to the resident index otherwise).
The built-in tools spawn a fresh ripgrep process on every call and scan from scratch. In long sessions with many parallel subagents, the same searches run dozens of times. dsh-frecency keeps one resident index per working directory (the Rust fff engine via @ff-labs/fff-node), so repeated searches hit hot memory in milliseconds, ranked by access/modification frecency.
Install
dsh plugin --profile <profile> add dsh-frecency
Restart dsh and start a session — grep / glob keep their names and schemas; grep hits the resident index and glob serves the same results as the built-in tool, whatever agent preset you use. The built-in search tools are mounted per-session on the agent plane, which beats any host-plane registration, so the plugin registers into each agent's own layer at agent creation (first-party precedent: dsh-tool-subagent). Config enabled: false or removing the plugin falls back to the built-in ripgrep tools.
What you get
- Same tool names —
grep/globkeep their names and schemas; the model switches with zero prompt changes. - Resident index (grep) — repeated content searches reuse one in-memory index instead of spawning ripgrep per call; measured 2.5–2.7× faster on a 14k-file tree (baseline).
- Frecency ranking (grep) — frequently opened / recently modified files surface first.
- Built-in-parity glob — glob runs the same fixed
rg --filesinvocation as the built-in tool: hidden and ignored files included, VCS metadata excluded, modification-time order. If ripgrep is unavailable, it degrades to the resident index. - Annotated grep output — engine-classified
isDefinitionand per-filegitStatusride along in grep results, so the model can spot definition lines and modified files without re-reading. - Git-aware index — the engine tracks working-tree state per file and surfaces it as
gitStatusin results. - Graceful fallback — if the native engine can't load, the plugin steps aside and the built-in ripgrep tools keep working.
See docs/design.md for the full design rationale.
Development
pnpm install
pnpm check # typecheck + build + test
scripts/setup-hooks.sh # point git hooks at .githooks/ (pre-commit / pre-push)
Local e2e against a real harness: build, then boot the default headless profile with a --patch overlay pointing at ./dist/index.js.
Quality gates: python3 scripts/verify-adr-format.py && python3 scripts/verify-handoff-structure.py && python3 scripts/verify-doc-budgets.py --manifest scripts/doc-budgets.manifest.json && python3 scripts/verify-md-links.py.
License
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.1.1 | — | — |
| 0.1.2 | — | — |
Similar plugins
by JUANWANG-BUAA
Auditable, token-gated DeepSeek Harness remote gateway: mobile QR access, per-device sessions, Host/Origin rewrite, settings/credentials/directory support.
★ 40
MIT
TypeScript
Sep 12, 2026
dsh plugin --profile web add dsh-full-remoteby guyuefangyuanl
Cross-session persistent memory for the DeepSeek Harness: a model-facing memory tool, an always-on index section, and a bundled maintenance skill.
★ 3
MIT
JavaScript
Aug 21, 2026
dsh plugin --profile web add dsh-memoryby ZSeven-W
DeepSeek Harness (DSH) plugin: a read-only ledger for the plugins you already have installed — a capability inventory with file:line evidence, declared-vs-detected reconciliation, cross-profile versio
★ 24
↓ 44/wk
MIT
JavaScript
Sep 11, 2026
dsh plugin --profile web add @zseven-w/dsh-harborby zoyluoblue
dsh plugin: snapshot your workspace every turn and restore the files to any earlier point. A rewind/undo for DeepSeek Harness coding sessions — your own git repo is never touched.
★ 0
MIT
TypeScript
Aug 19, 2026
dsh plugin --profile web add @zoytown/dsh-rewindby tluoluo
Persistent memory for DeepSeek Harness: per-conversation notes, selective injection, project memory, semantic Vault search + automatic retrieval.
★ 3
↓ 123/wk
MIT
TypeScript
Aug 16, 2026
dsh plugin --profile web add dsh-persistby yan5236
Two-phase long-term memory plugin for DeepSeek Harness (DSH): per-session extraction + global consolidation, always-injected summary, and memory_list/read/search/add tools.
★ 4
MIT
TypeScript
Aug 25, 2026
dsh plugin --profile web add @nanmicoder/dsh-memory