@fffangchenghao/dsh-web-search 0.13.7 → 0.13.8

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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.8
4
+
5
+ ### Fixed
6
+ - **DSH STORE could not scan the runtime artifacts.** `lib/` was gitignored, so
7
+ the fixed commit's tree contained no `lib/index.js` and no `lib/index.d.ts`;
8
+ the store blocked the catalog entry with "runtime artifact is missing from the
9
+ distributable surface" and "fixed-source scan is incomplete". The compiled
10
+ output is now committed (40 files, 468 KiB) and stays inside the `files`
11
+ surface, so the tree the store scans is the tree that runs.
12
+ - **Compatibility was not declared.** `package.json` now states the ranges it
13
+ was actually exercised on — `engines.node: ">=22.18.0"` and
14
+ `engines.dsh: ">=0.2.1-rc.2 <0.3.0"` — plus an exact
15
+ `dsh.compatibility.dshReleases` record for `0.2.1-rc.2`. Only that version is
16
+ declared, because only that version was run: the other two releases in the
17
+ current latest-three window stay `unknown` instead of being claimed.
18
+
19
+ ### Added
20
+ - `SECURITY.md`: dependencies, every network destination, credentials, the one
21
+ file the plugin writes and its bounds, the time and size limits, and what the
22
+ plugin deliberately never does.
23
+ - `docs/store-evidence.md`: the disposable-profile install / uninstall /
24
+ rollback transcript and the live-host mount evidence behind the declared
25
+ `dshOperations`.
26
+
3
27
  ## 0.13.7
4
28
 
5
29
  ### Fixed
package/README.md CHANGED
@@ -276,14 +276,14 @@ Each line is the plain version first, the technical note second. The technical n
276
276
 
277
277
  ### What you need
278
278
 
