Introduction¶
The design philosophy of DeepSeek Harness (DSH) emphasizes extending functionality through plugins. In long-running agent sessions, the built-in grep and glob tools have performance bottlenecks: each invocation spawns a new process and scans from scratch, resulting in inefficient repeated searches. dsh-frecency is a plugin that overrides these built-in tools and accelerates file search using a resident index and frecency ranking.
Plugin Overview¶
dsh-frecency is a DeepSeek Harness plugin that provides resident indexing and frecency-based file search. It is maintained by ZK-Andy and licensed under the MIT License. Its core role is to take over grep and glob while keeping their tool names and schemas unchanged, thereby improving file search response speed.
Core Capabilities¶
The plugin provides the following features:
- Same-name tool override:
grepandglobretain their original names and schemas. The model can use them directly without modifying prompts. - Resident index (grep): Uses an in-memory index for content search, avoiding launching an
rgprocess on every invocation and improving performance. - Frecency ranking: File lists are sorted by access frequency and modification time, so recently and frequently opened or modified files appear first.
- Semantically equivalent built-in glob: The
globtool executes the samerg --filescommand as the built-in tool (including hidden files and ignored files, excluding VCS metadata). Ifrgis unavailable, it falls back to the resident index. - Annotated grep output: Search results include
isDefinition(lines classified as definitions by the engine) andgitStatus(file status) information. - Git-aware indexing: The engine tracks the working-tree status of each file and reflects it in the results as
gitStatus. - Graceful degradation: If the native engine cannot be loaded, the plugin exits, and the built-in
rgtools continue to work normally.
Installation and Enablement¶
Install the plugin using the following command:
dsh plugin --profile <profile> add dsh-frecency
After installation, restart DSH and start a session. At that point, grep and glob retain their names and schemas, and the model can switch to them without any prompt adjustments. To restore the built-in tools, set enabled: false or remove the plugin.
Dependencies and Compatibility¶
- Node.js version: Node.js >= 22 is required.
- DSH version: Built and tested with DSH 0.1.2-alpha.3 through 0.2.1-alpha.1.
- Dependencies: The plugin depends on the host packages in the current runtime installation, including
@deepseek-ai/dsh-tools,@deepseek-ai/dsh-tool-fs-search,@deepseek-ai/dsh-output-retention, and@deepseek-ai/schemastery.
Notes¶
- The plugin registers into each agent’s respective layer during the creation phase of each agent, which differs from the main-plane registration mechanism.
- As a community plugin, it is listed in the SkillHub directory and has no official affiliation with DeepSeek or High-Flyer.