@nite07/dsh-search 0.1.0 → 0.1.2
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/README.md +29 -32
- package/README.zh.md +29 -32
- package/dist/client.js +14 -7
- package/locale/en.json +5 -2
- package/locale/zh.json +5 -2
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -2,53 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Multi-backend web search for DeepSeek Harness: 21 search providers you turn on one by one, each with an explicit access mode and a visible cost tier.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
- 21 backend entries, independently enabled; explicit anonymous or key access where supported.
|
|
10
|
-
- No provider, credential, endpoint, or access-mode fallback.
|
|
11
|
-
- Bounded configurable HTTP retries, cancellation, deadlines and Retry-After handling.
|
|
12
|
-
- Cost tiers, dated quota disclosures and official references per access mode.
|
|
13
|
-
- Native Settings > Search management page, English/Chinese localization, editable public configuration, credential controls, validation, diagnostics and explicit trial searches.
|
|
14
|
-
- Parallel or single-backend search, deterministic URL/title deduplication and RRF/ordered fusion.
|
|
15
|
-
- Bounded in-memory cache; failures are never cached.
|
|
16
|
-
- Durable local attempt reservations, serialized before sending, grouped by backend and mode. UTC reset; these are not provider balances or monetary guarantees.
|
|
17
|
-
- Agent-visible partial and total failure explanations.
|
|
18
|
-
|
|
19
|
-
All backends are disabled on first installation. Enabling an account-backed backend may incur charges even when its platform advertises free credits. Stored keys never activate a backend automatically. Do not assume a supplier's internal routing is controlled by this plugin.
|
|
20
|
-
|
|
21
|
-
## Development
|
|
7
|
+
## Install
|
|
22
8
|
|
|
23
9
|
```sh
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
dsh plugin add @nite07/dsh-search
|
|
11
|
+
dsh --profile web # or restart your running dsh web process
|
|
26
12
|
```
|
|
27
13
|
|
|
28
|
-
|
|
14
|
+
Or install it from **Settings → Plugins → Add plugin**.
|
|
15
|
+
|
|
16
|
+
Then make it the search source: open **Settings → Web search**. If the page says the current provider is something else, click **Use this plugin for web search**.
|
|
29
17
|
|
|
30
|
-
##
|
|
18
|
+
## Quick start
|
|
31
19
|
|
|
32
|
-
|
|
20
|
+
1. Open **Settings → Web search**.
|
|
21
|
+
2. In the **Backends** tab, pick the providers you want, choose **anonymous** or **API key** for each, and check the cost line before enabling.
|
|
22
|
+
3. Press **Save settings**. Every backend starts disabled, so nothing is called until you save.
|
|
33
23
|
|
|
34
|
-
The
|
|
24
|
+
The **Test & diagnostics** tab runs one explicit search against a saved backend and shows the exact request outcome.
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
## Backends and cost
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
Each backend is filed under a cost tier for the selected access mode: free, free allowance (key required), trial credits, paid usage, or self-hosted.
|
|
39
29
|
|
|
40
|
-
|
|
30
|
+
- Free anonymous tiers that work without any account: Keenable, Exa, You.com, AnySearch, Parallel.
|
|
31
|
+
- Local SearXNG is supported and needs no key.
|
|
32
|
+
- A **Live-tested** badge means this plugin completed a real call to that backend.
|
|
41
33
|
|
|
42
|
-
|
|
34
|
+
Per-backend quotas, prices, sources and the date they were checked: [docs/BACKENDS.md](docs/BACKENDS.md).
|
|
43
35
|
|
|
44
|
-
|
|
36
|
+
## Development
|
|
45
37
|
|
|
46
|
-
|
|
38
|
+
```sh
|
|
39
|
+
npm install --ignore-scripts --legacy-peer-deps
|
|
40
|
+
npm run check
|
|
41
|
+
```
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
- Default branch: `main`
|
|
50
|
-
- Feature branches are cut from `main` and merged back with `--ff-only`.
|
|
43
|
+
Design notes: [docs/PLAN.md](docs/PLAN.md). Verification status: [docs/VERIFICATION.md](docs/VERIFICATION.md).
|
|
51
44
|
|
|
52
45
|
## License
|
|
53
46
|
|
|
54
|
-
MIT.
|
|
47
|
+
MIT.
|
|
48
|
+
|
|
49
|
+
## Friends
|
|
50
|
+
|
|
51
|
+
- [LINUX DO](https://linux.do) — the community where this plugin's backend survey started.
|
package/README.zh.md
CHANGED
|
@@ -2,53 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
给 DeepSeek Harness 用的多后端网页搜索:21 家搜索服务,逐个开关,每个都明确选定接入模式、标明费用档。
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 安装
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- 原生「设置 → 网页搜索」管理页,中英双语,公开配置项全部可改,含凭证管理、校验、诊断和显式试搜
|
|
14
|
-
- 支持并行搜索或单后端搜索,按 URL / 标题去重,RRF 或后端顺序融合
|
|
15
|
-
- 内存缓存有容量上限;**失败的请求永不进缓存**
|
|
16
|
-
- 本地尝试额度按「后端 + 模式」持久化,发送前原子预占、串行化。按 UTC 跨日重置;这是本地计数,不是服务商余额,也不代表账单上限
|
|
17
|
-
- 部分失败和全部失败都会写进 Agent 能看到的返回内容,不会伪装成「没有结果」
|
|
9
|
+
```sh
|
|
10
|
+
dsh plugin add @nite07/dsh-search
|
|
11
|
+
dsh --profile web # 或者用你自己的方式重启 dsh web
|
|
12
|
+
```
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
也可以在 **设置 → 插件 → 添加插件** 里安装。
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
装完把它设为搜索来源:打开 **设置 → 网页搜索**,如果页面提示当前不是本插件,点「**设为网页搜索来源**」。
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
npm install --ignore-scripts --legacy-peer-deps
|
|
25
|
-
npm run check
|
|
26
|
-
```
|
|
18
|
+
## 快速开始
|
|
27
19
|
|
|
28
|
-
|
|
20
|
+
1. 打开 **设置 → 网页搜索**
|
|
21
|
+
2. 在「搜索后端」页签里挑后端,逐家选择**匿名**或 **API Key** 模式,先看费用说明再启用
|
|
22
|
+
3. 点「保存设置」。所有后端默认关闭,不保存就一个请求都不会发出
|
|
29
23
|
|
|
30
|
-
|
|
24
|
+
想先验一下某家通不通,用「试搜与诊断」页签:它会明确发一次搜索,并把结果和失败原因原样显示出来。
|
|
31
25
|
|
|
32
|
-
|
|
26
|
+
## 后端与费用
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
每个后端按**当前选中的接入模式**归类到费用档:免费、免费额度(需密钥)、试用额度、付费用量、自托管。
|
|
35
29
|
|
|
36
|
-
|
|
30
|
+
- 无需账号即可用的免费档:Keenable、Exa、You.com、AnySearch、Parallel
|
|
31
|
+
- 本机自建 SearXNG 也支持,不需要密钥
|
|
32
|
+
- 带「**已实测**」标记的,表示本插件真实调用成功过
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
各家的额度、单价、来源链接和核实日期见 [docs/BACKENDS.md](docs/BACKENDS.md)。
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
## 开发
|
|
41
37
|
|
|
42
|
-
|
|
38
|
+
```sh
|
|
39
|
+
npm install --ignore-scripts --legacy-peer-deps
|
|
40
|
+
npm run check
|
|
41
|
+
```
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
设计与实现说明:[docs/PLAN.md](docs/PLAN.md);验证记录:[docs/VERIFICATION.md](docs/VERIFICATION.md)。
|
|
45
44
|
|
|
46
|
-
##
|
|
45
|
+
## 许可
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
- 默认分支:`main`
|
|
50
|
-
- 功能分支从 `main` 切出,用 `--ff-only` 合回
|
|
47
|
+
MIT。
|
|
51
48
|
|
|
52
|
-
##
|
|
49
|
+
## 友链
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
- [LINUX DO](https://linux.do) — 这个插件的后端调研起步于这个社区。
|
package/dist/client.js
CHANGED
|
@@ -38,7 +38,7 @@ var NiteSearchClient = (() => {
|
|
|
38
38
|
description: "Multi-backend search with explicit anonymous or key access, cost tiers, bounded retries and complete Web settings. Backends start disabled; account-backed requests may incur charges."
|
|
39
39
|
},
|
|
40
40
|
title: "Web search",
|
|
41
|
-
intro: "{{enabled}} of {{total}} backends enabled.
|
|
41
|
+
intro: "{{enabled}} of {{total}} backends enabled.",
|
|
42
42
|
loading: "Loading saved settings\u2026",
|
|
43
43
|
loadFailed: "Could not load settings. Reload to try again.",
|
|
44
44
|
reload: "Reload settings",
|
|
@@ -253,7 +253,10 @@ var NiteSearchClient = (() => {
|
|
|
253
253
|
notSpecified: "Not specified",
|
|
254
254
|
activeTitle: "This plugin is not the active search provider",
|
|
255
255
|
activeOther: "The web seam currently selects \u201C{{provider}}\u201D. Searches keep going there until this plugin is selected.",
|
|
256
|
-
activateSelf: "Use this plugin for web search"
|
|
256
|
+
activateSelf: "Use this plugin for web search",
|
|
257
|
+
tierCount: "{{total}} total",
|
|
258
|
+
tierEnabled: "{{enabled}} on",
|
|
259
|
+
tierFiltered: "{{shown}} after filter"
|
|
257
260
|
};
|
|
258
261
|
|
|
259
262
|
// locale/zh.json
|
|
@@ -263,7 +266,7 @@ var NiteSearchClient = (() => {
|
|
|
263
266
|
description: "\u591A\u540E\u7AEF\u641C\u7D22\uFF0C\u56FA\u5B9A\u9009\u62E9\u533F\u540D\u6216\u5BC6\u94A5\u6A21\u5F0F\uFF0C\u63D0\u4F9B\u8D39\u7528\u5206\u6863\u3001\u6709\u9650\u91CD\u8BD5\u548C\u5B8C\u6574 Web \u8BBE\u7F6E\u3002\u540E\u7AEF\u9ED8\u8BA4\u5173\u95ED\uFF0C\u8D26\u6237\u8C03\u7528\u53EF\u80FD\u4EA7\u751F\u8D39\u7528\u3002"
|
|
264
267
|
},
|
|
265
268
|
title: "\u7F51\u9875\u641C\u7D22",
|
|
266
|
-
intro: "\u5DF2\u542F\u7528 {{enabled}}/{{total}} \u4E2A\u540E\u7AEF\u3002
|
|
269
|
+
intro: "\u5DF2\u542F\u7528 {{enabled}}/{{total}} \u4E2A\u540E\u7AEF\u3002",
|
|
267
270
|
loading: "\u6B63\u5728\u8BFB\u53D6\u5DF2\u4FDD\u5B58\u8BBE\u7F6E\u2026",
|
|
268
271
|
loadFailed: "\u8BFB\u53D6\u8BBE\u7F6E\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u3002",
|
|
269
272
|
reload: "\u91CD\u65B0\u52A0\u8F7D\u8BBE\u7F6E",
|
|
@@ -478,7 +481,10 @@ var NiteSearchClient = (() => {
|
|
|
478
481
|
notSpecified: "\u4E0D\u6307\u5B9A",
|
|
479
482
|
activeTitle: "\u5F53\u524D\u672A\u542F\u7528\u672C\u63D2\u4EF6\u4F5C\u4E3A\u641C\u7D22\u6E90",
|
|
480
483
|
activeOther: "\u5185\u7F6E\u641C\u7D22\u5F53\u524D\u9009\u62E9\u7684\u662F\u300C{{provider}}\u300D\u3002\u5728\u9009\u4E2D\u672C\u63D2\u4EF6\u4E4B\u524D\uFF0C\u641C\u7D22\u4ECD\u4F1A\u8D70\u5B83\u3002",
|
|
481
|
-
activateSelf: "\u8BBE\u4E3A\u7F51\u9875\u641C\u7D22\u6765\u6E90"
|
|
484
|
+
activateSelf: "\u8BBE\u4E3A\u7F51\u9875\u641C\u7D22\u6765\u6E90",
|
|
485
|
+
tierCount: "\u5171 {{total}} \u5BB6",
|
|
486
|
+
tierEnabled: "\u542F\u7528 {{enabled}}",
|
|
487
|
+
tierFiltered: "\u7B5B\u9009\u540E {{shown}}"
|
|
482
488
|
};
|
|
483
489
|
|
|
484
490
|
// src/catalog.ts
|
|
@@ -965,9 +971,10 @@ var NiteSearchClient = (() => {
|
|
|
965
971
|
setIssues([]);
|
|
966
972
|
setNotice("defaultsRestored");
|
|
967
973
|
}), showTransfer && /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-import" }, t("importLabel")), /* @__PURE__ */ React.createElement("textarea", { id: "ns-import", value: importText, disabled: !!pending, onChange: (event) => setImportText(event.target.value), rows: 8 }), /* @__PURE__ */ React.createElement("button", { disabled: !!pending || !importText.trim(), onClick: importConfig }, t("applyImport"))))), tab === "backends" && /* @__PURE__ */ React.createElement("div", { role: "tabpanel", id: "panel-backends", "aria-labelledby": "tab-backends" }, /* @__PURE__ */ React.createElement("section", { className: "ns-backends", id: "sec-backends", tabIndex: -1, "aria-labelledby": "sec-backends-title" }, /* @__PURE__ */ React.createElement("h3", { id: "sec-backends-title" }, t("backends"), " ", /* @__PURE__ */ React.createElement("span", { className: "ns-muted" }, tr("enabledSummary", { enabled: enabledCount, total: definitions.length }))), /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("backendIntro")), /* @__PURE__ */ React.createElement("div", { className: "ns-toolbar" }, /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-backend-search" }, t("searchBackends")), /* @__PURE__ */ React.createElement("input", { id: "ns-backend-search", type: "search", value: backendQuery, onChange: (event) => setBackendQuery(event.target.value), placeholder: t("searchBackendsPlaceholder") })), /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-backend-filter" }, t("filterBackends")), /* @__PURE__ */ React.createElement("select", { id: "ns-backend-filter", value: backendFilter, onChange: (event) => setBackendFilter(event.target.value) }, ["all", "enabled", "configured"].map((value) => /* @__PURE__ */ React.createElement("option", { key: value, value }, t(`filter.${value}`)))))), ["free", "allowance", "trial", "paid", "self-hosted", "unverified"].map((tier) => {
|
|
968
|
-
const
|
|
969
|
-
const
|
|
970
|
-
|
|
974
|
+
const inTier = definitions.filter((def) => tierOf(def) === tier);
|
|
975
|
+
const members = inTier.filter(matches);
|
|
976
|
+
const enabledInTier = inTier.filter((def) => draft.backends[def.id]?.enabled).length;
|
|
977
|
+
return members.length ? /* @__PURE__ */ React.createElement("div", { className: "ns-tier", key: tier }, /* @__PURE__ */ React.createElement("h4", null, t(`tier.${tier}`), " ", /* @__PURE__ */ React.createElement("span", { className: "ns-muted" }, tr("tierCount", { total: inTier.length }), " \xB7 ", tr("tierEnabled", { enabled: enabledInTier }), members.length < inTier.length ? ` \xB7 ${tr("tierFiltered", { shown: members.length })}` : "")), members.map((def) => {
|
|
971
978
|
const backend2 = draft.backends[def.id];
|
|
972
979
|
if (!backend2) return null;
|
|
973
980
|
const mode2 = def.modes.find((item) => item.mode === backend2.mode);
|
package/locale/en.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Multi-backend search with explicit anonymous or key access, cost tiers, bounded retries and complete Web settings. Backends start disabled; account-backed requests may incur charges."
|
|
5
5
|
},
|
|
6
6
|
"title": "Web search",
|
|
7
|
-
"intro": "{{enabled}} of {{total}} backends enabled.
|
|
7
|
+
"intro": "{{enabled}} of {{total}} backends enabled.",
|
|
8
8
|
"loading": "Loading saved settings…",
|
|
9
9
|
"loadFailed": "Could not load settings. Reload to try again.",
|
|
10
10
|
"reload": "Reload settings",
|
|
@@ -219,5 +219,8 @@
|
|
|
219
219
|
"notSpecified": "Not specified",
|
|
220
220
|
"activeTitle": "This plugin is not the active search provider",
|
|
221
221
|
"activeOther": "The web seam currently selects “{{provider}}”. Searches keep going there until this plugin is selected.",
|
|
222
|
-
"activateSelf": "Use this plugin for web search"
|
|
222
|
+
"activateSelf": "Use this plugin for web search",
|
|
223
|
+
"tierCount": "{{total}} total",
|
|
224
|
+
"tierEnabled": "{{enabled}} on",
|
|
225
|
+
"tierFiltered": "{{shown}} after filter"
|
|
223
226
|
}
|
package/locale/zh.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "多后端搜索,固定选择匿名或密钥模式,提供费用分档、有限重试和完整 Web 设置。后端默认关闭,账户调用可能产生费用。"
|
|
5
5
|
},
|
|
6
6
|
"title": "网页搜索",
|
|
7
|
-
"intro": "已启用 {{enabled}}/{{total}}
|
|
7
|
+
"intro": "已启用 {{enabled}}/{{total}} 个后端。",
|
|
8
8
|
"loading": "正在读取已保存设置…",
|
|
9
9
|
"loadFailed": "读取设置失败,请重新加载。",
|
|
10
10
|
"reload": "重新加载设置",
|
|
@@ -219,5 +219,8 @@
|
|
|
219
219
|
"notSpecified": "不指定",
|
|
220
220
|
"activeTitle": "当前未启用本插件作为搜索源",
|
|
221
221
|
"activeOther": "内置搜索当前选择的是「{{provider}}」。在选中本插件之前,搜索仍会走它。",
|
|
222
|
-
"activateSelf": "设为网页搜索来源"
|
|
222
|
+
"activateSelf": "设为网页搜索来源",
|
|
223
|
+
"tierCount": "共 {{total}} 家",
|
|
224
|
+
"tierEnabled": "启用 {{enabled}}",
|
|
225
|
+
"tierFiltered": "筛选后 {{shown}}"
|
|
223
226
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nite07/dsh-search",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Explicit-mode multi-backend search with transparent costs and complete Web settings for DSH",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,8 +45,7 @@
|
|
|
45
45
|
"check": "npm run typecheck && npm test && npm run build"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
|
-
"node": ">=22"
|
|
49
|
-
"dsh": ">=0.2.2"
|
|
48
|
+
"node": ">=22"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {
|
|
52
51
|
"@deepseek-ai/cordis": "*",
|