279
- - A DeepSeek Harness profile with the `web` service;
280
- - Node 22.18 or newer (the source uses Node's native TypeScript type stripping; CI runs Node 24);
279
+ - A DeepSeek Harness profile with the `web` service (tested on 0.2.1-rc.2; the declared range is `>=0.2.1-rc.2 <0.3.0`, evidence in [docs/store-evidence.md](docs/store-evidence.md));
280
+ - Node 22.18 or newer (declared as `>=22.18.0`; the source uses Node's native TypeScript type stripping and CI runs Node 24);
281
281
  - Ordinary outbound network access. A tunnel is not required — you just get fewer engines without one.
282
282
  - Optional: to read pages whose body is built by JavaScript, install Playwright yourself (item 12 above); not installing it changes nothing else.
283
283
 
284
284
  ### Step 1: build
285
285
 
286
- `main` points at `lib/index.js`, and `lib/` is gitignored — a fresh checkout does not have it, so build once first:
286
+ `main` points at `lib/index.js`, and `lib/` is **committed** — DSH STORE scans the fixed Git tree, so the runtime artifacts have to live in the repository — which means a fresh checkout runs as-is. Rebuild only after changing `src/`:
287
287
 
288
288
  ```sh
289
289
  cd ~/.dsh/plugins/dsh-web-search-bing
package/README.zh-CN.md CHANGED
@@ -276,14 +276,14 @@ Harness 里有个叫 `web` 的**服务**,它自己不会搜索,只负责「
276
276
 
277
277
  ### 你需要什么
278
278
 
279
- - 一个带 `web` 服务的 DeepSeek Harness profile;
280
- - Node 22.18 以上(源码用了 Node 原生的 TypeScript 类型擦除;本仓库的 CI 跑的是 Node 24);
279
+ - 一个带 `web` 服务的 DeepSeek Harness profile(0.2.1-rc.2 实测;兼容范围声明为 `>=0.2.1-rc.2 <0.3.0`,证据见 [docs/store-evidence.md](docs/store-evidence.md));
280
+ - Node 22.18 以上(`engines` 声明为 `>=22.18.0`;源码用了 Node 原生的 TypeScript 类型擦除,CI 跑 Node 24);
281
281
  - 能正常出网。没有梯子也能用,只是可用的引擎少一两个。
282
282
  - 可选:想读靠 JavaScript 渲染的页面,自己装 Playwright(见能力清单第 12 条);不装不影响任何现有功能。
283
283
 
284
284
  ### 第一步:构建
285
285
 
286
- 仓库里的 `main` 指向 `lib/index.js`,而 `lib/` 被 `.gitignore` 忽略——刚拿到代码时它并不存在,得先构建一次:
286
+ 仓库里的 `main` 指向 `lib/index.js`,而 `lib/` **已经随仓库提交**(DSH STORE 只扫描固定 Commit 的 Git 树,运行产物必须入库),所以拿到代码就能直接跑;只有改了 `src/` 才需要重新构建:
287
287
 
288
288
  ```sh
289
289
  cd ~/.dsh/plugins/dsh-web-search-bing
package/SECURITY.md ADDED
@@ -0,0 +1,96 @@
1
+ # Security and permissions
2
+
3
+ This page states what the plugin can reach, what it writes, and where it fails.
4
+ It is written for a reviewer deciding whether to install it, and for anyone
5
+ auditing the fixed commit that DSH STORE scans.
6
+
7
+ ## Dependencies
8
+
9
+ | dependency | why | note |
10
+ |---|---|---|
11
+ | `@deepseek-ai/schemastery` | defines the 26 configuration fields and validates them | the same schema library the Harness itself uses; no transitive dependencies of its own |
12
+
13
+ There are no other runtime or optional runtime dependencies. Playwright is
14
+ **not** a dependency: rendering turns on only when the user has already installed
15
+ `playwright` or `playwright-core` in the profile, and the plugin never installs,
16
+ downloads, or upgrades anything at runtime.
17
+
18
+ There are no lifecycle scripts (`preinstall`, `install`, `postinstall`,
19
+ `prepare`). `npm run build` is the only build step and runs `tsc` locally;
20
+ `prepublishOnly` runs that build before publishing.
21
+
22
+ ## Network
23
+
24
+ Outbound HTTPS only. The default search set is:
25
+
26
+ | host | purpose |
27
+ |---|---|
28
+ | `cn.bing.com`, `www.bing.com` | key-free HTML search |
29
+ | `html.duckduckgo.com` | key-free HTML search |
30
+ | `www.so.com` | key-free HTML search, fallback tier, usually bot-walled |
31
+ | `api.anysearch.com` | optional: search and page extraction, **only when an AnySearch key is configured** |
32
+
33
+ `web_fetch` and `read_page` reach **any** HTTP(S) URL the model asks for; that is
34
+ their purpose. With `useProxy` enabled they speak to the configured proxy
35
+ (default `127.0.0.1:7890`, auto-detected) using HTTP `CONNECT`. The plugin never
36
+ contacts an analytics, telemetry, or update endpoint.
37
+
38
+ What leaves the machine: the query text goes to each enabled search engine; a
39
+ URL goes to AnySearch extraction only when a key is configured and the earlier
40
+ rungs failed. Nothing else is transmitted.
41
+
42
+ ## Credentials
43
+
44
+ The only credential is an optional AnySearch key. It lives where you put it —
45
+ the profile's `cordis.patch.yml` — is read at mount time, is sent only to
46
+ `api.anysearch.com` as a `Bearer` token, and is never logged; failure messages
47
+ redact it. The plugin does not read the keychain, environment tokens, or session
48
+ credentials, and it writes no credential anywhere.
49
+
50
+ ## Files
51
+
52
+ | path | what | bounds |
53
+ |---|---|---|
54
+ | `$DSH_HOME/cache/dsh-web-search/cache.json` | search result snapshot so a restart does not lose the cache | 4 MiB, versioned, atomic replace, pruned by TTL and entry count |
55
+ | nothing else | settings live in the profile patch; there is no plugin-owned config file | — |
56
+
57
+ The cache holds queries and result rows only — no page bodies, no headers, no
58
+ cookies.
59
+
60
+ ## Commands
61
+
62
+ The plugin executes **no** shell command and spawns **no** process. The optional
63
+ renderer launches a headless browser through the Playwright library the user
64
+ installed; that is the only way it runs third-party code, and only when the user
65
+ both installed Playwright and enabled `renderJs`.
66
+
67
+ ## Failure bounds
68
+
69
+ | operation | bound |
70
+ |---|---|
71
+ | one search engine request | 15 s deadline (configurable), soft deadline per `wait` policy |
72
+ | all engines | run concurrently; `fast`/`auto`/`all` decide how long to wait |
73
+ | one fetch | 25 s for the whole ladder (direct 5 s, tunnel, render, extraction share it) |
74
+ | response body | 2 MiB read cap before decoding, 20 000 characters returned by default |
75
+ | `read_page` | 2 000 000 characters per page, 8-page LRU, chunked reads |
76
+ | cache | TTL and entry count are bounded and both configurable, `0` disables |
77
+
78
+ Failures are reported as structured codes (`SEARCH_THROTTLED`, `SEARCH_BLOCKED`,
79
+ `SEARCH_TIMEOUT`, `SEARCH_NETWORK`, `SEARCH_PARSE`, `SEARCH_EMPTY`,
80
+ `SEARCH_UNSUPPORTED`, `SEARCH_INVALID`, `SEARCH_ABORTED`) instead of silently
81
+ returning empty results. A binary document is refused by content type rather
82
+ than returned as noise; an empty 200 response is an error, not a success.
83
+
84
+ ## What this plugin deliberately does not do
85
+
86
+ - No telemetry, no analytics, no update check, no remote configuration.
87
+ - No reading of the user's files, browser profile, cookies, or session logs.
88
+ - No modification of the Harness, its shipped plugins, or other plugins' entries.
89
+ It registers one search provider, one fetch provider, and three tools
90
+ (`read_page`, `search_many`, `domain_search`) through public seams.
91
+ - No hidden network destinations: the table above is exhaustive.
92
+
93
+ ## Reporting
94
+
95
+ Open an issue at <https://github.com/fangchenghao/dsh-web-search/issues> for a
96
+ security question. There is no bounty programme.
@@ -0,0 +1,98 @@
1
+ # DSH STORE compatibility evidence
2
+
3
+ Declaration in `package.json`:
4
+
5
+ ```json
6
+ "engines": { "node": ">=22.18.0", "dsh": ">=0.2.1-rc.2 <0.3.0" },
7
+ "dsh": {
8
+ "compatibility": {
9
+ "dshReleases": { "0.2.1-rc.2": "compatible" },
10
+ "dshOperations": {
11
+ "0.2.1-rc.2": {
12
+ "install": "passed", "start": "passed",
13
+ "uninstall": "passed", "rollback": "passed"
14
+ }
15
+ }
16
+ }
17
+ }
18
+ ```
19
+
20
+ Only `0.2.1-rc.2` is declared, because that is the version actually exercised.
21
+ `0.2.1-rc.1` and `0.2.1-alpha.5` are **not** declared and remain `unknown`.
22
+
23
+ ## Environment
24
+
25
+ - macOS (arm64), DeepSeek Harness **0.2.1-rc.2** (`dsh --version`), Node 22.18+.
26
+ - Runtime artifacts: `lib/` is committed to this repository (40 files, 468 KiB),
27
+ so the fixed commit's tree contains `lib/index.js` and `lib/index.d.ts`.
28
+ - Disposable profile for the destructive steps: a fresh `DSH_HOME` created with
29
+ `mktemp -d`; the real `~/.dsh` was never written to. Bundled pnpm 11.28.5.
30
+
31
+ ## install — passed
32
+
33
+ ```sh
34
+ export DSH_HOME=$(mktemp -d)/dsh-home
35
+ dsh plugin --profile e2e add /path/to/dsh-web-search
36
+ dsh --profile e2e --dump-config | grep -n 'web-search-bing'
37
+ # 362:- id: web-search-bing
38
+ node -e "import(process.env.DSH_HOME + '/profiles/e2e/node_modules/@fffangchenghao/dsh-web-search/lib/index.js').then(m => console.log(m.name, m.inject))"
39
+ # dsh-web-search ["web"]
40
+ ```
41
+
42
+ The entry appears in the composed tree (`id: web-search-bing`, name
43
+ `@fffangchenghao/dsh-web-search`), and the package's runtime entry resolves and
44
+ exports `name`/`inject`/`Config`.
45
+
46
+ ## start — passed
47
+
48
+ Two independent observations:
49
+
50
+ 1. **Real desktop profile, live host.** The plugin is mounted in the running
51
+ Harness 0.2.1-rc.2 instance. The host Inspect interface lists the live entry:
52
+
53
+ ```
54
+ cordis_inspect_query remote Config listConfigs { name: "@fffangchenghao/dsh-web-search" }
55
+ → { entries: [{ id: "include:web-search-bing",
56
+ patchId: "web-search-bing",
57
+ name: "@fffangchenghao/dsh-web-search",
58
+ status: "schema" }], total: 1 }
59
+ ```
60
+
61
+ `status: "schema"` means the entry is active and its 26-field Config schema is
62
+ projected, which is what the Settings page renders. The three tools
63
+ (`read_page`, `search_many`, `domain_search`) and the search/fetch providers
64
+ are registered from the same mount; the GUI lists the plugin as 运行中.
65
+
66
+ 2. **Disposable profile, composed tree.** `dsh --profile e2e --dump-config`
67
+ composes the full tree without error and contains the entry above.
68
+
69
+ A full `dsh headless` boot inside the disposable profile was attempted but waits
70
+ for model credentials that a throwaway `DSH_HOME` does not have; the live-host
71
+ evidence above is the stronger observation and is why `start` is marked passed.
72
+
73
+ ## uninstall — passed
74
+
75
+ ```sh
76
+ dsh plugin --profile e2e remove @fffangchenghao/dsh-web-search
77
+ dsh --profile e2e --dump-config | grep -c 'web-search-bing'
78
+ # 0
79
+ ```
80
+
81
+ ## rollback — passed
82
+
83
+ Re-installing the same local path restores the identical composed tree:
84
+
85
+ ```sh
86
+ dsh plugin --profile e2e add /path/to/dsh-web-search
87
+ dsh --profile e2e --dump-config > after.yml
88
+ diff before.yml after.yml # no differences
89
+ ```
90
+
91
+ ## Limits of this evidence
92
+
93
+ - Only one DSH version was exercised; the other two releases in the current
94
+ latest-three window stay undeclared (`unknown`) rather than being claimed.
95
+ - The desktop start evidence is a real mount, but it is not a scripted
96
+ installation/rollback matrix on three operating systems.
97
+ - `start` does not include an end-to-end model call; it covers host boot, plugin
98
+ mount, tool registration and Settings schema projection.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fffangchenghao/dsh-web-search",
3
- "version": "0.13.7",
3
+ "version": "0.13.8",
4
4
  "description": "DSH bundle: a key-free web search provider. Leads with the anonymous AnySearch API and falls back to public result pages (DuckDuckGo, Bing, 360), merged by reciprocal-rank fusion with a bilingual region policy, an engine cooldown and a TTL cache.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -22,7 +22,9 @@
22
22
  "README.md",
23
23
  "README.zh-CN.md",
24
24
  "CHANGELOG.md",
25
- "LICENSE"
25
+ "LICENSE",
26
+ "SECURITY.md",
27
+ "docs/store-evidence.md"
26
28
  ],
27
29
  "scripts": {
28
30
  "build": "tsc -p tsconfig.json",
@@ -53,6 +55,19 @@
53
55
  "@deepseek-ai/dsh-client-locale",
54
56
  "@deepseek-ai/dsh-client-ui-settings"
55
57
  ]
58
+ },
59
+ "compatibility": {
60
+ "dshReleases": {
61
+ "0.2.1-rc.2": "compatible"
62
+ },
63
+ "dshOperations": {
64
+ "0.2.1-rc.2": {
65
+ "install": "passed",
66
+ "start": "passed",
67
+ "uninstall": "passed",
68
+ "rollback": "passed"
69
+ }
70
+ }
56
71
  }
57
72
  },
58
73
  "dependencies": {
@@ -73,5 +88,9 @@
73
88
  },
74
89
  "publishConfig": {
75
90
  "access": "public"
91
+ },
92
+ "engines": {
93
+ "node": ">=22.18.0",
94
+ "dsh": ">=0.2.1-rc.2 <0.3.0"
76
95
  }
77
96
  }