dsh-web-search-pro 0.2.1 → 0.2.3

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.
Files changed (258) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +154 -58
  3. package/assets/skills/dsh-web-search-pro/SKILL.md +13 -12
  4. package/assets/skills/dsh-web-search-pro/references/config.md +36 -0
  5. package/assets/skills/dsh-web-search-pro/references/sources.md +13 -7
  6. package/assets/skills/dsh-web-search-pro/references/troubleshooting.md +3 -1
  7. package/catalog/sources.v1.json +16 -14
  8. package/lib/actions/approval.js +50 -1
  9. package/lib/actions/approval.js.map +1 -1
  10. package/lib/actions/config.js +274 -0
  11. package/lib/actions/config.js.map +1 -0
  12. package/lib/actions/errors.js +8 -1
  13. package/lib/actions/errors.js.map +1 -1
  14. package/lib/actions/format.js +10 -0
  15. package/lib/actions/format.js.map +1 -1
  16. package/lib/actions/index-view.js +2 -2
  17. package/lib/actions/index-view.js.map +1 -1
  18. package/lib/actions/read.js +7 -3
  19. package/lib/actions/read.js.map +1 -1
  20. package/lib/actions/registry.js +3 -1
  21. package/lib/actions/registry.js.map +1 -1
  22. package/lib/actions/run.js +2 -2
  23. package/lib/actions/run.js.map +1 -1
  24. package/lib/actions/schema.js +18 -0
  25. package/lib/actions/schema.js.map +1 -1
  26. package/lib/actions/search.js +7 -2
  27. package/lib/actions/search.js.map +1 -1
  28. package/lib/actions/sources.js +76 -18
  29. package/lib/actions/sources.js.map +1 -1
  30. package/lib/actions/types.js +19 -1
  31. package/lib/actions/types.js.map +1 -1
  32. package/lib/browser-access.js +25 -0
  33. package/lib/browser-access.js.map +1 -1
  34. package/lib/catalog/recommend.js +11 -3
  35. package/lib/catalog/recommend.js.map +1 -1
  36. package/lib/catalog/schema.js +3 -1
  37. package/lib/catalog/schema.js.map +1 -1
  38. package/lib/cli/builtin-specs.js +57 -22
  39. package/lib/cli/builtin-specs.js.map +1 -1
  40. package/lib/cli/chain.js +13 -12
  41. package/lib/cli/chain.js.map +1 -1
  42. package/lib/cli/chains-spec.js +31 -11
  43. package/lib/cli/chains-spec.js.map +1 -1
  44. package/lib/cli/engine.js +19 -3
  45. package/lib/cli/engine.js.map +1 -1
  46. package/lib/cli/opencli-sites.js +83 -0
  47. package/lib/cli/opencli-sites.js.map +1 -0
  48. package/lib/cli/opencli.js +65 -17
  49. package/lib/cli/opencli.js.map +1 -1
  50. package/lib/cli/probe.js +1 -1
  51. package/lib/cli/probe.js.map +1 -1
  52. package/lib/cli/runner.js +217 -27
  53. package/lib/cli/runner.js.map +1 -1
  54. package/lib/cli/spec.js +100 -20
  55. package/lib/cli/spec.js.map +1 -1
  56. package/lib/cli/time-text.js +79 -0
  57. package/lib/cli/time-text.js.map +1 -0
  58. package/lib/cli/trial.js +57 -0
  59. package/lib/cli/trial.js.map +1 -0
  60. package/lib/client/SettingsCard.js +14 -32
  61. package/lib/client/SettingsCard.js.map +1 -1
  62. package/lib/client/agent-mark.js +27 -0
  63. package/lib/client/agent-mark.js.map +1 -0
  64. package/lib/client/card-frame.js +118 -0
  65. package/lib/client/card-frame.js.map +1 -0
  66. package/lib/client/cli-form.js +257 -0
  67. package/lib/client/cli-form.js.map +1 -0
  68. package/lib/client/field-docs.js +130 -0
  69. package/lib/client/field-docs.js.map +1 -0
  70. package/lib/client/field-keys.js +81 -0
  71. package/lib/client/field-keys.js.map +1 -0
  72. package/lib/client/field-rows.js +71 -0
  73. package/lib/client/field-rows.js.map +1 -0
  74. package/lib/client/fill.js +3 -0
  75. package/lib/client/fill.js.map +1 -0
  76. package/lib/client/form-specs.js +13 -1
  77. package/lib/client/form-specs.js.map +1 -1
  78. package/lib/client/form.js +282 -24
  79. package/lib/client/form.js.map +1 -1
  80. package/lib/client/group-advanced.js +23 -0
  81. package/lib/client/group-advanced.js.map +1 -0
  82. package/lib/client/group-agent.js +28 -0
  83. package/lib/client/group-agent.js.map +1 -0
  84. package/lib/client/group-cli.js +136 -0
  85. package/lib/client/group-cli.js.map +1 -0
  86. package/lib/client/group-common.js +29 -0
  87. package/lib/client/group-common.js.map +1 -0
  88. package/lib/client/group-judge.js +67 -0
  89. package/lib/client/group-judge.js.map +1 -0
  90. package/lib/client/group-order.js +201 -0
  91. package/lib/client/group-order.js.map +1 -0
  92. package/lib/client/group-runtime.js +33 -0
  93. package/lib/client/group-runtime.js.map +1 -0
  94. package/lib/client/group-sources.js +83 -0
  95. package/lib/client/group-sources.js.map +1 -0
  96. package/lib/client/groups-basic.js +36 -0
  97. package/lib/client/groups-basic.js.map +1 -0
  98. package/lib/client/index.js.map +1 -1
  99. package/lib/client/json-list.js +50 -0
  100. package/lib/client/json-list.js.map +1 -0
  101. package/lib/client/locales.js +666 -219
  102. package/lib/client/locales.js.map +1 -1
  103. package/lib/client/order.js +192 -0
  104. package/lib/client/order.js.map +1 -0
  105. package/lib/client/overlay-ops.js +46 -0
  106. package/lib/client/overlay-ops.js.map +1 -0
  107. package/lib/client/sources-table.js +1 -0
  108. package/lib/client/sources-table.js.map +1 -1
  109. package/lib/client/styles.js +74 -47
  110. package/lib/client/styles.js.map +1 -1
  111. package/lib/client/text-view.js +98 -0
  112. package/lib/client/text-view.js.map +1 -0
  113. package/lib/client/ui-kit.js +120 -0
  114. package/lib/client/ui-kit.js.map +1 -0
  115. package/lib/client/validators.js +8 -1
  116. package/lib/client/validators.js.map +1 -1
  117. package/lib/client.js +7313 -1571
  118. package/lib/client.js.map +1 -1
  119. package/lib/config-fillers.js +53 -0
  120. package/lib/config-fillers.js.map +1 -0
  121. package/lib/config-groups.js +49 -0
  122. package/lib/config-groups.js.map +1 -0
  123. package/lib/config.js +84 -108
  124. package/lib/config.js.map +1 -1
  125. package/lib/default-chain.js +66 -0
  126. package/lib/default-chain.js.map +1 -0
  127. package/lib/deps.js +1 -1
  128. package/lib/deps.js.map +1 -1
  129. package/lib/engines.js +3 -3
  130. package/lib/engines.js.map +1 -1
  131. package/lib/fetch.js +23 -4
  132. package/lib/fetch.js.map +1 -1
  133. package/lib/index.js +30 -5
  134. package/lib/index.js.map +1 -1
  135. package/lib/overlay-types.js +88 -0
  136. package/lib/overlay-types.js.map +1 -0
  137. package/lib/overlay.js +683 -0
  138. package/lib/overlay.js.map +1 -0
  139. package/lib/pipeline/candidates.js +27 -1
  140. package/lib/pipeline/candidates.js.map +1 -1
  141. package/lib/pipeline/compile.js +63 -0
  142. package/lib/pipeline/compile.js.map +1 -1
  143. package/lib/pipeline/confidence.js +64 -0
  144. package/lib/pipeline/confidence.js.map +1 -0
  145. package/lib/pipeline/fusion.js +50 -3
  146. package/lib/pipeline/fusion.js.map +1 -1
  147. package/lib/pipeline/plan.js +2 -2
  148. package/lib/pipeline/plan.js.map +1 -1
  149. package/lib/pipeline/render.js +20 -2
  150. package/lib/pipeline/render.js.map +1 -1
  151. package/lib/pipeline/run.js +17 -5
  152. package/lib/pipeline/run.js.map +1 -1
  153. package/lib/pipeline/sources-spec.js +19 -3
  154. package/lib/pipeline/sources-spec.js.map +1 -1
  155. package/lib/providers/builtin.js +3 -0
  156. package/lib/providers/builtin.js.map +1 -1
  157. package/lib/providers/deepseek.js +348 -0
  158. package/lib/providers/deepseek.js.map +1 -0
  159. package/lib/providers/http.js.map +1 -1
  160. package/lib/providers/keyed-meta.js +7 -0
  161. package/lib/providers/keyed-meta.js.map +1 -1
  162. package/lib/providers/platforms.js +18 -17
  163. package/lib/providers/platforms.js.map +1 -1
  164. package/lib/providers/registry.js.map +1 -1
  165. package/lib/restart.js +47 -0
  166. package/lib/restart.js.map +1 -0
  167. package/lib/router.js +145 -26
  168. package/lib/router.js.map +1 -1
  169. package/lib/rpc-types.js +15 -0
  170. package/lib/rpc-types.js.map +1 -0
  171. package/lib/rpc.js +85 -0
  172. package/lib/rpc.js.map +1 -0
  173. package/lib/tools.js +10 -4
  174. package/lib/tools.js.map +1 -1
  175. package/lib/types/actions/approval.d.ts +11 -0
  176. package/lib/types/actions/config.d.ts +54 -0
  177. package/lib/types/actions/format.d.ts +9 -2
  178. package/lib/types/actions/run.d.ts +1 -0
  179. package/lib/types/actions/schema.d.ts +7 -1
  180. package/lib/types/actions/sources.d.ts +29 -3
  181. package/lib/types/actions/types.d.ts +28 -2
  182. package/lib/types/browser-access.d.ts +17 -0
  183. package/lib/types/catalog/recommend.d.ts +4 -0
  184. package/lib/types/catalog/schema.d.ts +2 -0
  185. package/lib/types/cli/builtin-specs.d.ts +11 -3
  186. package/lib/types/cli/chains-spec.d.ts +12 -3
  187. package/lib/types/cli/engine.d.ts +10 -3
  188. package/lib/types/cli/opencli-sites.d.ts +24 -0
  189. package/lib/types/cli/opencli.d.ts +42 -3
  190. package/lib/types/cli/runner.d.ts +47 -8
  191. package/lib/types/cli/spec.d.ts +101 -8
  192. package/lib/types/cli/time-text.d.ts +12 -0
  193. package/lib/types/cli/trial.d.ts +19 -0
  194. package/lib/types/client/SettingsCard.d.ts +17 -1
  195. package/lib/types/client/agent-mark.d.ts +22 -0
  196. package/lib/types/client/card-frame.d.ts +35 -0
  197. package/lib/types/client/cli-form.d.ts +97 -0
  198. package/lib/types/client/field-docs.d.ts +15 -0
  199. package/lib/types/client/field-keys.d.ts +41 -0
  200. package/lib/types/client/field-rows.d.ts +70 -0
  201. package/lib/types/client/fill.d.ts +2 -0
  202. package/lib/types/client/form-specs.d.ts +12 -3
  203. package/lib/types/client/form.d.ts +79 -1
  204. package/lib/types/client/group-advanced.d.ts +9 -0
  205. package/lib/types/client/group-agent.d.ts +20 -0
  206. package/lib/types/client/group-cli.d.ts +52 -0
  207. package/lib/types/client/group-common.d.ts +12 -0
  208. package/lib/types/client/group-judge.d.ts +17 -0
  209. package/lib/types/client/group-order.d.ts +26 -0
  210. package/lib/types/client/group-runtime.d.ts +15 -0
  211. package/lib/types/client/group-sources.d.ts +46 -0
  212. package/lib/types/client/groups-basic.d.ts +18 -0
  213. package/lib/types/client/index.d.ts +8 -0
  214. package/lib/types/client/json-list.d.ts +21 -0
  215. package/lib/types/client/locales.d.ts +1079 -200
  216. package/lib/types/client/order.d.ts +102 -0
  217. package/lib/types/client/overlay-ops.d.ts +37 -0
  218. package/lib/types/client/styles.d.ts +56 -41
  219. package/lib/types/client/text-view.d.ts +22 -0
  220. package/lib/types/client/ui-kit.d.ts +200 -0
  221. package/lib/types/config-fillers.d.ts +9 -0
  222. package/lib/types/config-groups.d.ts +23 -0
  223. package/lib/types/config.d.ts +263 -225
  224. package/lib/types/default-chain.d.ts +63 -0
  225. package/lib/types/engines.d.ts +29 -1
  226. package/lib/types/fetch.d.ts +12 -3
  227. package/lib/types/index.d.ts +164 -150
  228. package/lib/types/overlay-types.d.ts +98 -0
  229. package/lib/types/overlay.d.ts +141 -0
  230. package/lib/types/pipeline/candidates.d.ts +17 -0
  231. package/lib/types/pipeline/compile.d.ts +11 -0
  232. package/lib/types/pipeline/confidence.d.ts +35 -0
  233. package/lib/types/pipeline/fusion.d.ts +23 -1
  234. package/lib/types/pipeline/render.d.ts +16 -0
  235. package/lib/types/pipeline/run.d.ts +2 -1
  236. package/lib/types/pipeline/sources-spec.d.ts +5 -2
  237. package/lib/types/pipeline/types.d.ts +37 -0
  238. package/lib/types/providers/deepseek.d.ts +130 -0
  239. package/lib/types/providers/http.d.ts +2 -1
  240. package/lib/types/providers/keyed-meta.d.ts +5 -0
  241. package/lib/types/providers/registry.d.ts +7 -0
  242. package/lib/types/restart.d.ts +52 -0
  243. package/lib/types/router.d.ts +57 -10
  244. package/lib/types/rpc-types.d.ts +79 -0
  245. package/lib/types/rpc.d.ts +41 -0
  246. package/lib/types/tools.d.ts +6 -0
  247. package/lib/types/util.d.ts +10 -0
  248. package/lib/util.js +10 -1
  249. package/lib/util.js.map +1 -1
  250. package/package.json +50 -42
  251. package/scripts/check-client-bundle.mjs +1 -1
  252. package/scripts/cli-login-check.mjs +214 -0
  253. package/lib/client/RubricEditor.js +0 -47
  254. package/lib/client/RubricEditor.js.map +0 -1
  255. package/lib/client/fields.js +0 -31
  256. package/lib/client/fields.js.map +0 -1
  257. package/lib/types/client/RubricEditor.d.ts +0 -6
  258. package/lib/types/client/fields.d.ts +0 -65
