@fishdivinity/dsh-local-search

中文文档
0.4.3发布于 2026/11/06MITES Module零依赖构建来源已验证近 30 天下载 2244

Local file search and document full-text search for DeepSeek Harness on Windows - file names through Everything (es.exe), text inside PDF/DOCX/XLSX/PPTX/EPUB through Anytxt, as five read-only tools. 本机文件搜索与文档全文检索:文件名走 Everything,PDF/DOCX/XLSX/PPTX/EPUB 正文

原始使用文档
文档目录17 节
  1. Why this exists
  2. When to use it
  3. Contents
  4. Tools
  5. Requirements
  6. Install
  7. Configuration
  8. Scopes
  9. Engine selection
  10. Errors and diagnostics
  11. Security and limits
  12. Known limitations
  13. How this compares
  14. For AI agents
  15. Development
  16. Changelog
  17. License
Local Search icon

Local Search for DeepSeek Harness

File names and document text from the whole machine, behind five read-only tools — so the model searches your disk instead of guessing a path.

npm version awesome · DSH plugin platform dsh CI

English · 简体中文 · Install · Configuration · Tools · Security

Why this exists

A session sees one folder. grep and glob are fast inside it and blind outside it, so when the work needs a file that lives anywhere else, the model either guesses a path or stops and asks you for one — and the lookup goes back to you, in another window, with the conversation waiting.

Searching is not the expensive part. Picking the right hit, opening the document, reading the part that matters, putting two of them side by side, and being able to say where the answer came from — that is. It is also exactly what a model is good at, once it can reach an index.

This plugin gives it both: es.exe for file and folder names wherever Everything has indexed them, Anytxt for the text inside PDF, DOCX, XLSX, PPTX, EPUB, RTF, TXT and MD files. The whole surface is read-only — nothing writes, deletes, re-indexes, OCRs or starts an engine. A lookup is answered from the index those engines already built: milliseconds, not a rescan of the drive.

When to use it

  • The search is a step, not the goal. You asked for something else — a summary, a comparison, a fix — and the answer needs a document you cannot point at. Handing that lookup back to yourself costs a window switch and a paste.
  • You know the answer, not the keyword. "The price clause we agreed with that supplier", "the note about this error". The model can try five phrasings in two languages, read the hits, and come back with the quote and the path.
  • The answer spans files. "Compare the payment terms in these two contracts", "what did the last three meeting notes decide about the schedule". A search field returns a hit list; the reading and comparing is the part you wanted delegated.
  • The work is batch. "List the counterparty in each of these 30 contracts" — no search field does this. Search once, read every hit, write the table.
  • The file is not text. grep cannot open a PDF, a .docx, or a spreadsheet. Either the text comes through Anytxt, or you paste it in by hand.
  • The answer has to cite a source. A path plus a snippet can be checked; a plausible paragraph cannot.

Contents

Tools

ToolEngineUse for
local_search_filesEverything via es.exeFile/folder names, paths, cross-drive discovery
local_search_contentAnytxt JSON-RPCText inside PDF, DOCX, XLSX, PPTX, EPUB, RTF, TXT, MD
local_search_fragmentsAnytxtSnippets around a match in one indexed file
local_search_readAnytxtExtracted plain text of one indexed file, capped
local_search_statusbothCheck whether each engine is reachable

Requirements

  • Windows.
  • DeepSeek Harness >=0.2.1-0 <0.3.0-0 — 0.2.1 and 0.2.2 (pre-releases included) run it; 0.3 pre-releases are refused.
  • Everything running, plus es.exe (a separate download from voidtools; the plugin auto-detects PATH/common install folders, or set files.everything.esPath).
  • Anytxt Searcher for content search: the GUI (ATGUI.exe) must be running because the JSON-RPC service lives inside it. The indexing service alone is not enough.

This plugin does not bundle Everything, es.exe, or Anytxt. Install and license them separately.

Install

