@nite07/dsh-search 0.1.4 → 0.1.10
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 +1 -0
- package/dist/client.js +94 -37
- package/dist/index.js +140 -2748
- package/dist/index.js.map +4 -4
- package/docs/VERIFICATION.md +3 -2
- package/locale/en.json +22 -6
- package/locale/zh.json +22 -6
- package/package.json +5 -3
package/docs/VERIFICATION.md
CHANGED
|
@@ -4,10 +4,11 @@ Date: 2026-11-17 (Asia/Shanghai), profile `web`. The DSH release running at that
|
|
|
4
4
|
|
|
5
5
|
## Automated
|
|
6
6
|
|
|
7
|
-
`npm run check` (typecheck +
|
|
7
|
+
`npm run check` (typecheck + 21 tests + build) passes. Coverage highlights:
|
|
8
8
|
|
|
9
|
-
- Config validation: unknown fields, ranges, enumerations,
|
|
9
|
+
- Config validation: unknown fields, ranges, enumerations, endpoint schemes (`http(s)` or `ws(s)`, no credentials, query or fragment), unverified backends cannot be enabled.
|
|
10
10
|
- Fixed access modes: anonymous mode never resolves or transmits a stored key; key mode without a credential fails without any request; no fallback path exists in the engine.
|
|
11
|
+
- Fixed credential names: credential destinations are defined in code, never editable configuration. Legacy name fields are discarded on load, and management requests cannot override the destination with a reference. The shared browser exposes one token input without storage-name controls or explanations. Stored secrets are never echoed back.
|
|
11
12
|
- Retry: only allowlisted statuses; bounded attempts on the same endpoint; `Retry-After` honoured and never shortened; `401`/quota-exhaustion bodies are not retried and never surface in results.
|
|
12
13
|
- Failure reporting: partial failures and total failure appear in returned content with backend, mode, kind and attempt count; failed backends are not cached.
|
|
13
14
|
- Deduplication, domain filtering, local budget accounting (durable domain, serialized reservations, fail-closed on storage errors), cancellation.
|
package/locale/en.json
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"credentialTitle": "Credential storage",
|
|
62
62
|
"credentialConfigured": "Credential configured",
|
|
63
63
|
"credentialMissing": "No credential configured",
|
|
64
|
-
"credentialHelp": "
|
|
64
|
+
"credentialHelp": "Saved credentials are never displayed.",
|
|
65
65
|
"credentialValue": "New credential value",
|
|
66
66
|
"replaceCredential": "Replace credential",
|
|
67
67
|
"deleteCredential": "Delete credential",
|
|
@@ -187,8 +187,6 @@
|
|
|
187
187
|
"help.backend.mode": "Choose a fixed anonymous or key mode. No automatic switching.",
|
|
188
188
|
"field.backend.endpoint": "Endpoint URL",
|
|
189
189
|
"help.backend.endpoint": "Use a trusted HTTPS endpoint, or a trusted local self-hosted endpoint. Never put secrets in the URL.",
|
|
190
|
-
"field.backend.credentialRef": "Credential reference",
|
|
191
|
-
"help.backend.credentialRef": "Reference only, not the secret value. Save this reference before managing its credential.",
|
|
192
190
|
"field.backend.timeoutMs": "Request timeout (ms)",
|
|
193
191
|
"help.backend.timeoutMs": "Deadline for each backend request.",
|
|
194
192
|
"field.backend.rateLimitPerMinute": "Attempts per minute",
|
|
@@ -223,12 +221,30 @@
|
|
|
223
221
|
"choice.session": "Browser session cookies",
|
|
224
222
|
"colorLegend": "Green: free path, own account or self-hosted. Yellow: free allowance. Red: trial credits or paid. Sorted cheapest first.",
|
|
225
223
|
"credentialPending": "Wait for the current action to finish.",
|
|
226
|
-
"
|
|
227
|
-
"credentialReadOnly": "This reference is read-only: another source supplies its value, so the plugin cannot overwrite it. Pick a different reference name, such as DSH_SEARCH_X_SESSION.",
|
|
224
|
+
"credentialReadOnly": "This credential is provided by another source and cannot be changed here.",
|
|
228
225
|
"credentialPlainKey": "Paste the key itself.",
|
|
229
226
|
"credentialShapeLabel": "Credential format",
|
|
230
227
|
"field.tools.webSearchPlus": "Allow web_search_plus",
|
|
231
228
|
"help.tools.webSearchPlus": "Off hides the tool entirely: the agent then searches only through the configured strategy.",
|
|
232
229
|
"field.tools.compactByDefault": "Compact results by default",
|
|
233
|
-
"help.tools.compactByDefault": "Sources carry only URL, title and date. Saves context when the agent only needs links; a call can still ask for full snippets."
|
|
230
|
+
"help.tools.compactByDefault": "Sources carry only URL, title and date. Saves context when the agent only needs links; a call can still ask for full snippets.",
|
|
231
|
+
"choice.browser": "Browser",
|
|
232
|
+
"field.browser.endpoint": "Shared browser endpoint",
|
|
233
|
+
"field.browser.statePath": "Shared session file",
|
|
234
|
+
"field.browser.timeoutMs": "Browser read timeout (ms)",
|
|
235
|
+
"help.browser.endpoint": "The Playwright endpoint every browser-backed reader shares, for example ws://<host>:3000/ws. When set it wins over a backend's own endpoint; leave it empty to let each backend name its own.",
|
|
236
|
+
"help.browser.statePath": "Optional. Where the browser container writes the signed-in session; empty uses the search core default.",
|
|
237
|
+
"help.browser.timeoutMs": "How long one browser read may take.",
|
|
238
|
+
"sharedBrowser": "Shared browser",
|
|
239
|
+
"sharedBrowserHint": "This block describes the browser container you host: its endpoint, its endpoint token, the session file and the read timeout. Every backend in browser mode shares it.",
|
|
240
|
+
"browserTokenTitle": "Endpoint token",
|
|
241
|
+
"browserTokenValue": "New endpoint token",
|
|
242
|
+
"saveToken": "Save token",
|
|
243
|
+
"browserTokenHelp": "Used to connect to the browser service. Sign in to Xiaohongshu through VNC.",
|
|
244
|
+
"browserInheritedEndpoint": "This backend inherits the shared endpoint: {{endpoint}}",
|
|
245
|
+
"browserInheritedEndpointMissing": "This backend has no endpoint to connect to: the shared browser settings are empty and it names none of its own.",
|
|
246
|
+
"browserOwnEndpoint": "The shared browser endpoint is empty, so this backend uses its own endpoint: {{endpoint}}.",
|
|
247
|
+
"browserInheritedHint": "The endpoint and the token both come from the shared browser settings, so they are changed in one place.",
|
|
248
|
+
"browserOverride": "Give this backend its own endpoint (fallback only)",
|
|
249
|
+
"browserOverrideHint": "Applies only while the shared browser settings are empty. Use it to point one backend at a different browser container."
|
|
234
250
|
}
|
package/locale/zh.json
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"credentialTitle": "凭证存储",
|
|
62
62
|
"credentialConfigured": "已配置凭证",
|
|
63
63
|
"credentialMissing": "未配置凭证",
|
|
64
|
-
"credentialHelp": "
|
|
64
|
+
"credentialHelp": "凭证保存后不会回显。",
|
|
65
65
|
"credentialValue": "新的凭证值",
|
|
66
66
|
"replaceCredential": "替换凭证",
|
|
67
67
|
"deleteCredential": "删除凭证",
|
|
@@ -187,8 +187,6 @@
|
|
|
187
187
|
"help.backend.mode": "固定使用匿名或密钥模式,不自动切换。",
|
|
188
188
|
"field.backend.endpoint": "端点 URL",
|
|
189
189
|
"help.backend.endpoint": "仅使用可信的 HTTPS 或本地自托管端点,不要在 URL 中填写密钥。",
|
|
190
|
-
"field.backend.credentialRef": "凭证引用",
|
|
191
|
-
"help.backend.credentialRef": "填写引用而非密钥本身。请先保存引用,再管理对应的凭证。",
|
|
192
190
|
"field.backend.timeoutMs": "请求超时(毫秒)",
|
|
193
191
|
"help.backend.timeoutMs": "每次后端请求的时间上限。",
|
|
194
192
|
"field.backend.rateLimitPerMinute": "每分钟尝试上限",
|
|
@@ -223,12 +221,30 @@
|
|
|
223
221
|
"choice.session": "浏览器会话 Cookie",
|
|
224
222
|
"colorLegend": "绿色=免费/自带账号/自托管,黄色=免费额度,红色=试用或付费。由便宜到贵排序。",
|
|
225
223
|
"credentialPending": "当前操作还没结束,稍等。",
|
|
226
|
-
"
|
|
227
|
-
"credentialReadOnly": "这个凭证引用是只读的:它的值由其它来源提供,插件无法覆盖。换一个引用名试试,例如 DSH_SEARCH_X_SESSION。",
|
|
224
|
+
"credentialReadOnly": "该凭证由其他来源提供,无法在此修改。",
|
|
228
225
|
"credentialPlainKey": "直接填密钥字符串。",
|
|
229
226
|
"credentialShapeLabel": "凭证格式",
|
|
230
227
|
"field.tools.webSearchPlus": "允许使用 web_search_plus",
|
|
231
228
|
"help.tools.webSearchPlus": "关闭后这个工具不会注册,agent 只能用配置里的固定策略搜索。",
|
|
232
229
|
"field.tools.compactByDefault": "默认返回精简结果",
|
|
233
|
-
"help.tools.compactByDefault": "结果只保留链接、标题和日期。agent 只需要链接时能省下大量上下文;单次调用仍可要求完整摘要。"
|
|
230
|
+
"help.tools.compactByDefault": "结果只保留链接、标题和日期。agent 只需要链接时能省下大量上下文;单次调用仍可要求完整摘要。",
|
|
231
|
+
"choice.browser": "浏览器",
|
|
232
|
+
"field.browser.endpoint": "共享浏览器端点",
|
|
233
|
+
"field.browser.statePath": "共享会话文件",
|
|
234
|
+
"field.browser.timeoutMs": "浏览器读取超时(毫秒)",
|
|
235
|
+
"help.browser.endpoint": "所有依赖浏览器的后端共用的 Playwright 端点,例如 ws://<主机>:3000/ws。填写后优先于各后端自己的端点;留空则各后端各用自己的。",
|
|
236
|
+
"help.browser.statePath": "可选。浏览器容器把登录态写在哪个文件;留空则用搜索核心的默认位置。",
|
|
237
|
+
"help.browser.timeoutMs": "一次浏览器读取最多等多久。",
|
|
238
|
+
"sharedBrowser": "共享浏览器",
|
|
239
|
+
"sharedBrowserHint": "这里描述你自己托管的浏览器容器:端点、端点令牌、登录态文件与读取超时。所有处于浏览器模式的后端都共用这一份配置。",
|
|
240
|
+
"browserTokenTitle": "端点令牌",
|
|
241
|
+
"browserTokenValue": "新的端点令牌",
|
|
242
|
+
"saveToken": "保存令牌",
|
|
243
|
+
"browserTokenHelp": "用于连接浏览器服务。小红书账号请在 VNC 中登录。",
|
|
244
|
+
"browserInheritedEndpoint": "该后端继承共享端点:{{endpoint}}",
|
|
245
|
+
"browserInheritedEndpointMissing": "该后端没有可连接的端点:共享浏览器配置为空,它自己也没有填写。",
|
|
246
|
+
"browserOwnEndpoint": "共享浏览器端点尚未填写,该后端目前使用自己的端点:{{endpoint}}。",
|
|
247
|
+
"browserInheritedHint": "端点与令牌都来自共享浏览器配置,需要修改时只改那一处。",
|
|
248
|
+
"browserOverride": "为该后端单独指定端点(仅作兜底)",
|
|
249
|
+
"browserOverrideHint": "只有共享浏览器配置留空时这里才会生效,用于把单个后端指向另一个浏览器容器。"
|
|
234
250
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nite07/dsh-search",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Explicit-mode multi-backend search with transparent costs and complete Web settings for DSH",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=22"
|
|
49
49
|
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@nite07/search-core": "0.1.5"
|
|
52
|
+
},
|
|
50
53
|
"peerDependencies": {
|
|
51
54
|
"@deepseek-ai/cordis": "*",
|
|
52
55
|
"@deepseek-ai/schemastery": "*",
|
|
@@ -61,8 +64,7 @@
|
|
|
61
64
|
"esbuild": "^0.28.2",
|
|
62
65
|
"tsx": "^4.20.0",
|
|
63
66
|
"@types/node": "^24.0.0",
|
|
64
|
-
"@types/react": "^19.3.0"
|
|
65
|
-
"@nite07/search-core": "0.1.0"
|
|
67
|
+
"@types/react": "^19.3.0"
|
|
66
68
|
},
|
|
67
69
|
"dsh": {
|
|
68
70
|
"bundle": {
|