@nite07/dsh-search 0.0.0-stage → 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nite
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,54 @@
1
- # Temporary Holding Version
1
+ # dsh-search
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
+ English | [中文](README.zh.md)
4
+
5
+ A TypeScript/TSX multi-backend search bundle for DeepSeek Harness. Compatibility is verified against the running release rather than pinned to one version.
6
+
7
+ ## Features
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
22
+
23
+ ```sh
24
+ npm install --ignore-scripts --legacy-peer-deps
25
+ npm run check
26
+ ```
27
+
28
+ DSH peer packages must resolve from the compatible installed runtime or a compatible development environment. The local installation used ignored symlinks to the installed DSH peers; these links are not portable build dependencies. Client React is supplied by DSH's module loader, never bundled twice. TypeScript, esbuild and tsx are development-only dependencies; runtime transport uses the platform Fetch API and Node crypto. DSH supplies its own configuration/credential/storage facilities and zod for durable record validation.
29
+
30
+ ## Install and configure
31
+
32
+ Install from npm (`@nite07/dsh-search`) or, when hacking on the source, build first and install this directory using DSH Plugin Manager. Open Settings > Search, select each backend's access mode, review pricing, set its endpoint/options and enable only the backends you want. Save before editing credentials or running an explicit test. Credential references are environment-style identifiers; secrets are saved through DSH's credential service, not exported in configuration. Removing a stored credential can reveal an ambient environment value again.
33
+
34
+ The bundle registers provider ID `nite-search` but does **not** change the active search/fetch selection or disable another plugin automatically. Migration must explicitly select the new provider while preserving the current fetch provider. Retain the old bundle disabled for rollback. The settings page reports which provider the web seam currently selects and offers a one-click switch when it is not this plugin.
35
+
36
+ Tencent WSA uses one credential containing JSON `{"secretId":"...","secretKey":"..."}` and the official HTTPS API root. It does not use Bearer authentication.
37
+
38
+ ## Limits and evidence
39
+
40
+ See [the backend contract and pricing audit](docs/BACKENDS.md), [the implementation plan](docs/PLAN.md), and [verification status](docs/VERIFICATION.md). Documentation verification, mock contract tests, real anonymous calls and paid-account validation are separate evidence levels. Keyed backends are not live-verified without credentials and explicit cost approval. HTML discovery and hosted MCP response formats may change; unknown payloads return a protocol failure rather than a false no-results success.
41
+
42
+ All public plugin configuration fields are form-editable; this does not mean every option exposed by every upstream vendor has been implemented. Unsupported generic filters are disclosed. Domain inclusion/exclusion is additionally enforced locally. Cache, diagnostics and circuit-breaker state are process-local; attempt reservations persist through configuration reloads. Durable usage is intended for one Host process, not coordinated account-wide limits across multiple DSH instances.
43
+
44
+ Language and region use fixed canonical lists because providers disagree on spelling (`zh-hans` for Brave, `zh-cn` for Serper, `zh-CN` for SearXNG, upper-case primary tags for You.com). Each adapter translates the value or skips it with a warning.
45
+
46
+ ## Repository
47
+
48
+ - Origin: https://git.nite07.com/nite/dsh-search(私有)
49
+ - Default branch: `main`
50
+ - Feature branches are cut from `main` and merged back with `--ff-only`.
51
+
52
+ ## License
53
+
54
+ MIT. Original plugin icon; upstream service terms remain applicable.
package/README.zh.md ADDED
@@ -0,0 +1,54 @@
1
+ # dsh-search
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 面向 DeepSeek Harness 的多后端搜索插件,用 TypeScript / TSX 写成。兼容性以实际运行的版本为准,不绑定某个具体版本。
6
+
7
+ ## 功能
8
+
9
+ - 21 个搜索后端,各自独立开关;支持的后端可以在**匿名**和**API Key** 两种接入模式里固定选一种
10
+ - 不自动切换后端、不换凭证、不改端点、不跨模式回退;失败就是失败
11
+ - HTTP 重试可配置且有上限,支持取消、总超时和 `Retry-After`
12
+ - 按接入模式标注费用档、额度说明(含核实日期)和官方来源
13
+ - 原生「设置 → 网页搜索」管理页,中英双语,公开配置项全部可改,含凭证管理、校验、诊断和显式试搜
14
+ - 支持并行搜索或单后端搜索,按 URL / 标题去重,RRF 或后端顺序融合
15
+ - 内存缓存有容量上限;**失败的请求永不进缓存**
16
+ - 本地尝试额度按「后端 + 模式」持久化,发送前原子预占、串行化。按 UTC 跨日重置;这是本地计数,不是服务商余额,也不代表账单上限
17
+ - 部分失败和全部失败都会写进 Agent 能看到的返回内容,不会伪装成「没有结果」
18
+
19
+ 首次安装时**所有后端都是关闭的**。即使平台宣称有免费额度,账户类后端开启后仍可能产生费用。保存了 Key 也不会自动启用任何后端。供应商内部的路由、重试和融合由对方控制,不属于本插件的可配置范围。
20
+
21
+ ## 开发
22
+
23
+ ```sh
24
+ npm install --ignore-scripts --legacy-peer-deps
25
+ npm run check
26
+ ```
27
+
28
+ DSH 的对等依赖(peer)需要从兼容的已安装运行时或兼容的开发环境解析。本机开发时用软链接指向已安装的 DSH 包,这些链接不属于可移植的构建依赖。客户端的 React 由 DSH 的模块加载器注入,不会被打包两份。TypeScript、esbuild、tsx 只用于开发;运行时只用平台自带的 Fetch API 与 Node crypto。配置、凭证、持久化存储以及用于记录校验的 zod 均由 DSH 提供。
29
+
30
+ ## 安装与配置
31
+
32
+ 可以从 npm 安装(`@nite07/dsh-search`);改源码时先构建,再用 DSH 插件管理器安装本目录。打开「设置 → 网页搜索」,逐个选择后端的接入模式、核对价格、设置端点和参数,只启用你需要的后端。**改了配置要先保存**,再编辑凭证或执行试搜。凭证引用只是环境变量风格的标识符,密钥通过 DSH 凭证服务保存,不会出现在导出的配置里;删除已保存的凭证后,环境变量里的同名值可能重新生效。
33
+
34
+ 插件注册的 provider id 是 `nite-search`,但它**不会**自动修改当前生效的搜索 / 抓取选择,也不会去禁用别的插件。迁移需要显式选中新 provider,同时保留原来的抓取 provider。旧的搜索插件建议保留为禁用状态,以便回滚。设置页会显示当前实际生效的 provider,不是本插件时提供一键切换。
35
+
36
+ 腾讯云 WSA 用的是一条 JSON 凭证 `{"secretId":"...","secretKey":"..."}` 加官方 HTTPS 根地址,不是 Bearer 认证。
37
+
38
+ ## 边界与证据
39
+
40
+ 后端契约、价格与实测记录见 [docs/BACKENDS.md](docs/BACKENDS.md),实施计划见 [docs/PLAN.md](docs/PLAN.md),当前验证状态见 [docs/VERIFICATION.md](docs/VERIFICATION.md)。「文档核实」「模拟契约测试」「真实匿名调用」「付费账户验证」是四个不同层级的证据,不要混用。带 Key 的后端在没有凭证、没有明确费用授权的情况下不做在线验证。HTML 抓取和第三方 MCP 的响应格式可能变化;无法识别的响应会报协议错误,而不是假装「没有搜索结果」。
41
+
42
+ 插件公开的配置项都能在表单里修改,但这不等于上游厂商暴露的每个参数都已实现;不支持的通用筛选参数会明确说明。域名包含 / 排除还会在本地再过滤一次。缓存、诊断和熔断状态是进程内状态;尝试额度跨配置重载保留。持久化的额度只针对单个 Host 进程,不跨多个 DSH 实例协调。
43
+
44
+ 语言和地区使用固定的规范列表,因为各家写法并不统一(Brave 用 `zh-hans`、Serper 用 `zh-cn`、SearXNG 用 `zh-CN`、You.com 用大写主语言标签)。每个适配器自行转换,转不了就跳过并给出提示。
45
+
46
+ ## 仓库
47
+
48
+ - 远端:https://git.nite07.com/nite/dsh-search(私有)
49
+ - 默认分支:`main`
50
+ - 功能分支从 `main` 切出,用 `--ff-only` 合回
51
+
52
+ ## 许可证
53
+
54
+ MIT。插件图标为原创;上游服务条款照旧适用。
@@ -0,0 +1,4 @@
1
+ - insert:
2
+ - id: nite-search
3
+ name: '@nite07/dsh-search'
4
+ config: {}