@@ -0,0 +1,130 @@
1
+ /**
2
+ * DeepSeek Search and Fetch API (https://api-docs.deepseek.com/guides/search/, online since 2026-10-17): the "常用" (common) source of
3
+ * this plugin. Contract: `POST {base}/search` and `POST {base}/fetch`, `Authorization: Bearer <DeepSeek API key>`, JSON; the base is
4
+ * `https://api.deepseek.com/v1/tools`.
5
+ *
6
+ * - Search request: `query` (1-128 characters, with the operators `site:` `-site:` `-term` `"phrase"` `lang:` `after:` `before:`),
7
+ * `count` (1-50, default 10), `ori_question` (optional, the caller's original question, at most 128), `localization` (not sent),
8
+ * `need_content` (default false: `content` stays empty, we never ask for it). Response: `results[]` of `rerank_score` (0-3),
9
+ * `title`, `url`, `snippet` (about 100-200 characters, for display), `summary` (about 600-800 characters, written for a model),
10
+ * `content`, `site_name`, `site_icon`, `date` (RFC 3339 or null), `authority` (0-4, -1 unknown). An empty array is "no results".
11
+ * - Fetch request `url` (at most 8192 characters, http/https, no credentials); response `title` and `content` (Markdown).
12
+ * - Errors are OpenAI-shaped `{ error: { message, type, param, code } }`: 400, 401, 402 (balance), 403 (Fetch refused by the security
13
+ * policy), 404 (Fetch could not get usable content), 408, 413, 429, 500, 504. Both APIs are read-only: 408 / 429 / 5xx are retried
14
+ * after a wait, every other 4xx is not.
15
+ * - Billing: $0.75 per 1,000 SUCCESSFUL requests, for each endpoint. Only a 200 that yields a result is billed (empty results, failures
16
+ * and timeouts are not), and `count` does not change the price. Calls made through DeepSeek Harness / Claude Code / Codex server-side
17
+ * tools are free until 2026-11-01 00:00 Beijing time; the docs do not say whether a plugin calling the API directly is inside that
18
+ * window, so this plugin treats every call as billed. Limits per account: Search 100 QPS, Fetch 25 QPS plus a per-domain limit.
19
+ *
20
+ * Field mapping: `summary` (else `snippet`) -> `snippet` (the long excerpt the evidence pipeline gates and scores on), `date` ->
21
+ * `publishedAt`, `rerank_score` -> `rerankScore`, `authority` -> `authority` (source metadata; one small fusion signal, fusion.ts).
22
+ * The host's own `deepseek-search-api` provider maps only snippet and date.
23
+ * @module web-search-pro/providers/deepseek
24
+ */
25
+ import { EngineError, type Engine, type EngineDeps, type EngineSource } from '../engines.ts';
26
+ import { type ProviderResponse } from './http.ts';
27
+ import type { ProviderAdapter, ProviderDescriptor } from './registry.ts';
28
+ export declare const DEEPSEEK_ROUTE_ID = "deepseek";
29
+ export declare const DEEPSEEK_LABEL = "DeepSeek Search";
30
+ export declare const DEEPSEEK_DEFAULT_BASE = "https://api.deepseek.com/v1/tools";
31
+ export declare const DEEPSEEK_SEARCH_PATH = "/search";
32
+ export declare const DEEPSEEK_FETCH_PATH = "/fetch";
33
+ export declare const DEEPSEEK_KEY_ENV = "DEEPSEEK_API_KEY";
34
+ /** Longest `query` / `ori_question` the API takes, in characters. */
35
+ export declare const DEEPSEEK_QUERY_CHARS = 128;
36
+ export declare const DEEPSEEK_MAX_COUNT = 50;
37
+ export declare const DEEPSEEK_DEFAULT_COUNT = 10;
38
+ /** The long excerpt kept per result (the API's `summary` is about 600-800 characters). */
39
+ export declare const DEEPSEEK_SNIPPET_CHARS = 1000;
40
+ /** Longest URL the Fetch API takes. */
41
+ export declare const DEEPSEEK_FETCH_URL_CHARS = 8192;
42
+ /** Usage-ledger provider names: requests counted, tokens n/a, price unknown to the plugin. */
43
+ export declare const DEEPSEEK_USAGE_SEARCH = "deepseek-search";
44
+ export declare const DEEPSEEK_USAGE_FETCH = "deepseek-fetch";
45
+ /** One try plus at most two retries of a 408 / 429 / 5xx answer. */
46
+ export declare const DEEPSEEK_MAX_ATTEMPTS = 3;
47
+ export declare const DEEPSEEK_RETRY_BASE_MS = 800;
48
+ /** A wait longer than this (a `Retry-After` of a minute) is not slept through: the failure carries it as the cooldown instead. */
49
+ export declare const DEEPSEEK_RETRY_WAIT_CAP_MS = 8000;
50
+ export interface FittedQuery {
51
+ query: string;
52
+ cut: boolean;
53
+ from: number;
54
+ }
55
+ /**
56
+ * The query as the API takes it: whitespace collapsed, at most 128 characters. A longer query keeps every operator token (a
57
+ * `site:` restriction or an exclusion is what the caller asked for) and `OR` between site operators, and loses the tail of the free
58
+ * text, at a word boundary when it has words and by character when it does not (Chinese). The caller says so in the result notes.
59
+ */
60
+ export declare function fitQuery(raw: string): FittedQuery;
61
+ /** `ori_question`: whitespace collapsed and cut to 128 characters; undefined when nothing remains or it adds nothing to the query. */
62
+ export declare function originalQuestion(raw: string | undefined, query: string): string | undefined;
63
+ export interface DeepSeekSearchBody {
64
+ query: string;
65
+ count: number;
66
+ need_content: false;
67
+ ori_question?: string;
68
+ }
69
+ export declare function deepseekSearchBody(query: string, count: number, question?: string): DeepSeekSearchBody;
70
+ /** Map `results[]`: summary (else snippet) as the excerpt, date -> publishedAt, rerank_score / authority as metadata. Rows without an http(s) URL are dropped. */
71
+ export declare function mapDeepSeekResults(results: readonly unknown[], count: number): EngineSource[];
72
+ /** Parse a 2xx Search body; an empty `results` array is ENGINE_EMPTY (the service works, nothing matched, and nothing was billed). */
73
+ export declare function parseDeepSeekSearch(json: unknown, count: number): EngineSource[];
74
+ /** Statuses the docs say to wait and retry: 408, 429 and 5xx. */
75
+ export declare const isRetryableStatus: (status: number) => boolean;
76
+ /**
77
+ * The error message of an OpenAI-shaped body, safe to show: the key (should it ever be echoed) and credential-looking values are
78
+ * redacted and the length is capped. The service's `request_id` (what DeepSeek support asks for) is returned apart, so a message can
79
+ * end with it instead of burying the cause.
80
+ */
81
+ export declare function errorParts(json: unknown, key: string | undefined): {
82
+ text: string;
83
+ id?: string;
84
+ };
85
+ /** {@link errorParts} as one string: `message (request_id …)`. */
86
+ export declare function detailOf(json: unknown, key: string | undefined): string;
87
+ /**
88
+ * Status -> error contract for Search. 401 / 403 are `ENGINE_AUTH`; 402 is `ENGINE_QUOTA` with the balance wording (never retried,
89
+ * no cooldown: waiting does not refill a balance); 429 is `ENGINE_RATE_LIMIT` carrying `Retry-After`; 408 is a retryable
90
+ * `ENGINE_TIMEOUT`; 400 / 404 / 413 are bad requests (not retryable); 5xx is a retryable `ENGINE_ERROR`. Never contains the key.
91
+ */
92
+ export declare function deepseekFailure(label: string, status: number, headers: Headers, json: unknown, key?: string): EngineError;
93
+ /** Abort-aware wait. */
94
+ export declare function defaultSleep(ms: number, signal?: AbortSignal): Promise<void>;
95
+ type Transport = Pick<EngineDeps, 'allowProxyFakeIp' | 'fetchImpl' | 'lookup' | 'sleep'>;
96
+ /** Wait before retry number `attempt` (1-based): the service's `Retry-After` when it gave one, else 0.8 s, 1.6 s. Undefined = not worth waiting (stop). */
97
+ export declare function retryWaitMs(res: Pick<ProviderResponse, 'headers'>, attempt: number): number | undefined;
98
+ /**
99
+ * One POST with the documented retry policy: a 408 / 429 / 5xx answer is retried after a wait (at most {@link DEEPSEEK_MAX_ATTEMPTS}
100
+ * tries in all, never longer than {@link DEEPSEEK_RETRY_WAIT_CAP_MS} per wait); every other answer is returned at once. Retries are
101
+ * safe: both APIs are read-only and failed requests are not billed. Returns the final response (which may still be an error).
102
+ */
103
+ export declare function postWithRetry(label: string, url: string, key: string, body: unknown, transport: Transport, signal: AbortSignal | undefined): Promise<ProviderResponse>;
104
+ export declare function deepseekEngine(deps: EngineDeps): Engine;
105
+ /** A Fetch API failure. `code` names what DeepSeek did; none of them describes the TARGET page's own HTTP status. */
106
+ export declare class DeepSeekFetchError extends Error {
107
+ readonly code: 'DEEPSEEK_FETCH_DENIED' | 'DEEPSEEK_FETCH_NO_CONTENT' | 'DEEPSEEK_FETCH_AUTH' | 'DEEPSEEK_FETCH_QUOTA' | 'DEEPSEEK_FETCH_RATE_LIMIT' | 'DEEPSEEK_FETCH_ERROR';
108
+ readonly retryable: boolean;
109
+ constructor(message: string, code: 'DEEPSEEK_FETCH_DENIED' | 'DEEPSEEK_FETCH_NO_CONTENT' | 'DEEPSEEK_FETCH_AUTH' | 'DEEPSEEK_FETCH_QUOTA' | 'DEEPSEEK_FETCH_RATE_LIMIT' | 'DEEPSEEK_FETCH_ERROR', retryable?: boolean);
110
+ }
111
+ /**
112
+ * Status -> error for Fetch. 403 and 404 are DeepSeek's own verdicts (security policy; no usable content), and the message opens by
113
+ * saying so: it is not the target page's HTTP status. The request id comes last.
114
+ */
115
+ export declare function deepseekFetchFailure(status: number, headers: Headers, json: unknown, key?: string): DeepSeekFetchError;
116
+ export interface DeepSeekFetchAccess extends Transport {
117
+ apiKey: string;
118
+ /** Endpoint base, default {@link DEEPSEEK_DEFAULT_BASE}. */
119
+ baseUrl?: string;
120
+ usage?: EngineDeps['usage'];
121
+ }
122
+ export interface DeepSeekPage {
123
+ title?: string;
124
+ text: string;
125
+ }
126
+ /** Read one page as Markdown through the Fetch API. Throws {@link DeepSeekFetchError} (or an EngineError for transport problems). */
127
+ export declare function deepseekFetchPage(url: string, access: DeepSeekFetchAccess, signal?: AbortSignal): Promise<DeepSeekPage>;
128
+ export declare const DEEPSEEK_DESCRIPTOR: ProviderDescriptor;
129
+ export declare const deepseekAdapter: ProviderAdapter;
130
+ export {};
@@ -27,7 +27,8 @@ export interface ProviderResponse {
27
27
  text: string;
28
28
  }
