dsh-everything 0.0.0-stage → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,86 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+
6
+ ## [1.3.1] - 2026-10-27
7
+
8
+ ### Fixed
9
+ - Multi-word queries (`*.docx dm:thisweek`) silently returned 0 results: the
10
+ whole query string was handed to es.exe as ONE argument, which Everything
11
+ then matched literally. Queries are now tokenized on whitespace (outside
12
+ double quotes) and each term is passed as its own argument, restoring AND
13
+ semantics. Quoted phrases without spaces keep their phrase meaning; quoted
14
+ phrases containing spaces degrade to ANDed words (es.exe cannot express
15
+ them positionally — use `regex=true` for exact multi-word matching).
16
+ - Non-ASCII file names came back as mojibake (`?????`): es.exe pipes results
17
+ in the console/ANSI codepage, not UTF-8. Results are now read from es.exe's
18
+ UTF-8 `-export-json` file instead, so Chinese/Japanese/emoji names survive
19
+ the round trip on every codepage (with a decoded-stdout fallback for es.exe
20
+ builds without `-export-json`).
21
+
22
+ ## [1.3.0] - 2026-10-26
23
+
24
+ ### Added
25
+ - `countOnly`: return just the total match count in one round-trip — the
26
+ fastest way to check existence or estimate volume.
27
+ - `dateCreated`: include each result's creation date.
28
+ - ES CLI self-update: the plugin keeps its **self-installed** `es.exe`
29
+ current against the pinned known-good release (user-managed installs are
30
+ never touched).
31
+ - Tool description now documents search syntax quirks and the NTFS/reFS
32
+ coverage limit (FAT/exFAT and network shares are typically not indexed).
33
+
34
+ ### Fixed
35
+ - The background provisioning probe used the pre-resolution `esPath`
36
+ (possibly null) instead of the freshly resolved path, which could log a
37
+ spurious "auto-install failed" warning on auto-installed setups.
38
+ - Backend recovery (auto-install / auto-start retry) now also covers the
39
+ count-only path, not just the search path.
40
+
41
+ ## [1.2.0] - 2026-10-26
42
+
43
+ ### Changed
44
+ - Auto-install now resolves the **latest stable** version from the
45
+ voidtools.com downloads page instead of installing a pinned version; the
46
+ recorded known-good releases remain as SHA256-verified fallbacks when the
47
+ page is unreachable.
48
+ - Downloads try a **direct connection first**; a configured or system proxy
49
+ is only a fallback, so machines without proxy tools (or with a stale
50
+ proxy setting) install reliably.
51
+
52
+ ### Added
53
+ - Newer-than-pinned upstream releases are verified by their voidtools
54
+ Authenticode signature (with a raw .NET certificate-chain fallback when
55
+ `Get-AuthenticodeSignature`'s module fails to load).
56
+
57
+ ## [1.1.0] - 2026-10-26
58
+
59
+ ### Added
60
+ - `autoInstall` (default on): when the backend is missing, the plugin
61
+ downloads the pinned ES CLI (SHA256-verified) into
62
+ `%LOCALAPPDATA%\dsh-everything\bin` and installs Everything via winget or
63
+ the official silent setup, then starts it — fresh machines need no manual
64
+ setup.
65
+ - Proxy-aware downloads: `HTTPS_PROXY`/`HTTP_PROXY` or the Windows system
66
+ proxy, with fetch → curl.exe → PowerShell fallbacks.
67
+ - New `installDir` config key; new `ES_SETUP_FAILED` error code.
68
+
69
+ ## [1.0.0] - 2026-10-26
70
+
71
+ ### Added
72
+ - `everything_search` tool: whole-disk file/folder search through the local
73
+ Everything (voidtools) index via `es.exe -json`, with size and
74
+ date-modified columns.
75
+ - Everything search syntax pass-through: `path`, `regex`, `matchCase`,
76
+ `wholeWord`, `foldersOnly` / `filesOnly` filters, `sort` order, and
77
+ `offset` pagination.
78
+ - Exact total hit count via `-get-result-count`, fetched only when the page
79
+ is full (truncation possible).
80
+ - `autoStart` (default on): launches `Everything.exe -startup` and waits for
81
+ IPC when the index is not running.
82
+ - Built-in search-paths result card (`presentCall` / `presentResult`).
83
+ - Actionable, coded errors (`ES_NOT_FOUND`, `ES_NOT_RUNNING`, `ES_TIMEOUT`,
84
+ `ES_ABORTED`, `ES_UNSUPPORTED_PLATFORM`, …); non-Windows platforms get a
85
+ stub tool that fails with a clear platform message.
86
+ - English and Chinese plugin metadata and icon.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-everything contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,100 @@
1
- # Temporary Holding Version
1
+ # dsh-everything
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [中文文档](README.zh-CN.md)
4
+
5
+ A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) plugin that gives the agent an **`everything_search`** tool: whole-disk file and folder search in **milliseconds**, powered by the local [Everything](https://www.voidtools.com/) (voidtools) index through its official command line `es.exe`.
6
+
7
+ Instead of recursively scanning directories (glob) when the model needs to locate a file, the agent asks Everything's pre-built index — instant even on drives with millions of files.
8
+
9
+ ## Requirements
10
+
11
+ - **Windows** (Everything is a Windows-only application; on other platforms the plugin registers a stub that fails with a clear message)
12
+ - [Everything 1.4+](https://www.voidtools.com/downloads/) and the [ES command line tool](https://www.voidtools.com/downloads/) (`es.exe`) — **installed automatically on first use** (see below)
13
+
14
+ ### Automatic backend setup (default)
15
+
16
+ With `autoInstall: true` (the default), the plugin provisions the backend by itself when it is missing:
17
+
18
+ 1. Resolves the **latest stable** ES CLI from the voidtools.com downloads page, downloads the zip, and extracts `es.exe` to `%LOCALAPPDATA%\dsh-everything\bin` (per-user, no admin).
19
+ 2. Installs **Everything** via `winget install voidtools.Everything` when winget is available, otherwise downloads the latest stable official setup and runs it silently — either path may show **one UAC prompt**.
20
+ 3. Launches Everything and waits for its IPC before searching.
21
+
22
+ Downloads always go **direct first** — no proxy is needed, and a stale system-proxy setting can never break the install. A proxy (`HTTPS_PROXY`/`HTTP_PROXY` env, or the Windows system proxy) is only used as a fallback. Integrity: when the resolved version matches the known-good release recorded in [`setup.js`](setup.js), the download is SHA256-verified; a newer upstream release is verified by its **voidtools Authenticode signature** instead. If the downloads page is unreachable, the recorded known-good release (SHA256-verified) is used. Installs fail closed when verification fails.
23
+
24
+ The plugin also keeps its **self-installed** copy of `es.exe` current: on startup it compares the file version against the pinned known-good release and upgrades the copy it owns (user-managed installs are never touched).
25
+
26
+ Set `autoInstall: false` if you prefer to install the backend yourself:
27
+
28
+ ```powershell
29
+ winget install --id voidtools.Everything --silent
30
+ Invoke-WebRequest https://www.voidtools.com/ES-1.1.0.37.x64.zip -OutFile ES.zip
31
+ Expand-Archive ES.zip -DestinationPath "C:\Program Files\Everything" -Force
32
+ Start-Process "C:\Program Files\Everything\Everything.exe"
33
+ ```
34
+
35
+ ## Installation
36
+
37
+ In a DSH session, ask the agent or call the plugin manager:
38
+
39
+ ```
40
+ plugin_manager install_bundle with target = dsh-everything
41
+ ```
42
+
43
+ The plugin activates as `dsh-everything` and registers the `everything_search` tool for every agent in the profile.
44
+
45
+ Published on npm as [`dsh-everything`](https://www.npmjs.com/package/dsh-everything); installing from the package directory works too.
46
+
47
+ ## Tool: `everything_search`
48
+
49
+ | Parameter | Type | Description |
50
+ |---|---|---|
51
+ | `query` *(required)* | string | Everything search expression: `report ext:docx`, `*.sln dm:thisweek`, `path:\projects\ ext:py`. Space = AND, `\|` = OR, `!` = NOT. Multi-word queries are split into es.exe terms automatically. |
52
+ | `path` | string | Restrict to a directory and its subtree (absolute path). |
53
+ | `maxResults` | integer | Result cap (default 100, ceiling 1000). |
54
+ | `offset` | integer | Skip leading results (pagination). |
55
+ | `sort` | string | e.g. `date-modified-descending`, `size-descending`, `name-ascending`. Keys: `name`, `path`, `size`, `extension`, `date-created`, `date-modified`, `date-accessed`, `run-count`, plus `-ascending`/`-descending`. |
56
+ | `regex` | boolean | Treat `query` as a full-path regular expression. |
57
+ | `matchCase` | boolean | Case-sensitive matching (default: insensitive). |
58
+ | `wholeWord` | boolean | Match whole words only. |
59
+ | `foldersOnly` / `filesOnly` | boolean | Restrict result type. |
60
+ | `dateCreated` | boolean | Also return each result's creation date. |
61
+ | `countOnly` | boolean | Return only the total match count — the fastest way to check existence or estimate volume. |
62
+
63
+ Returns `{ query, total, truncated, results: [{ path, size, dateModified, dateCreated? }] }` and renders in the chat as a search-paths card.
64
+
65
+ Typical queries: `report ext:docx` · `*.sln dm:thisweek` · `size:>500mb` · `notes !archive` · recently changed files with `sort: date-modified-descending` + `dm:thisweek`.
66
+
67
+ > **Phrase quirks:** a quoted phrase only matches the *name* part, so `"report.docx"` matches nothing — pass it unquoted. Phrases containing spaces cannot be expressed through the es.exe CLI (they degrade to ANDed words); use `regex=true` for exact multi-word matching.
68
+ > **Encoding:** results are read from es.exe's UTF-8 `-export-json` output, so non-ASCII file names (Chinese, Japanese, emoji, …) survive the round trip intact.
69
+
70
+ > **Scope note:** searches names and paths only, never file contents — content search stays with `grep`.
71
+ > **Coverage note:** results follow the local Everything index — NTFS/reFS drives and folders explicitly added to the index. FAT/exFAT removable drives and network shares are typically not covered.
72
+
73
+ ## Configuration
74
+
75
+ Edit the plugin's `config` in `cordis.patch.yml` (or your profile's patch layer):
76
+
77
+ | Key | Default | Description |
78
+ |---|---|---|
79
+ | `esPath` | auto-detect | Absolute path to `es.exe`. |
80
+ | `everythingPath` | sibling of `esPath` | Absolute path to `Everything.exe`, used by autoStart. |
81
+ | `autoStart` | `true` | Launch Everything and wait for its IPC when it is not running. |
82
+ | `autoInstall` | `true` | Download & install Everything + ES CLI when missing (see above). |
83
+ | `installDir` | `%LOCALAPPDATA%\dsh-everything` | Where the auto-installed ES CLI lives. |
84
+ | `maxResults` | `100` | Default per-call result cap. |
85
+ | `timeoutMs` | `8000` | Per-spawn timeout (ms). |
86
+
87
+ ## Privacy
88
+
89
+ The search scope is **every indexed drive** on the machine, and result paths are sent to the model as tool output. Keep that in mind on machines with sensitive directory layouts; use `path` to scope searches.
90
+
91
+ ## Development
92
+
93
+ ```bash
94
+ node --test # unit tests (any platform)
95
+ node --test test/integration.test.mjs # needs a running Everything (Windows)
96
+ ```
97
+
98
+ ## License
99
+
100
+ [MIT](LICENSE)
@@ -0,0 +1,98 @@
1
+ # dsh-everything
2
+
3
+ [English](README.md)
4
+
5
+ 一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)插件,为模型注册 **`everything_search`** 工具:借助本机 [Everything](https://www.voidtools.com/)(voidtools)索引,通过官方命令行 `es.exe` 实现**毫秒级**全盘文件/文件夹搜索。
6
+
7
+ 当模型需要找文件时,不再递归遍历目录(glob),而是直接查询 Everything 预先建好的索引——即使磁盘上有数百万文件也是秒回。
8
+
9
+ ## 环境要求
10
+
11
+ - **Windows**(Everything 是 Windows 独占应用;其他平台上插件会注册一个明确报错的占位工具)
12
+ - [Everything 1.4+](https://www.voidtools.com/zh-cn/downloads/) 与 [ES 命令行工具](https://www.voidtools.com/zh-cn/downloads/)(`es.exe`)——**缺失时插件会自动安装**(见下文)
13
+
14
+ ### 自动安装后端(默认)
15
+
16
+ `autoInstall: true`(默认)时,插件在检测到后端缺失后会自行准备环境:
17
+
18
+ 1. 从 voidtools.com 下载页解析**最新稳定版** ES CLI,下载压缩包并把 `es.exe` 解压到 `%LOCALAPPDATA%\dsh-everything\bin`(用户目录,无需管理员)。
19
+ 2. 优先用 `winget install voidtools.Everything` 安装 **Everything**;没有 winget 时下载最新稳定版官方安装包静默运行——两种方式都可能弹**一次 UAC 授权框**。
20
+ 3. 启动 Everything 并等待其 IPC 就绪后才执行搜索。
21
+
22
+ 下载**始终直连优先**——无需任何代理工具,系统代理设置残留也不会影响安装;代理(`HTTPS_PROXY`/`HTTP_PROXY` 环境变量或 Windows 系统代理)只作为兜底。完整性校验:解析到的版本与 [`setup.js`](setup.js) 记录的已知良好版本一致时做 SHA256 校验;更新的上游版本改验 **voidtools 数字签名**;下载页不可达时回退到已知良好版本(SHA256 校验)。校验失败一律中止安装。
23
+
24
+ 插件还会保持**自装**的 `es.exe` 不过时:启动时会比对文件版本与插件内置的已知良好版本,落后才升级,且只升级自己装的副本(用户自装的 es.exe 永不动)。
25
+
26
+ 想完全自己装后端,可设 `autoInstall: false`:
27
+
28
+ ```powershell
29
+ winget install --id voidtools.Everything --silent
30
+ Invoke-WebRequest https://www.voidtools.com/ES-1.1.0.37.x64.zip -OutFile ES.zip
31
+ Expand-Archive ES.zip -DestinationPath "C:\Program Files\Everything" -Force
32
+ Start-Process "C:\Program Files\Everything\Everything.exe"
33
+ ```
34
+
35
+ ## 安装
36
+
37
+ 在 DSH 会话中让插件管理器安装 npm 包名:
38
+
39
+ ```
40
+ plugin_manager install_bundle,target = dsh-everything
41
+ ```
42
+
43
+ 插件以 `dsh-everything` 激活,并为该 profile 下的所有 Agent 注册 `everything_search` 工具。已发布到 npm([`dsh-everything`](https://www.npmjs.com/package/dsh-everything)),直接用本包目录安装也可以。
44
+
45
+ ## 工具:everything_search
46
+
47
+ | 参数 | 类型 | 说明 |
48
+ |---|---|---|
49
+ | `query` *(必填)* | string | Everything 搜索表达式:`report ext:docx`、`*.sln dm:thisweek`、`path:\projects\ ext:py`。空格 = 与,`\|` = 或,`!` = 非。多词查询会自动拆分为 es.exe 的独立搜索词。 |
50
+ | `path` | string | 限定在某目录及其子目录内(绝对路径)。 |
51
+ | `maxResults` | integer | 返回条数上限(默认 100,封顶 1000)。 |
52
+ | `offset` | integer | 跳过前 N 条(分页)。 |
53
+ | `sort` | string | 排序,如 `date-modified-descending`、`size-descending`、`name-ascending`。键:`name`、`path`、`size`、`extension`、`date-created`、`date-modified`、`date-accessed`、`run-count`,可加 `-ascending`/`-descending`。 |
54
+ | `regex` | boolean | 把 `query` 当作全路径正则表达式。 |
55
+ | `matchCase` | boolean | 区分大小写(默认不区分)。 |
56
+ | `wholeWord` | boolean | 整词匹配。 |
57
+ | `foldersOnly` / `filesOnly` | boolean | 只看文件夹 / 只看文件。 |
58
+ | `dateCreated` | boolean | 一并返回每个结果的创建时间。 |
59
+ | `countOnly` | boolean | 只返回匹配总数——判断存在性、估量级的最快方式。 |
60
+
61
+ 返回 `{ query, total, truncated, results: [{ path, size, dateModified, dateCreated? }] }`,在会话里以搜索路径卡片展示。
62
+
63
+ 典型查询:`report ext:docx` · `*.sln dm:thisweek` · `size:>500mb` · `notes !archive` · 最近改动文件用 `sort: date-modified-descending` + `dm:thisweek`。
64
+
65
+ > **短语怪癖**:带引号的短语只匹配文件名的“名字部分”,所以 `"report.docx"` 永远搜不到——直接写不带引号的 `report.docx`。含空格的短语无法经 es.exe CLI 表达(会退化为逐词 AND);需要精确多词匹配请用 `regex=true`。
66
+ > **编码**:结果改从 es.exe 的 UTF-8 `-export-json` 输出读取,非 ASCII 文件名(中文、日文、emoji 等)完整回传、不再乱码。
67
+
68
+ > **范围说明**:只搜文件名和路径,不搜文件内容——内容搜索请继续用 `grep`。
69
+ > **覆盖说明**:结果取决于本机 Everything 索引——NTFS/reFS 磁盘与显式加入索引的目录;FAT/exFAT 可移动盘与网络共享通常不在覆盖范围。
70
+
71
+ ## 配置
72
+
73
+ 在 `cordis.patch.yml`(或你 profile 的 patch 层)中修改插件 `config`:
74
+
75
+ | 键 | 默认值 | 说明 |
76
+ |---|---|---|
77
+ | `esPath` | 自动探测 | `es.exe` 的绝对路径。 |
78
+ | `everythingPath` | `esPath` 同目录 | `Everything.exe` 路径,供 autoStart 使用。 |
79
+ | `autoStart` | `true` | Everything 未运行时自动启动并等待其 IPC 就绪。 |
80
+ | `autoInstall` | `true` | 后端缺失时自动下载并安装 Everything + ES CLI(见上文)。 |
81
+ | `installDir` | `%LOCALAPPDATA%\dsh-everything` | 自动安装的 ES CLI 存放目录。 |
82
+ | `maxResults` | `100` | 单次返回条数默认上限。 |
83
+ | `timeoutMs` | `8000` | 单次 spawn 超时(毫秒)。 |
84
+
85
+ ## 隐私
86
+
87
+ 搜索范围是本机**所有已索引磁盘**,结果路径会作为工具输出发给模型。在目录结构敏感的机器上请注意,可用 `path` 参数收窄范围。
88
+
89
+ ## 开发
90
+
91
+ ```bash
92
+ node --test # 单元测试(任意平台)
93
+ node --test test/integration.test.mjs # 需要运行中的 Everything(Windows)
94
+ ```
95
+
96
+ ## 许可证
97
+
98
+ [MIT](LICENSE)
@@ -0,0 +1,8 @@
1
+ - insert:
2
+ - id: dsh-everything
3
+ name: 'dsh-everything'
4
+ config:
5
+ autoStart: true
6
+ autoInstall: true
7
+ maxResults: 100
8
+ timeoutMs: 8000
package/icon.svg ADDED
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
2
+ <rect x="4" y="4" width="56" height="56" rx="12" fill="#2b6cb0"/>
3
+ <circle cx="28" cy="28" r="12" fill="none" stroke="#ffffff" stroke-width="4"/>
4
+ <line x1="37" y1="37" x2="48" y2="48" stroke="#ffffff" stroke-width="5" stroke-linecap="round"/>
5
+ <path d="M20 28h16M28 20v16" stroke="#90cdf4" stroke-width="3" stroke-linecap="round"/>
6
+ </svg>