The command writes into one profile, and it has to be the profile the session boots from — the Desktop app owns desktop, dsh web owns web:

dsh plugin --profile desktop add @fishdivinity/dsh-local-search   # Desktop app
dsh plugin --profile web add @fishdivinity/dsh-local-search       # dsh web

web is a shipped template that initializes on first use; desktop must have been opened once, and only the dsh bundled with the Desktop app can manage it. To install the source instead of the npm tarball, swap the spec for github:fishdivinity/dsh-local-search.

Restart the profile or open a new session. The five local_search_* tools appear in the model toolset.

Configuration

Sidebar Plugins → the Local Search card in the Official plugins group → the plugin's own page. That is the same card shape the GitHub plugin contributes. Saves apply to the next tool call; leaving the page drops unsaved edits. Reset, under the description, first shows what it will clear and only writes once you confirm: the engine and limit settings go, a fresh probe refills them, and the search scopes plus the startup-check switch are left alone.

The page is organised by capability: File names and File contents each open with a backend picker and show that backend's fields once it is selected; Search scopes, Limits and Startup are the same whichever backend runs, so they close the page. The Host's GET /dsh-local-search/api/describe supplies the sections, the registered backends, the field types and the hard caps, and the page only renders them, so a new backend does not change the page logic.

Test connection sits under the Anytxt endpoint field. It probes the endpoint as typed — nothing has to be saved first — together with Everything, and puts the result and its fix in a dialog that can probe again. The es.exe path in the field is checked too, so a typo there says the file is missing instead of reporting the saved binary as OK. A failing engine gets a link to its official download page; this plugin never bundles, downloads, or installs either product.

A save checks before it writes. When the endpoint or the es.exe path is part of the edit, the page probes them first: whatever the check refuses is not written, and a dialog asks whether to Save anyway — a deliberate exception rather than the default. A hard rejection (no file at that path, no such directory, a rejected address) gets no such way out. The Host only checks that the path exists; it never starts a file named by a request. Path fields and the endpoint are also checked when focus leaves them: a missing path, a directory where a file belongs, or a non-local address is flagged under the input and clears as soon as the value changes.

Path fields are rewritten to one standard spelling on save: d:/alpha is stored as D:\alpha (upper-case drive letter, backslashes, no trailing separator), and allRoots is rewritten entry by entry. When the path exists, the on-disk spelling wins (d:/alpha → D:\Alpha). This rewriting only happens on Windows: the page asks the Host for its platform and leaves POSIX-style values alone. Spaces and non-ASCII names are left alone — D:\Alpha\我的项目\drawio a is fine as typed, because the Host passes values to es.exe and the file APIs without going through a shell. A path may also start with ~/; it is expanded where it is used, and a save writes back the resolved absolute path.

Copied diagnostics. The card has a Copy diagnostics button under its description: it opens a dialog with a plain-text snapshot of this machine — plugin and DSH versions, profile, shell, whether the page runs against a Host on another machine, OS and node, each engine's state with the code that explains it and, when it failed, the address it tried plus the transport error, the configured es.exe path, endpoint, encoding, timeout, limits and backends, the search roots with the default scope, the startup-write outcome (including an error), and the probe time. The text carries a heading, a one-line legend for its status tags, and a link to the code table, so a person or another assistant can act on it without the source. Paste it into the chat so the assistant can work through it first; open an issue only if that does not solve it. The home directory and DSH_HOME are already reduced to ~. The same text is at GET /dsh-local-search/api/diagnose.

