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:

  1. Same-name tool override: grep and glob retain their original names and schemas. The model can use them directly without modifying prompts.
  2. Resident index (grep): Uses an in-memory index for content search, avoiding launching an rg process on every invocation and improving performance.
  3. Frecency ranking: File lists are sorted by access frequency and modification time, so recently and frequently opened or modified files appear first.
  4. Semantically equivalent built-in glob: The glob tool executes the same rg --files command as the built-in tool (including hidden files and ignored files, excluding VCS metadata). If rg is unavailable, it falls back to the resident index.
  5. Annotated grep output: Search results include isDefinition (lines classified as definitions by the engine) and gitStatus (file status) information.
  6. Git-aware indexing: The engine tracks the working-tree status of each file and reflects it in the results as gitStatus.
  7. Graceful degradation: If the native engine cannot be loaded, the plugin exits, and the built-in rg tools 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.