29
29
  export interface ProviderRequest {
30
- deps: EngineDeps;
30
+ /** Only the transport settings are read (SSRF-safe HTTP path and the test seams). */
31
+ deps: Pick<EngineDeps, 'allowProxyFakeIp' | 'fetchImpl' | 'lookup'>;
31
32
  signal?: AbortSignal | undefined;
32
33
  headers?: Record<string, string>;
33
34
  method?: 'GET' | 'POST';
@@ -6,3 +6,8 @@
6
6
  /** Default environment variable names of each keyed source's API key, first one preferred (route id -> names). */
7
7
  export declare const KEYED_SOURCE_ENVS: Readonly<Record<string, readonly string[]>>;
8
8
  export declare const KEYED_SOURCE_IDS: readonly string[];
9
+ /**
10
+ * The "常用" (common) sources: a test pins this list to the registry descriptors that set `common: true`. Data only, for the
11
+ * settings panel (client bundle), which cannot import the descriptors.
12
+ */
13
+ export declare const COMMON_SOURCE_IDS: readonly string[];
@@ -85,6 +85,13 @@ export interface ProviderDescriptor {
85
85
  costTier?: CostTier;
86
86
  /** Order among providers promoted for a language (lower first, default 100). */
87
87
  priority?: number;
88
+ /**
89
+ * "常用" (common): the source this plugin recommends first. Once its key resolves it leads the default order in every language
90
+ * (ahead of the other promoted sources and of the configured `engines`), and `sources.status`, `search.recommend` and the settings
91
+ * panel mark it. It never overrides what the user said: an explicit `engines` list, then `sources.priority` / `sources.disabled`,
92
+ * then `evidence.sourcePolicy: anonymous-only` all come first. Without a key it is not planned.
93
+ */
94
+ common?: boolean;
88
95
  /** Default `web`. A `platform` provider is never added to a plan on its own, only by an explicit source choice or a hard `site` constraint naming one of its `domains`. */
89
96
  kind?: ProviderKind;
90
97
  /** Site domains a `platform` provider covers (`zhihu.com`): a hard `site` constraint on one of them selects it. */
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The settings that are read once, when the plugin starts. Almost every field of `Config` is live (the Host updates the entry's
3
+ * configuration in place and every call reads it through `dynamic()`), but these few are applied while the plugin is mounted:
4
+ * a database opened, a tool registered, a cache sized, a deadline fixed. The Host lets them be edited (they are volatile in
5
+ * the schema), so without a marker the edit looks like it was ignored until the next restart.
6
+ *
7
+ * One constant lists them; the settings card marks them, the save bar says so when a save touches one, and `sources.status` /
8
+ * `config.inspect` report "待重启" when the configured value differs from the one the running plugin started with. Pure and
9
+ * free of imports: the client bundle includes this file.
10
+ * @module web-search-pro/restart
11
+ */
12
+ export interface PendingRestart {
13
+ field: string;
14
+ /** The value in force: what the plugin started with. */
15
+ running: string;
16
+ /** The value the configuration holds now. */
17
+ configured: string;
18
+ }
19
+ /** Why each field is read at start-up only (shown in the docs and the card's `?` text). */
20
+ export declare const RESTART_FIELDS: {
21
+ readonly toolSurface: "the tools (web_index + web_call, or one tool per action) are registered at start-up";
22
+ readonly 'playwright.snapshotDir': "the snapshot folder of read.snapshot is resolved at start-up";
23
+ readonly providerId: "the id of the ctx.web provider is given to the Host at registration";
24
+ readonly registerProvider: "the ctx.web provider is registered at start-up";
25
+ readonly timeoutMs: "the per-action deadlines and the Host tool ceiling are fixed at start-up (the cooperative time budget of a search reads it live)";
26
+ readonly memoryCacheEntries: "the in-process LRU cache is sized at start-up";
27
+ readonly dbPath: "the SQLite store and the overlay file are opened at start-up";
28
+ readonly verbose: "the load marker is written at start-up";
29
+ };
30
+ export type RestartField = keyof typeof RESTART_FIELDS;
31
+ /** The field names, in the order of the configuration groups (config-groups.ts). */
32
+ export declare const RESTART_FIELD_LIST: RestartField[];
33
+ export declare const isRestartField: (field: string) => field is RestartField;
34
+ /** The slice of the resolved configuration the restart check reads. */
35
+ export interface RestartSource {
36
+ dbPath: string;
37
+ toolSurface: string;
38
+ registerProvider: boolean;
39
+ providerId: string;
40
+ verbose: boolean;
41
+ memoryCacheEntries: number;
42
+ timeoutMs: number;
43
+ playwright: {
44
+ snapshotDir?: string;
45
+ };
46
+ }
47
+ /** The values of the restart fields as short text, from a resolved configuration. */
48
+ export declare function restartValues(config: RestartSource): Record<RestartField, string>;
49
+ /** The restart fields whose configured value differs from the one the running plugin started with. */
50
+ export declare function pendingRestart(mounted: Readonly<Record<RestartField, string>>, current: Readonly<Record<RestartField, string>>): PendingRestart[];
51
+ /** `待重启:toolSurface(当前生效 indexed,配置为 flat)`, one line per field. */
52
+ export declare function pendingRestartLine(entry: PendingRestart): string;
@@ -7,7 +7,7 @@ import type { Context } from '@deepseek-ai/cordis';
7
7
  import type { WebSearchRequest, WebSearchResult } from '@deepseek-ai/dsh-web';
8
8
  import type { Store } from './store.ts';
9
9
  import type { ResolvedConfig } from './config.ts';
10
- import { type EngineSearchOptions } from './engines.ts';
10
+ import { type EngineSearchOptions, type UsageRecorder } from './engines.ts';
11
11
  import type { ChainEntryReport, ChainReport } from './cli/chain.ts';
12
12
  import { type CostTier, type ProviderDescriptor, type Readiness, type ProviderRegistry } from './providers/index.ts';
13
13
  import { type RequestBudgetState } from './pipeline/ledger.ts';
@@ -47,14 +47,19 @@ export interface PlatformRequest {
47
47
  authProfile?: string;
48
48
  rulePack?: string;
49
49
  }
50
+ /** A result row as the router returns it; `via`, `confidence` and `tag` appear for custom CLIs and for sources with a confidence below 1. */
51
+ export type RouterSource = {
52
+ url: string;
53
+ title?: string;
54
+ snippet?: string;
55
+ publishedAt?: string;
56
+ via?: string;
57
+ confidence?: number;
58
+ tag?: string;
59
+ };
50
60
  export interface RouterSearchResult {
51
61
  content?: string;
52
- sources: {
53
- url: string;
54
- title?: string;
55
- snippet?: string;
56
- publishedAt?: string;
57
- }[];
62
+ sources: RouterSource[];
58
63
  engine: string;
59
64
  enginesTried: string[];
60
65
  fromCache: boolean;
@@ -95,8 +100,14 @@ export interface ProviderReport {
95
100
  budget?: RequestBudgetState;
96
101
  /** Not verified against the live service (descriptor.verification). */
97
102
  unverified?: boolean;
103
+ /** "常用": the plugin's recommended source (descriptor.common). With a resolved key it leads the default order. */
104
+ common?: boolean;
105
+ /** Confidence (0..1) of what this source returns: 1 for a built-in source unless `sources.confidence` says otherwise; a custom CLI has its spec's. */
106
+ confidence: number;
98
107
  /** Platforms with an ordered backend chain: each backend, in order, with its readiness or the reason it is skipped. */
99
- chain?: ChainEntryReport[];
108
+ chain?: (ChainEntryReport & {
109
+ confidence: number;
110
+ })[];
100
111
  readiness: Readiness & {
101
112
  state?: ChainReport['state'];
102
113
  lastLocalCheck: string;
@@ -124,6 +135,8 @@ export declare class SearchRouter {
124
135
  /** User-defined CLI adapters (settings `cliAdapters`) this router registered as `custom-cli:<id>` platforms, with the diagnostics of the entries it ignored. */
125
136
  private readonly customCli;
126
137
  private cliAdapterDiagnostics;
138
+ /** Confidence of each registered custom CLI by route id (its spec's, default 0.5), rebuilt with the registrations. */
139
+ private customConfidence;
127
140
  /** Latest local probe per route id (read by providerStatuses for the credential dimension). */
128
141
  private readonly readiness;
129
142
  /** Last real call per route id: feeds the health dimension (never inferred from a local probe). */
@@ -152,10 +165,27 @@ export declare class SearchRouter {
152
165
  private bindingsOf;
153
166
  private probeEnv;
154
167
  /**
155
- * The configured `engines` list with the user's `sources.*` preferences applied: disabled sources removed, `priority` ones that are
156
- * already in the list moved to the front in their listed order. An explicit `engines` of a call never goes through this.
168
+ * The default engine order for a search that names no `engines`: the configured `engines` list with the user's `sources.*`
169
+ * preferences applied, then the default rule for "常用" (common) sources.
170
+ * 1. an explicit `engines` of a call never comes through here;
171
+ * 2. `sources.disabled` ids are removed, `sources.priority` ids that are in the list move to the front in their listed order;
172
+ * 3. a common source (DeepSeek Search) whose key resolves leads what is left, while `engines` is still the default list (a
173
+ * list the user wrote is theirs: it keeps its order, and a common source in it keeps the position given). `sources.disabled`
174
+ * and `evidence.sourcePolicy: anonymous-only` switch it off.
157
175
  */
158
176
  private preferred;
177
+ /** Route ids of the common ("常用") sources that are ready to run now (key resolved), best `priority` first. */
178
+ private commonReady;
179
+ /**
180
+ * Key and endpoint of the DeepSeek Fetch API for the fetch pipeline, or undefined when no key resolves (settings literal ->
181
+ * DSH credentials ref -> process environment, the same order as the search side). Resolved per call; the key is never cached.
182
+ */
183
+ deepseekAccess(): Promise<{
184
+ apiKey: string;
185
+ baseUrl?: string;
186
+ allowProxyFakeIp: boolean;
187
+ usage: UsageRecorder;
188
+ } | undefined>;
159
189
  /** Alias / full id -> route id; ids the registry does not know are kept as written (the backend then reports them unknown). */
160
190
  private canonicalIds;
161
191
  backendDiagnostics(cliAvailability?: ReadonlyMap<string, boolean>): Promise<BackendDiagnostic[]>;
@@ -176,6 +206,13 @@ export declare class SearchRouter {
176
206
  runProvider(call: ProviderCall, opts?: {
177
207
  skipSeam?: boolean;
178
208
  }): Promise<ProviderOutcome>;
209
+ /**
210
+ * The credential variables of the CLI adapters under the names the tools read, each resolved like the plugin's other secrets:
211
+ * settings literal -> DSH credentials ref (`twitterAuthTokenEnv`) -> process environment. Values only ever reach a command's environment.
212
+ */
213
+ cliEnv(): Promise<Record<string, string>>;
214
+ /** Sync twin of {@link cliEnv} for `available()` checks: settings literal and process environment only. */
215
+ private cliEnvSync;
179
216
  /** Resolve a key through credentials first, then process env. */
180
217
  private resolveKey;
181
218
  private deps;
@@ -194,6 +231,16 @@ export declare class SearchRouter {
194
231
  requestBudgetOf(route: string): RequestBudgetState | undefined;
195
232
  /** Problems of the `sources.*` settings (unknown ids, bad numbers), for `sources.status`. */
196
233
  sourceDiagnostics(): string[];
234
+ /** The confidence of one platform backend as a leg of a chain (`xhs`, `custom-cli:echo`): its own, without the provider's. */
235
+ backendConfidenceOf(id: string): number;
236
+ /** `sources.confidence` by canonical id (a provider's route id; a platform backend id as written), valid entries only. */
237
+ private confidenceOverrides;
238
+ /**
239
+ * The confidence (0..1) of what `route` returned, through `backend` when it is a platform chain: `sources.confidence` of the
240
+ * provider times that of the backend that answered, each defaulting to the custom CLI's own (spec `confidence`, 0.5) and to 1
241
+ * for every built-in source, so the built-in ones are 1 unless the user set something.
242
+ */
243
+ confidenceOf(route: string, backend?: string): number;
197
244
  /** Counts a metered, non-model request (Bocha search) in the usage ledger; best effort, never throws into the search. */
198
245
  private usageRecorder;
199
246
  /** Whether any configured engine is currently usable. */
@@ -0,0 +1,79 @@
1
+ /**
2
+ * The private RPC channel between the settings card and the running plugin: the shapes it carries. Free of runtime imports (the card
3
+ * bundle includes this file); the server half is src/rpc.ts. The calls:
4
+ * - `status`: what the plugin can tell about each source and backend right now (installed, ready, why not), from the same local probes
5
+ * as `sources.status`; never a search, never a login;
6
+ * - `trial`: runs ONE search of a custom CLI spec that is still a draft in the dialog, the way a real search would run it (probe, then the
7
+ * spec's command through the same runner and the same read-only guard), and reports what it parsed and what the tool said;
8
+ * - `overlay`: what the agent overlay holds (the settings an agent changed with `config.*`) and its newest audit entries;
9
+ * - `overlay.revoke`: drop overlay entries (one or several keys, or all), as the user: the card's "Revoke" and the second half of
10
+ * "Adopt" (the card writes the value into the profile first, then asks the plugin to drop the entry). Audited with actor `user`.
11
+ * @module web-search-pro/rpc-types
12
+ */
13
+ import type { OverlayView } from './overlay-types.ts';
14
+ import type { PendingRestart } from './restart.ts';
15
+ /** The channel prefix this plugin registers with the Host transport (Browser registers `/dsh-browser-assets` the same way). */
16
+ export declare const RPC_CHANNEL = "/dsh-web-search-pro";
17
+ /** `status`: readiness by source route id and by the backend legs of each platform chain (`<platform>/<backend>`). */
18
+ export interface StatusView {
19
+ sources: Record<string, {
20
+ available: boolean;
21
+ reason?: string;
22
+ confidence: number;
23
+ }>;
24
+ legs: Record<string, {
25
+ ready: boolean;
26
+ reason?: string;
27
+ confidence: number;
28
+ }>;
29
+ /** Settings the configuration holds that the running plugin only reads at start-up (the card shows "restart the plugin"). */
30
+ pendingRestart?: PendingRestart[];
31
+ /** The agent overlay in one line: how many keys it overrides and whether it is being ignored. */
32
+ overlay?: {
33
+ revision: number;
34
+ count: number;
35
+ valid: boolean;
36
+ problem?: string;
37
+ };
38
+ }
39
+ export type { OverlayView, PendingRestart };
40
+ /** `overlay.revoke`: the keys to drop (`OverlayItem.key`), or `'all'`; `adopted` says the value was first written into the configuration. */
41
+ export interface RevokeRequest {
42
+ keys: string[] | 'all';
43
+ adopted?: boolean;
44
+ }
45
+ export interface TrialRequest {
46
+ /** The key of the entry (`cliAdapters.<id>`). */
47
+ id: string;
48
+ /** The spec as the dialog has it now (validated by the server with the rule every spec goes through). */
49
+ spec: unknown;
50
+ /** The sample query; the dialog proposes one. */
51
+ query: string;
52
+ }
53
+ /** What a trial found: the first results (as the runner mapped them) and the tool's own words, or the stage it stopped at and why. */
54
+ export type TrialResult = {
55
+ ok: true;
56
+ stage: 'search';
57
+ probe: {
58
+ version?: string;
59
+ path?: string;
60
+ };
61
+ sources: {
62
+ url: string;
63
+ title?: string;
64
+ snippet?: string;
65
+ publishedAt?: string;
66
+ }[];
67
+ total: number;
68
+ raw: string;
69
+ elapsedMs: number;
70
+ } | {
71
+ ok: false;
72
+ stage: 'disabled' | 'validate' | 'probe' | 'search';
73
+ message: string;
74
+ errors?: string[];
75
+ code?: string;
76
+ hint?: string;
77
+ raw?: string;
78
+ elapsedMs?: number;
79
+ };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The server half of the private RPC channel of the settings card (see rpc-types.ts). It uses the Host's connection transport the
3
+ * way the dsh-browser plugin does for its panel (`connection.rpc.handle`, an authenticated absolute channel prefix); when the Host
4
+ * has no `connection` / `webServer` service nothing is registered and the card says that "Try it" and the live readiness are
5
+ * unavailable (everything else in the card works without them).
6
+ * @module web-search-pro/rpc
7
+ */
8
+ import type { Context } from '@deepseek-ai/cordis';
9
+ import type { ResolvedConfig } from './config.ts';
10
+ import type { SearchRouter } from './router.ts';
11
+ import type { OverlayStore } from './overlay.ts';
12
+ import type { PendingRestart } from './restart.ts';
13
+ import { type StatusView } from './rpc-types.ts';
14
+ type Handler = (endpoint: string, payload: unknown, context?: {
15
+ signal?: AbortSignal;
16
+ }) => Promise<{
17
+ ok: true;
18
+ value: unknown;
19
+ } | {
20
+ ok: false;
21
+ error: {
22
+ code: 'bad-request' | 'not-found';
23
+ message: string;
24
+ details: Record<string, unknown>;
25
+ };
26
+ }>;
27
+ export interface RpcServices {
28
+ router: Pick<SearchRouter, 'providerReport'>;
29
+ dynamic: () => ResolvedConfig;
30
+ /** The agent overlay (read and revoke endpoints); absent in tests of the older endpoints. */
31
+ overlay?: OverlayStore;
32
+ /** Settings changed in the configuration that only take effect at the next start. */
33
+ pendingRestart?: () => PendingRestart[];
34
+ }
35
+ /** Readiness for the card, from the report `sources.status` is made of (local probes; never a search). */
36
+ export declare function statusView(router: Pick<SearchRouter, 'providerReport'>, extras?: Pick<RpcServices, 'overlay' | 'pendingRestart'>): Promise<StatusView>;
37
+ /** The handler of the channel: `status` and `trial`. A failure is a value (`ok: false`), never a throw into the transport. */
38
+ export declare function createHandler(services: RpcServices): Handler;
39
+ /** Register the channel when the Host has the transport; the effect unregisters it with the plugin. */
40
+ export declare function registerRpc(ctx: Context, services: RpcServices): void;
41
+ export {};
@@ -22,6 +22,8 @@ import type { BrowserService } from './browser-service.ts';
22
22
  import type { ResolvedConfig, ToolSurface } from './config.ts';
23
23
  import { EvidenceService } from './pipeline/service.ts';
24
24
  import type { ProviderState } from './provider.ts';
25
+ import type { OverlayStore } from './overlay.ts';
26
+ import type { PendingRestart } from './restart.ts';
25
27
  export interface ToolDeps {
26
28
  ctx: Context;
27
29
  config: ResolvedConfig;
@@ -40,5 +42,9 @@ export interface ToolDeps {
40
42
  providerState?: () => ProviderState;
41
43
  /** Whether the `dsh-web-search-pro` skill is currently registered; read at call time. */
42
44
  skillAvailable?: () => boolean;
45
+ /** The agent overlay behind the `config.*` actions. */
46
+ overlay?: OverlayStore;
47
+ /** Settings changed in the configuration that only take effect at the next start. */
48
+ pendingRestart?: () => PendingRestart[];
43
49
  }
44
50
  export declare function registerTools(deps: ToolDeps): void;
@@ -111,10 +111,20 @@ export declare function shapeSources(sources: readonly {
111
111
  snippet?: string | null;
112
112
  publishedAt?: string | null;
113
113
  lowConfidence?: boolean;
114
+ rerankScore?: number | null;
115
+ authority?: number | null;
116
+ via?: string | null;
117
+ tag?: string | null;
118
+ confidence?: number | null;
114
119
  }[], count: number): {
115
120
  url: string;
116
121
  title?: string;
117
122
  snippet?: string;
118
123
  publishedAt?: string;
124
+ rerankScore?: number;
125
+ authority?: number;
119
126
  lowConfidence?: true;
127
+ via?: string;
128
+ confidence?: number;
129
+ tag?: string;
120
130
  }[];
package/lib/util.js CHANGED
@@ -11,6 +11,7 @@ import path from 'node:path';
11
11
  import crossSpawn from 'cross-spawn';
12
12
  import { load as yamlLoad } from 'js-yaml';
13
13
  import { parse as parseHtml } from 'node-html-parser';
14
+ import { WHOLE_OUTPUT_SCHEME } from "./cli/spec.js";
14
15
  import { assertResolvedPublicUrl, readBoundedBody, stripSensitiveHeadersForRedirect } from "./safe-http.js";
15
16
  /** js-yaml parser (npm dep). */
16
17
  export const jsYaml = { load: (input) => yamlLoad(input) };
@@ -285,9 +286,17 @@ export function shapeSources(sources, count) {
285
286
  return sources.slice(0, count).map(s => ({
286
287
  url: s.url,
287
288
  ...s.title ? { title: s.title } : {},
288
- ...s.snippet ? { snippet: capText(s.snippet, SNIPPET_MAX_CHARS) } : {},
289
+ // A whole-output result (`cli://`) was already cut by the runner, with a note saying so: the generic cap would only cut it again.
290
+ ...s.snippet ? { snippet: s.url.startsWith(WHOLE_OUTPUT_SCHEME) ? s.snippet : capText(s.snippet, SNIPPET_MAX_CHARS) } : {},
289
291
  ...s.publishedAt ? { publishedAt: s.publishedAt } : {},
292
+ // The provider's own quality grade (DeepSeek Search), as source metadata.
293
+ ...typeof s.rerankScore === 'number' && Number.isFinite(s.rerankScore) ? { rerankScore: Math.round(s.rerankScore * 100) / 100 } : {},
294
+ ...typeof s.authority === 'number' && Number.isFinite(s.authority) && s.authority >= 0 ? { authority: s.authority } : {},
290
295
  ...s.lowConfidence ? { lowConfidence: true } : {},
296
+ // Which user-defined CLI returned the row, how far the source is trusted (below 1 only) and the honest label.
297
+ ...s.via ? { via: s.via } : {},
298
+ ...typeof s.confidence === 'number' && Number.isFinite(s.confidence) && s.confidence < 1 ? { confidence: Math.round(Math.max(s.confidence, 0) * 10_000) / 10_000 } : {},
299
+ ...s.tag ? { tag: s.tag } : {},
291
300
  }));
292
301
  }
293
302
  //# sourceMappingURL=util.js.map
package/lib/util.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAA;AACpE,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,UAAU,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,gCAAgC,EAAgC,MAAM,gBAAgB,CAAA;AAEzI,gCAAgC;AAChC,MAAM,CAAC,MAAM,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