Startup check. checkEnginesOnStart is on by default: every start probes both engines once and, if one fails, leaves a card in the bottom-right corner with one line per engine and what to fix. The card re-checks the running engines every 20 seconds and removes itself once both answer — an engine that starts after deepseek harness (Anytxt's GUI commonly does) does not leave a false alarm behind. Closing it hides it for this tab, including after a reload; the switch is how you stop both the probe and the card. Test connection and the first-run pass work either way.

The first run fills what it can and then stops: while files.everything.esPath or content.anytxt.url is still unset, the plugin probes once, writes what answered, and records that pass in a hidden autoConfigured key. After that a field you clear stays clear instead of being filled again.

Every key is optional, and the row config replaces the whole config object rather than merging. Only timeoutMs stays in the profile's cordis.patch.yml: each tool fixes its deadline when it registers, so the page leaves it out rather than showing a field that would not take effect.

KeyDefaultMeaning
files.backendeverythingFilename backend auto uses.
files.everything.esPathauto-detectAbsolute path to es.exe. Resolution order: the configured value, ES_PATH, common install folders, where.exe.
files.everything.esEncodinggbkCode page used to decode es.exe output. Any TextDecoder label is accepted; the page offers gbk and utf-8.
content.backendanytxtContent backend auto uses.
content.anytxt.urlhttp://127.0.0.1:9920Anytxt JSON-RPC endpoint on this machine (127.0.0.1, localhost or [::1] only). The default also tries :9921.
scopes.workspaceRootsession default directoryDirectory for scope=workspace.
scopes.workRootemptyDirectory for scope=work; required before using that scope.
scopes.personalRootemptyPersonal directory for scope=personal; required before using that scope.
scopes.allRootsempty (automatic)Semicolon-separated roots for Anytxt scope=all; empty uses the platform default roots (drive roots on Windows, mounted volumes on macOS, /home on Linux). Everything scope=all searches all volumes it indexes.
scopes.defaultScopeallScope used when a tool call omits scope: all / workspace / work / personal.
limits.maxResults20Results per call when the tool omits limit; hard cap 100, not configurable.
limits.readMaxChars8000Default local_search_read window; hard cap 20,000 characters.
checkEnginesOnStarttrueProbe both engines once per start and show the failure card.
timeoutMs30000Per-call timeout budget; profile YAML only.

Example row override:

- id: fishdivinity-local-search
  name: '@fishdivinity/dsh-local-search'
  config:
    scopes:
      workRoot: '~/Projects'
      personalRoot: '~/Documents'
    limits:
      maxResults: 50

A 0.1 or 0.2 profile needs no hand edit: on startup its nine flat keys (esPath, esEncoding, anytxtUrl, workspaceRoot, workRoot, personalRoot, allRoots, maxResults, readMaxChars) move into the structure above and are removed. When the settings layer refuses that write — a home patch overrides the profile — the old keys stay and are still read.

Scopes

  • all (default): the whole computer; scopes.allRoots for Anytxt (the platform default roots when empty — drive roots on Windows, mounted volumes on macOS, /home on Linux), all indexed volumes for Everything.
  • workspace: the session's working directory.
  • work: scopes.workRoot (work directory).
  • personal: scopes.personalRoot (personal directory).

scopes.defaultScope sets which one is used when a tool call omits scope; it defaults to all. Pass scope or path only when the user explicitly limits the search.

Engine selection

engine defaults to auto, which follows the backend configured for that capability: files.backend for local_search_files, content.backend for local_search_content, fragments, and read.

  • local_search_files: auto or everything.
  • local_search_content / fragments / read: auto or anytxt.
  • local_search_status: auto, everything, or anytxt.

The tool names stay stable if more engines are added; engine values are additive. Content items carry both engine and a self-describing ref such as anytxt:123; pass the ref unchanged to local_search_fragments/local_search_read, and pass engine only as an assertion.

Errors and diagnostics

Every failure is a typed HarnessError with a stable code. The code table — what raises each one, what you see, and what to do — lives in docs/troubleshooting.md; it is the only place that explains codes.

A tool call returns the code and a one-line message and nothing else, deliberately: a model that starts installing engines or editing configuration turns one failed search into an environment repair, while the useful move is to fall back to grep/glob and say it did.

If a search reports *_DOWN, fall back to grep/glob and say that you fell back. The human picture of this machine — versions, profile, shell, platform, engine states, roots, probe time — is Copy diagnostics on the plugin card or GET /dsh-local-search/api/diagnose.

Security and limits

  • Read-only: no write, delete, index-sync, OCR, export, or settings operation is registered.
  • es.exe is always spawned with a fixed argv; model text goes after --, so -export-*, -save-settings, -clear-settings, -exit, -reindex, -save-db, and run-count switches are unreachable.
  • Anytxt is only called through Search, GetResult, GetFragmentAll, and GetRawTextByFID.
  • No network access except the configured local Anytxt URL.
  • Results are capped; local_search_read caps the returned text.
  • The plugin runs with the user's privileges and can read files the user can read. Search tools default to all (every available root); prefer scope=workspace/work/personal or path when the search should stay in one tree.

Known limitations

  • The engines are Windows-only today. The scope/path layer is already platform-aware (Windows drive roots, macOS /Users + /Volumes, Linux /home), so labels and roots do not assume drive letters; native backends for macOS/Linux are something we may add later. On those systems the tools still answer but report both engines as unavailable (missing-tool / down), and the card plus diagnostics name the platform.
  • The default scope is all: content search queries every default root (up to two RPCs per root). If the configured allRoots are all missing (a drive unplugged), the call falls back to the workspace and the result says so; a partially missing root is skipped and named in the result.
  • Everything 1.4 indexes metadata, not file contents; use Anytxt for contents.
  • Anytxt's JSON-RPC API is local and unofficial; GUI versions can change behavior. The plugin reports unreachable/wrong-shape responses instead of guessing.
  • Anytxt's index may be stale. Verify important hits with read/the original file.
  • No auto-start: starting ATGUI.exe writes the index and is left to the user.
  • Anytxt's terms limit personal/non-commercial use; commercial use needs its own license.

How this compares

local_search_files + local_search_contentdsh-tool-everythingdsh-workspace-search
What it reachesAny path Everything indexed, plus the text inside documentsAny path Everything indexedFiles and text inside one workspace
Document text (PDF/DOCX/XLSX/PPTX/EPUB)Yes, through AnytxtNoPlain text only
PrerequisitesEverything + Anytxt runningEverything running (ships its own SDK DLL)dsh-better-sidebar

The differentiator is the pair: Anytxt document content, and one routing surface that answers both "where is this file" and "what does this document say".

For AI agents

A session that can only see one folder and is asked about anything else should search instead of guessing. Map the question to a tool:

QuestionToolWhat comes back
Where is this file?local_search_filesPaths and names, anywhere Everything indexed
What does this document say?local_search_contentMatching lines from the text Anytxt extracted, with a ref per hit
Which part of it?local_search_fragmentsSnippets around one match — pass that hit's ref unchanged
Give me the textlocal_search_readExtracted plain text of one file, capped
Is the engine even there?local_search_statusPer-engine reachability, before you report "no results"
  • scope defaults to scopes.defaultScope (all out of the box); workspace, work and personal are explicit narrowings, and path overrides scope.
  • Pass a content hit's ref back unchanged (anytxt:123); engine is an assertion to check against, not a selector.
  • EVERYTHING_DOWN / ANYTXT_DOWN mean the engine is not running — fall back to grep/glob and say you fell back. A down engine is not "no such file".
  • local_search_status says whether an engine works, not how to fix it. The fix belongs to the user, in the plugin card; installing or starting an engine is not your call.
  • Results are capped (limits.maxResults is the default per call, hard 100; local_search_read 20,000 characters). Narrow the query instead of paging.
  • Every failure carries a stable code from docs/troubleshooting.md; quote the code, not the prose.
  • Windows only, and the engines are installed separately: file-name results cover what Everything indexed, content results cover what Anytxt indexed.

A shorter machine-readable copy of this section is in llms.txt. Terms this package answers to: local search, Everything, es.exe, Anytxt, full-text search, PDF / Word / Excel / PowerPoint / EPUB text, cross-drive search, file names outside the workspace.

Development

No dependencies; tests use Node's built-in test runner.

npm test
npm run check
npm run pack:check

The engine and config modules (lib/everything.js, lib/anytxt.js, lib/roots.js, lib/platform.js, lib/format.js, lib/config.js) are independent of the DSH runtime so their tests run under plain Node. lib/client.js ships as the browser half: it is written directly in the client module system's lazy-CJS factory format, so there is no build step. See docs/architecture.md, docs/extending-engines.md, docs/config-migration.md for the rules a config-shape change has to follow, and .github/RELEASING.md.

Adding a language is two files: lib/locales/<lang>.json holding exactly the baseline's key set (values only, .-separated keys, {name} placeholders kept), and locale/<lang>.json for the plugin list's title and description. A pack is registered only for a language the shell already ships — the card never adds one to the picker — and test/client.test.js fails when a pack's keys or placeholders drift from the baseline. zh and en stay in the bundle: apply cannot wait on a request, and the first frame must not flash another language.

This release ships initial de, es, fr, ja, pt (Brazilian Portuguese) and ru packs — the six ids DSH 0.2.2 introduces. They were proofread against the English baseline; native review is still welcome and replaces a whole file at a time. Ids must match the shell's list exactly (pt, not pt-BR), otherwise the pack is ignored and the card falls back to English.

Changelog

See CHANGELOG.md (Chinese) or CHANGELOG.en.md (English). They stay in the repository; the npm tarball ships only the runtime files, README, LICENSE, locale, and icon.

License

MIT. Everything and Anytxt are separate products with their own licenses and trademarks; this project is not affiliated with voidtools or CBEWIN.

版本与发布记录

@fishdivinity/dsh-local-search 共发布 10 个版本,首次发布于 2026/10/28;过去 12 个月发布了 10 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.3latest2026/11/069 天前
0.4.22026/11/0510 天前
0.4.12026/11/0411 天前
0.4.02026/11/0312 天前
0.3.12026/10/3115 天前
0.3.02026/10/3115 天前

关于 @fishdivinity/dsh-local-search 的常见问题

@fishdivinity/dsh-local-search 是什么?

Local file search and document full-text search for DeepSeek Harness on Windows - file names through Everything (es.exe), text inside PDF/DOCX/XLSX/PPTX/EPUB through Anytxt, as five read-only tools. 本机文件搜索与文档全文检索:文件名走 Everything,PDF/DOCX/XLSX/PPTX/EPUB 正文

如何安装 @fishdivinity/dsh-local-search?

在项目目录运行 npm install @fishdivinity/dsh-local-search,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@deepseek-ai/cordis(^4.0.5)、@deepseek-ai/dsh-llm(>=0.2.1-0 <0.3.0-0)、@deepseek-ai/dsh-tools(>=0.2.1-0 <0.3.0-0)、@deepseek-ai/dsh-timeout(>=0.2.1-0 <0.3.0-0)、@deepseek-ai/schemastery(^3.18.5)、@deepseek-ai/dsh-system-prompt(>=0.2.1-0 <0.3.0-0)、@deepseek-ai/dsh-working-directory(>=0.2.1-0 <0.3.0-0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@fishdivinity/dsh-local-search 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fishdivinity__dsh-local-search 是否存在。

@fishdivinity/dsh-local-search 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@fishdivinity/dsh-local-search 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@fishdivinity/dsh-local-search 可以商用吗?

@fishdivinity/dsh-local-search 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fishdivinity/dsh-local-search 的下载量有多少?

根据 npm 官方下载统计,@fishdivinity/dsh-local-search 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,244 次,日均约 75 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fishdivinity/dsh-local-search 还在维护吗?

最新版本 0.4.3 发布于 2026/11/06(9 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/10/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。